From 564c80fe42d6b19164065a18315f38485b5659b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 9 Jan 2016 01:09:31 +0000 Subject: [PATCH 001/437] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 17d0457feac717563c6ec34f06086d6a06db3f4d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 04:32:05 +0100 Subject: [PATCH 002/437] Initial import (#1295549). --- .gitignore | 1 + clean_ffmpeg.sh | 244 ++++++++++++ clean_qtwebengine.sh | 67 ++++ process_ffmpeg_gyp.py | 43 +++ qt5-qtwebengine.spec | 356 ++++++++++++++++++ ...-opensource-src-5.6.0-beta-linux-pri.patch | 24 ++ ...-opensource-src-5.6.0-beta-no-format.patch | 30 ++ sources | 1 + 8 files changed, 766 insertions(+) create mode 100755 clean_ffmpeg.sh create mode 100755 clean_qtwebengine.sh create mode 100755 process_ffmpeg_gyp.py create mode 100644 qt5-qtwebengine.spec create mode 100644 qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch create mode 100644 qtwebengine-opensource-src-5.6.0-beta-no-format.patch diff --git a/.gitignore b/.gitignore index e69de29..9438a84 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh new file mode 100755 index 0000000..9d784cf --- /dev/null +++ b/clean_ffmpeg.sh @@ -0,0 +1,244 @@ +#!/bin/bash +# Copyright 2013 Tomas Popela +# 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. + +where=`pwd` + +generated_files=`./process_ffmpeg_gyp.py $1` +generated_files_headers="${generated_files//.c/.h}" +generated_files_headers="${generated_files_headers//.S/.h}" +generated_files_headers="${generated_files_headers//.asm/.h}" + +cd $1 + +header_files=" libavutil/x86/asm.h \ + libavutil/x86/bswap.h \ + libavutil/x86/cpu.h \ + libavutil/x86/emms.h \ + libavutil/x86/intmath.h \ + libavutil/x86/intreadwrite.h \ + libavutil/x86/timer.h \ + libavutil/atomic_gcc.h \ + libavutil/attributes.h \ + libavutil/audio_fifo.h \ + libavutil/avassert.h \ + libavutil/avutil.h \ + libavutil/bswap.h \ + libavutil/buffer_internal.h \ + libavutil/common.h \ + libavutil/colorspace.h \ + libavutil/cpu_internal.h \ + libavutil/cpu.h \ + libavutil/dynarray.h \ + libavutil/internal.h \ + libavutil/intfloat.h \ + libavutil/intreadwrite.h \ + libavutil/libm.h \ + libavutil/lls.h \ + libavutil/lzo.h \ + libavutil/macros.h \ + libavutil/old_pix_fmts.h \ + libavutil/pixfmt.h \ + libavutil/replaygain.h \ + libavutil/softfloat_tables.h \ + libavutil/thread.h \ + libavutil/timer.h \ + libavutil/timestamp.h \ + libavutil/time_internal.h \ + libavutil/version.h \ + libavutil/x86_cpu.h + libavcodec/x86/constants.h \ + libavcodec/x86/dsputil_x86.h \ + libavcodec/x86/fft.h \ + libavcodec/x86/fpel.h \ + libavcodec/x86/hpeldsp.h \ + libavcodec/x86/inline_asm.h \ + libavcodec/x86/mathops.h \ + libavcodec/x86/vp56_arith.h \ + libavcodec/avcodec.h \ + libavcodec/blockdsp.h \ + libavcodec/bytestream.h \ + libavcodec/dct.h \ + libavcodec/dsputil.h \ + libavcodec/dv_profile_internal.h \ + libavcodec/error_resilience.h \ + libavcodec/fdctdsp.h \ + libavcodec/flac.h \ + libavcodec/fft.h \ + libavcodec/fft-internal.h \ + libavcodec/fft_table.h \ + libavcodec/frame_thread_encoder.h \ + libavcodec/get_bits.h \ + libavcodec/h263dsp.h \ + libavcodec/h264chroma.h \ + libavcodec/h264pred.h \ + libavcodec/hpeldsp.h \ + libavcodec/idctdsp.h \ + libavcodec/internal.h \ + libavcodec/mathops.h \ + libavcodec/me_cmp.h \ + libavcodec/motion_est.h \ + libavcodec/mpegpicture.h \ + libavcodec/mpegutils.h \ + libavcodec/mpegvideo.h \ + libavcodec/mpegvideodsp.h \ + libavcodec/mpegvideoencdsp.h \ + libavcodec/old_codec_ids.h \ + libavcodec/options_table.h \ + libavcodec/pcm_tablegen.h \ + libavcodec/pel_template.c \ + libavcodec/pixblockdsp.h \ + libavcodec/pixels.h \ + libavcodec/pthread_internal.h \ + libavcodec/put_bits.h \ + libavcodec/qpeldsp.h \ + libavcodec/ratecontrol.h \ + libavcodec/rectangle.h \ + libavcodec/rl.h \ + libavcodec/rnd_avg.h \ + libavcodec/thread.h \ + libavcodec/tpel_template.c \ + libavcodec/version.h \ + libavcodec/videodsp.h \ + libavcodec/vorbis_parser_internal.h \ + libavcodec/vp3data.h \ + libavcodec/vp3dsp.h \ + libavcodec/vp56.h \ + libavcodec/vp56dsp.h \ + libavcodec/vp8data.h \ + libavcodec/vp8.h \ + libavcodec/vp8dsp.h \ + libavformat/audiointerleave.h \ + libavformat/avio_internal.h \ + libavformat/avformat.h \ + libavformat/dv.h \ + libavformat/internal.h \ + libavformat/pcm.h \ + libavformat/rdt.h \ + libavformat/rtp.h \ + libavformat/rtpdec.h \ + libavformat/spdif.h \ + libavformat/srtp.h \ + libavformat/options_table.h \ + libavformat/version.h \ + libavformat/w64.h \ + libswresample/swresample.h \ + libswresample/version.h \ + compat/va_copy.h " + +manual_files=" libavutil/x86/x86inc.asm \ + libavutil/x86/x86util.asm \ + libavcodec/x86/hpeldsp_rnd_template.c \ + libavcodec/x86/rnd_template.c \ + libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c \ + libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c \ + libavcodec/x86/constants.c \ + libavcodec/x86/fft_init.c \ + libavcodec/x86/h264_intrapred_init.c \ + libavcodec/x86/hpeldsp_init.c \ + libavcodec/x86/vp3dsp_init.c \ + libavcodec/x86/vp8dsp_init.c \ + libavutil/x86/autorename_libavutil_x86_cpu.c \ + libavutil/x86/autorename_libavutil_x86_float_dsp_init.c \ + libavutil/x86/lls_init.c \ + libavcodec/x86/deinterlace.asm \ + libavcodec/x86/fft.asm \ + libavcodec/x86/fpel.asm \ + libavcodec/x86/h264_intrapred.asm \ + libavcodec/x86/h264_intrapred_10bit.asm \ + libavcodec/x86/hpeldsp.asm \ + libavcodec/x86/videodsp.asm \ + libavcodec/x86/vorbisdsp.asm \ + libavcodec/x86/vp3dsp.asm \ + libavcodec/x86/vp8dsp.asm \ + libavcodec/x86/vp8dsp_loopfilter.asm \ + libavutil/x86/cpuid.asm \ + libavutil/x86/float_dsp.asm \ + libavutil/x86/lls.asm \ + libavcodec/bit_depth_template.c \ + libavcodec/fft_template.c \ + libavcodec/h264pred_template.c \ + libavcodec/hpel_template.c \ + libavcodec/hpeldsp_template.c \ + libavcodec/mdct_template.c \ + libavcodec/videodsp_template.c \ + libavcodec/h264pred.c \ + libavcodec/hpeldsp.c \ + libavcodec/videodsp.c \ + libavcodec/vp3.c \ + libavcodec/vp3_parser.c \ + libavcodec/vp3dsp.c \ + libavcodec/vp56rac.c \ + libavcodec/vp8.c \ + libavcodec/vp8_parser.c \ + libavcodec/vp8dsp.c \ + chromium/ffmpeg_stub_headers.fragment \ + chromium/ffmpegsumo.sigs" + +other_files=" Changelog \ + COPYING.GPLv2 \ + COPYING.GPLv3 \ + COPYING.LGPLv2.1 \ + COPYING.LGPLv3 \ + CREDITS \ + ffmpeg_generated.gypi \ + ffmpeg.gyp \ + ffmpegsumo.ver \ + INSTALL \ + LICENSE \ + MAINTAINERS \ + OWNERS \ + README \ + README.chromium \ + RELEASE \ + xcode_hack.c " + +files=$generated_files$manual_files$other_files$generated_files_headers$header_files + +prefix="tmp_" + +for f in $files +do + dir_name=`echo $f | sed 's%/[^/]*$%/%'` + if [[ $dir_name == */* ]]; then + tmp_dir_name=$prefix$dir_name + mkdir -p ../tmp_ffmpeg/$tmp_dir_name + else + tmp_dir_name=$f + fi + + cp $f ../tmp_ffmpeg/$tmp_dir_name 2>/dev/null +done + +mkdir -p ../tmp_ffmpeg/tmp_chromium/config +cp -r chromium/config ../tmp_ffmpeg/tmp_chromium + +cd ../tmp_ffmpeg +for tmp_directory in $(find . -type d -name 'tmp_*') +do + new_name=`echo $tmp_directory | sed 's/tmp_//'` + mv $tmp_directory $new_name +done + +cd .. +rm -rf ffmpeg +mv tmp_ffmpeg ffmpeg + +cd $where diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh new file mode 100755 index 0000000..0c97005 --- /dev/null +++ b/clean_qtwebengine.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2015 Kevin Kofler +# 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. + +if [ -z "$1" ] ; then + echo "usage: ./clean_qtwebengine.sh VERSION" + echo "e.g.: ./clean_qtwebengine.sh 5.6.0" + exit 1 +fi + +DIRNAME="qtwebengine-opensource-src-$1" + +echo "removing $DIRNAME" +rm -rf "$DIRNAME" || exit $? + +if [ -f "$DIRNAME.tar.xz" ] ; then + echo "unpacking $DIRNAME.tar.xz" + tar xJf "$DIRNAME.tar.xz" || exit $? +elif [ -f "$DIRNAME.tar.bz2" ] ; then + echo "unpacking $DIRNAME.tar.bz2" + tar xjf "$DIRNAME.tar.bz2" || exit $? +elif [ -f "$DIRNAME.tar.gz" ] ; then + echo "unpacking $DIRNAME.tar.gz" + tar xzf "$DIRNAME.tar.gz" || exit $? +elif [ -f "$DIRNAME.7z" ] ; then + echo "unpacking $DIRNAME.7z" + if type 7za >/dev/null 2>/dev/null ; then + 7za x "$DIRNAME.7z" || exit $? + elif type 7z >/dev/null 2>/dev/null ; then + 7z x "$DIRNAME.7z" || exit $? + else + echo "error: p7zip required" + exit 1 + fi +else + echo "error: no archive for $DIRNAME found" + exit 1 +fi + +echo "running clean_ffmpeg.sh" +./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium/third_party/ffmpeg" || exit $? + +echo "repacking as $DIRNAME-clean.tar.xz" +XZ_OPT="-9 -f" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? + +echo "removing $DIRNAME" +rm -rf "$DIRNAME" || exit $? + +echo "done" +exit 0 diff --git a/process_ffmpeg_gyp.py b/process_ffmpeg_gyp.py new file mode 100755 index 0000000..abbeedf --- /dev/null +++ b/process_ffmpeg_gyp.py @@ -0,0 +1,43 @@ +#!/usr/bin/python +# Copyright 2013 Tomas Popela +# 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. + +import sys +import re + +if __name__ == "__main__": + path = "%s/ffmpeg_generated.gypi" % sys.argv[1] + with open(path, "r") as input_file: + content = input_file.read().replace('\n', '') + + brandings = ['ChromeOS', 'ChromiumOS', 'win', 'Chrome'] + output_duplicates = [] + sections = re.findall('\[([^\}]*)\]', content) + for section in sections: + condition = re.findall("'([^']*)'", section) + if not any(x in condition[0] for x in brandings): + for source_file in condition[1:]: + output_duplicates.append( + source_file.replace('<(shared_generated_dir)/', '')) + + output = list(set(output_duplicates)) + output.remove('c_sources') + output.remove('asm_sources') + print ' '.join(output) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec new file mode 100644 index 0000000..3c68646 --- /dev/null +++ b/qt5-qtwebengine.spec @@ -0,0 +1,356 @@ + +%global qt_module qtwebengine + +%global _hardened_build 1 + +# define to build docs, need to undef this for bootstrapping +# where qt5-qttools builds are not yet available +# only primary archs (for now), allow secondary to bootstrap +%ifarch %{arm} %{ix86} x86_64 +%global docs 1 +%endif + +%global prerelease beta + +Summary: Qt5 - QtWebEngine components +Name: qt5-qtwebengine +Version: 5.6.0 +Release: 0.4.beta%{?dist} + +# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details +# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html +# The other licenses are from Chromium and the code it bundles +License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and (MPLv1.1 or GPLv2 or LGPLv2) +URL: http://www.qt.io +# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg +# wget http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/submodules/qtwebengine-opensource-src-5.6.0-beta.7z +# ./clean_qtwebengine.sh 5.6.0-beta +Source0: qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +# cleanup scripts used above +Source1: clean_qtwebengine.sh +Source2: clean_ffmpeg.sh +Source3: process_ffmpeg_gyp.py +# do not compile with -Wno-format, which also bypasses -Werror-format-security +Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch +# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch + +BuildRequires: qt5-qtbase-devel >= %{version} +BuildRequires: qt5-qtdeclarative-devel >= %{version} +BuildRequires: qt5-qtxmlpatterns-devel >= %{version} +BuildRequires: qt5-qtlocation-devel >= %{version} +BuildRequires: qt5-qtsensors-devel >= %{version} +BuildRequires: qt5-qtwebchannel-devel >= %{version} +BuildRequires: qt5-qttools-static >= %{version} +BuildRequires: ninja-build +BuildRequires: bison +BuildRequires: gperf +BuildRequires: libicu-devel +BuildRequires: libjpeg-devel +BuildRequires: re2-devel +BuildRequires: snappy-devel +%ifarch %{ix86} x86_64 +BuildRequires: yasm +%endif +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(egl) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libudev) +%if 0%{?fedora} || 0%{?rhel} > 6 +BuildRequires: pkgconfig(libwebp) +%endif +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(jsoncpp) +BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(opus) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(flac) +BuildRequires: pkgconfig(minizip) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libxslt) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xi) +BuildRequires: pkgconfig(xcursor) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xcomposite) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(speex) +BuildRequires: pkgconfig(libsrtp) +BuildRequires: perl +BuildRequires: python + +# does not compile against libvpx 1.4.0 (Fedora <= 23), the libvpx 1.5.0 in F24 +# is reported to be built with incompatible options (FIXME: check this) +#BuildRequires: pkgconfig(vpx) +# extra (non-upstream) functions needed, see +# src/3rdparty/chromium/third_party/sqlite/README.chromium for details +#BuildRequires: pkgconfig(sqlite3) + +## Various bundled libraries that Chromium does not support unbundling :-( +## Only the parts actually built are listed. +## Query for candidates: +## grep third_party/ build.log | sed 's!third_party/!\nthird_party/!g' | \ +## grep third_party/ | sed 's!^third_party/!!g' | sed 's!/.*$!!g' | \ +## sed 's/\;.*$//g' | sed 's/ .*$//g' | sort | uniq | less +## some false positives where only shim headers are generated for some reason +## some false positives with dummy placeholder dirs (swiftshader, widevine) +## some false negatives where a header-only library is bundled (e.g. x86inc) +## Spot's chromium.spec also has a list that I checked. + +# Of course, Chromium itself is bundled. It cannot be unbundled because it is +# not a library, but forked (modified) application code. +# Some security fixes are backported, see: +# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=45-based +Provides: bundled(chromium) = 45 + +# Bundled in src/3rdparty/chromium/third_party: +# Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, +# except where specified otherwise. +Provides: bundled(angle) = 2422 +Provides: bundled(brotli) +# Don't get too excited. MPEG and other legally problematic stuff is stripped +# out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and process_ffmpeg_gyp.py. +# see src/3rdparty/chromium/third_party/ffmpeg/Changelog for the version number +Provides: bundled(ffmpeg) = 2.7 +Provides: bundled(iccjpeg) +# bundled as "khronos", headers only +Provides: bundled(khronos_headers) +# bundled as "leveldatabase" +Provides: bundled(leveldb) = r80 +Provides: bundled(libjingle) = 9564 +Provides: bundled(libvpx) = 1.4.0 +Provides: bundled(libXNVCtrl) = 302.17 +Provides: bundled(libyuv) = 1444 +Provides: bundled(modp_b64) +Provides: bundled(mojo) +# headers only +Provides: bundled(npapi) +Provides: bundled(openmax_dl) = 1.0.2 +Provides: bundled(ots) +Provides: bundled(qcms) = 4 +Provides: bundled(sfntly) = 0-0.1.svn111 +Provides: bundled(skia) +# bundled as "smhasher" +Provides: bundled(SMHasher) = 0-0.1.svn147 +Provides: bundled(sqlite) = 3.8.7.4 +Provides: bundled(usrsctp) = 0-0.1.svn9045 +Provides: bundled(webrtc) = 90 +# header (for assembly) only +Provides: bundled(x86inc) = 0 + +# Bundled in src/3rdparty/chromium/base/third_party: +# Check src/3rdparty/chromium/third_party/base/*/README.chromium for version +# numbers, except where specified otherwise. +Provides: bundled(dmg_fp) +Provides: bundled(dynamic_annotations) = 4384 +# only prtime.cc, a modified version of NSPR's prtime.c, is bundled +Provides: bundled(nspr) +Provides: bundled(superfasthash) = 0 +Provides: bundled(symbolize) +# bundled as "valgrind", headers only +Provides: bundled(valgrind.h) +# bundled as "xdg_mime" +Provides: bundled(xdg-mime) +# bundled as "xdg_user_dirs" +Provides: bundled(xdg-user-dirs) = 0.10 + +# Bundled in src/3rdparty/chromium/net/third_party: +# Check src/3rdparty/chromium/third_party/net/*/README.chromium for version +# numbers, except where specified otherwise. +Provides: bundled(mozilla_security_manager) = 1.9.2 +# Ewww... Chromium uses the system NSS, but bundles a heavily patched version of +# its SSL implementation. This might crash and burn sooner or later! +Provides: bundled(nss) = 3.19 + +# Bundled in src/3rdparty/chromium/url/third_party: +# Check src/3rdparty/chromium/third_party/url/*/README.chromium for version +# numbers, except where specified otherwise. +# bundled as "mozilla", file renamed and modified +Provides: bundled(nsURLParsers) + +# Bundled outside of third_party, apparently not considered as such by Chromium: +# see src/3rdparty/chromium/v8/include/v8_version.h for the version number +Provides: bundled(v8) = 4.5.103.35 +# bundled by v8 (src/3rdparty/chromium/v8/src/third_party/fdlibm) +# see src/3rdparty/chromium/v8/src/third_party/fdlibm/README.v8 for the version +Provides: bundled(fdlibm) = 5.3 + +%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}} + + +%description +%{summary}. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: qt5-qtbase-devel%{?_isa} +Requires: qt5-qtdeclarative-devel%{?_isa} +%description devel +%{summary}. + +%package examples +Summary: Example files for %{name} + +%description examples +%{summary}. + + +%if 0%{?docs} +%package doc +Summary: API documentation for %{name} +# for qhelpgenerator +BuildRequires: qt5-qttools-devel +BuildArch: noarch +%description doc +%{summary}. +%endif + + +%prep +%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} +%patch0 -p1 -b .no-format +%patch1 -p1 -b .linux-pri + +%build +export STRIP=strip +export NINJAFLAGS="-v %{_smp_mflags}" +export NINJA_PATH=%{_bindir}/ninja-build + +mkdir %{_target_platform} +pushd %{_target_platform} + +%{qmake_qt5} WEBENGINE_CONFIG+="use_system_icu" .. + +# workaround, disable parallel compilation as it fails to compile in brew +make %{?_smp_mflags} + +%if 0%{?docs} +make %{?_smp_mflags} docs +%endif +popd + +%install +make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} + +%if 0%{?docs} +make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%endif + +## .prl/.la file love +# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs +pushd %{buildroot}%{_qt5_libdir} +for prl_file in libQt5*.prl ; do + sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} + if [ -f "$(basename ${prl_file} .prl).so" ]; then + rm -fv "$(basename ${prl_file} .prl).la" + sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} + fi +done +popd + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%{_qt5_libdir}/libQt5*.so.* +%{_qt5_libdir}/qt5/qml/* +%{_qt5_libdir}/qt5/libexec/QtWebEngineProcess +%{_qt5_translationdir}/* + +%{_qt5_datadir}/qtwebengine_resources.pak +%{_qt5_datadir}/qtwebengine_resources_100p.pak +%{_qt5_datadir}/qtwebengine_resources_200p.pak + +%files devel +%{_qt5_headerdir}/Qt*/ +%{_qt5_libdir}/libQt5*.so +%{_qt5_libdir}/libQt5*.prl +%{_qt5_libdir}/cmake/Qt5*/ +%{_qt5_libdir}/pkgconfig/Qt5*.pc +%{_qt5_archdatadir}/mkspecs/modules/*.pri + +%files examples +%{_qt5_examplesdir}/ + +%if 0%{?docs} +%files doc +%{_qt5_docdir}/* +%endif + + +%changelog +* Fri Jan 08 2016 Kevin Kofler - 5.6.0-0.4.beta1 +- Fix License tag +- Use %%_qt5_examplesdir macro +- Add Provides: bundled(*) for all the bundled libraries that I found + +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.3.beta1 +- linux-pri patch: Add use_system_protobuf, went missing in the 5.6 rebase + +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.2.beta1 +- linux-pri patch: Add missing newline at the end of the log line +- Use export for NINJA_PATH (fixes system ninja-build use) + +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.1.beta1 +- Readd BR pkgconfig(jsoncpp) because linux.pri now checks for it +- BR yasm only on x86 (i686, x86_64) +- Add dot at the end of %%description +- Rebase no-format patch +- Replace unbundle-gyp.patch with new linux-pri.patch +- Use system ninja-build instead of the bundled one +- Run the unbundling script replace_gyp_files.py in linux.pri rather than here +- Update file list for 5.6.0-beta (no more libffmpegsumo since Chromium 45) + +* Tue Jan 05 2016 Kevin Kofler - 5.5.1-4 +- Remove unused BRs flex, libgcrypt-devel, bzip2-devel, pkgconfig(gio-2.0), + pkgconfig(hunspell), pkgconfig(libpcre), pkgconfig(libssl), + pkgconfig(libcrypto), pkgconfig(jsoncpp), pkgconfig(libmtp), + pkgconfig(libexif), pkgconfig(liblzma), pkgconfig(cairo), pkgconfig(libusb), + perl(version), perl(Digest::MD5), perl(Text::ParseWords), ruby +- Add missing explicit BRs on pkgconfig(x11), pkgconfig(xext), + pkgconfig(xfixes), pkgconfig(xdamage), pkgconfig(egl) +- Fix BR pkgconfig(flac++) to pkgconfig(flac) (libFLAC++ not used, only libFLAC) +- Fix BR python-devel to python +- Remove unused -Duse_system_openssl=1 flag (QtWebEngine uses NSS instead) +- Remove unused -Duse_system_jsoncpp=1 and -Duse_system_libusb=1 flags + +* Mon Jan 04 2016 Kevin Kofler - 5.5.1-3 +- Update file list for 5.5.1 (add qtwebengine_resources_[12]00p.pak) + +* Mon Jan 04 2016 Kevin Kofler - 5.5.1-2 +- Add missing explicit BRs on pkgconfig(expat) and pkgconfig(libxml-2.0) +- Remove unused BR v8-devel (cannot currently be unbundled) + +* Thu Dec 24 2015 Kevin Kofler - 5.5.1-1 +- Update to 5.5.1 +- Remove patent-encumbered codecs in the bundled FFmpeg from the tarball + +* Fri Jul 17 2015 Helio Chissini de Castro - 5.5.0-2 +- Update with unbundle flags. Adapted from original 5.4 Suse package +- Disable vpx and sqlite as unbundle due some compilation issues +- Enable verbose build + +* Fri Jul 17 2015 Helio Chissini de Castro - 5.5.0-1 +- Initial spec + +* Thu Jun 25 2015 Helio Chissini de Castro - 5.5.0-0.2.rc +- Update for official RC1 released packages diff --git a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch new file mode 100644 index 0000000..723e47c --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch @@ -0,0 +1,24 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-06 04:43:23.115923478 +0100 +@@ -43,3 +43,20 @@ + use?(system_icu): GYP_CONFIG += use_system_icu=1 + use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 + ++# some more system packages, that are not checked for for some reason ++GYP_CONFIG += \ ++ use_system_yasm=1 \ ++ use_system_expat=1 \ ++ use_system_re2=1 \ ++ use_system_protobuf=1 ++ ++# link libpci instead of dlopening it, our Qt packaging depends on it anyway ++GYP_CONFIG += linux_link_libpci=1 ++ ++# run the unbundling script Chromium provides ++CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" ++R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" ++R_G_F_PY_ARGS = ++for (config, GYP_CONFIG): R_G_F_PY_ARGS += "-D $$config" ++log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-format.patch b/qtwebengine-opensource-src-5.6.0-beta-no-format.patch new file mode 100644 index 0000000..650854f --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-no-format.patch @@ -0,0 +1,30 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/common.gypi 2016-01-05 05:58:55.336938182 +0100 +@@ -3142,11 +3142,6 @@ + # Don't warn about hash_map in third-party code. + '-Wno-deprecated', + ], +- 'cflags': [ +- # Don't warn about printf format problems. +- # This is off by default in gcc but on in Ubuntu's gcc(!). +- '-Wno-format', +- ], + 'cflags_cc!': [ + # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). + '-Wsign-compare', +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/config/compiler/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2016-01-05 05:58:55.362938322 +0100 +@@ -1013,11 +1013,6 @@ + } + + if (is_linux || is_android) { +- cflags += [ +- # Don't warn about printf format problems. This is off by default in gcc +- # but on in Ubuntu's gcc(!). +- "-Wno-format", +- ] + cflags_cc += [ + # Don't warn about hash_map in third-party code. + "-Wno-deprecated", diff --git a/sources b/sources index e69de29..42b5fc1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +60b11851cbe7049dcfadf3fa9472eb79 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From a6f722327423880968bac926c39f052b267c7d9f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 04:34:32 +0100 Subject: [PATCH 003/437] Use more specific BuildRequires for docs, fix FTBFS against ICU 54 (F22/F23) * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta1.1 - Use more specific BuildRequires for docs (thanks to rdieter) - Fix FTBFS against ICU 54 (F22/F23), thanks to spot for the Chromium fix --- qt5-qtwebengine.spec | 13 ++++++++++--- ...ine-opensource-src-5.6.0-beta-system-icu54.patch | 12 ++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3c68646..6ce8958 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -15,7 +15,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.4.beta%{?dist} +Release: 0.4.beta%{?dist}.1 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -34,6 +34,8 @@ Source3: process_ffmpeg_gyp.py Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script) Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +# don't require the time zone detection API backported from ICU 55 (thanks spot) +Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -217,8 +219,8 @@ Summary: Example files for %{name} %if 0%{?docs} %package doc Summary: API documentation for %{name} -# for qhelpgenerator -BuildRequires: qt5-qttools-devel +BuildRequires: qt5-qhelpgenerator +BuildRequires: qt5-qdoc BuildArch: noarch %description doc %{summary}. @@ -229,6 +231,7 @@ BuildArch: noarch %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri +%patch2 -p1 -b .system-icu54 %build export STRIP=strip @@ -298,6 +301,10 @@ popd %changelog +* Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta1.1 +- Use more specific BuildRequires for docs (thanks to rdieter) +- Fix FTBFS against ICU 54 (F22/F23), thanks to spot for the Chromium fix + * Fri Jan 08 2016 Kevin Kofler - 5.6.0-0.4.beta1 - Fix License tag - Use %%_qt5_examplesdir macro diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch new file mode 100644 index 0000000..7366f6a --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2016-01-08 23:40:36.387525597 +0100 +@@ -22,7 +22,7 @@ + + void TimeZoneMonitor::NotifyRenderers() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +-#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 54 ++#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 55 + // On CrOS and older ICU versions, ICU's default tz is already set to a new zone. + // No need to redetect it with detectHostTimeZone(). + scoped_ptr new_zone(icu::TimeZone::createDefault()); From bf16304ee3e8cbe7c2e84671512b39890d248d2a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 04:42:08 +0100 Subject: [PATCH 004/437] Bump Release for official Rawhide build (to distinguish it from Copr builds) * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta - Bump Release for official Rawhide build (to distinguish it from Copr builds) --- qt5-qtwebengine.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6ce8958..a688f70 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -15,7 +15,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.4.beta%{?dist}.1 +Release: 0.5.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -301,23 +301,26 @@ popd %changelog -* Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta1.1 +* Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta +- Bump Release for official Rawhide build (to distinguish it from Copr builds) + +* Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 - Use more specific BuildRequires for docs (thanks to rdieter) - Fix FTBFS against ICU 54 (F22/F23), thanks to spot for the Chromium fix -* Fri Jan 08 2016 Kevin Kofler - 5.6.0-0.4.beta1 +* Fri Jan 08 2016 Kevin Kofler - 5.6.0-0.4.beta - Fix License tag - Use %%_qt5_examplesdir macro - Add Provides: bundled(*) for all the bundled libraries that I found -* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.3.beta1 +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.3.beta - linux-pri patch: Add use_system_protobuf, went missing in the 5.6 rebase -* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.2.beta1 +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.2.beta - linux-pri patch: Add missing newline at the end of the log line - Use export for NINJA_PATH (fixes system ninja-build use) -* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.1.beta1 +* Wed Jan 06 2016 Kevin Kofler - 5.6.0-0.1.beta - Readd BR pkgconfig(jsoncpp) because linux.pri now checks for it - BR yasm only on x86 (i686, x86_64) - Add dot at the end of %%description From dda9dc45a82bac72731941a7d08289d71737cd6b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 05:19:21 +0100 Subject: [PATCH 005/437] Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 --- qt5-qtwebengine.spec | 2 +- qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a688f70..8e6d3c9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -302,7 +302,7 @@ popd %changelog * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta -- Bump Release for official Rawhide build (to distinguish it from Copr builds) +- Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 - Use more specific BuildRequires for docs (thanks to rdieter) diff --git a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch index 723e47c..e035681 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch @@ -1,17 +1,22 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri --- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri 2015-12-14 16:27:24.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-06 04:43:23.115923478 +0100 -@@ -43,3 +43,20 @@ +@@ -43,3 +43,25 @@ use?(system_icu): GYP_CONFIG += use_system_icu=1 use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 +# some more system packages, that are not checked for for some reason +GYP_CONFIG += \ -+ use_system_yasm=1 \ + use_system_expat=1 \ + use_system_re2=1 \ + use_system_protobuf=1 + ++# yasm is only used on x86, and passing use_system_yasm makes the build fail on ++# other architectures (e.g., ARM), so make it conditional on the architecture ++contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ GYP_CONFIG += use_system_yasm=1 ++} ++ +# link libpci instead of dlopening it, our Qt packaging depends on it anyway +GYP_CONFIG += linux_link_libpci=1 + From 20a11c0a4ef6b424b513458a69d118123272f449 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 15:18:06 +0100 Subject: [PATCH 006/437] clean_ffmpeg.sh: Simplify the shell code and use cp -r --- clean_ffmpeg.sh | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 9d784cf..6022828 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -1,5 +1,6 @@ #!/bin/bash # Copyright 2013 Tomas Popela +# Copyright 2016 Kevin Kofler # 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 @@ -212,30 +213,20 @@ other_files=" Changelog \ files=$generated_files$manual_files$other_files$generated_files_headers$header_files -prefix="tmp_" - for f in $files do - dir_name=`echo $f | sed 's%/[^/]*$%/%'` - if [[ $dir_name == */* ]]; then - tmp_dir_name=$prefix$dir_name - mkdir -p ../tmp_ffmpeg/$tmp_dir_name - else - tmp_dir_name=$f - fi + dir_name=`dirname $f`/ + if [[ $dir_name == ./ ]]; then + dir_name= + else + mkdir -p ../tmp_ffmpeg/$dir_name + fi - cp $f ../tmp_ffmpeg/$tmp_dir_name 2>/dev/null + cp -p $f ../tmp_ffmpeg/$dir_name 2>/dev/null done -mkdir -p ../tmp_ffmpeg/tmp_chromium/config -cp -r chromium/config ../tmp_ffmpeg/tmp_chromium - -cd ../tmp_ffmpeg -for tmp_directory in $(find . -type d -name 'tmp_*') -do - new_name=`echo $tmp_directory | sed 's/tmp_//'` - mv $tmp_directory $new_name -done +mkdir -p ../tmp_ffmpeg/chromium +cp -pr chromium/config ../tmp_ffmpeg/chromium/ cd .. rm -rf ffmpeg From 1120e4b80ba10124f000a213f24e99ab9ffcded0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 15:19:17 +0100 Subject: [PATCH 007/437] clean_ffmpeg.sh: Change all tabs to spaces --- clean_ffmpeg.sh | 352 ++++++++++++++++++++++++------------------------ 1 file changed, 176 insertions(+), 176 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 6022828..01bdd32 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -30,186 +30,186 @@ generated_files_headers="${generated_files_headers//.asm/.h}" cd $1 header_files=" libavutil/x86/asm.h \ - libavutil/x86/bswap.h \ - libavutil/x86/cpu.h \ - libavutil/x86/emms.h \ - libavutil/x86/intmath.h \ - libavutil/x86/intreadwrite.h \ - libavutil/x86/timer.h \ - libavutil/atomic_gcc.h \ - libavutil/attributes.h \ - libavutil/audio_fifo.h \ - libavutil/avassert.h \ - libavutil/avutil.h \ - libavutil/bswap.h \ - libavutil/buffer_internal.h \ - libavutil/common.h \ - libavutil/colorspace.h \ - libavutil/cpu_internal.h \ - libavutil/cpu.h \ - libavutil/dynarray.h \ - libavutil/internal.h \ - libavutil/intfloat.h \ - libavutil/intreadwrite.h \ - libavutil/libm.h \ - libavutil/lls.h \ - libavutil/lzo.h \ - libavutil/macros.h \ - libavutil/old_pix_fmts.h \ - libavutil/pixfmt.h \ - libavutil/replaygain.h \ - libavutil/softfloat_tables.h \ - libavutil/thread.h \ - libavutil/timer.h \ - libavutil/timestamp.h \ - libavutil/time_internal.h \ - libavutil/version.h \ - libavutil/x86_cpu.h - libavcodec/x86/constants.h \ - libavcodec/x86/dsputil_x86.h \ - libavcodec/x86/fft.h \ - libavcodec/x86/fpel.h \ - libavcodec/x86/hpeldsp.h \ - libavcodec/x86/inline_asm.h \ - libavcodec/x86/mathops.h \ - libavcodec/x86/vp56_arith.h \ - libavcodec/avcodec.h \ - libavcodec/blockdsp.h \ - libavcodec/bytestream.h \ - libavcodec/dct.h \ - libavcodec/dsputil.h \ - libavcodec/dv_profile_internal.h \ - libavcodec/error_resilience.h \ - libavcodec/fdctdsp.h \ - libavcodec/flac.h \ - libavcodec/fft.h \ - libavcodec/fft-internal.h \ - libavcodec/fft_table.h \ - libavcodec/frame_thread_encoder.h \ - libavcodec/get_bits.h \ - libavcodec/h263dsp.h \ - libavcodec/h264chroma.h \ - libavcodec/h264pred.h \ - libavcodec/hpeldsp.h \ - libavcodec/idctdsp.h \ - libavcodec/internal.h \ - libavcodec/mathops.h \ - libavcodec/me_cmp.h \ - libavcodec/motion_est.h \ - libavcodec/mpegpicture.h \ - libavcodec/mpegutils.h \ - libavcodec/mpegvideo.h \ - libavcodec/mpegvideodsp.h \ - libavcodec/mpegvideoencdsp.h \ - libavcodec/old_codec_ids.h \ - libavcodec/options_table.h \ - libavcodec/pcm_tablegen.h \ - libavcodec/pel_template.c \ - libavcodec/pixblockdsp.h \ - libavcodec/pixels.h \ - libavcodec/pthread_internal.h \ - libavcodec/put_bits.h \ - libavcodec/qpeldsp.h \ - libavcodec/ratecontrol.h \ - libavcodec/rectangle.h \ - libavcodec/rl.h \ - libavcodec/rnd_avg.h \ - libavcodec/thread.h \ - libavcodec/tpel_template.c \ - libavcodec/version.h \ - libavcodec/videodsp.h \ - libavcodec/vorbis_parser_internal.h \ - libavcodec/vp3data.h \ - libavcodec/vp3dsp.h \ - libavcodec/vp56.h \ - libavcodec/vp56dsp.h \ - libavcodec/vp8data.h \ - libavcodec/vp8.h \ - libavcodec/vp8dsp.h \ - libavformat/audiointerleave.h \ - libavformat/avio_internal.h \ - libavformat/avformat.h \ - libavformat/dv.h \ - libavformat/internal.h \ - libavformat/pcm.h \ - libavformat/rdt.h \ - libavformat/rtp.h \ - libavformat/rtpdec.h \ - libavformat/spdif.h \ - libavformat/srtp.h \ - libavformat/options_table.h \ - libavformat/version.h \ - libavformat/w64.h \ - libswresample/swresample.h \ - libswresample/version.h \ - compat/va_copy.h " + libavutil/x86/bswap.h \ + libavutil/x86/cpu.h \ + libavutil/x86/emms.h \ + libavutil/x86/intmath.h \ + libavutil/x86/intreadwrite.h \ + libavutil/x86/timer.h \ + libavutil/atomic_gcc.h \ + libavutil/attributes.h \ + libavutil/audio_fifo.h \ + libavutil/avassert.h \ + libavutil/avutil.h \ + libavutil/bswap.h \ + libavutil/buffer_internal.h \ + libavutil/common.h \ + libavutil/colorspace.h \ + libavutil/cpu_internal.h \ + libavutil/cpu.h \ + libavutil/dynarray.h \ + libavutil/internal.h \ + libavutil/intfloat.h \ + libavutil/intreadwrite.h \ + libavutil/libm.h \ + libavutil/lls.h \ + libavutil/lzo.h \ + libavutil/macros.h \ + libavutil/old_pix_fmts.h \ + libavutil/pixfmt.h \ + libavutil/replaygain.h \ + libavutil/softfloat_tables.h \ + libavutil/thread.h \ + libavutil/timer.h \ + libavutil/timestamp.h \ + libavutil/time_internal.h \ + libavutil/version.h \ + libavutil/x86_cpu.h + libavcodec/x86/constants.h \ + libavcodec/x86/dsputil_x86.h \ + libavcodec/x86/fft.h \ + libavcodec/x86/fpel.h \ + libavcodec/x86/hpeldsp.h \ + libavcodec/x86/inline_asm.h \ + libavcodec/x86/mathops.h \ + libavcodec/x86/vp56_arith.h \ + libavcodec/avcodec.h \ + libavcodec/blockdsp.h \ + libavcodec/bytestream.h \ + libavcodec/dct.h \ + libavcodec/dsputil.h \ + libavcodec/dv_profile_internal.h \ + libavcodec/error_resilience.h \ + libavcodec/fdctdsp.h \ + libavcodec/flac.h \ + libavcodec/fft.h \ + libavcodec/fft-internal.h \ + libavcodec/fft_table.h \ + libavcodec/frame_thread_encoder.h \ + libavcodec/get_bits.h \ + libavcodec/h263dsp.h \ + libavcodec/h264chroma.h \ + libavcodec/h264pred.h \ + libavcodec/hpeldsp.h \ + libavcodec/idctdsp.h \ + libavcodec/internal.h \ + libavcodec/mathops.h \ + libavcodec/me_cmp.h \ + libavcodec/motion_est.h \ + libavcodec/mpegpicture.h \ + libavcodec/mpegutils.h \ + libavcodec/mpegvideo.h \ + libavcodec/mpegvideodsp.h \ + libavcodec/mpegvideoencdsp.h \ + libavcodec/old_codec_ids.h \ + libavcodec/options_table.h \ + libavcodec/pcm_tablegen.h \ + libavcodec/pel_template.c \ + libavcodec/pixblockdsp.h \ + libavcodec/pixels.h \ + libavcodec/pthread_internal.h \ + libavcodec/put_bits.h \ + libavcodec/qpeldsp.h \ + libavcodec/ratecontrol.h \ + libavcodec/rectangle.h \ + libavcodec/rl.h \ + libavcodec/rnd_avg.h \ + libavcodec/thread.h \ + libavcodec/tpel_template.c \ + libavcodec/version.h \ + libavcodec/videodsp.h \ + libavcodec/vorbis_parser_internal.h \ + libavcodec/vp3data.h \ + libavcodec/vp3dsp.h \ + libavcodec/vp56.h \ + libavcodec/vp56dsp.h \ + libavcodec/vp8data.h \ + libavcodec/vp8.h \ + libavcodec/vp8dsp.h \ + libavformat/audiointerleave.h \ + libavformat/avio_internal.h \ + libavformat/avformat.h \ + libavformat/dv.h \ + libavformat/internal.h \ + libavformat/pcm.h \ + libavformat/rdt.h \ + libavformat/rtp.h \ + libavformat/rtpdec.h \ + libavformat/spdif.h \ + libavformat/srtp.h \ + libavformat/options_table.h \ + libavformat/version.h \ + libavformat/w64.h \ + libswresample/swresample.h \ + libswresample/version.h \ + compat/va_copy.h " -manual_files=" libavutil/x86/x86inc.asm \ - libavutil/x86/x86util.asm \ - libavcodec/x86/hpeldsp_rnd_template.c \ - libavcodec/x86/rnd_template.c \ +manual_files=" libavutil/x86/x86inc.asm \ + libavutil/x86/x86util.asm \ + libavcodec/x86/hpeldsp_rnd_template.c \ + libavcodec/x86/rnd_template.c \ libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c \ - libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c \ - libavcodec/x86/constants.c \ - libavcodec/x86/fft_init.c \ - libavcodec/x86/h264_intrapred_init.c \ - libavcodec/x86/hpeldsp_init.c \ - libavcodec/x86/vp3dsp_init.c \ - libavcodec/x86/vp8dsp_init.c \ - libavutil/x86/autorename_libavutil_x86_cpu.c \ - libavutil/x86/autorename_libavutil_x86_float_dsp_init.c \ - libavutil/x86/lls_init.c \ - libavcodec/x86/deinterlace.asm \ - libavcodec/x86/fft.asm \ - libavcodec/x86/fpel.asm \ - libavcodec/x86/h264_intrapred.asm \ - libavcodec/x86/h264_intrapred_10bit.asm \ - libavcodec/x86/hpeldsp.asm \ - libavcodec/x86/videodsp.asm \ - libavcodec/x86/vorbisdsp.asm \ - libavcodec/x86/vp3dsp.asm \ - libavcodec/x86/vp8dsp.asm \ - libavcodec/x86/vp8dsp_loopfilter.asm \ - libavutil/x86/cpuid.asm \ - libavutil/x86/float_dsp.asm \ - libavutil/x86/lls.asm \ - libavcodec/bit_depth_template.c \ - libavcodec/fft_template.c \ - libavcodec/h264pred_template.c \ - libavcodec/hpel_template.c \ - libavcodec/hpeldsp_template.c \ - libavcodec/mdct_template.c \ - libavcodec/videodsp_template.c \ - libavcodec/h264pred.c \ - libavcodec/hpeldsp.c \ - libavcodec/videodsp.c \ - libavcodec/vp3.c \ - libavcodec/vp3_parser.c \ - libavcodec/vp3dsp.c \ - libavcodec/vp56rac.c \ - libavcodec/vp8.c \ - libavcodec/vp8_parser.c \ - libavcodec/vp8dsp.c \ - chromium/ffmpeg_stub_headers.fragment \ - chromium/ffmpegsumo.sigs" + libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c \ + libavcodec/x86/constants.c \ + libavcodec/x86/fft_init.c \ + libavcodec/x86/h264_intrapred_init.c \ + libavcodec/x86/hpeldsp_init.c \ + libavcodec/x86/vp3dsp_init.c \ + libavcodec/x86/vp8dsp_init.c \ + libavutil/x86/autorename_libavutil_x86_cpu.c \ + libavutil/x86/autorename_libavutil_x86_float_dsp_init.c \ + libavutil/x86/lls_init.c \ + libavcodec/x86/deinterlace.asm \ + libavcodec/x86/fft.asm \ + libavcodec/x86/fpel.asm \ + libavcodec/x86/h264_intrapred.asm \ + libavcodec/x86/h264_intrapred_10bit.asm \ + libavcodec/x86/hpeldsp.asm \ + libavcodec/x86/videodsp.asm \ + libavcodec/x86/vorbisdsp.asm \ + libavcodec/x86/vp3dsp.asm \ + libavcodec/x86/vp8dsp.asm \ + libavcodec/x86/vp8dsp_loopfilter.asm \ + libavutil/x86/cpuid.asm \ + libavutil/x86/float_dsp.asm \ + libavutil/x86/lls.asm \ + libavcodec/bit_depth_template.c \ + libavcodec/fft_template.c \ + libavcodec/h264pred_template.c \ + libavcodec/hpel_template.c \ + libavcodec/hpeldsp_template.c \ + libavcodec/mdct_template.c \ + libavcodec/videodsp_template.c \ + libavcodec/h264pred.c \ + libavcodec/hpeldsp.c \ + libavcodec/videodsp.c \ + libavcodec/vp3.c \ + libavcodec/vp3_parser.c \ + libavcodec/vp3dsp.c \ + libavcodec/vp56rac.c \ + libavcodec/vp8.c \ + libavcodec/vp8_parser.c \ + libavcodec/vp8dsp.c \ + chromium/ffmpeg_stub_headers.fragment \ + chromium/ffmpegsumo.sigs" -other_files=" Changelog \ - COPYING.GPLv2 \ - COPYING.GPLv3 \ - COPYING.LGPLv2.1 \ - COPYING.LGPLv3 \ - CREDITS \ - ffmpeg_generated.gypi \ - ffmpeg.gyp \ +other_files=" Changelog \ + COPYING.GPLv2 \ + COPYING.GPLv3 \ + COPYING.LGPLv2.1 \ + COPYING.LGPLv3 \ + CREDITS \ + ffmpeg_generated.gypi \ + ffmpeg.gyp \ ffmpegsumo.ver \ - INSTALL \ - LICENSE \ - MAINTAINERS \ - OWNERS \ - README \ - README.chromium \ - RELEASE \ - xcode_hack.c " + INSTALL \ + LICENSE \ + MAINTAINERS \ + OWNERS \ + README \ + README.chromium \ + RELEASE \ + xcode_hack.c " files=$generated_files$manual_files$other_files$generated_files_headers$header_files From 4844045435063dc7dd2d61e69720ce5a568900fe Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 16:30:41 +0100 Subject: [PATCH 008/437] clean_ffmpeg.sh: Add missing ARM files (fix FTBFS on ARM) Also remove an unused #include of a file we do not ship from an ARM file. (fft_init_arm.c wants synth_filter.h, but does not actually use anything from it. We ship neither synth_filter.h nor synth_filter.c.) Mention the change in the qt5-qtwebengine.spec %changelog. --- clean_ffmpeg.sh | 15 +++++++++++++++ qt5-qtwebengine.spec | 1 + 2 files changed, 16 insertions(+) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 01bdd32..7ea64a9 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -36,6 +36,13 @@ header_files=" libavutil/x86/asm.h \ libavutil/x86/intmath.h \ libavutil/x86/intreadwrite.h \ libavutil/x86/timer.h \ + libavutil/arm/asm.S \ + libavutil/arm/bswap.h \ + libavutil/arm/cpu.h \ + libavutil/arm/float_dsp_arm.h \ + libavutil/arm/intmath.h \ + libavutil/arm/intreadwrite.h \ + libavutil/arm/timer.h \ libavutil/atomic_gcc.h \ libavutil/attributes.h \ libavutil/audio_fifo.h \ @@ -73,6 +80,10 @@ header_files=" libavutil/x86/asm.h \ libavcodec/x86/inline_asm.h \ libavcodec/x86/mathops.h \ libavcodec/x86/vp56_arith.h \ + libavcodec/arm/mathops.h \ + libavcodec/arm/videodsp_arm.h \ + libavcodec/arm/vp56_arith.h \ + libavcodec/arm/vp8.h \ libavcodec/avcodec.h \ libavcodec/blockdsp.h \ libavcodec/bytestream.h \ @@ -225,9 +236,13 @@ do cp -p $f ../tmp_ffmpeg/$dir_name 2>/dev/null done +# whole directory mkdir -p ../tmp_ffmpeg/chromium cp -pr chromium/config ../tmp_ffmpeg/chromium/ +# unused include +sed -i -e '/synth_filter\.h/d' ../tmp_ffmpeg/libavcodec/arm/fft_init_arm.c + cd .. rm -rf ffmpeg mv tmp_ffmpeg ffmpeg diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8e6d3c9..e82785e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -303,6 +303,7 @@ popd %changelog * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta - Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 +- Fix FTBFS on ARM: Respin tarball with: clean_ffmpeg.sh: Add missing ARM files * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 - Use more specific BuildRequires for docs (thanks to rdieter) From d8e7ca84f678709726c51bbc83580fdd9c8f3fe2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 9 Jan 2016 10:18:39 -0600 Subject: [PATCH 009/437] new-sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 42b5fc1..830e964 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -60b11851cbe7049dcfadf3fa9472eb79 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +db8354d242c8fac9994999e8f11aef81 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From 7485545db9f20ae0c643b573d2a94f099d99cadf Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 18:15:44 +0100 Subject: [PATCH 010/437] clean_ffmpeg.sh: Add missing libavcodec/arm/vp8dsp.h --- clean_ffmpeg.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 7ea64a9..debd4b3 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -84,6 +84,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/arm/videodsp_arm.h \ libavcodec/arm/vp56_arith.h \ libavcodec/arm/vp8.h \ + libavcodec/arm/vp8dsp.h \ libavcodec/avcodec.h \ libavcodec/blockdsp.h \ libavcodec/bytestream.h \ From 3a4ed33987446c171c4f97d11e0234dae6c5ce6d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 22:18:50 +0100 Subject: [PATCH 011/437] new-sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 830e964..481d744 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db8354d242c8fac9994999e8f11aef81 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +447f0742be94882a5e98ca3f16fb0251 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From 9ea9e384ab358d22dd49b58f36beaf637cf86a19 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 9 Jan 2016 23:18:35 +0100 Subject: [PATCH 012/437] new-sources This time with a tarball actually generated with the correct version of clean_ffmpeg.sh. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 481d744..e20c1fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -447f0742be94882a5e98ca3f16fb0251 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +bfd13c6500cea06d2fd77aa9f4d43881 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From ac0741f5ec6c0c2423c8e4f923f1ab46ce924e24 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 10 Jan 2016 00:19:16 +0100 Subject: [PATCH 013/437] clean_ffmpeg.sh: Add missing libavcodec/arm/neon.S MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and upload the resulting tarball with fedpkg new-sources. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index debd4b3..b0d0ae7 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -81,6 +81,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/x86/mathops.h \ libavcodec/x86/vp56_arith.h \ libavcodec/arm/mathops.h \ + libavcodec/arm/neon.S \ libavcodec/arm/videodsp_arm.h \ libavcodec/arm/vp56_arith.h \ libavcodec/arm/vp8.h \ diff --git a/sources b/sources index e20c1fa..4df1abc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bfd13c6500cea06d2fd77aa9f4d43881 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +caec41469f29a0a3781213d8dcde7b77 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From 09a281a2db99a44672f5daf446ecaabe65286787 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 10 Jan 2016 17:53:25 +0100 Subject: [PATCH 014/437] Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) --- qt5-qtwebengine.spec | 7 ++++++- ...engine-opensource-src-5.6.0-beta-no-neon.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-no-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e82785e..2bf2adc 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -15,7 +15,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.5.beta%{?dist} +Release: 0.6.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -36,6 +36,9 @@ Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +# disable NEON vector instructions on ARM for now, the NEON code FTBFS due to +# GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 +Patch3: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -232,6 +235,7 @@ BuildArch: noarch %patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri %patch2 -p1 -b .system-icu54 +%patch3 -p1 -b .no-neon %build export STRIP=strip @@ -304,6 +308,7 @@ popd * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta - Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 - Fix FTBFS on ARM: Respin tarball with: clean_ffmpeg.sh: Add missing ARM files +- Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 - Use more specific BuildRequires for docs (thanks to rdieter) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-neon.patch b/qtwebengine-opensource-src-5.6.0-beta-no-neon.patch new file mode 100644 index 0000000..af9bbf7 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-no-neon.patch @@ -0,0 +1,15 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/gyp_run.pro qtwebengine-opensource-src-5.6.0-beta-no-neon/src/core/gyp_run.pro +--- qtwebengine-opensource-src-5.6.0-beta/src/core/gyp_run.pro 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-neon/src/core/gyp_run.pro 2016-01-10 17:48:45.689954050 +0100 +@@ -74,7 +74,10 @@ + # we use arm_neon_optional for ARMv7 and newer and let chromium decide + # about the mfpu option. + contains(MFPU, "neon")|contains(MFPU, "neon-vfpv4"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 +- else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1 ++ # Disable NEON entirely for now, because it fails to build: ++ # https://bugzilla.redhat.com/show_bug.cgi?id=1282495 ++ # (This line was also missing the required arm_fpu flag, which I added.) ++ # else:!lessThan(MARMV, 7): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=1 + else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0 + } + From cdac6a712b9930e4ff39db5bcd9ff132298a4e8a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 10 Jan 2016 18:18:58 +0100 Subject: [PATCH 015/437] Fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE (needed for ARM) --- qt5-qtwebengine.spec | 9 +++++++-- ...-opensource-src-5.6.0-beta-fix-extractcflag.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2bf2adc..d748663 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,9 +36,12 @@ Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +# fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the +# ARM flags with our %%qmake_qt5 macro, including for the next patch +Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch # disable NEON vector instructions on ARM for now, the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -Patch3: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch +Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -235,7 +238,8 @@ BuildArch: noarch %patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri %patch2 -p1 -b .system-icu54 -%patch3 -p1 -b .no-neon +%patch3 -p1 -b .fix-extractcflag +%patch4 -p1 -b .no-neon %build export STRIP=strip @@ -308,6 +312,7 @@ popd * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta - Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 - Fix FTBFS on ARM: Respin tarball with: clean_ffmpeg.sh: Add missing ARM files +- Fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE (needed for ARM) - Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 diff --git a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch new file mode 100644 index 0000000..8beae69 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf +--- qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf 2016-01-10 18:15:23.942032985 +0100 +@@ -87,7 +87,7 @@ + } + + defineReplace(extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + return ($$member(OPTION, 1)) From 8fec587968c4cd7b53bc5536417b8eb74b15b706 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 10 Jan 2016 23:15:14 +0100 Subject: [PATCH 016/437] Fix changelog --- qt5-qtwebengine.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d748663..1a836db 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -309,11 +309,13 @@ popd %changelog +* Sun Jan 10 2016 Kevin Kofler - 5.6.0-0.6.beta +- Fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE (needed for ARM) +- Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) + * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.5.beta - Fix FTBFS on ARM: linux-pri patch: Set use_system_yasm only on x86_64 and i386 - Fix FTBFS on ARM: Respin tarball with: clean_ffmpeg.sh: Add missing ARM files -- Fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE (needed for ARM) -- Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) * Sat Jan 09 2016 Kevin Kofler - 5.6.0-0.4.beta.1 - Use more specific BuildRequires for docs (thanks to rdieter) From 0b8bca06fbbad1146db007d7d6fb382d77ac0d77 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 11 Jan 2016 03:15:35 +0100 Subject: [PATCH 017/437] Use the system libvpx on F24+ (1.5.0) * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.7.beta - Use the system libvpx on F24+ (1.5.0) - Fixes to Provides: bundled(*): libwebp if bundled, x86inc only on x86 Let's see if this works. --- qt5-qtwebengine.spec | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1a836db..3dcbc67 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,12 +10,21 @@ %global docs 1 %endif +%if 0%{?fedora} > 23 +# need libvpx >= 1.5.0 +%global use_system_libvpx 1 +%endif +%if 0%{?fedora} || 0%{?rhel} > 6 +# need libwebp >= 0.4.3 +%global use_system_libwebp 1 +%endif + %global prerelease beta Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.6.beta%{?dist} +Release: 0.7.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -69,8 +78,8 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) -%if 0%{?fedora} || 0%{?rhel} > 6 -BuildRequires: pkgconfig(libwebp) +%if 0%{?use_system_libwebp} +BuildRequires: pkgconfig(libwebp) >= 0.4.3 %endif BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(jsoncpp) @@ -104,10 +113,12 @@ BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(libsrtp) BuildRequires: perl BuildRequires: python +%if 0%{?use_system_libvpx} +# does not compile against libvpx 1.4.0 (Fedora <= 23), need at least 1.5.0: +# https://code.google.com/p/chromium/issues/detail?id=494939 +BuildRequires: pkgconfig(vpx) >= 1.5.0 +%endif -# does not compile against libvpx 1.4.0 (Fedora <= 23), the libvpx 1.5.0 in F24 -# is reported to be built with incompatible options (FIXME: check this) -#BuildRequires: pkgconfig(vpx) # extra (non-upstream) functions needed, see # src/3rdparty/chromium/third_party/sqlite/README.chromium for details #BuildRequires: pkgconfig(sqlite3) @@ -144,7 +155,13 @@ Provides: bundled(khronos_headers) # bundled as "leveldatabase" Provides: bundled(leveldb) = r80 Provides: bundled(libjingle) = 9564 +%if !0%{?use_system_libvpx} +# actually something between 1.4.0 and 1.5.0, so a system 1.4.0 is not enough Provides: bundled(libvpx) = 1.4.0 +%endif +%if !0%{?use_system_libwebp} +Provides: bundled(libwebp) = 0.4.3 +%endif Provides: bundled(libXNVCtrl) = 302.17 Provides: bundled(libyuv) = 1444 Provides: bundled(modp_b64) @@ -161,8 +178,10 @@ Provides: bundled(SMHasher) = 0-0.1.svn147 Provides: bundled(sqlite) = 3.8.7.4 Provides: bundled(usrsctp) = 0-0.1.svn9045 Provides: bundled(webrtc) = 90 +%ifarch %{ix86} x86_64 # header (for assembly) only Provides: bundled(x86inc) = 0 +%endif # Bundled in src/3rdparty/chromium/base/third_party: # Check src/3rdparty/chromium/third_party/base/*/README.chromium for version @@ -309,6 +328,10 @@ popd %changelog +* Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.7.beta +- Use the system libvpx on F24+ (1.5.0) +- Fixes to Provides: bundled(*): libwebp if bundled, x86inc only on x86 + * Sun Jan 10 2016 Kevin Kofler - 5.6.0-0.6.beta - Fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE (needed for ARM) - Fix FTBFS on ARM: Disable NEON due to #1282495 (GCC bug) From 134ba1a2397809b24abc50660255b64119a68eb7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 11 Jan 2016 17:34:42 +0100 Subject: [PATCH 018/437] Build against the system libvpx also on F23 (1.4.0), worked in Copr * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.8.beta - Build against the system libvpx also on F23 (1.4.0), worked in Copr It turns out the 1.5.0 requirement (https://code.google.com/p/chromium/issues/detail?id=494939) is only for portions of Chromium that QtWebEngine does not build. --- qt5-qtwebengine.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3dcbc67..6dff80e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,8 +10,8 @@ %global docs 1 %endif -%if 0%{?fedora} > 23 -# need libvpx >= 1.5.0 +%if 0%{?fedora} > 22 +# need libvpx >= 1.4.0 %global use_system_libvpx 1 %endif %if 0%{?fedora} || 0%{?rhel} > 6 @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.7.beta%{?dist} +Release: 0.8.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -114,9 +114,7 @@ BuildRequires: pkgconfig(libsrtp) BuildRequires: perl BuildRequires: python %if 0%{?use_system_libvpx} -# does not compile against libvpx 1.4.0 (Fedora <= 23), need at least 1.5.0: -# https://code.google.com/p/chromium/issues/detail?id=494939 -BuildRequires: pkgconfig(vpx) >= 1.5.0 +BuildRequires: pkgconfig(vpx) >= 1.4.0 %endif # extra (non-upstream) functions needed, see @@ -156,7 +154,6 @@ Provides: bundled(khronos_headers) Provides: bundled(leveldb) = r80 Provides: bundled(libjingle) = 9564 %if !0%{?use_system_libvpx} -# actually something between 1.4.0 and 1.5.0, so a system 1.4.0 is not enough Provides: bundled(libvpx) = 1.4.0 %endif %if !0%{?use_system_libwebp} @@ -328,6 +325,9 @@ popd %changelog +* Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.8.beta +- Build against the system libvpx also on F23 (1.4.0), worked in Copr + * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.7.beta - Use the system libvpx on F24+ (1.5.0) - Fixes to Provides: bundled(*): libwebp if bundled, x86inc only on x86 From 87fb3887bf7fe39abb96025ac5d49160b59ee12c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 11 Jan 2016 19:05:29 +0100 Subject: [PATCH 019/437] linux-pri.patch: Set icu_use_data_file_flag=0 for system ICU * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.9.beta - linux-pri.patch: Set icu_use_data_file_flag=0 for system ICU --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6dff80e..c5b92e2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.8.beta%{?dist} +Release: 0.9.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -325,6 +325,9 @@ popd %changelog +* Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.9.beta +- linux-pri.patch: Set icu_use_data_file_flag=0 for system ICU + * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.8.beta - Build against the system libvpx also on F23 (1.4.0), worked in Copr diff --git a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch index e035681..7280fb6 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch @@ -1,8 +1,12 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri --- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri 2015-12-14 16:27:24.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-06 04:43:23.115923478 +0100 -@@ -43,3 +43,25 @@ - use?(system_icu): GYP_CONFIG += use_system_icu=1 +@@ -40,6 +40,28 @@ + use?(system_snappy): GYP_CONFIG += use_system_snappy=1 + use?(system_speex): GYP_CONFIG += use_system_speex=1 + use?(system_vpx): GYP_CONFIG += use_system_libvpx=1 +-use?(system_icu): GYP_CONFIG += use_system_icu=1 ++use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 +# some more system packages, that are not checked for for some reason From d3940c705a0497997d0efaaa994c91f85d128737 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 12 Jan 2016 03:38:10 +0100 Subject: [PATCH 020/437] Unbundle NSPR prtime and ICU UTF API * Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.10.beta - Unbundle prtime.cc, use the system NSPR instead (which is already required) - Unbundle icu_utf.cc, use the system ICU instead (which is already required) --- qt5-qtwebengine.spec | 19 +- ...source-src-5.6.0-beta-system-icu-utf.patch | 381 ++++++++++++++++++ ...ce-src-5.6.0-beta-system-nspr-prtime.patch | 49 +++ 3 files changed, 446 insertions(+), 3 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch create mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c5b92e2..97d0aea 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.9.beta%{?dist} +Release: 0.10.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -51,6 +51,15 @@ Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch # disable NEON vector instructions on ARM for now, the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch +# use the system NSPR prtime (based on Debian patch) +# We already depend on NSPR, so it is useless to copy these functions here. +# Debian uses this just fine, and I don't see relevant modifications either. +Patch5: qtwebengine-opensource-src-5.6.0-system-nspr-prtime.patch +# use the system ICU UTF functions +# We already depend on ICU, so it is useless to copy these functions here. +# I checked the history of that directory, and other than the renames I am +# undoing, there were no modifications at all. Must be applied after Patch5. +Patch6: qtwebengine-opensource-src-5.6.0-system-icu-utf.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -185,8 +194,6 @@ Provides: bundled(x86inc) = 0 # numbers, except where specified otherwise. Provides: bundled(dmg_fp) Provides: bundled(dynamic_annotations) = 4384 -# only prtime.cc, a modified version of NSPR's prtime.c, is bundled -Provides: bundled(nspr) Provides: bundled(superfasthash) = 0 Provides: bundled(symbolize) # bundled as "valgrind", headers only @@ -256,6 +263,8 @@ BuildArch: noarch %patch2 -p1 -b .system-icu54 %patch3 -p1 -b .fix-extractcflag %patch4 -p1 -b .no-neon +%patch5 -p1 -b .system-nspr-prtime +%patch6 -p1 -b .system-icu-utf %build export STRIP=strip @@ -325,6 +334,10 @@ popd %changelog +* Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.10.beta +- Unbundle prtime.cc, use the system NSPR instead (which is already required) +- Unbundle icu_utf.cc, use the system ICU instead (which is already required) + * Mon Jan 11 2016 Kevin Kofler - 5.6.0-0.9.beta - linux-pri.patch: Set icu_use_data_file_flag=0 for system ICU diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch b/qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch new file mode 100644 index 0000000..a522e8e --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch @@ -0,0 +1,381 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:04:12.789946122 +0100 +@@ -621,8 +621,6 @@ + 'third_party/dmg_fp/dmg_fp.h', + 'third_party/dmg_fp/dtoa_wrapper.cc', + 'third_party/dmg_fp/g_fmt.cc', +- 'third_party/icu/icu_utf.cc', +- 'third_party/icu/icu_utf.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'thread_task_runner_handle.cc', +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:04:27.209025094 +0100 +@@ -504,8 +504,6 @@ + "third_party/dmg_fp/dmg_fp.h", + "third_party/dmg_fp/dtoa_wrapper.cc", + "third_party/dmg_fp/g_fmt.cc", +- "third_party/icu/icu_utf.cc", +- "third_party/icu/icu_utf.h", + "third_party/superfasthash/superfasthash.c", + "thread_task_runner_handle.cc", + "thread_task_runner_handle.h", +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2016-01-12 03:09:08.430565334 +0100 +@@ -20,7 +20,7 @@ + + #if defined(OS_MACOSX) + #include "base/mac/scoped_cftyperef.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #endif + + #if defined(OS_WIN) +@@ -1140,9 +1140,9 @@ + int* index) { + int codepoint = 0; + while (*index < length && codepoint == 0) { +- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string ++ // U8_NEXT returns a value < 0 in error cases. For purposes of string + // comparison, we just use that value and flag it with DCHECK. +- CBU8_NEXT(string, *index, length, codepoint); ++ U8_NEXT(string, *index, length, codepoint); + DCHECK_GT(codepoint, 0); + if (codepoint > 0) { + // Check if there is a subtable for this upper byte. +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2016-01-12 03:12:23.701634827 +0100 +@@ -14,7 +14,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "base/values.h" + + namespace base { +@@ -616,8 +616,8 @@ + int32 next_char = 0; + + while (CanConsume(1)) { +- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. +- CBU8_NEXT(start_pos_, index_, length, next_char); ++ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. ++ U8_NEXT(start_pos_, index_, length, next_char); + if (next_char < 0 || !IsValidCharacter(next_char)) { + ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); + return false; +@@ -710,7 +710,7 @@ + return false; + } + } else if (next_char == '"') { +- --index_; // Rewind by one because of CBU8_NEXT. ++ --index_; // Rewind by one because of U8_NEXT. + out->Swap(&string); + return true; + } else { +@@ -750,10 +750,10 @@ + + // If this is a high surrogate, consume the next code unit to get the + // low surrogate. +- if (CBU16_IS_SURROGATE(code_unit16_high)) { ++ if (U16_IS_SURROGATE(code_unit16_high)) { + // Make sure this is the high surrogate. If not, it's an encoding + // error. +- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) ++ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) + return false; + + // Make sure that the token has more characters to consume the +@@ -770,24 +770,24 @@ + + NextNChars(3); + +- if (!CBU16_IS_TRAIL(code_unit16_low)) { ++ if (!U16_IS_TRAIL(code_unit16_low)) { + return false; + } + +- uint32 code_point = CBU16_GET_SUPPLEMENTARY(code_unit16_high, +- code_unit16_low); ++ uint32 code_point = U16_GET_SUPPLEMENTARY(code_unit16_high, ++ code_unit16_low); + if (!IsValidCharacter(code_point)) + return false; + + offset = 0; +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_point); + } else { + // Not a surrogate. +- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); ++ DCHECK(U16_IS_SINGLE(code_unit16_high)); + if (!IsValidCharacter(code_unit16_high)) + return false; + +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); + } + + dest_string->append(code_unit8); +@@ -804,9 +804,9 @@ + } else { + char utf8_units[4] = { 0 }; + int offset = 0; +- CBU8_APPEND_UNSAFE(utf8_units, offset, point); ++ U8_APPEND_UNSAFE(utf8_units, offset, point); + dest->Convert(); +- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be ++ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be + // zero terminated at this point. |offset| contains the correct length. + dest->AppendString(std::string(utf8_units, offset)); + } +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2016-01-12 03:12:46.093757468 +0100 +@@ -10,7 +10,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2016-01-12 03:14:17.884254687 +0100 +@@ -4,13 +4,13 @@ + + #include "base/strings/pattern.h" + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + + namespace { + +-static bool IsWildcard(base_icu::UChar32 character) { ++static bool IsWildcard(UChar32 character) { + return character == '*' || character == '?'; + } + +@@ -37,9 +37,9 @@ + // Check if the chars match, if so, increment the ptrs. + const CHAR* pattern_next = *pattern; + const CHAR* string_next = *string; +- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); ++ UChar32 pattern_char = next(&pattern_next, pattern_end); + if (pattern_char == next(&string_next, string_end) && +- pattern_char != CBU_SENTINEL) { ++ pattern_char != U_SENTINEL) { + *pattern = pattern_next; + *string = string_next; + } else { +@@ -133,20 +133,20 @@ + } + + struct NextCharUTF8 { +- base_icu::UChar32 operator()(const char** p, const char* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char** p, const char* end) { ++ UChar32 c; + int offset = 0; +- CBU8_NEXT(*p, offset, end - *p, c); ++ U8_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } + }; + + struct NextCharUTF16 { +- base_icu::UChar32 operator()(const char16** p, const char16* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char16** p, const char16* end) { ++ UChar32 c; + int offset = 0; +- CBU16_NEXT(*p, offset, end - *p, c); ++ U16_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2016-01-12 03:14:39.106365912 +0100 +@@ -6,7 +6,7 @@ + + #include "base/logging.h" + #include "base/strings/string_util.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +@@ -201,7 +201,7 @@ + void SplitString(const string16& str, + char16 c, + std::vector* result) { +- DCHECK(CBU16_IS_SINGLE(c)); ++ DCHECK(U16_IS_SINGLE(c)); + *result = SplitStringT( + str, c, TRIM_WHITESPACE, SPLIT_WANT_ALL); + +@@ -274,7 +274,7 @@ + void SplitStringDontTrim(StringPiece16 str, + char16 c, + std::vector* result) { +- DCHECK(CBU16_IS_SINGLE(c)); ++ DCHECK(U16_IS_SINGLE(c)); + *result = SplitStringT( + str, c, KEEP_WHITESPACE, SPLIT_WANT_ALL); + } +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2016-01-12 03:15:00.981480560 +0100 +@@ -24,7 +24,7 @@ + #include "base/strings/string_split.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "build/build_config.h" + + // Remove when this entire file is in the base namespace. +@@ -274,19 +274,19 @@ + return; + } + DCHECK_LE(byte_size, static_cast(kint32max)); +- // Note: This cast is necessary because CBU8_NEXT uses int32s. ++ // Note: This cast is necessary because U8_NEXT uses int32s. + int32 truncation_length = static_cast(byte_size); + int32 char_index = truncation_length - 1; + const char* data = input.data(); + +- // Using CBU8, we will move backwards from the truncation point ++ // Using U8, we will move backwards from the truncation point + // to the beginning of the string looking for a valid UTF8 + // character. Once a full UTF8 character is found, we will + // truncate the string to the end of that character. + while (char_index >= 0) { + int32 prev = char_index; +- base_icu::UChar32 code_point = 0; +- CBU8_NEXT(data, char_index, truncation_length, code_point); ++ UChar32 code_point = 0; ++ U8_NEXT(data, char_index, truncation_length, code_point); + if (!IsValidCharacter(code_point) || + !IsValidCodepoint(code_point)) { + char_index = prev - 1; +@@ -447,7 +447,7 @@ + + while (char_index < src_len) { + int32 code_point; +- CBU8_NEXT(src, char_index, src_len, code_point); ++ U8_NEXT(src, char_index, src_len, code_point); + if (!IsValidCharacter(code_point)) + return false; + } +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-01-12 03:15:27.384618939 +0100 +@@ -4,7 +4,7 @@ + + #include "base/strings/utf_string_conversion_utils.h" + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +@@ -18,7 +18,7 @@ + // use a signed type for code_point. But this function returns false + // on error anyway, so code_point_out is unsigned. + int32 code_point; +- CBU8_NEXT(src, *char_index, src_len, code_point); ++ U8_NEXT(src, *char_index, src_len, code_point); + *code_point_out = static_cast(code_point); + + // The ICU macro above moves to the next char, we want to point to the last +@@ -33,16 +33,16 @@ + int32 src_len, + int32* char_index, + uint32* code_point) { +- if (CBU16_IS_SURROGATE(src[*char_index])) { +- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || ++ if (U16_IS_SURROGATE(src[*char_index])) { ++ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || + *char_index + 1 >= src_len || +- !CBU16_IS_TRAIL(src[*char_index + 1])) { ++ !U16_IS_TRAIL(src[*char_index + 1])) { + // Invalid surrogate pair. + return false; + } + + // Valid surrogate pair. +- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], ++ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], + src[*char_index + 1]); + (*char_index)++; + } else { +@@ -76,30 +76,30 @@ + } + + +- // CBU8_APPEND_UNSAFE can append up to 4 bytes. ++ // U8_APPEND_UNSAFE can append up to 4 bytes. + size_t char_offset = output->length(); + size_t original_char_offset = char_offset; +- output->resize(char_offset + CBU8_MAX_LENGTH); ++ output->resize(char_offset + U8_MAX_LENGTH); + +- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); + +- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so ++ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so + // it will represent the new length of the string. + output->resize(char_offset); + return char_offset - original_char_offset; + } + + size_t WriteUnicodeCharacter(uint32 code_point, string16* output) { +- if (CBU16_LENGTH(code_point) == 1) { ++ if (U16_LENGTH(code_point) == 1) { + // Thie code point is in the Basic Multilingual Plane (BMP). + output->push_back(static_cast(code_point)); + return 1; + } + // Non-BMP characters use a double-character encoding. + size_t char_offset = output->length(); +- output->resize(char_offset + CBU16_MAX_LENGTH); +- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); +- return CBU16_MAX_LENGTH; ++ output->resize(char_offset + U16_MAX_LENGTH); ++ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ return U16_MAX_LENGTH; + } + + // Generalized Unicode converter ----------------------------------------------- +diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-01-12 03:15:51.205743785 +0100 +@@ -5,13 +5,13 @@ + #include "ui/gfx/utf16_indexing.h" + + #include "base/logging.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace gfx { + + bool IsValidCodePointIndex(const base::string16& s, size_t index) { + return index == 0 || index == s.length() || +- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); ++ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); + } + + ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch new file mode 100644 index 0000000..12c830a --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch @@ -0,0 +1,49 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 +@@ -623,8 +623,6 @@ + 'third_party/dmg_fp/g_fmt.cc', + 'third_party/icu/icu_utf.cc', + 'third_party/icu/icu_utf.h', +- 'third_party/nspr/prtime.cc', +- 'third_party/nspr/prtime.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'thread_task_runner_handle.cc', +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 +@@ -506,8 +506,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "thread_task_runner_handle.cc", + "thread_task_runner_handle.h", +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-01-12 03:01:20.876004555 +0100 +@@ -6,7 +6,7 @@ + #include + + #include "base/compiler_specific.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "testing/gtest/include/gtest/gtest.h" + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2016-01-12 03:01:20.877004561 +0100 +@@ -13,7 +13,8 @@ + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++ ++#include + + namespace base { + From 33131a9eb85e3ed01cda6969c1fa7ce8e9d17bbf Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 12 Jan 2016 03:43:19 +0100 Subject: [PATCH 021/437] Fix patch file names --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 97d0aea..57ffceb 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -54,12 +54,12 @@ Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch5: qtwebengine-opensource-src-5.6.0-system-nspr-prtime.patch +Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch6: qtwebengine-opensource-src-5.6.0-system-icu-utf.patch +Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} From 1bb73067eb987e65a4c4ee30b64ab04f406ed6e6 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 12 Jan 2016 04:10:50 +0100 Subject: [PATCH 022/437] Fix system-nspr-prtime patch to match Fedora paths The clean way to do this would probably be to call pkg-config or nspr-config to get a -I flag and use just #include , but this should work for now. --- ...bengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch index 12c830a..dffa81e 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch @@ -30,7 +30,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/p #include "base/compiler_specific.h" -#include "base/third_party/nspr/prtime.h" -+#include ++#include #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" @@ -43,7 +43,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/t #include "base/strings/stringprintf.h" -#include "base/third_party/nspr/prtime.h" + -+#include ++#include namespace base { From 632ea2de5b30e6b23f2d186ff616d86b9db354f1 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 13 Jan 2016 01:56:52 +0100 Subject: [PATCH 023/437] Add an (optimistic) ExclusiveArch list because of V8 (tracking bug: #1298011) * Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.11.beta - Add an (optimistic) ExclusiveArch list because of V8 (tracking bug: #1298011) --- qt5-qtwebengine.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 57ffceb..827a585 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.10.beta%{?dist} +Release: 0.11.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -61,6 +61,14 @@ Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch # undoing, there were no modifications at all. Must be applied after Patch5. Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch +# the architectures theoretically supported by the version of V8 used (#1298011) +# You may need some minor patching to build on one of the secondary +# architectures, e.g., to add to the Qt -> Chromium -> V8 arch translations. +# If you cannot get this package to build on your secondary architecure, please: +# * remove your architecture from this list AND +# * put #1298011 onto your ExcludeArch tracker. +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc ppc64 ppc64le mips mipsel mips64el + BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} BuildRequires: qt5-qtxmlpatterns-devel >= %{version} @@ -334,6 +342,9 @@ popd %changelog +* Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.11.beta +- Add an (optimistic) ExclusiveArch list because of V8 (tracking bug: #1298011) + * Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.10.beta - Unbundle prtime.cc, use the system NSPR instead (which is already required) - Unbundle icu_utf.cc, use the system ICU instead (which is already required) From 75c556639cc8d33a9a10717f9da39c17b5c497b2 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 13 Jan 2016 01:57:53 +0100 Subject: [PATCH 024/437] Fix changelog date It's already Wed Jan 13 2016 in UTC. --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 827a585..f55bc50 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -342,7 +342,7 @@ popd %changelog -* Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.11.beta +* Wed Jan 13 2016 Kevin Kofler - 5.6.0-0.11.beta - Add an (optimistic) ExclusiveArch list because of V8 (tracking bug: #1298011) * Tue Jan 12 2016 Kevin Kofler - 5.6.0-0.10.beta From 2ce8abfa5bc9b6109b873d099822c68c076f59a5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 13 Jan 2016 14:31:44 +0100 Subject: [PATCH 025/437] Update forked NSS SSL code to 3.21, match system NSS (backport from Chromium) * Wed Jan 13 2016 Kevin Kofler - 5.6.0-0.12.beta - Update forked NSS SSL code to 3.21, match system NSS (backport from Chromium) --- qt5-qtwebengine.spec | 14 +- ...ine-opensource-src-5.6.0-beta-nss321.patch | 7898 +++++++++++++++++ 2 files changed, 7910 insertions(+), 2 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-nss321.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f55bc50..d9d3bde 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.11.beta%{?dist} +Release: 0.12.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -60,6 +60,9 @@ Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch +# update the bundled patched NSS SSL implementation to NSS 3.21, matching the +# system NSS (backport of https://codereview.chromium.org/1511123006) +Patch7: qtwebengine-opensource-src-5.6.0-beta-nss321.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -217,7 +220,10 @@ Provides: bundled(xdg-user-dirs) = 0.10 Provides: bundled(mozilla_security_manager) = 1.9.2 # Ewww... Chromium uses the system NSS, but bundles a heavily patched version of # its SSL implementation. This might crash and burn sooner or later! -Provides: bundled(nss) = 3.19 +# See also Patch7, which updates it from 3.19 to 3.21, because the mix of +# versions was indeed causing issues. (Ironically, HTTPS not working on Google's +# own sites!) +Provides: bundled(nss) = 3.21 # Bundled in src/3rdparty/chromium/url/third_party: # Check src/3rdparty/chromium/third_party/url/*/README.chromium for version @@ -273,6 +279,7 @@ BuildArch: noarch %patch4 -p1 -b .no-neon %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf +%patch7 -p1 -b .nss321 %build export STRIP=strip @@ -342,6 +349,9 @@ popd %changelog +* Wed Jan 13 2016 Kevin Kofler - 5.6.0-0.12.beta +- Update forked NSS SSL code to 3.21, match system NSS (backport from Chromium) + * Wed Jan 13 2016 Kevin Kofler - 5.6.0-0.11.beta - Add an (optimistic) ExclusiveArch list because of V8 (tracking bug: #1298011) diff --git a/qtwebengine-opensource-src-5.6.0-beta-nss321.patch b/qtwebengine-opensource-src-5.6.0-beta-nss321.patch new file mode 100644 index 0000000..1a5ebbd --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-nss321.patch @@ -0,0 +1,7898 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2016-01-13 14:18:55.587954670 +0100 +@@ -695,6 +695,8 @@ + "nss/lib/freebl/win_rand.c", + "nss/lib/nss/nss.h", + "nss/lib/nss/nssinit.c", ++ "nss/lib/nss/nssoptions.c", ++ "nss/lib/nss/nssoptions.h", + "nss/lib/nss/nssrenam.h", + "nss/lib/nss/utilwrap.c", + "nss/lib/pk11wrap/debug_module.c", +@@ -859,6 +861,7 @@ + "nss/lib/util/utilpars.h", + "nss/lib/util/utilparst.h", + "nss/lib/util/utilrename.h", ++ "nss/lib/util/verref.h", + ] + + sources -= [ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2016-01-13 14:18:55.588954676 +0100 +@@ -1,7 +1,7 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 1167d6d..dabe333 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index c5cb1eb..299e414 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c + @@ -8,6 +8,7 @@ + + /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ +@@ -10,7 +10,7 @@ + #include "cert.h" + #include "ssl.h" + #include "cryptohi.h" /* for DSAU_ stuff */ +-@@ -44,6 +45,9 @@ ++@@ -46,6 +47,9 @@ + #ifdef NSS_ENABLE_ZLIB + #include "zlib.h" + #endif +@@ -20,7 +20,7 @@ + + #ifndef PK11_SETATTRS + #define PK11_SETATTRS(x,id,v,l) (x)->type = (id); \ +-@@ -1874,6 +1878,63 @@ ssl3_BuildRecordPseudoHeader(unsigned char *out, ++@@ -1897,6 +1901,63 @@ ssl3_BuildRecordPseudoHeader(unsigned char *out, + return 13; + } + +@@ -84,7 +84,7 @@ + static SECStatus + ssl3_AESGCM(ssl3KeyMaterial *keys, + PRBool doDecrypt, +-@@ -1925,10 +1986,10 @@ ssl3_AESGCM(ssl3KeyMaterial *keys, ++@@ -1948,10 +2009,10 @@ ssl3_AESGCM(ssl3KeyMaterial *keys, + gcmParams.ulTagBits = tagSize * 8; + + if (doDecrypt) { +@@ -97,7 +97,7 @@ + maxout, in, inlen); + } + *outlen += (int) uOutLen; +-@@ -5162,6 +5223,10 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5337,6 +5398,10 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + ssl3_DisableNonDTLSSuites(ss); + } + +@@ -108,7 +108,7 @@ + /* how many suites are permitted by policy and user preference? */ + num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE); + if (!num_suites) { +-@@ -8172,6 +8237,10 @@ ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -8400,6 +8465,10 @@ ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + ssl3_DisableNonDTLSSuites(ss); + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2016-01-13 14:18:55.588954676 +0100 +@@ -46,9 +46,3 @@ + patch -p2 < $patches_dir/nssrwlock.patch + + patch -p2 < $patches_dir/reorderextensions.patch +- +-patch -p2 < $patches_dir/removebuildmetadata.patch +- +-patch -p2 < $patches_dir/norenegotiatelock.patch +- +-patch -p2 < $patches_dir/dh1024.patch +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2016-01-13 14:18:55.589954682 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 163572c..60af5b0 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -43,6 +43,7 @@ ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 8f1c547..9aaf601 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -45,6 +45,7 @@ + + static SECStatus ssl3_AuthCertificate(sslSocket *ss); + static void ssl3_CleanupPeerCerts(sslSocket *ss); +@@ -10,15 +10,15 @@ + static PK11SymKey *ssl3_GenerateRSAPMS(sslSocket *ss, ssl3CipherSpec *spec, + PK11SlotInfo * serverKeySlot); + static SECStatus ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms); +-@@ -6549,6 +6550,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -6751,6 +6752,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + /* copy the peer cert from the SID */ + if (sid->peerCert != NULL) { + ss->sec.peerCert = CERT_DupCertificate(sid->peerCert); + + ssl3_CopyPeerCertsFromSID(ss, sid); + } + +- /* NULL value for PMS signifies re-use of the old MS */ +-@@ -8140,6 +8142,7 @@ compression_found: ++ /* NULL value for PMS because we are reusing the old MS */ ++@@ -8405,6 +8407,7 @@ compression_found: + ss->sec.ci.sid = sid; + if (sid->peerCert != NULL) { + ss->sec.peerCert = CERT_DupCertificate(sid->peerCert); +@@ -26,7 +26,7 @@ + } + + /* +-@@ -9763,6 +9766,44 @@ ssl3_CleanupPeerCerts(sslSocket *ss) ++@@ -10389,6 +10392,44 @@ ssl3_CleanupPeerCerts(sslSocket *ss) + ss->ssl3.peerCertChain = NULL; + } + +@@ -71,7 +71,7 @@ + /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete + * ssl3 CertificateStatus message. + * Caller must hold Handshake and RecvBuf locks. +-@@ -10041,6 +10082,7 @@ ssl3_AuthCertificate(sslSocket *ss) ++@@ -10669,6 +10710,7 @@ ssl3_AuthCertificate(sslSocket *ss) + } + + ss->sec.ci.sid->peerCert = CERT_DupCertificate(ss->sec.peerCert); +@@ -79,11 +79,11 @@ + + if (!ss->sec.isServer) { + CERTCertificate *cert = ss->sec.peerCert; +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 1b38a52..086f6d2 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -597,6 +597,8 @@ typedef enum { never_cached, ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index ad31aae..9dcc29e 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -608,6 +608,8 @@ typedef enum { never_cached, + invalid_cache /* no longer in any cache. */ + } Cached; + +@@ -92,7 +92,7 @@ + struct sslSessionIDStr { + /* The global cache lock must be held when accessing these members when the + * sid is in any cache. +-@@ -611,6 +613,7 @@ struct sslSessionIDStr { ++@@ -622,6 +624,7 @@ struct sslSessionIDStr { + */ + + CERTCertificate * peerCert; +@@ -100,10 +100,10 @@ + SECItemArray peerCertStatus; /* client only */ + const char * peerID; /* client only */ + const char * urlSvrName; /* client only */ +-diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c ++diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c + index 2e861f1..be11008 100644 +---- a/ssl/sslnonce.c +-+++ b/ssl/sslnonce.c ++--- a/lib/ssl/sslnonce.c +++++ b/lib/ssl/sslnonce.c + @@ -164,6 +164,7 @@ lock_cache(void) + static void + ssl_DestroySID(sslSessionID *sid) +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2016-01-13 14:18:55.589954682 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 6819b03..6a4a443 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -5748,7 +5748,6 @@ SSL3_ShutdownServerCache(void) ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 2533679..ba3d012 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -5921,7 +5921,6 @@ SSL3_ShutdownServerCache(void) + } + + PZ_Unlock(symWrapKeysLock); +@@ -10,7 +10,7 @@ + return SECSuccess; + } + +-@@ -5800,7 +5799,7 @@ getWrappingKey( sslSocket * ss, ++@@ -5973,7 +5972,7 @@ getWrappingKey( sslSocket * ss, + + pSymWrapKey = &symWrapKeys[symWrapMechIndex].symWrapKey[exchKeyType]; + +@@ -19,11 +19,11 @@ + + PZ_Lock(symWrapKeysLock); + +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 88b2eba..c4c87b4 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1924,9 +1924,7 @@ extern SECStatus ssl_InitSymWrapKeysLock(void); ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index d5f326f..d53c446 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1957,9 +1957,7 @@ extern SECStatus ssl_InitSymWrapKeysLock(void); + + extern SECStatus ssl_FreeSymWrapKeysLock(void); + +@@ -34,10 +34,10 @@ + + /***************** platform client auth ****************/ + +-diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c ++diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c + index 1326a8b..c45849d 100644 +---- a/ssl/sslnonce.c +-+++ b/ssl/sslnonce.c ++--- a/lib/ssl/sslnonce.c +++++ b/lib/ssl/sslnonce.c + @@ -35,91 +35,55 @@ static PZLock * cacheLock = NULL; + #define LOCK_CACHE lock_cache() + #define UNLOCK_CACHE PZ_Unlock(cacheLock) +@@ -204,11 +204,11 @@ + PZ_Lock(cacheLock); + } + +-diff --git a/ssl/sslsnce.c b/ssl/sslsnce.c +-index 4d9ef38..3279200 100644 +---- a/ssl/sslsnce.c +-+++ b/ssl/sslsnce.c +-@@ -1352,7 +1352,7 @@ SSL_ConfigServerSessionIDCache( int maxCacheEntries, ++diff --git a/lib/ssl/sslsnce.c b/lib/ssl/sslsnce.c ++index f31b2e9..3856c13 100644 ++--- a/lib/ssl/sslsnce.c +++++ b/lib/ssl/sslsnce.c ++@@ -1363,7 +1363,7 @@ SSL_ConfigServerSessionIDCache( int maxCacheEntries, + PRUint32 ssl3_timeout, + const char * directory) + { +@@ -217,7 +217,7 @@ + return SSL_ConfigServerSessionIDCacheInstance(&globalCache, + maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE); + } +-@@ -1466,7 +1466,7 @@ SSL_ConfigServerSessionIDCacheWithOpt( ++@@ -1477,7 +1477,7 @@ SSL_ConfigServerSessionIDCacheWithOpt( + PRBool enableMPCache) + { + if (!enableMPCache) { +@@ -226,7 +226,7 @@ + return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, + ssl2_timeout, ssl3_timeout, directory, PR_FALSE, + maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); +-@@ -1511,7 +1511,7 @@ SSL_InheritMPServerSIDCacheInstance(cacheDesc *cache, const char * envString) ++@@ -1521,7 +1521,7 @@ SSL_InheritMPServerSIDCacheInstance(cacheDesc *cache, const char * envString) + return SECSuccess; /* already done. */ + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2016-01-13 14:18:55.590954688 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index dabe333..6819b03 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -41,6 +41,21 @@ ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 299e414..2533679 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -43,6 +43,21 @@ + #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) + #endif + +@@ -24,16 +24,16 @@ + #include + #ifdef NSS_ENABLE_ZLIB + #include "zlib.h" +-@@ -105,6 +120,8 @@ static ssl3CipherSuiteCfg cipherSuites[ssl_V3_SUITES_IMPLEMENTED] = { ++@@ -110,6 +125,8 @@ static ssl3CipherSuiteCfg cipherSuites[ssl_V3_SUITES_IMPLEMENTED] = { + /* cipher_suite policy enabled isPresent */ + + #ifndef NSS_DISABLE_ECC + + { TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + + { TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, ++ { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA is out of order to work around +-@@ -296,6 +313,7 @@ static const ssl3BulkCipherDef bulk_cipher_defs[] = { ++@@ -307,6 +324,7 @@ static const ssl3BulkCipherDef bulk_cipher_defs[] = { + {cipher_camellia_256, calg_camellia, 32,32, type_block, 16,16, 0, 0}, + {cipher_seed, calg_seed, 16,16, type_block, 16,16, 0, 0}, + {cipher_aes_128_gcm, calg_aes_gcm, 16,16, type_aead, 4, 0,16, 8}, +@@ -41,16 +41,16 @@ + {cipher_missing, calg_null, 0, 0, type_stream, 0, 0, 0, 0}, + }; + +-@@ -422,6 +440,8 @@ static const ssl3CipherSuiteDef cipher_suite_defs[] = ++@@ -433,6 +451,8 @@ static const ssl3CipherSuiteDef cipher_suite_defs[] = + {TLS_RSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_rsa}, + {TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_ecdhe_rsa}, + {TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_ecdhe_ecdsa}, + + {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_rsa}, + + {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_ecdsa}, + +- #ifndef NSS_DISABLE_ECC +- {TLS_ECDH_ECDSA_WITH_NULL_SHA, cipher_null, mac_sha, kea_ecdh_ecdsa}, +-@@ -487,6 +507,7 @@ static const SSLCipher2Mech alg2Mech[] = { ++ {TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_dhe_dss}, ++ {TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, cipher_aes_128, hmac_sha256, kea_dhe_dss}, ++@@ -502,6 +522,7 @@ static const SSLCipher2Mech alg2Mech[] = { + { calg_camellia , CKM_CAMELLIA_CBC }, + { calg_seed , CKM_SEED_CBC }, + { calg_aes_gcm , CKM_AES_GCM }, +@@ -58,7 +58,7 @@ + /* { calg_init , (CK_MECHANISM_TYPE)0x7fffffffL } */ + }; + +-@@ -662,6 +683,8 @@ ssl3_CipherSuiteAllowedForVersionRange( ++@@ -679,6 +700,8 @@ ssl3_CipherSuiteAllowedForVersionRange( + case TLS_RSA_WITH_NULL_SHA256: + return vrange->max == SSL_LIBRARY_VERSION_TLS_1_2; + +@@ -67,7 +67,7 @@ + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: + case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: +-@@ -2070,6 +2093,46 @@ ssl3_AESGCMBypass(ssl3KeyMaterial *keys, ++@@ -2093,6 +2116,46 @@ ssl3_AESGCMBypass(ssl3KeyMaterial *keys, + } + #endif + +@@ -114,7 +114,7 @@ + /* Initialize encryption and MAC contexts for pending spec. + * Master Secret already is derived. + * Caller holds Spec write lock. +-@@ -2103,13 +2166,17 @@ ssl3_InitPendingContextsPKCS11(sslSocket *ss) ++@@ -2126,13 +2189,17 @@ ssl3_InitPendingContextsPKCS11(sslSocket *ss) + pwSpec->client.write_mac_context = NULL; + pwSpec->server.write_mac_context = NULL; + +@@ -134,11 +134,11 @@ + return SECSuccess; + } + +-diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c +-index 9b91270..31e0774 100644 +---- a/ssl/ssl3ecc.c +-+++ b/ssl/ssl3ecc.c +-@@ -921,6 +921,7 @@ static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { ++diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c ++index cf8e741..ab5ab14 100644 ++--- a/lib/ssl/ssl3ecc.c +++++ b/lib/ssl/ssl3ecc.c ++@@ -926,6 +926,7 @@ static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, +@@ -146,7 +146,7 @@ + TLS_ECDHE_ECDSA_WITH_NULL_SHA, + TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + 0 /* end of list marker */ +-@@ -932,6 +933,7 @@ static const ssl3CipherSuite ecdhe_rsa_suites[] = { ++@@ -937,6 +938,7 @@ static const ssl3CipherSuite ecdhe_rsa_suites[] = { + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, +@@ -154,7 +154,7 @@ + TLS_ECDHE_RSA_WITH_NULL_SHA, + TLS_ECDHE_RSA_WITH_RC4_128_SHA, + 0 /* end of list marker */ +-@@ -944,6 +946,7 @@ static const ssl3CipherSuite ecSuites[] = { ++@@ -949,6 +951,7 @@ static const ssl3CipherSuite ecSuites[] = { + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, +@@ -162,7 +162,7 @@ + TLS_ECDHE_ECDSA_WITH_NULL_SHA, + TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, +-@@ -951,6 +954,7 @@ static const ssl3CipherSuite ecSuites[] = { ++@@ -956,6 +959,7 @@ static const ssl3CipherSuite ecSuites[] = { + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, +@@ -170,10 +170,10 @@ + TLS_ECDHE_RSA_WITH_NULL_SHA, + TLS_ECDHE_RSA_WITH_RC4_128_SHA, + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, +-diff --git a/ssl/sslenum.c b/ssl/sslenum.c +-index 09ce43f..a036627 100644 +---- a/ssl/sslenum.c +-+++ b/ssl/sslenum.c ++diff --git a/lib/ssl/sslenum.c b/lib/ssl/sslenum.c ++index f69aed2..b4a8844 100644 ++--- a/lib/ssl/sslenum.c +++++ b/lib/ssl/sslenum.c + @@ -37,17 +37,21 @@ + * + * Exception: Because some servers ignore the high-order byte of the cipher +@@ -199,11 +199,11 @@ + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA must appear before +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index ea71975..88b2eba 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -65,6 +65,7 @@ typedef SSLSignType SSL3SignType; ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 60dd243..d5f326f 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -66,6 +66,7 @@ typedef SSLSignType SSL3SignType; + #define calg_camellia ssl_calg_camellia + #define calg_seed ssl_calg_seed + #define calg_aes_gcm ssl_calg_aes_gcm +@@ -211,16 +211,16 @@ + + #define mac_null ssl_mac_null + #define mac_md5 ssl_mac_md5 +-@@ -299,7 +300,7 @@ typedef struct { ++@@ -301,7 +302,7 @@ typedef struct { + } ssl3CipherSuiteCfg; + + #ifndef NSS_DISABLE_ECC +--#define ssl_V3_SUITES_IMPLEMENTED 61 +-+#define ssl_V3_SUITES_IMPLEMENTED 63 ++-#define ssl_V3_SUITES_IMPLEMENTED 64 +++#define ssl_V3_SUITES_IMPLEMENTED 66 + #else +- #define ssl_V3_SUITES_IMPLEMENTED 37 ++ #define ssl_V3_SUITES_IMPLEMENTED 40 + #endif /* NSS_DISABLE_ECC */ +-@@ -485,6 +486,7 @@ typedef enum { ++@@ -495,6 +496,7 @@ typedef enum { + cipher_camellia_256, + cipher_seed, + cipher_aes_128_gcm, +@@ -228,11 +228,11 @@ + cipher_missing /* reserved for no such supported cipher */ + /* This enum must match ssl3_cipherName[] in ssl3con.c. */ + } SSL3BulkCipher; +-diff --git a/ssl/sslinfo.c b/ssl/sslinfo.c +-index ba230d2..845d9f0 100644 +---- a/ssl/sslinfo.c +-+++ b/ssl/sslinfo.c +-@@ -110,6 +110,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len) ++diff --git a/lib/ssl/sslinfo.c b/lib/ssl/sslinfo.c ++index 7048eb8..bef3190 100644 ++--- a/lib/ssl/sslinfo.c +++++ b/lib/ssl/sslinfo.c ++@@ -148,6 +148,7 @@ SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, + #define C_NULL "NULL", calg_null + #define C_SJ "SKIPJACK", calg_sj + #define C_AESGCM "AES-GCM", calg_aes_gcm +@@ -240,7 +240,7 @@ + + #define B_256 256, 256, 256 + #define B_128 128, 128, 128 +-@@ -188,12 +189,14 @@ static const SSLCipherSuiteInfo suiteInfo[] = { ++@@ -229,12 +230,14 @@ static const SSLCipherSuiteInfo suiteInfo[] = { + {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA, 1, 0, 0, }, + {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_256, M_SHA, 1, 0, 0, }, +@@ -255,11 +255,11 @@ + + {0,CS(TLS_ECDHE_RSA_WITH_NULL_SHA), S_RSA, K_ECDHE, C_NULL, B_0, M_SHA, 0, 0, 0, }, + {0,CS(TLS_ECDHE_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDHE, C_RC4, B_128, M_SHA, 0, 0, 0, }, +-diff --git a/ssl/sslproto.h b/ssl/sslproto.h +-index e02442c..dc653c9 100644 +---- a/ssl/sslproto.h +-+++ b/ssl/sslproto.h +-@@ -258,6 +258,9 @@ ++diff --git a/lib/ssl/sslproto.h b/lib/ssl/sslproto.h ++index 2db47a5..36ae6c9 100644 ++--- a/lib/ssl/sslproto.h +++++ b/lib/ssl/sslproto.h ++@@ -260,6 +260,9 @@ + #define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F + #define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031 + +@@ -269,11 +269,11 @@ + /* Netscape "experimental" cipher suites. */ + #define SSL_RSA_OLDFIPS_WITH_3DES_EDE_CBC_SHA 0xffe0 + #define SSL_RSA_OLDFIPS_WITH_DES_CBC_SHA 0xffe1 +-diff --git a/ssl/sslt.h b/ssl/sslt.h +-index 430d216..fe0ad07 100644 +---- a/ssl/sslt.h +-+++ b/ssl/sslt.h +-@@ -94,7 +94,8 @@ typedef enum { ++diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h ++index 5593579..a2eff62 100644 ++--- a/lib/ssl/sslt.h +++++ b/lib/ssl/sslt.h ++@@ -117,7 +117,8 @@ typedef enum { + ssl_calg_aes = 7, + ssl_calg_camellia = 8, + ssl_calg_seed = 9, +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2016-01-13 14:18:55.591954693 +0100 +@@ -1,25 +1,25 @@ +-diff --git a/ssl/SSLerrs.h b/ssl/SSLerrs.h +-index 174037b..81da41c 100644 +---- a/ssl/SSLerrs.h +-+++ b/ssl/SSLerrs.h +-@@ -422,3 +422,12 @@ ER3(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL, (SSL_ERROR_BASE + 130), +- ER3(SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT, (SSL_ERROR_BASE + 131), +- "The server rejected the handshake because the client downgraded to a lower " +- "TLS version than the server supports.") ++diff --git a/lib/ssl/SSLerrs.h b/lib/ssl/SSLerrs.h ++index 6028396..3d21ab8 100644 ++--- a/lib/ssl/SSLerrs.h +++++ b/lib/ssl/SSLerrs.h ++@@ -440,3 +440,12 @@ ER3(SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 136), ++ ++ ER3(SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 137), ++ "The peer tried to resume with an unexpected extended_master_secret extension") + + +-+ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 132), +++ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 138), + +"SSL received a malformed TLS Channel ID extension.") + + +-+ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 133), +++ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 139), + +"The application provided an invalid TLS Channel ID key.") + + +-+ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 134), +++ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 140), + +"The application could not get a TLS Channel ID.") +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 593dd00..716537d 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -1025,6 +1025,34 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 85ced8a..120c257 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -1135,6 +1135,34 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, + SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, + PRBool *last_handshake_resumed); + +@@ -54,11 +54,11 @@ + /* + ** How long should we wait before retransmitting the next flight of + ** the DTLS handshake? Returns SECFailure if not DTLS or not in a +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 29e8f1c..c0e8e79 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -55,6 +55,7 @@ static SECStatus ssl3_SendCertificateStatus( sslSocket *ss); ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 304e03b..2ae8ce9 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -57,6 +57,7 @@ static SECStatus ssl3_SendCertificateStatus( sslSocket *ss); + static SECStatus ssl3_SendEmptyCertificate( sslSocket *ss); + static SECStatus ssl3_SendCertificateRequest(sslSocket *ss); + static SECStatus ssl3_SendNextProto( sslSocket *ss); +@@ -66,7 +66,7 @@ + static SECStatus ssl3_SendFinished( sslSocket *ss, PRInt32 flags); + static SECStatus ssl3_SendServerHello( sslSocket *ss); + static SECStatus ssl3_SendServerHelloDone( sslSocket *ss); +-@@ -6296,6 +6297,15 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -6470,6 +6471,15 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + } + #endif /* NSS_PLATFORM_CLIENT_AUTH */ + +@@ -82,7 +82,7 @@ + temp = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); + if (temp < 0) { + goto loser; /* alert has been sent */ +-@@ -6578,7 +6588,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -6780,7 +6790,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + if (rv != SECSuccess) { + goto alert_loser; /* err code was set */ + } +@@ -91,9 +91,9 @@ + } while (0); + + if (sid_match) +-@@ -6613,6 +6623,27 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) +- } else { +- ss->ssl3.hs.ws = wait_cert_request; ++@@ -6819,6 +6829,27 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++ PORT_Assert(ss->ssl3.hs.kea_def->ephemeral); ++ ss->ssl3.hs.ws = wait_server_key; + } + + + +winner: +@@ -119,7 +119,7 @@ + return SECSuccess; + + alert_loser: +-@@ -7565,7 +7596,14 @@ ssl3_SendClientSecondRound(sslSocket *ss) ++@@ -7774,7 +7805,14 @@ ssl3_SendClientSecondRound(sslSocket *ss) + if (rv != SECSuccess) { + goto loser; /* err code was set. */ + } +@@ -134,7 +134,7 @@ + if (ss->opt.enableFalseStart) { + if (!ss->ssl3.hs.authCertificatePending) { + /* When we fix bug 589047, we will need to know whether we are +-@@ -7602,6 +7640,33 @@ ssl3_SendClientSecondRound(sslSocket *ss) ++@@ -7811,6 +7849,33 @@ ssl3_SendClientSecondRound(sslSocket *ss) + + ssl_ReleaseXmitBufLock(ss); /*******************************/ + +@@ -168,7 +168,7 @@ + if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) + ss->ssl3.hs.ws = wait_new_session_ticket; + else +-@@ -10590,6 +10655,184 @@ ssl3_RecordKeyLog(sslSocket *ss) ++@@ -11264,6 +11329,184 @@ ssl3_RecordKeyLog(sslSocket *ss) + } + + /* called from ssl3_SendClientSecondRound +@@ -353,7 +353,7 @@ + * ssl3_HandleClientHello + * ssl3_HandleFinished + */ +-@@ -10849,11 +11092,16 @@ ssl3_HandleFinished(sslSocket *ss, SSL3Opaque *b, PRUint32 length, ++@@ -11531,11 +11774,16 @@ ssl3_HandleFinished(sslSocket *ss, SSL3Opaque *b, PRUint32 length, + flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER; + } + +@@ -374,7 +374,7 @@ + } + + if (IS_DTLS(ss)) { +-@@ -12333,6 +12581,11 @@ ssl3_DestroySSL3Info(sslSocket *ss) ++@@ -13095,6 +13343,11 @@ ssl3_DestroySSL3Info(sslSocket *ss) + ssl_FreePlatformKey(ss->ssl3.platformClientKey); + #endif /* NSS_PLATFORM_CLIENT_AUTH */ + +@@ -386,10 +386,10 @@ + if (ss->ssl3.peerCertArena != NULL) + ssl3_CleanupPeerCerts(ss); + +-diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c +-index 0a2288a..4d17587 100644 +---- a/ssl/ssl3ext.c +-+++ b/ssl/ssl3ext.c ++diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c ++index 5661a5c..78825cb 100644 ++--- a/lib/ssl/ssl3ext.c +++++ b/lib/ssl/ssl3ext.c + @@ -73,6 +73,10 @@ static SECStatus ssl3_ClientHandleUseSRTPXtn(sslSocket * ss, PRUint16 ex_type, + SECItem *data); + static SECStatus ssl3_ServerHandleUseSRTPXtn(sslSocket * ss, PRUint16 ex_type, +@@ -401,15 +401,15 @@ + static PRInt32 ssl3_ServerSendStatusRequestXtn(sslSocket * ss, + PRBool append, PRUint32 maxBytes); + static SECStatus ssl3_ServerHandleStatusRequestXtn(sslSocket *ss, +-@@ -269,6 +273,7 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { ++@@ -276,6 +280,7 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { + { ssl_next_proto_nego_xtn, &ssl3_ClientHandleNextProtoNegoXtn }, + { ssl_app_layer_protocol_xtn, &ssl3_ClientHandleAppProtoXtn }, + { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, + + { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, + { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, ++ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, + { -1, NULL } +- }; +-@@ -296,6 +301,7 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { ++@@ -304,6 +309,7 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { + { ssl_next_proto_nego_xtn, &ssl3_ClientSendNextProtoNegoXtn }, + { ssl_app_layer_protocol_xtn, &ssl3_ClientSendAppProtoXtn }, + { ssl_use_srtp_xtn, &ssl3_ClientSendUseSRTPXtn }, +@@ -417,7 +417,7 @@ + { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, + { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, + { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, +-@@ -930,6 +936,61 @@ ssl3_ServerSendAppProtoXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) ++@@ -945,6 +951,61 @@ ssl3_ServerSendAppProtoXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) + } + + static SECStatus +@@ -479,10 +479,10 @@ + ssl3_ClientHandleStatusRequestXtn(sslSocket *ss, PRUint16 ex_type, + SECItem *data) + { +-diff --git a/ssl/ssl3prot.h b/ssl/ssl3prot.h +-index 485d7dd..78fbcaa 100644 +---- a/ssl/ssl3prot.h +-+++ b/ssl/ssl3prot.h ++diff --git a/lib/ssl/ssl3prot.h b/lib/ssl/ssl3prot.h ++index a93bef1..848bdee 100644 ++--- a/lib/ssl/ssl3prot.h +++++ b/lib/ssl/ssl3prot.h + @@ -136,7 +136,8 @@ typedef enum { + client_key_exchange = 16, + finished = 20, +@@ -493,10 +493,10 @@ + } SSL3HandshakeType; + + typedef struct { +-diff --git a/ssl/sslauth.c b/ssl/sslauth.c +-index 7f9c43b..c2d9201 100644 +---- a/ssl/sslauth.c +-+++ b/ssl/sslauth.c ++diff --git a/lib/ssl/sslauth.c b/lib/ssl/sslauth.c ++index e6981f0..03b23b4 100644 ++--- a/lib/ssl/sslauth.c +++++ b/lib/ssl/sslauth.c + @@ -216,6 +216,24 @@ SSL_GetClientAuthDataHook(PRFileDesc *s, SSLGetClientAuthData func, + return SECSuccess; + } +@@ -522,26 +522,26 @@ + #ifdef NSS_PLATFORM_CLIENT_AUTH + /* NEED LOCKS IN HERE. */ + SECStatus +-diff --git a/ssl/sslerr.h b/ssl/sslerr.h +-index 12dbb1d..24bf893 100644 +---- a/ssl/sslerr.h +-+++ b/ssl/sslerr.h +-@@ -198,6 +198,10 @@ SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL = (SSL_ERROR_BASE + 130), +- +- SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT = (SSL_ERROR_BASE + 131), +- +-+SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 132), +-+SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 133), +-+SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 134), ++diff --git a/lib/ssl/sslerr.h b/lib/ssl/sslerr.h ++index 192a107..835b812 100644 ++--- a/lib/ssl/sslerr.h +++++ b/lib/ssl/sslerr.h ++@@ -208,6 +208,10 @@ SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 135), ++ SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 136), ++ SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 137), ++ +++SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 138), +++SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 139), +++SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 140), + + + SSL_ERROR_END_OF_LIST /* let the c compiler determine the value of this. */ + } SSLErrorCodes; + #endif /* NO_SECURITY_ERROR_ENUM */ +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 2cf0b3a..e11860e 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -711,6 +711,14 @@ struct sslSessionIDStr { ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index c089889..c286518 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -722,6 +722,14 @@ struct sslSessionIDStr { + + SECItem srvName; + +@@ -556,7 +556,7 @@ + /* This lock is lazily initialized by CacheSID when a sid is first + * cached. Before then, there is no need to lock anything because + * the sid isn't being shared by anything. +-@@ -986,6 +994,9 @@ struct ssl3StateStr { ++@@ -999,6 +1007,9 @@ struct ssl3StateStr { + CERTCertificateList *clientCertChain; /* used by client */ + PRBool sendEmptyCert; /* used by client */ + +@@ -566,7 +566,7 @@ + int policy; + /* This says what cipher suites we can do, and should + * be either SSL_ALLOWED or SSL_RESTRICTED +-@@ -1264,6 +1275,8 @@ const unsigned char * preferredCipher; ++@@ -1294,6 +1305,8 @@ const unsigned char * preferredCipher; + void *pkcs11PinArg; + SSLNextProtoCallback nextProtoCallback; + void *nextProtoArg; +@@ -575,7 +575,7 @@ + + PRIntervalTime rTimeout; /* timeout for NSPR I/O */ + PRIntervalTime wTimeout; /* timeout for NSPR I/O */ +-@@ -1610,6 +1623,11 @@ extern SECStatus ssl3_RestartHandshakeAfterCertReq(sslSocket * ss, ++@@ -1640,6 +1653,11 @@ extern SECStatus ssl3_RestartHandshakeAfterCertReq(sslSocket * ss, + SECKEYPrivateKey * key, + CERTCertificateList *certChain); + +@@ -587,10 +587,10 @@ + extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error); + + /* +-diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c ++diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c + index be11008..1326a8b 100644 +---- a/ssl/sslnonce.c +-+++ b/ssl/sslnonce.c ++--- a/lib/ssl/sslnonce.c +++++ b/lib/ssl/sslnonce.c + @@ -180,6 +180,9 @@ ssl_DestroySID(sslSessionID *sid) + if (sid->u.ssl3.srvName.data) { + SECITEM_FreeItem(&sid->u.ssl3.srvName, PR_FALSE); +@@ -601,11 +601,11 @@ + + if (sid->u.ssl3.lock) { + PR_DestroyRWLock(sid->u.ssl3.lock); +-diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c +-index d44336e..5c6751a 100644 +---- a/ssl/sslsecur.c +-+++ b/ssl/sslsecur.c +-@@ -1582,6 +1582,42 @@ SSL_RestartHandshakeAfterCertReq(PRFileDesc * fd, ++diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c ++index f77d6fa..cca55bb 100644 ++--- a/lib/ssl/sslsecur.c +++++ b/lib/ssl/sslsecur.c ++@@ -1598,6 +1598,42 @@ SSL_RestartHandshakeAfterCertReq(PRFileDesc * fd, + return ret; + } + +@@ -648,11 +648,11 @@ + /* DO NOT USE. This function was exported in ssl.def with the wrong signature; + * this implementation exists to maintain link-time compatibility. + */ +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 9431fe4..042f24f 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -288,6 +288,8 @@ ssl_DupSocket(sslSocket *os) ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index 11e66f2..efba686 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -313,6 +313,8 @@ ssl_DupSocket(sslSocket *os) + ss->canFalseStartCallback = os->canFalseStartCallback; + ss->canFalseStartCallbackData = os->canFalseStartCallbackData; + ss->pkcs11PinArg = os->pkcs11PinArg; +@@ -661,7 +661,7 @@ + + /* Create security data */ + rv = ssl_CopySecurityInfo(ss, os); +-@@ -1733,6 +1735,10 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) ++@@ -1987,6 +1989,10 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) + ss->handshakeCallbackData = sm->handshakeCallbackData; + if (sm->pkcs11PinArg) + ss->pkcs11PinArg = sm->pkcs11PinArg; +@@ -672,7 +672,7 @@ + return fd; + loser: + return NULL; +-@@ -3021,6 +3027,8 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) ++@@ -3279,6 +3285,8 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) + ss->badCertArg = NULL; + ss->pkcs11PinArg = NULL; + ss->ephemeralECDHKeyPair = NULL; +@@ -681,12 +681,12 @@ + + ssl_ChooseOps(ss); + ssl2_InitSocketPolicy(ss); +-diff --git a/ssl/sslt.h b/ssl/sslt.h +-index 1d28feb..0900f28 100644 +---- a/ssl/sslt.h +-+++ b/ssl/sslt.h +-@@ -191,10 +191,11 @@ typedef enum { +- ssl_padding_xtn = 21, ++diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h ++index cd742bb..b6616e2 100644 ++--- a/lib/ssl/sslt.h +++++ b/lib/ssl/sslt.h ++@@ -238,11 +238,12 @@ typedef enum { ++ ssl_extended_master_secret_xtn = 23, + ssl_session_ticket_xtn = 35, + ssl_next_proto_nego_xtn = 13172, + + ssl_channel_id_xtn = 30032, +@@ -694,7 +694,8 @@ + ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ + } SSLExtensionType; + +--#define SSL_MAX_EXTENSIONS 11 /* doesn't include ssl_padding_xtn. */ +-+#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ ++-#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ +++#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ + +- #endif /* __sslt_h_ */ ++ typedef enum { ++ ssl_dhe_group_none = 0, +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2016-01-13 14:18:55.591954693 +0100 +@@ -1,10 +1,10 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index e9f5fb0..be6d88e 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -295,6 +295,13 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDefault(PRInt32 cipher, PRBool *enabled); +- SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); +- SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index db09425..437a822 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -387,6 +387,13 @@ SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, ++ */ ++ SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); + + +/* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|, + + * which must be an array of cipher suite ids of length |len|. All the given +@@ -16,12 +16,12 @@ + /* SSLChannelBindingType enumerates the types of supported channel binding + * values. See RFC 5929. */ + typedef enum SSLChannelBindingType { +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 54c5b80..26b87c6 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -12631,6 +12631,46 @@ ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBool *enabled) +- return rv; ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 5c09f25..572bba9 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -13390,6 +13390,46 @@ SSL_SignatureMaxCount() { ++ return MAX_SIGNATURE_ALGORITHMS; + } + + +SECStatus +@@ -67,11 +67,11 @@ + /* copy global default policy into socket. */ + void + ssl3_InitSocketPolicy(sslSocket *ss) +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 0fd0a89..d12228e 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1754,6 +1754,8 @@ extern SECStatus ssl3_CipherPrefSet(sslSocket *ss, ssl3CipherSuite which, PRBool ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 080debe..3403091 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1786,6 +1786,8 @@ extern SECStatus ssl3_CipherPrefSet(sslSocket *ss, ssl3CipherSuite which, PRBool + extern SECStatus ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBool *on); + extern SECStatus ssl2_CipherPrefSet(sslSocket *ss, PRInt32 which, PRBool enabled); + extern SECStatus ssl2_CipherPrefGet(sslSocket *ss, PRInt32 which, PRBool *enabled); +@@ -80,11 +80,11 @@ + + extern SECStatus ssl3_SetPolicy(ssl3CipherSuite which, PRInt32 policy); + extern SECStatus ssl3_GetPolicy(ssl3CipherSuite which, PRInt32 *policy); +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 72058f5..09a0fb5 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -1316,6 +1316,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt32 which, PRBool enabled) ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index 28e3543..8ad1517 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -1369,6 +1369,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt32 which, PRBool enabled) + } + + SECStatus +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2016-01-13 14:18:55.609954798 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 91a47a6..4e7d52e 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -543,6 +543,48 @@ typedef SECStatus (PR_CALLBACK *SSLGetClientAuthData)(void *arg, ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 2a52769..48fa018 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -636,6 +636,48 @@ typedef SECStatus (PR_CALLBACK *SSLGetClientAuthData)(void *arg, + SSL_IMPORT SECStatus SSL_GetClientAuthDataHook(PRFileDesc *fd, + SSLGetClientAuthData f, void *a); + +@@ -51,11 +51,11 @@ + + /* + ** SNI extension processing callback function. +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 60af5b0..b9014ef 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -2503,6 +2503,9 @@ ssl3_ClientAuthTokenPresent(sslSessionID *sid) { ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 9aaf601..cc193cd 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -2530,6 +2530,9 @@ ssl3_ClientAuthTokenPresent(sslSessionID *sid) { + PRBool isPresent = PR_TRUE; + + /* we only care if we are doing client auth */ +@@ -65,7 +65,7 @@ + if (!sid || !sid->u.ssl3.clAuthValid) { + return PR_TRUE; + } +-@@ -6178,25 +6181,36 @@ ssl3_SendCertificateVerify(sslSocket *ss) ++@@ -6352,25 +6355,36 @@ ssl3_SendCertificateVerify(sslSocket *ss) + + isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); + isTLS12 = (PRBool)(ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); +@@ -119,7 +119,7 @@ + if (rv != SECSuccess) { + goto done; /* err code was set by ssl3_SignHashes */ + } +-@@ -6275,6 +6289,12 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -6449,6 +6463,12 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey); + ss->ssl3.clientPrivateKey = NULL; + } +@@ -132,7 +132,7 @@ + + temp = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); + if (temp < 0) { +-@@ -6904,6 +6924,18 @@ ssl3_ExtractClientKeyInfo(sslSocket *ss, ++@@ -7109,6 +7129,18 @@ ssl3_ExtractClientKeyInfo(sslSocket *ss, + goto done; + } + +@@ -151,7 +151,7 @@ + /* If the key is a 1024-bit RSA or DSA key, assume conservatively that + * it may be unable to sign SHA-256 hashes. This is the case for older + * Estonian ID cards that have 1024-bit RSA keys. In FIPS 186-2 and +-@@ -7002,6 +7034,10 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -7207,6 +7239,10 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + SECItem cert_types = {siBuffer, NULL, 0}; + SECItem algorithms = {siBuffer, NULL, 0}; + CERTDistNames ca_list; +@@ -162,7 +162,7 @@ + + SSL_TRC(3, ("%d: SSL3[%d]: handle certificate_request handshake", + SSL_GETPID(), ss->fd)); +-@@ -7017,6 +7053,7 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -7222,6 +7258,7 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + PORT_Assert(ss->ssl3.clientCertChain == NULL); + PORT_Assert(ss->ssl3.clientCertificate == NULL); + PORT_Assert(ss->ssl3.clientPrivateKey == NULL); +@@ -170,7 +170,7 @@ + + isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); + isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); +-@@ -7096,6 +7133,18 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -7301,6 +7338,18 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + desc = no_certificate; + ss->ssl3.hs.ws = wait_hello_done; + +@@ -187,9 +187,9 @@ + + } else + +#endif + if (ss->getClientAuthData != NULL) { +- /* XXX Should pass cert_types and algorithms in this call!! */ +- rv = (SECStatus)(*ss->getClientAuthData)(ss->getClientAuthDataArg, +-@@ -7105,12 +7154,55 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); ++@@ -7312,12 +7361,55 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + } else { + rv = SECFailure; /* force it to send a no_certificate alert */ + } +@@ -245,7 +245,7 @@ + /* check what the callback function returned */ + if ((!ss->ssl3.clientCertificate) || (!ss->ssl3.clientPrivateKey)) { + /* we are missing either the key or cert */ +-@@ -7172,6 +7264,10 @@ loser: ++@@ -7379,6 +7471,10 @@ loser: + done: + if (arena != NULL) + PORT_FreeArena(arena, PR_FALSE); +@@ -256,7 +256,7 @@ + return rv; + } + +-@@ -7288,7 +7384,8 @@ ssl3_SendClientSecondRound(sslSocket *ss) ++@@ -7497,7 +7593,8 @@ ssl3_SendClientSecondRound(sslSocket *ss) + + sendClientCert = !ss->ssl3.sendEmptyCert && + ss->ssl3.clientCertChain != NULL && +@@ -266,7 +266,7 @@ + + if (!sendClientCert && + ss->ssl3.hs.hashType == handshake_hash_single && +-@@ -12148,6 +12245,10 @@ ssl3_DestroySSL3Info(sslSocket *ss) ++@@ -12910,6 +13007,10 @@ ssl3_DestroySSL3Info(sslSocket *ss) + + if (ss->ssl3.clientPrivateKey != NULL) + SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey); +@@ -277,10 +277,10 @@ + + if (ss->ssl3.peerCertArena != NULL) + ssl3_CleanupPeerCerts(ss); +-diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c +-index 28d21c4..0a2288a 100644 +---- a/ssl/ssl3ext.c +-+++ b/ssl/ssl3ext.c ++diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c ++index cf04aba..5661a5c 100644 ++--- a/lib/ssl/ssl3ext.c +++++ b/lib/ssl/ssl3ext.c + @@ -11,8 +11,8 @@ + #include "nssrenam.h" + #include "nss.h" +@@ -291,10 +291,10 @@ + #include "pk11pub.h" + #ifdef NO_PKCS11_BYPASS + #include "blapit.h" +-diff --git a/ssl/sslauth.c b/ssl/sslauth.c +-index ed74d94..7f9c43b 100644 +---- a/ssl/sslauth.c +-+++ b/ssl/sslauth.c ++diff --git a/lib/ssl/sslauth.c b/lib/ssl/sslauth.c ++index b144336..e6981f0 100644 ++--- a/lib/ssl/sslauth.c +++++ b/lib/ssl/sslauth.c + @@ -216,6 +216,28 @@ SSL_GetClientAuthDataHook(PRFileDesc *s, SSLGetClientAuthData func, + return SECSuccess; + } +@@ -324,11 +324,11 @@ + /* NEED LOCKS IN HERE. */ + SECStatus + SSL_SetPKCS11PinArg(PRFileDesc *s, void *arg) +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 086f6d2..bbc9bd2 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -20,6 +20,7 @@ ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 9dcc29e..94bb9f4 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -21,6 +21,7 @@ + #include "sslerr.h" + #include "ssl3prot.h" + #include "hasht.h" +@@ -336,7 +336,7 @@ + #include "nssilock.h" + #include "pkcs11t.h" + #if defined(XP_UNIX) || defined(XP_BEOS) +-@@ -31,6 +32,15 @@ ++@@ -32,6 +33,15 @@ + + #include "sslt.h" /* for some formerly private types, now public */ + +@@ -352,7 +352,7 @@ + /* to make some of these old enums public without namespace pollution, + ** it was necessary to prepend ssl_ to the names. + ** These #defines preserve compatibility with the old code here in libssl. +-@@ -443,6 +453,14 @@ struct sslGatherStr { ++@@ -453,6 +463,14 @@ struct sslGatherStr { + #define GS_DATA 3 + #define GS_PAD 4 + +@@ -367,7 +367,7 @@ + + + /* +-@@ -961,6 +979,10 @@ struct ssl3StateStr { ++@@ -974,6 +992,10 @@ struct ssl3StateStr { + + CERTCertificate * clientCertificate; /* used by client */ + SECKEYPrivateKey * clientPrivateKey; /* used by client */ +@@ -378,7 +378,7 @@ + CERTCertificateList *clientCertChain; /* used by client */ + PRBool sendEmptyCert; /* used by client */ + +-@@ -1223,6 +1245,10 @@ const unsigned char * preferredCipher; ++@@ -1253,6 +1275,10 @@ const unsigned char * preferredCipher; + void *authCertificateArg; + SSLGetClientAuthData getClientAuthData; + void *getClientAuthDataArg; +@@ -389,7 +389,7 @@ + SSLSNISocketConfig sniSocketConfig; + void *sniSocketConfigArg; + SSLBadCertHandler handleBadCert; +-@@ -1863,6 +1889,26 @@ extern SECStatus ssl_InitSessionCacheLocks(PRBool lazyInit); ++@@ -1896,6 +1922,26 @@ extern SECStatus ssl_InitSessionCacheLocks(PRBool lazyInit); + + extern SECStatus ssl_FreeSessionCacheLocks(void); + +@@ -416,11 +416,11 @@ + + /**************** DTLS-specific functions **************/ + extern void dtls_FreeQueuedMessage(DTLSQueuedMessage *msg); +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 282bb85..6c09992 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -275,6 +275,10 @@ ssl_DupSocket(sslSocket *os) ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index f735009..21754d6 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -300,6 +300,10 @@ ssl_DupSocket(sslSocket *os) + ss->authCertificateArg = os->authCertificateArg; + ss->getClientAuthData = os->getClientAuthData; + ss->getClientAuthDataArg = os->getClientAuthDataArg; +@@ -431,7 +431,7 @@ + ss->sniSocketConfig = os->sniSocketConfig; + ss->sniSocketConfigArg = os->sniSocketConfigArg; + ss->handleBadCert = os->handleBadCert; +-@@ -1709,6 +1713,12 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) ++@@ -1963,6 +1967,12 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) + ss->getClientAuthData = sm->getClientAuthData; + if (sm->getClientAuthDataArg) + ss->getClientAuthDataArg = sm->getClientAuthDataArg; +@@ -444,7 +444,7 @@ + if (sm->sniSocketConfig) + ss->sniSocketConfig = sm->sniSocketConfig; + if (sm->sniSocketConfigArg) +-@@ -2974,6 +2984,10 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) ++@@ -3232,6 +3242,10 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) + ss->sniSocketConfig = NULL; + ss->sniSocketConfigArg = NULL; + ss->getClientAuthData = NULL; +Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: dh1024.patch. +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2016-01-13 14:18:55.609954798 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 4e7d52e..34142fc 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -1007,6 +1007,9 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 48fa018..0983b5f 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -1117,6 +1117,9 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, + SSLExtensionType extId, + PRBool *yes); + +@@ -12,11 +12,11 @@ + /* + ** How long should we wait before retransmitting the next flight of + ** the DTLS handshake? Returns SECFailure if not DTLS or not in a +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 6c09992..1a9c584 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -1897,6 +1897,20 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index 21754d6..b73f8f6 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -2151,6 +2151,20 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) + return &ss->sec.ci.sid->peerCertStatus; + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2016-01-13 14:18:55.609954798 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 34142fc..e2d1b09 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -803,6 +803,16 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 0983b5f..cf9f6db 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -896,6 +896,16 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, + PRBool flushCache, + PRIntervalTime timeout); + +@@ -19,11 +19,11 @@ + + #ifdef SSL_DEPRECATED_FUNCTION + /* deprecated! +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index b9014ef..800c28e 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -7061,6 +7061,9 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index cc193cd..27038f3 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -7266,6 +7266,9 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + if (rv != SECSuccess) + goto loser; /* malformed, alert has been sent */ + +@@ -33,7 +33,7 @@ + if (isTLS12) { + rv = ssl3_ConsumeHandshakeVariable(ss, &algorithms, 2, &b, &length); + if (rv != SECSuccess) +-@@ -7262,6 +7265,7 @@ loser: ++@@ -7469,6 +7472,7 @@ loser: + PORT_SetError(errCode); + rv = SECFailure; + done: +@@ -41,11 +41,11 @@ + if (arena != NULL) + PORT_FreeArena(arena, PR_FALSE); + #ifdef NSS_PLATFORM_CLIENT_AUTH +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index bbc9bd2..46e618a 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1238,6 +1238,10 @@ struct sslSocketStr { ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 94bb9f4..c7231a7 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1265,6 +1265,10 @@ struct sslSocketStr { + unsigned int sizeCipherSpecs; + const unsigned char * preferredCipher; + +@@ -55,12 +55,12 @@ + + + ssl3KeyPair * stepDownKeyPair; /* RSA step down keys */ + +- /* Callbacks */ +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 1a9c584..9431fe4 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -1911,6 +1911,20 @@ SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { ++ const ssl3DHParams *dheParams; /* DHE param */ ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index b73f8f6..11e66f2 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -2165,6 +2165,20 @@ SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { + return SECSuccess; + } + +@@ -81,11 +81,11 @@ + /************************************************************************/ + /* The following functions are the TOP LEVEL SSL functions. + ** They all get called through the NSPRIOMethods table below. +-@@ -2989,6 +3003,7 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) ++@@ -3243,6 +3257,7 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) + sc->serverKeyBits = 0; + ss->certStatusArray[i] = NULL; + } + + ss->requestedCertTypes = NULL; + ss->stepDownKeyPair = NULL; +- ss->dbHandle = CERT_GetDefaultCertDB(); + ++ ss->dheParams = NULL; +Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: norenegotiatelock.patch. +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2016-01-13 14:18:55.610954804 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 0ac85da..f5afab7 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -5261,7 +5261,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index afab931..e5e620f 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + * the lock across the calls to ssl3_CallHelloExtensionSenders. + */ + if (sid->u.ssl3.lock) { +@@ -11,7 +11,7 @@ + } + + if (isTLS || (ss->firstHsDone && ss->peerRequestedProtection)) { +-@@ -5270,7 +5270,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5445,7 +5445,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + + extLen = ssl3_CallHelloExtensionSenders(ss, PR_FALSE, maxBytes, NULL); + if (extLen < 0) { +@@ -20,7 +20,7 @@ + return SECFailure; + } + total_exten_len += extLen; +-@@ -5297,7 +5297,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5472,7 +5472,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + /* how many suites are permitted by policy and user preference? */ + num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE); + if (!num_suites) { +@@ -29,7 +29,7 @@ + return SECFailure; /* count_cipher_suites has set error code. */ + } + +-@@ -5342,7 +5342,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5517,7 +5517,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + + rv = ssl3_AppendHandshakeHeader(ss, client_hello, length); + if (rv != SECSuccess) { +@@ -38,7 +38,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + +-@@ -5361,21 +5361,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5536,21 +5536,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + rv = ssl3_AppendHandshakeNumber(ss, ss->clientHelloVersion, 2); + } + if (rv != SECSuccess) { +@@ -63,7 +63,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + +-@@ -5385,7 +5385,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5560,7 +5560,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + else + rv = ssl3_AppendHandshakeNumber(ss, 0, 1); + if (rv != SECSuccess) { +@@ -72,7 +72,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + +-@@ -5393,14 +5393,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5568,14 +5568,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + rv = ssl3_AppendHandshakeVariable( + ss, ss->ssl3.hs.cookie, ss->ssl3.hs.cookieLen, 1); + if (rv != SECSuccess) { +@@ -89,7 +89,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + +-@@ -5409,7 +5409,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5584,7 +5584,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + rv = ssl3_AppendHandshakeNumber(ss, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, + sizeof(ssl3CipherSuite)); + if (rv != SECSuccess) { +@@ -98,7 +98,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + actual_count++; +-@@ -5418,7 +5418,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5593,7 +5593,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + rv = ssl3_AppendHandshakeNumber(ss, TLS_FALLBACK_SCSV, + sizeof(ssl3CipherSuite)); + if (rv != SECSuccess) { +@@ -107,8 +107,8 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + actual_count++; +-@@ -5428,7 +5428,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) +- if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange)) { ++@@ -5603,7 +5603,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++ if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) { + actual_count++; + if (actual_count > num_suites) { + - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } +@@ -116,7 +116,7 @@ + /* set error card removal/insertion error */ + PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL); + return SECFailure; +-@@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5611,7 +5611,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + rv = ssl3_AppendHandshakeNumber(ss, suite->cipher_suite, + sizeof(ssl3CipherSuite)); + if (rv != SECSuccess) { +@@ -125,7 +125,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + } +-@@ -5447,14 +5447,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5622,14 +5622,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + * the server.. */ + if (actual_count != num_suites) { + /* Card removal/insertion error */ +@@ -142,7 +142,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + for (i = 0; i < compressionMethodsCount; i++) { +-@@ -5462,7 +5462,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5637,7 +5637,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + continue; + rv = ssl3_AppendHandshakeNumber(ss, compressions[i], 1); + if (rv != SECSuccess) { +@@ -151,7 +151,7 @@ + return rv; /* err set by ssl3_AppendHandshake* */ + } + } +-@@ -5473,20 +5473,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5648,20 +5648,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + + rv = ssl3_AppendHandshakeNumber(ss, maxBytes, 2); + if (rv != SECSuccess) { +@@ -175,7 +175,7 @@ + return SECFailure; + } + maxBytes -= extLen; +-@@ -5495,7 +5495,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) ++@@ -5670,7 +5670,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) + } + + if (sid->u.ssl3.lock) { +@@ -184,11 +184,11 @@ + } + + if (ss->xtnData.sentSessionTicketInClientHello) { +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index d12228e..efcbf9f 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -731,7 +731,7 @@ struct sslSessionIDStr { ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 3403091..874e59c 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -742,7 +742,7 @@ struct sslSessionIDStr { + * cached. Before then, there is no need to lock anything because + * the sid isn't being shared by anything. + */ +@@ -197,10 +197,10 @@ + + /* The lock must be held while reading or writing these members + * because they change while the sid is cached. +-diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c ++diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c + index cefdda6..28ad364 100644 +---- a/ssl/sslnonce.c +-+++ b/ssl/sslnonce.c ++--- a/lib/ssl/sslnonce.c +++++ b/lib/ssl/sslnonce.c + @@ -136,7 +136,7 @@ ssl_DestroySID(sslSessionID *sid) + } + +Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: removebuildmetadata.patch. +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2016-01-13 14:18:55.610954804 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c +-index c18d6f6..9214a2e 100644 +---- a/ssl/ssl3ext.c +-+++ b/ssl/ssl3ext.c +-@@ -313,6 +313,10 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { ++diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c ++index 9cfd541..eb3fb70 100644 ++--- a/lib/ssl/ssl3ext.c +++++ b/lib/ssl/ssl3ext.c ++@@ -321,6 +321,10 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { + { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, + { ssl_signed_certificate_timestamp_xtn, + &ssl3_ClientSendSignedCertTimestampXtn }, +@@ -12,8 +12,8 @@ + + * extension. */ + { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, + { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, +- /* any extra entries will appear as { 0, NULL } */ +-@@ -2507,9 +2511,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength) ++ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, ++@@ -2546,9 +2550,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength) + } + + extensionLength = 512 - recordLength; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2016-01-13 14:18:55.610954804 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index e2d1b09..593dd00 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -409,6 +409,11 @@ SSL_IMPORT SECStatus SSL_ForceHandshake(PRFileDesc *fd); ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index cf9f6db..85ced8a 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -502,6 +502,11 @@ SSL_IMPORT SECStatus SSL_ForceHandshake(PRFileDesc *fd); + SSL_IMPORT SECStatus SSL_ForceHandshakeWithTimeout(PRFileDesc *fd, + PRIntervalTime timeout); + +@@ -14,11 +14,11 @@ + /* + ** Query security status of socket. *on is set to one if security is + ** enabled. *keySize will contain the stream key size used. *issuer will +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 800c28e..29e8f1c 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -7275,6 +7275,85 @@ done: ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 27038f3..304e03b 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -7482,6 +7482,85 @@ done: + return rv; + } + +@@ -104,11 +104,11 @@ + static SECStatus + ssl3_CheckFalseStart(sslSocket *ss) + { +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 46e618a..2cf0b3a 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1599,16 +1599,17 @@ extern SECStatus ssl3_MasterKeyDeriveBypass( ssl3CipherSpec * pwSpec, ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index c7231a7..c089889 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1629,16 +1629,17 @@ extern SECStatus ssl3_MasterSecretDeriveBypass( ssl3CipherSpec * pwSpec, + /* These functions are called from secnav, even though they're "private". */ + + extern int ssl2_SendErrorMessage(struct sslSocketStr *ss, int error); +@@ -130,11 +130,11 @@ + extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error); + + /* +-diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c +-index ea2d408..d44336e 100644 +---- a/ssl/sslsecur.c +-+++ b/ssl/sslsecur.c +-@@ -1516,17 +1516,70 @@ SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHandle) ++diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c ++index 53b4885..f77d6fa 100644 ++--- a/lib/ssl/sslsecur.c +++++ b/lib/ssl/sslsecur.c ++@@ -1532,17 +1532,70 @@ SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHandle) + return SECSuccess; + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2016-01-13 14:18:55.610954804 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index 0ece0ed..ea71975 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1373,6 +1373,15 @@ extern sslSessionIDUncacheFunc ssl_sid_uncache; ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index 976330e..60dd243 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1403,6 +1403,15 @@ extern sslSessionIDUncacheFunc ssl_sid_uncache; + + SEC_BEGIN_PROTOS + +@@ -18,11 +18,11 @@ + /* Internal initialization and installation of the SSL error tables */ + extern SECStatus ssl_Init(void); + extern SECStatus ssl_InitializePRErrorTable(void); +-diff --git a/ssl/sslt.h b/ssl/sslt.h +-index 0900f28..430d216 100644 +---- a/ssl/sslt.h +-+++ b/ssl/sslt.h +-@@ -10,6 +10,19 @@ ++diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h ++index b6616e2..5593579 100644 ++--- a/lib/ssl/sslt.h +++++ b/lib/ssl/sslt.h ++@@ -11,6 +11,19 @@ + + #include "prtypes.h" + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2016-01-13 14:18:55.611954809 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/sslinfo.c b/ssl/sslinfo.c +-index 00f2f38..ba230d2 100644 +---- a/ssl/sslinfo.c +-+++ b/ssl/sslinfo.c +-@@ -350,8 +350,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, ++diff --git a/lib/ssl/sslinfo.c b/lib/ssl/sslinfo.c ++index 216ab0f..7048eb8 100644 ++--- a/lib/ssl/sslinfo.c +++++ b/lib/ssl/sslinfo.c ++@@ -387,8 +387,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, + return SECFailure; + } + +@@ -16,7 +16,7 @@ + return SECFailure; + } + +-@@ -362,13 +367,17 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, ++@@ -399,13 +404,17 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, + } + val = PORT_Alloc(valLen); + if (!val) { +@@ -34,7 +34,7 @@ + if (hasContext) { + val[i++] = contextLen >> 8; + val[i++] = contextLen; +-@@ -389,6 +398,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, ++@@ -426,6 +435,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, + valLen, out, outLen); + } + ssl_ReleaseSpecReadLock(ss); +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2016-01-13 14:18:55.611954809 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index be6d88e..57771cd 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -900,6 +900,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd); ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 437a822..bc417a5 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -992,6 +992,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd); + SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); + + /* +@@ -21,11 +21,11 @@ + ** Return a SECItem containing the SSL session ID associated with the fd. + */ + SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 26b87c6..0ac85da 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -11375,7 +11375,7 @@ ssl3_FinishHandshake(sslSocket * ss) ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 572bba9..afab931 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -12058,7 +12058,7 @@ ssl3_FinishHandshake(sslSocket * ss) + ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE; + } + +@@ -34,11 +34,11 @@ + PORT_Assert(ss->sec.ci.sid->cached == never_cached); + (*ss->sec.cache)(ss->sec.ci.sid); + ss->ssl3.hs.cacheSID = PR_FALSE; +-diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c +-index 5c6751a..00ab455 100644 +---- a/ssl/sslsecur.c +-+++ b/ssl/sslsecur.c +-@@ -1467,6 +1467,49 @@ SSL_InvalidateSession(PRFileDesc *fd) ++diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c ++index cca55bb..b4b8e95 100644 ++--- a/lib/ssl/sslsecur.c +++++ b/lib/ssl/sslsecur.c ++@@ -1483,6 +1483,49 @@ SSL_InvalidateSession(PRFileDesc *fd) + return rv; + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2016-01-13 14:18:55.612954815 +0100 +@@ -1,18 +1,17 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 80717db..e9f5fb0 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -191,6 +191,9 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); +- #define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in +- * handshakes. */ ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index eb7f7ec..db09425 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -203,6 +203,8 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); ++ */ ++ #define SSL_ENABLE_EXTENDED_MASTER_SECRET 30 + + +/* Request Signed Certificate Timestamps via TLS extension (client) */ +-+#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 29 +-+ +++#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 31 ++ + #ifdef SSL_DEPRECATED_FUNCTION + /* Old deprecated function names */ +- SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); +-@@ -493,6 +496,23 @@ SSL_IMPORT CERTCertList *SSL_PeerCertificateChain(PRFileDesc *fd); ++@@ -586,6 +588,23 @@ SSL_IMPORT CERTCertList *SSL_PeerCertificateChain(PRFileDesc *fd); + */ + SSL_IMPORT const SECItemArray * SSL_PeerStapledOCSPResponses(PRFileDesc *fd); + +@@ -36,13 +35,13 @@ + /* SSL_SetStapledOCSPResponses stores an array of one or multiple OCSP responses + * in the fd's data, which may be sent as part of a server side cert_status + * handshake message. Parameter |responses| is for the server certificate of +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 6a4a443..54c5b80 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -6752,6 +6752,14 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) +- sid->u.ssl3.sessionIDLength = sidBytes.len; +- PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes.data, sidBytes.len); ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index ba3d012..5c09f25 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -6957,6 +6957,14 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++ sid->u.ssl3.keys.extendedMasterSecretUsed = ++ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); + + + /* Copy Signed Certificate Timestamps, if any. */ + + if (ss->xtnData.signedCertTimestamps.data) { +@@ -55,7 +54,7 @@ + ss->ssl3.hs.isResuming = PR_FALSE; + if (ss->ssl3.hs.kea_def->signKeyType != sign_null) { + /* All current cipher suites other than those with sign_null (i.e., +-@@ -6765,6 +6773,10 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) ++@@ -6971,6 +6979,10 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) + } + + winner: +@@ -66,7 +65,7 @@ + /* If we will need a ChannelID key then we make the callback now. This + * allows the handshake to be restarted cleanly if the callback returns + * SECWouldBlock. */ +-@@ -6790,6 +6802,9 @@ alert_loser: ++@@ -6996,6 +7008,9 @@ alert_loser: + (void)SSL3_SendAlert(ss, alert_fatal, desc); + + loser: +@@ -76,10 +75,10 @@ + errCode = ssl_MapLowLevelError(errCode); + return SECFailure; + } +-diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c +-index 4d17587..c18d6f6 100644 +---- a/ssl/ssl3ext.c +-+++ b/ssl/ssl3ext.c ++diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c ++index 78825cb..9cfd541 100644 ++--- a/lib/ssl/ssl3ext.c +++++ b/lib/ssl/ssl3ext.c + @@ -90,6 +90,12 @@ static PRInt32 ssl3_ClientSendSigAlgsXtn(sslSocket *ss, PRBool append, + PRUint32 maxBytes); + static SECStatus ssl3_ServerHandleSigAlgsXtn(sslSocket *ss, PRUint16 ex_type, +@@ -93,16 +92,16 @@ + + static PRInt32 ssl3_ClientSendDraftVersionXtn(sslSocket *ss, PRBool append, + PRUint32 maxBytes); +-@@ -275,6 +281,8 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { +- { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, ++@@ -283,6 +289,8 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { + { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, + { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, ++ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, + + { ssl_signed_certificate_timestamp_xtn, + + &ssl3_ClientHandleSignedCertTimestampXtn }, + { -1, NULL } + }; + +-@@ -303,6 +311,8 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { ++@@ -311,6 +319,8 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { + { ssl_use_srtp_xtn, &ssl3_ClientSendUseSRTPXtn }, + { ssl_channel_id_xtn, &ssl3_ClientSendChannelIDXtn }, + { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, +@@ -110,12 +109,16 @@ + + &ssl3_ClientSendSignedCertTimestampXtn }, + { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, + { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, +- /* any extra entries will appear as { 0, NULL } */ +-@@ -2616,3 +2626,65 @@ ssl3_ServerHandleDraftVersionXtn(sslSocket * ss, PRUint16 ex_type, ++ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, ++@@ -2698,11 +2708,48 @@ ssl3_SendExtendedMasterSecretXtn(sslSocket * ss, PRBool append, ++ } + +- return SECSuccess; ++ return extension_length; ++- ++ loser: ++ return -1; + } +-+ ++ + +/* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp + + * extension for TLS ClientHellos. */ + +static PRInt32 +@@ -129,7 +132,12 @@ + + if (!ss->opt.enableSignedCertTimestamps) + + return 0; + + +-+ if (append && maxBytes >= extension_length) { +++ if (maxBytes < extension_length) { +++ PORT_Assert(0); +++ return 0; +++ } +++ +++ if (append) { + + SECStatus rv; + + /* extension_type */ + + rv = ssl3_AppendHandshakeNumber(ss, +@@ -143,15 +151,19 @@ + + goto loser; + + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + + ssl_signed_certificate_timestamp_xtn; +-+ } else if (maxBytes < extension_length) { +-+ PORT_Assert(0); +-+ return 0; + + } + + + + return extension_length; + +loser: + + return -1; + +} ++ ++ static SECStatus ++ ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, ++@@ -2743,3 +2790,28 @@ ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, ++ } ++ return SECSuccess; ++ } + + + +static SECStatus + +ssl3_ClientHandleSignedCertTimestampXtn(sslSocket *ss, PRUint16 ex_type, +@@ -177,19 +189,19 @@ + + ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type; + + return SECSuccess; + +} +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index c4c87b4..0fd0a89 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -339,6 +339,7 @@ typedef struct sslOptionsStr { +- unsigned int enableALPN : 1; /* 27 */ +- unsigned int reuseServerECDHEKey : 1; /* 28 */ ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index d53c446..080debe 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -349,6 +349,7 @@ typedef struct sslOptionsStr { + unsigned int enableFallbackSCSV : 1; /* 29 */ +-+ unsigned int enableSignedCertTimestamps : 1; /* 30 */ ++ unsigned int enableServerDhe : 1; /* 30 */ ++ unsigned int enableExtendedMS : 1; /* 31 */ +++ unsigned int enableSignedCertTimestamps : 1; /* 32 */ + } sslOptions; + + typedef enum { sslHandshakingUndetermined = 0, +-@@ -721,6 +722,11 @@ struct sslSessionIDStr { ++@@ -732,6 +733,11 @@ struct sslSessionIDStr { + * resumption handshake to the original handshake. */ + SECItem originalHandshakeHash; + +@@ -201,7 +213,7 @@ + /* This lock is lazily initialized by CacheSID when a sid is first + * cached. Before then, there is no need to lock anything because + * the sid isn't being shared by anything. +-@@ -835,6 +841,18 @@ struct TLSExtensionDataStr { ++@@ -846,6 +852,18 @@ struct TLSExtensionDataStr { + * is beyond ssl3_HandleClientHello function. */ + SECItem *sniNameArr; + PRUint32 sniNameArrSize; +@@ -220,10 +232,10 @@ + }; + + typedef SECStatus (*sslRestartTarget)(sslSocket *); +-diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c ++diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c + index c45849d..cefdda6 100644 +---- a/ssl/sslnonce.c +-+++ b/ssl/sslnonce.c ++--- a/lib/ssl/sslnonce.c +++++ b/lib/ssl/sslnonce.c + @@ -131,6 +131,9 @@ ssl_DestroySID(sslSessionID *sid) + if (sid->u.ssl3.originalHandshakeHash.data) { + SECITEM_FreeItem(&sid->u.ssl3.originalHandshakeHash, PR_FALSE); +@@ -234,22 +246,22 @@ + + if (sid->u.ssl3.lock) { + PR_DestroyRWLock(sid->u.ssl3.lock); +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 6a6c8d1..72058f5 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -89,7 +89,8 @@ static sslOptions ssl_defaults = { +- PR_TRUE, /* enableNPN */ +- PR_FALSE, /* enableALPN */ ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index 6d700a7..28e3543 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -92,7 +92,8 @@ static sslOptions ssl_defaults = { + PR_TRUE, /* reuseServerECDHEKey */ +-- PR_FALSE /* enableFallbackSCSV */ +-+ PR_FALSE, /* enableFallbackSCSV */ ++ PR_FALSE, /* enableFallbackSCSV */ ++ PR_TRUE, /* enableServerDhe */ ++- PR_FALSE /* enableExtendedMS */ +++ PR_FALSE, /* enableExtendedMS */ + + PR_FALSE, /* enableSignedCertTimestamps */ + }; + + /* +-@@ -807,6 +808,10 @@ SSL_OptionSet(PRFileDesc *fd, PRInt32 which, PRBool on) +- ss->opt.enableFallbackSCSV = on; ++@@ -843,6 +844,10 @@ SSL_OptionSet(PRFileDesc *fd, PRInt32 which, PRBool on) ++ ss->opt.enableExtendedMS = on; + break; + + + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: +@@ -259,19 +271,19 @@ + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + rv = SECFailure; +-@@ -882,6 +887,9 @@ SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn) +- case SSL_REUSE_SERVER_ECDHE_KEY: +- on = ss->opt.reuseServerECDHEKey; break; +- case SSL_ENABLE_FALLBACK_SCSV: on = ss->opt.enableFallbackSCSV; break; ++@@ -921,6 +926,9 @@ SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn) ++ case SSL_ENABLE_SERVER_DHE: on = ss->opt.enableServerDhe; break; ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ on = ss->opt.enableExtendedMS; break; + + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + + on = ss->opt.enableSignedCertTimestamps; + + break; + + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); +-@@ -951,6 +959,9 @@ SSL_OptionGetDefault(PRInt32 which, PRBool *pOn) +- case SSL_ENABLE_FALLBACK_SCSV: +- on = ssl_defaults.enableFallbackSCSV; ++@@ -996,6 +1004,9 @@ SSL_OptionGetDefault(PRInt32 which, PRBool *pOn) ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ on = ssl_defaults.enableExtendedMS; + break; + + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + + on = ssl_defaults.enableSignedCertTimestamps; +@@ -279,8 +291,8 @@ + + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); +-@@ -1134,6 +1145,10 @@ SSL_OptionSetDefault(PRInt32 which, PRBool on) +- ssl_defaults.enableFallbackSCSV = on; ++@@ -1187,6 +1198,10 @@ SSL_OptionSetDefault(PRInt32 which, PRBool on) ++ ssl_defaults.enableExtendedMS = on; + break; + + + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: +@@ -290,7 +302,7 @@ + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; +-@@ -1963,6 +1978,29 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) ++@@ -2218,6 +2233,29 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) + return &ss->sec.ci.sid->peerCertStatus; + } + +@@ -320,23 +332,24 @@ + SECStatus + SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { + sslSocket *ss = ssl_FindSocket(fd); +-diff --git a/ssl/sslt.h b/ssl/sslt.h +-index fe0ad07..c36b8c7 100644 +---- a/ssl/sslt.h +-+++ b/ssl/sslt.h +-@@ -202,6 +202,7 @@ typedef enum { ++diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h ++index a2eff62..36e34df 100644 ++--- a/lib/ssl/sslt.h +++++ b/lib/ssl/sslt.h ++@@ -248,6 +248,7 @@ typedef enum { + ssl_signature_algorithms_xtn = 13, + ssl_use_srtp_xtn = 14, + ssl_app_layer_protocol_xtn = 16, + + ssl_signed_certificate_timestamp_xtn = 18, /* RFC 6962 */ + ssl_padding_xtn = 21, ++ ssl_extended_master_secret_xtn = 23, + ssl_session_ticket_xtn = 35, +- ssl_next_proto_nego_xtn = 13172, +-@@ -210,6 +211,6 @@ typedef enum { ++@@ -257,7 +258,7 @@ typedef enum { + ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ + } SSLExtensionType; + +--#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ +-+#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ ++-#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ +++#define SSL_MAX_EXTENSIONS 14 /* doesn't include ssl_padding_xtn. */ + +- #endif /* __sslt_h_ */ ++ typedef enum { ++ ssl_dhe_group_none = 0, +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2016-01-13 14:18:55.612954815 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c +-index aca2b74..dac7a9e 100644 +---- a/ssl/ssl3ecc.c +-+++ b/ssl/ssl3ecc.c +-@@ -1090,6 +1090,7 @@ static const PRUint8 ecPtFmt[6] = { ++diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c ++index 94008a0..6d89bbe 100644 ++--- a/lib/ssl/ssl3ecc.c +++++ b/lib/ssl/ssl3ecc.c ++@@ -1093,6 +1093,7 @@ static const PRUint8 ecPtFmt[6] = { + static PRBool + ssl3_SuiteBOnly(sslSocket *ss) + { +@@ -10,7 +10,7 @@ + /* See if we can support small curves (like 163). If not, assume we can + * only support Suite-B curves (P-256, P-384, P-521). */ + PK11SlotInfo *slot = +-@@ -1103,6 +1104,9 @@ ssl3_SuiteBOnly(sslSocket *ss) ++@@ -1106,6 +1107,9 @@ ssl3_SuiteBOnly(sslSocket *ss) + /* we can, presume we can do all curves */ + PK11_FreeSlot(slot); + return PR_FALSE; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2016-01-13 14:18:55.612954815 +0100 +@@ -1,8 +1,8 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index 7c06815..1167d6d 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -31,6 +31,15 @@ ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index ce92cf1..c5cb1eb 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -33,6 +33,15 @@ + #include "blapi.h" + #endif + +@@ -18,10 +18,10 @@ + #include + #ifdef NSS_ENABLE_ZLIB + #include "zlib.h" +-diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c +-index dac7a9e..9b91270 100644 +---- a/ssl/ssl3ecc.c +-+++ b/ssl/ssl3ecc.c ++diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c ++index 6d89bbe..cf8e741 100644 ++--- a/lib/ssl/ssl3ecc.c +++++ b/lib/ssl/ssl3ecc.c + @@ -31,6 +31,12 @@ + + #include +@@ -35,16 +35,17 @@ + #ifndef NSS_DISABLE_ECC + + #ifndef PK11_SETATTRS +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 14ff328..6a6c8d1 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -17,8 +17,15 @@ ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index c9a4493..6d700a7 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -17,9 +17,16 @@ + #ifndef NO_PKCS11_BYPASS + #include "blapi.h" + #endif + +#include "pk11pub.h" + #include "nss.h" ++ #include "pk11pqg.h" + + +/* This is a bodge to allow this code to be compiled against older NSS headers + + * that don't contain the TLS 1.2 changes. */ +@@ -55,7 +56,7 @@ + #define SET_ERROR_CODE /* reminder */ + + static const sslSocketOps ssl_default_ops = { /* No SSL. */ +-@@ -1878,6 +1885,24 @@ SSL_VersionRangeGet(PRFileDesc *fd, SSLVersionRange *vrange) ++@@ -2133,6 +2140,24 @@ SSL_VersionRangeGet(PRFileDesc *fd, SSLVersionRange *vrange) + return SECSuccess; + } + +@@ -80,7 +81,7 @@ + SECStatus + SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) + { +-@@ -1898,6 +1923,20 @@ SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) ++@@ -2153,6 +2178,20 @@ SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) + ssl_GetSSL3HandshakeLock(ss); + + ss->vrange = *vrange; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2016-01-13 14:18:55.612954815 +0100 +@@ -1,10 +1,10 @@ +-diff --git a/ssl/ssl.h b/ssl/ssl.h +-index 716537d..80717db 100644 +---- a/ssl/ssl.h +-+++ b/ssl/ssl.h +-@@ -292,6 +292,27 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDefault(PRInt32 cipher, PRBool *enabled); +- SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); +- SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); ++diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h ++index 120c257..eb7f7ec 100644 ++--- a/lib/ssl/ssl.h +++++ b/lib/ssl/ssl.h ++@@ -385,6 +385,27 @@ SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, ++ */ ++ SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); + + +/* SSLChannelBindingType enumerates the types of supported channel binding + + * values. See RFC 5929. */ +@@ -30,12 +30,12 @@ + /* SSL Version Range API + ** + ** This API should be used to control SSL 3.0 & TLS support instead of the +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index c0e8e79..7c06815 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -12479,6 +12479,68 @@ ssl3_InitSocketPolicy(sslSocket *ss) +- PORT_Memcpy(ss->cipherSuites, cipherSuites, sizeof cipherSuites); ++diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c ++index 2ae8ce9..ce92cf1 100644 ++--- a/lib/ssl/ssl3con.c +++++ b/lib/ssl/ssl3con.c ++@@ -13241,6 +13241,68 @@ ssl3_InitSocketPolicy(sslSocket *ss) ++ ss->ssl3.signatureAlgorithmCount = PR_ARRAY_SIZE(defaultSignatureAlgorithms); + } + + +SECStatus +@@ -103,11 +103,11 @@ + /* ssl3_config_match_init must have already been called by + * the caller of this function. + */ +-diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h +-index e11860e..0ece0ed 100644 +---- a/ssl/sslimpl.h +-+++ b/ssl/sslimpl.h +-@@ -1864,6 +1864,11 @@ extern PRBool ssl_GetSessionTicketKeysPKCS11(SECKEYPrivateKey *svrPrivKey, ++diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h ++index c286518..976330e 100644 ++--- a/lib/ssl/sslimpl.h +++++ b/lib/ssl/sslimpl.h ++@@ -1897,6 +1897,11 @@ extern PRBool ssl_GetSessionTicketKeysPKCS11(SECKEYPrivateKey *svrPrivKey, + extern SECStatus ssl3_ValidateNextProtoNego(const unsigned char* data, + unsigned int length); + +@@ -119,12 +119,12 @@ + /* Construct a new NSPR socket for the app to use */ + extern PRFileDesc *ssl_NewPRSocket(sslSocket *ss, PRFileDesc *fd); + extern void ssl_FreePRSocket(PRFileDesc *fd); +-diff --git a/ssl/sslsock.c b/ssl/sslsock.c +-index 042f24f..14ff328 100644 +---- a/ssl/sslsock.c +-+++ b/ssl/sslsock.c +-@@ -1345,6 +1345,27 @@ NSS_SetFrancePolicy(void) +- return NSS_SetDomesticPolicy(); ++diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c ++index efba686..c9a4493 100644 ++--- a/lib/ssl/sslsock.c +++++ b/lib/ssl/sslsock.c ++@@ -1540,6 +1540,28 @@ SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled) ++ return SECSuccess; + } + + +SECStatus +@@ -148,6 +148,7 @@ + + + + return ssl3_GetTLSUniqueChannelBinding(ss, out, outLen, outLenMax); + +} +++ ++ #include "dhe-param.c" + +- +- /* LOCKS ??? XXX */ ++ static const SSLDHEGroupType ssl_default_dhe_groups[] = { +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium 2016-01-13 14:18:55.588954676 +0100 +@@ -1,6 +1,6 @@ + Name: Network Security Services (NSS) + URL: http://www.mozilla.org/projects/security/pki/nss/ +-Version: 3.19 RTM ++Version: 3.21 RTM + Security Critical: Yes + License: MPL 2 + License File: NOT_SHIPPED +@@ -11,7 +11,7 @@ + The same module appears in crypto/third_party/nss (and third_party/nss on some + platforms), so we don't repeat the license file here. + +-The snapshot was updated to the hg tag: NSS_3_19_RTM ++The snapshot was updated to the hg tag: NSS_3_21_RTM + + Patches: + +@@ -100,16 +100,6 @@ + length. + patches/reorderextensions.patch + +- * Make the build metadata deterministic +- patches/removebuildmetadata.patch +- +- * Fix locking bug in ssl3_HandleHelloRequest when rejecting a renegotiation. +- patches/norenegotiatelock.patch +- https://bugzilla.mozilla.org/show_bug.cgi?id=1162521 +- +- * Increase the minimum DH group size to 1024 +- patches/dh1024.patch +- + Apply the patches to NSS by running the patches/applypatches.sh script. Read + the comments at the top of patches/applypatches.sh for instructions. + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2016-01-13 14:18:55.613954821 +0100 +@@ -431,7 +431,7 @@ + * so isRSA is always true. + */ + SECStatus +-ssl3_MasterKeyDeriveBypass( ++ssl3_MasterSecretDeriveBypass( + ssl3CipherSpec * pwSpec, + const unsigned char * cr, + const unsigned char * sr, +Nur in qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl: dhe-param.c. +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2016-01-13 14:18:55.614954827 +0100 +@@ -104,9 +104,7 @@ + const ssl3CipherSuite * suite; + + for (suite = nonDTLSSuites; *suite; ++suite) { +- SECStatus rv = ssl3_CipherPrefSet(ss, *suite, PR_FALSE); +- +- PORT_Assert(rv == SECSuccess); /* else is coding error */ ++ PORT_CheckSuccess(ssl3_CipherPrefSet(ss, *suite, PR_FALSE)); + } + return SECSuccess; + } +@@ -229,7 +227,7 @@ + #define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */ + if (message_length > MAX_HANDSHAKE_MSG_LEN) { + (void)ssl3_DecodeError(ss); +- PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE); + return SECFailure; + } + #undef MAX_HANDSHAKE_MSG_LEN +@@ -396,7 +394,7 @@ + * This avoids having to fill in the bitmask in the common + * case of adjacent fragments received in sequence + */ +- if (fragment_offset <= ss->ssl3.hs.recvdHighWater) { ++ if (fragment_offset <= (unsigned int)ss->ssl3.hs.recvdHighWater) { + /* Either this is the adjacent fragment or an overlapping + * fragment */ + ss->ssl3.hs.recvdHighWater = fragment_offset + +@@ -676,7 +674,7 @@ + + /* The reason we use 8 here is that that's the length of + * the new DTLS data that we add to the header */ +- fragment_len = PR_MIN(room_left - (SSL3_BUFFER_FUDGE + 8), ++ fragment_len = PR_MIN((PRUint32)room_left - (SSL3_BUFFER_FUDGE + 8), + content_len - fragment_offset); + PORT_Assert(fragment_len < DTLS_MAX_MTU - 12); + /* Make totally sure that we are within the buffer. +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2016-01-13 14:18:55.620954862 +0100 +@@ -25,6 +25,8 @@ + #include "prerror.h" + #include "pratom.h" + #include "prthread.h" ++#include "nss.h" ++#include "nssoptions.h" + + #include "pk11func.h" + #include "secmod.h" +@@ -91,8 +93,11 @@ + static SECStatus ssl3_UpdateHandshakeHashes( sslSocket *ss, + const unsigned char *b, + unsigned int l); ++static SECStatus ssl3_ComputeHandshakeHashes(sslSocket *ss, ++ ssl3CipherSpec *spec, ++ SSL3Hashes *hashes, ++ PRUint32 sender); + static SECStatus ssl3_FlushHandshakeMessages(sslSocket *ss, PRInt32 flags); +-static int ssl3_OIDToTLSHashAlgorithm(SECOidTag oid); + + static SECStatus Null_Cipher(void *ctx, unsigned char *output, int *outputLen, + int maxOutputLen, const unsigned char *input, +@@ -122,17 +127,17 @@ + #ifndef NSS_DISABLE_ECC + { TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, ++ { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA is out of order to work around + * bug 946147. + */ +- { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +- { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, ++ { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, +@@ -140,14 +145,17 @@ + #endif /* NSS_DISABLE_ECC */ + + { TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + { TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + { TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + { TLS_DHE_DSS_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, + { TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, ++ { TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + { TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, +@@ -205,6 +213,23 @@ + { TLS_RSA_WITH_NULL_MD5, SSL_ALLOWED, PR_FALSE, PR_FALSE}, + }; + ++static const SSLSignatureAndHashAlg defaultSignatureAlgorithms[] = { ++ {ssl_hash_sha256, ssl_sign_rsa}, ++ {ssl_hash_sha384, ssl_sign_rsa}, ++ {ssl_hash_sha512, ssl_sign_rsa}, ++ {ssl_hash_sha1, ssl_sign_rsa}, ++#ifndef NSS_DISABLE_ECC ++ {ssl_hash_sha256, ssl_sign_ecdsa}, ++ {ssl_hash_sha384, ssl_sign_ecdsa}, ++ {ssl_hash_sha512, ssl_sign_ecdsa}, ++ {ssl_hash_sha1, ssl_sign_ecdsa}, ++#endif ++ {ssl_hash_sha256, ssl_sign_dsa}, ++ {ssl_hash_sha1, ssl_sign_dsa} ++}; ++PR_STATIC_ASSERT(PR_ARRAY_SIZE(defaultSignatureAlgorithms) <= ++ MAX_SIGNATURE_ALGORITHMS); ++ + /* Verify that SSL_ImplementedCiphers and cipherSuites are in consistent order. + */ + #ifdef DEBUG +@@ -265,20 +290,6 @@ + ct_DSS_sign, + }; + +-/* This block is the contents of the supported_signature_algorithms field of +- * our TLS 1.2 CertificateRequest message, in wire format. See +- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 +- * +- * This block contains only sha256 entries because we only support TLS 1.2 +- * CertificateVerify messages that use the handshake hash. */ +-static const PRUint8 supported_signature_algorithms[] = { +- tls_hash_sha256, tls_sig_rsa, +-#ifndef NSS_DISABLE_ECC +- tls_hash_sha256, tls_sig_ecdsa, +-#endif +- tls_hash_sha256, tls_sig_dsa, +-}; +- + #define EXPORT_RSA_KEY_LENGTH 64 /* bytes */ + + +@@ -322,8 +333,8 @@ + /* kea exchKeyType signKeyType is_limited limit tls_keygen ephemeral */ + {kea_null, kt_null, sign_null, PR_FALSE, 0, PR_FALSE, PR_FALSE}, + {kea_rsa, kt_rsa, sign_rsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, +- {kea_rsa_export, kt_rsa, sign_rsa, PR_TRUE, 512, PR_FALSE, PR_TRUE}, +- {kea_rsa_export_1024,kt_rsa, sign_rsa, PR_TRUE, 1024, PR_FALSE, PR_TRUE}, ++ {kea_rsa_export, kt_rsa, sign_rsa, PR_TRUE, 512, PR_FALSE, PR_FALSE}, ++ {kea_rsa_export_1024,kt_rsa, sign_rsa, PR_TRUE, 1024, PR_FALSE, PR_FALSE}, + {kea_dh_dss, kt_dh, sign_dsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, + {kea_dh_dss_export, kt_dh, sign_dsa, PR_TRUE, 512, PR_FALSE, PR_FALSE}, + {kea_dh_rsa, kt_dh, sign_rsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, +@@ -443,6 +454,10 @@ + {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_rsa}, + {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_ecdsa}, + ++ {TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_dhe_dss}, ++ {TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, cipher_aes_128, hmac_sha256, kea_dhe_dss}, ++ {TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, cipher_aes_256, hmac_sha256, kea_dhe_dss}, ++ + #ifndef NSS_DISABLE_ECC + {TLS_ECDH_ECDSA_WITH_NULL_SHA, cipher_null, mac_sha, kea_ecdh_ecdsa}, + {TLS_ECDH_ECDSA_WITH_RC4_128_SHA, cipher_rc4, mac_sha, kea_ecdh_ecdsa}, +@@ -680,6 +695,8 @@ + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: + case TLS_RSA_WITH_AES_128_CBC_SHA256: + case TLS_RSA_WITH_AES_128_GCM_SHA256: ++ case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: ++ case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: + case TLS_RSA_WITH_NULL_SHA256: + return vrange->max == SSL_LIBRARY_VERSION_TLS_1_2; + +@@ -688,6 +705,7 @@ + case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: + case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: + case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: ++ case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: + return vrange->max >= SSL_LIBRARY_VERSION_TLS_1_2; + + /* RFC 4492: ECC cipher suites need TLS extensions to negotiate curves and +@@ -810,16 +828,11 @@ + * that the server uses an RSA cert for (EC)DHE-RSA. + */ + switch (cipher_def->key_exchange_alg) { ++ case kea_dhe_dss: ++ svrAuth = ss->serverCerts + ssl_kea_dh; ++ break; + case kea_ecdhe_rsa: +-#if NSS_SERVER_DHE_IMPLEMENTED +- /* XXX NSS does not yet implement the server side of _DHE_ +- * cipher suites. Correcting the computation for svrAuth, +- * as the case below does, causes NSS SSL servers to begin to +- * negotiate cipher suites they do not implement. So, until +- * server side _DHE_ is implemented, keep this disabled. +- */ + case kea_dhe_rsa: +-#endif + svrAuth = ss->serverCerts + kt_rsa; + break; + case kea_ecdh_ecdsa: +@@ -831,6 +844,8 @@ + * simultaneously. For now, both of them use + * whatever is in the certificate slot for kt_ecdh + */ ++ case kea_dhe_dss_export: ++ case kea_dhe_rsa_export: + default: + svrAuth = ss->serverCerts + exchKeyType; + break; +@@ -867,11 +882,22 @@ + * cipher suite. */ + static PRBool + config_match(ssl3CipherSuiteCfg *suite, int policy, PRBool enabled, +- const SSLVersionRange *vrange) ++ const SSLVersionRange *vrange, const sslSocket *ss) + { ++ const ssl3CipherSuiteDef *cipher_def; ++ + PORT_Assert(policy != SSL_NOT_ALLOWED && enabled != PR_FALSE); + if (policy == SSL_NOT_ALLOWED || !enabled) +- return PR_FALSE; ++ return PR_FALSE; ++ ++ cipher_def = ssl_LookupCipherSuiteDef(suite->cipher_suite); ++ PORT_Assert(cipher_def != NULL); ++ ++ PORT_Assert(ss != NULL); ++ if (ss->sec.isServer && !ss->opt.enableServerDhe && ++ kea_defs[cipher_def->key_exchange_alg].exchKeyType == ssl_kea_dh) ++ return PR_FALSE; ++ + return (PRBool)(suite->enabled && + suite->isPresent && + suite->policy != SSL_NOT_ALLOWED && +@@ -892,7 +918,7 @@ + return 0; + } + for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { +- if (config_match(&ss->cipherSuites[i], policy, enabled, &ss->vrange)) ++ if (config_match(&ss->cipherSuites[i], policy, enabled, &ss->vrange, ss)) + count++; + } + if (count <= 0) { +@@ -984,9 +1010,9 @@ + break; + case dsaKey: + doDerEncode = isTLS; +- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. ++ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. + * In that case, we use just the SHA1 part. */ +- if (hash->hashAlg == SEC_OID_UNKNOWN) { ++ if (hash->hashAlg == ssl_hash_none) { + hashItem.data = hash->u.s.sha; + hashItem.len = sizeof(hash->u.s.sha); + } else { +@@ -997,9 +1023,9 @@ + #ifndef NSS_DISABLE_ECC + case ecKey: + doDerEncode = PR_TRUE; +- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. ++ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. + * In that case, we use just the SHA1 part. */ +- if (hash->hashAlg == SEC_OID_UNKNOWN) { ++ if (hash->hashAlg == ssl_hash_none) { + hashItem.data = hash->u.s.sha; + hashItem.len = sizeof(hash->u.s.sha); + } else { +@@ -1014,7 +1040,7 @@ + } + PRINT_BUF(60, (NULL, "hash(es) to be signed", hashItem.data, hashItem.len)); + +- if (hash->hashAlg == SEC_OID_UNKNOWN) { ++ if (hash->hashAlg == ssl_hash_none) { + signatureLen = PK11_SignatureLen(key); + if (signatureLen <= 0) { + PORT_SetError(SEC_ERROR_INVALID_KEY); +@@ -1028,7 +1054,8 @@ + + rv = PK11_Sign(key, buf, &hashItem); + } else { +- rv = SGN_Digest(key, hash->hashAlg, buf, &hashItem); ++ SECOidTag hashOID = ssl3_TLSHashAlgorithmToOID(hash->hashAlg); ++ rv = SGN_Digest(key, hashOID, buf, &hashItem); + } + if (rv != SECSuccess) { + ssl_MapLowLevelError(SSL_ERROR_SIGN_HASHES_FAILURE); +@@ -1076,7 +1103,7 @@ + return SECFailure; + } + +- hashAlg = hash->hashAlg; ++ hashAlg = ssl3_TLSHashAlgorithmToOID(hash->hashAlg); + switch (key->keyType) { + case rsaKey: + encAlg = SEC_OID_PKCS1_RSA_ENCRYPTION; +@@ -1085,9 +1112,9 @@ + break; + case dsaKey: + encAlg = SEC_OID_ANSIX9_DSA_SIGNATURE; +- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. ++ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. + * In that case, we use just the SHA1 part. */ +- if (hash->hashAlg == SEC_OID_UNKNOWN) { ++ if (hash->hashAlg == ssl_hash_none) { + hashItem.data = hash->u.s.sha; + hashItem.len = sizeof(hash->u.s.sha); + } else { +@@ -1108,13 +1135,13 @@ + #ifndef NSS_DISABLE_ECC + case ecKey: + encAlg = SEC_OID_ANSIX962_EC_PUBLIC_KEY; +- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. ++ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. + * In that case, we use just the SHA1 part. + * ECDSA signatures always encode the integers r and s using ASN.1 + * (unlike DSA where ASN.1 encoding is used with TLS but not with + * SSL3). So we can use VFY_VerifyDigestDirect for ECDSA. + */ +- if (hash->hashAlg == SEC_OID_UNKNOWN) { ++ if (hash->hashAlg == ssl_hash_none) { + hashAlg = SEC_OID_SHA1; + hashItem.data = hash->u.s.sha; + hashItem.len = sizeof(hash->u.s.sha); +@@ -1142,8 +1169,8 @@ + */ + rv = PK11_Verify(key, buf, &hashItem, pwArg); + } else { +- rv = VFY_VerifyDigestDirect(&hashItem, key, buf, encAlg, hashAlg, +- pwArg); ++ rv = VFY_VerifyDigestDirect(&hashItem, key, buf, encAlg, hashAlg, ++ pwArg); + } + SECKEY_DestroyPublicKey(key); + if (signature) { +@@ -1159,75 +1186,71 @@ + /* Caller must set hiLevel error code. */ + /* Called from ssl3_ComputeExportRSAKeyHash + * ssl3_ComputeDHKeyHash +- * which are called from ssl3_HandleServerKeyExchange. ++ * which are called from ssl3_HandleServerKeyExchange. + * +- * hashAlg: either the OID for a hash algorithm or SEC_OID_UNKNOWN to specify +- * the pre-1.2, MD5/SHA1 combination hash. ++ * hashAlg: ssl_hash_none indicates the pre-1.2, MD5/SHA1 combination hash. + */ + SECStatus +-ssl3_ComputeCommonKeyHash(SECOidTag hashAlg, +- PRUint8 * hashBuf, unsigned int bufLen, +- SSL3Hashes *hashes, PRBool bypassPKCS11) ++ssl3_ComputeCommonKeyHash(SSLHashType hashAlg, ++ PRUint8 * hashBuf, unsigned int bufLen, ++ SSL3Hashes *hashes, PRBool bypassPKCS11) + { +- SECStatus rv = SECSuccess; ++ SECStatus rv; ++ SECOidTag hashOID; + + #ifndef NO_PKCS11_BYPASS + if (bypassPKCS11) { +- if (hashAlg == SEC_OID_UNKNOWN) { +- MD5_HashBuf (hashes->u.s.md5, hashBuf, bufLen); +- SHA1_HashBuf(hashes->u.s.sha, hashBuf, bufLen); +- hashes->len = MD5_LENGTH + SHA1_LENGTH; +- } else if (hashAlg == SEC_OID_SHA1) { +- SHA1_HashBuf(hashes->u.raw, hashBuf, bufLen); +- hashes->len = SHA1_LENGTH; +- } else if (hashAlg == SEC_OID_SHA256) { +- SHA256_HashBuf(hashes->u.raw, hashBuf, bufLen); +- hashes->len = SHA256_LENGTH; +- } else if (hashAlg == SEC_OID_SHA384) { +- SHA384_HashBuf(hashes->u.raw, hashBuf, bufLen); +- hashes->len = SHA384_LENGTH; +- } else if (hashAlg == SEC_OID_SHA512) { +- SHA512_HashBuf(hashes->u.raw, hashBuf, bufLen); +- hashes->len = SHA512_LENGTH; +- } else { +- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); +- return SECFailure; +- } +- } else ++ if (hashAlg == ssl_hash_none) { ++ MD5_HashBuf (hashes->u.s.md5, hashBuf, bufLen); ++ SHA1_HashBuf(hashes->u.s.sha, hashBuf, bufLen); ++ hashes->len = MD5_LENGTH + SHA1_LENGTH; ++ } else if (hashAlg == ssl_hash_sha1) { ++ SHA1_HashBuf(hashes->u.raw, hashBuf, bufLen); ++ hashes->len = SHA1_LENGTH; ++ } else if (hashAlg == ssl_hash_sha256) { ++ SHA256_HashBuf(hashes->u.raw, hashBuf, bufLen); ++ hashes->len = SHA256_LENGTH; ++ } else if (hashAlg == ssl_hash_sha384) { ++ SHA384_HashBuf(hashes->u.raw, hashBuf, bufLen); ++ hashes->len = SHA384_LENGTH; ++ } else if (hashAlg == ssl_hash_sha512) { ++ SHA512_HashBuf(hashes->u.raw, hashBuf, bufLen); ++ hashes->len = SHA512_LENGTH; ++ } else { ++ PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); ++ return SECFailure; ++ } ++ } else + #endif + { +- if (hashAlg == SEC_OID_UNKNOWN) { +- rv = PK11_HashBuf(SEC_OID_MD5, hashes->u.s.md5, hashBuf, bufLen); +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE); +- rv = SECFailure; +- goto done; +- } +- +- rv = PK11_HashBuf(SEC_OID_SHA1, hashes->u.s.sha, hashBuf, bufLen); +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE); +- rv = SECFailure; +- } +- hashes->len = MD5_LENGTH + SHA1_LENGTH; +- } else { +- hashes->len = HASH_ResultLenByOidTag(hashAlg); +- if (hashes->len > sizeof(hashes->u.raw)) { +- ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); +- rv = SECFailure; +- goto done; +- } +- rv = PK11_HashBuf(hashAlg, hashes->u.raw, hashBuf, bufLen); +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE); +- rv = SECFailure; +- } +- } ++ if (hashAlg == ssl_hash_none) { ++ rv = PK11_HashBuf(SEC_OID_MD5, hashes->u.s.md5, hashBuf, bufLen); ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE); ++ return rv; ++ } ++ rv = PK11_HashBuf(SEC_OID_SHA1, hashes->u.s.sha, hashBuf, bufLen); ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE); ++ return rv; ++ } ++ hashes->len = MD5_LENGTH + SHA1_LENGTH; ++ } else { ++ hashOID = ssl3_TLSHashAlgorithmToOID(hashAlg); ++ hashes->len = HASH_ResultLenByOidTag(hashOID); ++ if (hashes->len == 0 || hashes->len > sizeof(hashes->u.raw)) { ++ ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); ++ return SECFailure; ++ } ++ rv = PK11_HashBuf(hashOID, hashes->u.raw, hashBuf, bufLen); ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE); ++ return rv; ++ } ++ } + } + hashes->hashAlg = hashAlg; +- +-done: +- return rv; ++ return SECSuccess; + } + + /* Caller must set hiLevel error code. +@@ -1235,10 +1258,10 @@ + ** ssl3_HandleServerKeyExchange. + */ + static SECStatus +-ssl3_ComputeExportRSAKeyHash(SECOidTag hashAlg, +- SECItem modulus, SECItem publicExponent, +- SSL3Random *client_rand, SSL3Random *server_rand, +- SSL3Hashes *hashes, PRBool bypassPKCS11) ++ssl3_ComputeExportRSAKeyHash(SSLHashType hashAlg, ++ SECItem modulus, SECItem publicExponent, ++ SSL3Random *client_rand, SSL3Random *server_rand, ++ SSL3Hashes *hashes, PRBool bypassPKCS11) + { + PRUint8 * hashBuf; + PRUint8 * pBuf; +@@ -1276,7 +1299,7 @@ + bypassPKCS11); + + PRINT_BUF(95, (NULL, "RSAkey hash: ", hashBuf, bufLen)); +- if (hashAlg == SEC_OID_UNKNOWN) { ++ if (hashAlg == ssl_hash_none) { + PRINT_BUF(95, (NULL, "RSAkey hash: MD5 result", + hashes->u.s.md5, MD5_LENGTH)); + PRINT_BUF(95, (NULL, "RSAkey hash: SHA1 result", +@@ -1294,10 +1317,10 @@ + /* Caller must set hiLevel error code. */ + /* Called from ssl3_HandleServerKeyExchange. */ + static SECStatus +-ssl3_ComputeDHKeyHash(SECOidTag hashAlg, +- SECItem dh_p, SECItem dh_g, SECItem dh_Ys, +- SSL3Random *client_rand, SSL3Random *server_rand, +- SSL3Hashes *hashes, PRBool bypassPKCS11) ++ssl3_ComputeDHKeyHash(SSLHashType hashAlg, ++ SECItem dh_p, SECItem dh_g, SECItem dh_Ys, ++ SSL3Random *client_rand, SSL3Random *server_rand, ++ SSL3Hashes *hashes, PRBool bypassPKCS11) + { + PRUint8 * hashBuf; + PRUint8 * pBuf; +@@ -1340,7 +1363,7 @@ + bypassPKCS11); + + PRINT_BUF(95, (NULL, "DHkey hash: ", hashBuf, bufLen)); +- if (hashAlg == SEC_OID_UNKNOWN) { ++ if (hashAlg == ssl_hash_none) { + PRINT_BUF(95, (NULL, "DHkey hash: MD5 result", + hashes->u.s.md5, MD5_LENGTH)); + PRINT_BUF(95, (NULL, "DHkey hash: SHA1 result", +@@ -2298,7 +2321,11 @@ + * Sets error code, but caller probably should override to disambiguate. + * NULL pms means re-use old master_secret. + * +- * This code is common to the bypass and PKCS11 execution paths. ++ * This code is common to the bypass and PKCS11 execution paths. For ++ * the bypass case, pms is NULL. If the old master secret is reused, ++ * pms is NULL and the master secret is already in either ++ * pwSpec->msItem.len (the bypass case) or pwSpec->master_secret. ++ * + * For the bypass case, pms is NULL. + */ + SECStatus +@@ -2682,7 +2709,7 @@ + PRUint32 fragLen; + PRUint32 p1Len, p2Len, oddLen = 0; + PRUint16 headerLen; +- int ivLen = 0; ++ unsigned int ivLen = 0; + int cipherBytes = 0; + unsigned char pseudoHeader[13]; + unsigned int pseudoHeaderLen; +@@ -3244,7 +3271,8 @@ + { + static const PRInt32 allowedFlags = ssl_SEND_FLAG_FORCE_INTO_BUFFER | + ssl_SEND_FLAG_CAP_RECORD_VERSION; +- PRInt32 rv = SECSuccess; ++ PRInt32 count = -1; ++ SECStatus rv = SECSuccess; + + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); +@@ -3258,18 +3286,19 @@ + PORT_SetError(SEC_ERROR_INVALID_ARGS); + rv = SECFailure; + } else { +- rv = ssl3_SendRecord(ss, 0, content_handshake, ss->sec.ci.sendBuf.buf, ++ count = ssl3_SendRecord(ss, 0, content_handshake, ss->sec.ci.sendBuf.buf, + ss->sec.ci.sendBuf.len, flags); + } +- if (rv < 0) { ++ if (count < 0) { + int err = PORT_GetError(); + PORT_Assert(err != PR_WOULD_BLOCK_ERROR); + if (err == PR_WOULD_BLOCK_ERROR) { + PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + } +- } else if (rv < ss->sec.ci.sendBuf.len) { ++ rv = SECFailure; ++ } else if ((unsigned int)count < ss->sec.ci.sendBuf.len) { + /* short write should never happen */ +- PORT_Assert(rv >= ss->sec.ci.sendBuf.len); ++ PORT_Assert((unsigned int)count >= ss->sec.ci.sendBuf.len); + PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + rv = SECFailure; + } else { +@@ -3705,13 +3734,70 @@ + return SECSuccess; + } + +-/* This method uses PKCS11 to derive the MS from the PMS, where PMS +-** is a PKCS11 symkey. This is used in all cases except the +-** "triple bypass" with RSA key exchange. +-** Called from ssl3_InitPendingCipherSpec. prSpec is pwSpec. ++/* This method completes the derivation of the MS from the PMS. ++** ++** 1. Derive the MS, if possible, else return an error. ++** ++** 2. Check the version if |pms_version| is non-zero and if wrong, ++** return an error. ++** ++** 3. If |msp| is nonzero, return MS in |*msp|. ++ ++** Called from: ++** ssl3_ComputeMasterSecretInt ++** tls_ComputeExtendedMasterSecretInt + */ + static SECStatus +-ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms) ++ssl3_ComputeMasterSecretFinish(sslSocket *ss, ++ CK_MECHANISM_TYPE master_derive, ++ CK_MECHANISM_TYPE key_derive, ++ CK_VERSION *pms_version, ++ SECItem *params, CK_FLAGS keyFlags, ++ PK11SymKey *pms, PK11SymKey **msp) ++{ ++ PK11SymKey *ms = NULL; ++ ++ ms = PK11_DeriveWithFlags(pms, master_derive, ++ params, key_derive, ++ CKA_DERIVE, 0, keyFlags); ++ if (!ms) { ++ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); ++ return SECFailure; ++ } ++ ++ if (pms_version && ss->opt.detectRollBack) { ++ SSL3ProtocolVersion client_version; ++ client_version = pms_version->major << 8 | pms_version->minor; ++ ++ if (IS_DTLS(ss)) { ++ client_version = dtls_DTLSVersionToTLSVersion(client_version); ++ } ++ ++ if (client_version != ss->clientHelloVersion) { ++ /* Destroy MS. Version roll-back detected. */ ++ PK11_FreeSymKey(ms); ++ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); ++ return SECFailure; ++ } ++ } ++ ++ if (msp) { ++ *msp = ms; ++ } else { ++ PK11_FreeSymKey(ms); ++ } ++ ++ return SECSuccess; ++} ++ ++/* Compute the ordinary (pre draft-ietf-tls-session-hash) master ++ ** secret and return it in |*msp|. ++ ** ++ ** Called from: ssl3_ComputeMasterSecret ++ */ ++static SECStatus ++ssl3_ComputeMasterSecretInt(sslSocket *ss, PK11SymKey *pms, ++ PK11SymKey **msp) + { + ssl3CipherSpec * pwSpec = ss->ssl3.pwSpec; + const ssl3KEADef *kea_def= ss->ssl3.hs.kea_def; +@@ -3721,28 +3807,27 @@ + (pwSpec->version > SSL_LIBRARY_VERSION_3_0)); + PRBool isTLS12= + (PRBool)(isTLS && pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); +- /* ++ /* + * Whenever isDH is true, we need to use CKM_TLS_MASTER_KEY_DERIVE_DH + * which, unlike CKM_TLS_MASTER_KEY_DERIVE, converts arbitrary size +- * data into a 48-byte value. ++ * data into a 48-byte value, and does not expect to return the version. + */ + PRBool isDH = (PRBool) ((ss->ssl3.hs.kea_def->exchKeyType == kt_dh) || + (ss->ssl3.hs.kea_def->exchKeyType == kt_ecdh)); +- SECStatus rv = SECFailure; + CK_MECHANISM_TYPE master_derive; + CK_MECHANISM_TYPE key_derive; + SECItem params; + CK_FLAGS keyFlags; + CK_VERSION pms_version; +- CK_SSL3_MASTER_KEY_DERIVE_PARAMS master_params; ++ CK_VERSION *pms_version_ptr = NULL; ++ /* master_params may be used as a CK_SSL3_MASTER_KEY_DERIVE_PARAMS */ ++ CK_TLS12_MASTER_KEY_DERIVE_PARAMS master_params; ++ unsigned int master_params_len; + +- PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); +- PORT_Assert( ss->opt.noLocks || ssl_HaveSpecWriteLock(ss)); +- PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); + if (isTLS12) { +- if(isDH) master_derive = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; +- else master_derive = CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256; +- key_derive = CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256; ++ if(isDH) master_derive = CKM_TLS12_MASTER_KEY_DERIVE_DH; ++ else master_derive = CKM_TLS12_MASTER_KEY_DERIVE; ++ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; + keyFlags = CKF_SIGN | CKF_VERIFY; + } else if (isTLS) { + if(isDH) master_derive = CKM_TLS_MASTER_KEY_DERIVE_DH; +@@ -3756,87 +3841,142 @@ + keyFlags = 0; + } + +- if (pms || !pwSpec->master_secret) { +- if (isDH) { +- master_params.pVersion = NULL; +- } else { +- master_params.pVersion = &pms_version; +- } +- master_params.RandomInfo.pClientRandom = cr; +- master_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH; +- master_params.RandomInfo.pServerRandom = sr; +- master_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH; ++ if (!isDH) { ++ pms_version_ptr = &pms_version; ++ } + +- params.data = (unsigned char *) &master_params; +- params.len = sizeof master_params; ++ master_params.pVersion = pms_version_ptr; ++ master_params.RandomInfo.pClientRandom = cr; ++ master_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH; ++ master_params.RandomInfo.pServerRandom = sr; ++ master_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH; ++ if (isTLS12) { ++ master_params.prfHashMechanism = CKM_SHA256; ++ master_params_len = sizeof(CK_TLS12_MASTER_KEY_DERIVE_PARAMS); ++ } else { ++ /* prfHashMechanism is not relevant with this PRF */ ++ master_params_len = sizeof(CK_SSL3_MASTER_KEY_DERIVE_PARAMS); + } + +- if (pms != NULL) { +-#if defined(TRACE) +- if (ssl_trace >= 100) { +- SECStatus extractRV = PK11_ExtractKeyValue(pms); +- if (extractRV == SECSuccess) { +- SECItem * keyData = PK11_GetKeyData(pms); +- if (keyData && keyData->data && keyData->len) { +- ssl_PrintBuf(ss, "Pre-Master Secret", +- keyData->data, keyData->len); +- } +- } +- } +-#endif +- pwSpec->master_secret = PK11_DeriveWithFlags(pms, master_derive, +- ¶ms, key_derive, CKA_DERIVE, 0, keyFlags); +- if (!isDH && pwSpec->master_secret && ss->opt.detectRollBack) { +- SSL3ProtocolVersion client_version; +- client_version = pms_version.major << 8 | pms_version.minor; ++ params.data = (unsigned char *) &master_params; ++ params.len = master_params_len; + +- if (IS_DTLS(ss)) { +- client_version = dtls_DTLSVersionToTLSVersion(client_version); +- } ++ return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive, ++ pms_version_ptr, ¶ms, ++ keyFlags, pms, msp); ++} + +- if (client_version != ss->clientHelloVersion) { +- /* Destroy it. Version roll-back detected. */ +- PK11_FreeSymKey(pwSpec->master_secret); +- pwSpec->master_secret = NULL; +- } +- } +- if (pwSpec->master_secret == NULL) { +- /* Generate a faux master secret in the same slot as the old one. */ +- PK11SlotInfo * slot = PK11_GetSlotFromKey((PK11SymKey *)pms); +- PK11SymKey * fpms = ssl3_GenerateRSAPMS(ss, pwSpec, slot); ++/* Compute the draft-ietf-tls-session-hash master ++** secret and return it in |*msp|. ++** ++** Called from: ssl3_ComputeMasterSecret ++*/ ++static SECStatus ++tls_ComputeExtendedMasterSecretInt(sslSocket *ss, PK11SymKey *pms, ++ PK11SymKey **msp) ++{ ++ ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec; ++ CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS extended_master_params; ++ SSL3Hashes hashes; ++ /* ++ * Determine whether to use the DH/ECDH or RSA derivation modes. ++ */ ++ /* ++ * TODO(ekr@rtfm.com): Verify that the slot can handle this key expansion ++ * mode. Bug 1198298 */ ++ PRBool isDH = (PRBool) ((ss->ssl3.hs.kea_def->exchKeyType == kt_dh) || ++ (ss->ssl3.hs.kea_def->exchKeyType == kt_ecdh)); ++ CK_MECHANISM_TYPE master_derive; ++ CK_MECHANISM_TYPE key_derive; ++ SECItem params; ++ const CK_FLAGS keyFlags = CKF_SIGN | CKF_VERIFY; ++ CK_VERSION pms_version; ++ CK_VERSION *pms_version_ptr = NULL; ++ SECStatus rv; + +- PK11_FreeSlot(slot); +- if (fpms != NULL) { +- pwSpec->master_secret = PK11_DeriveWithFlags(fpms, +- master_derive, ¶ms, key_derive, +- CKA_DERIVE, 0, keyFlags); +- PK11_FreeSymKey(fpms); +- } +- } ++ rv = ssl3_ComputeHandshakeHashes(ss, pwSpec, &hashes, 0); ++ if (rv != SECSuccess) { ++ PORT_Assert(0); /* Should never fail */ ++ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); ++ return SECFailure; + } +- if (pwSpec->master_secret == NULL) { +- /* Generate a faux master secret from the internal slot. */ +- PK11SlotInfo * slot = PK11_GetInternalSlot(); +- PK11SymKey * fpms = ssl3_GenerateRSAPMS(ss, pwSpec, slot); + +- PK11_FreeSlot(slot); +- if (fpms != NULL) { +- pwSpec->master_secret = PK11_DeriveWithFlags(fpms, +- master_derive, ¶ms, key_derive, +- CKA_DERIVE, 0, keyFlags); +- if (pwSpec->master_secret == NULL) { +- pwSpec->master_secret = fpms; /* use the fpms as the master. */ +- fpms = NULL; +- } +- } +- if (fpms) { +- PK11_FreeSymKey(fpms); +- } ++ if (isDH) { ++ master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH; ++ } else { ++ master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE; ++ pms_version_ptr = &pms_version; + } +- if (pwSpec->master_secret == NULL) { +- ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); +- return rv; ++ ++ if (pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { ++ /* TLS 1.2 */ ++ extended_master_params.prfHashMechanism = CKM_SHA256; ++ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; ++ } else { ++ /* TLS < 1.2 */ ++ extended_master_params.prfHashMechanism = CKM_TLS_PRF; ++ key_derive = CKM_TLS_KEY_AND_MAC_DERIVE; ++ } ++ ++ extended_master_params.pVersion = pms_version_ptr; ++ extended_master_params.pSessionHash = hashes.u.raw; ++ extended_master_params.ulSessionHashLen = hashes.len; ++ ++ params.data = (unsigned char *) &extended_master_params; ++ params.len = sizeof extended_master_params; ++ ++ return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive, ++ pms_version_ptr, ¶ms, ++ keyFlags, pms, msp); ++} ++ ++ ++/* Wrapper method to compute the master secret and return it in |*msp|. ++** ++** Called from ssl3_ComputeMasterSecret ++*/ ++static SECStatus ++ssl3_ComputeMasterSecret(sslSocket *ss, PK11SymKey *pms, ++ PK11SymKey **msp) ++{ ++ PORT_Assert(pms != NULL); ++ PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); ++ PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); ++ ++ if (ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { ++ return tls_ComputeExtendedMasterSecretInt(ss, pms, msp); ++ } else { ++ return ssl3_ComputeMasterSecretInt(ss, pms, msp); ++ } ++} ++ ++/* This method uses PKCS11 to derive the MS from the PMS, where PMS ++** is a PKCS11 symkey. We call ssl3_ComputeMasterSecret to do the ++** computations and then modify the pwSpec->state as a side effect. ++** ++** This is used in all cases except the "triple bypass" with RSA key ++** exchange. ++** ++** Called from ssl3_InitPendingCipherSpec. prSpec is pwSpec. ++*/ ++static SECStatus ++ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms) ++{ ++ SECStatus rv; ++ PK11SymKey* ms = NULL; ++ ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec; ++ ++ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); ++ PORT_Assert( ss->opt.noLocks || ssl_HaveSpecWriteLock(ss)); ++ PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); ++ ++ if (pms) { ++ rv = ssl3_ComputeMasterSecret(ss, pms, &ms); ++ pwSpec->master_secret = ms; ++ if (rv != SECSuccess) ++ return rv; + } ++ + #ifndef NO_PKCS11_BYPASS + if (ss->opt.bypassPKCS11) { + SECItem * keydata; +@@ -3847,7 +3987,7 @@ + rv = PK11_ExtractKeyValue(pwSpec->master_secret); + if (rv != SECSuccess) { + return rv; +- } ++ } + /* This returns the address of the secItem inside the key struct, + * not a copy or a reference. So, there's no need to free it. + */ +@@ -3862,10 +4002,10 @@ + } + } + #endif ++ + return SECSuccess; + } + +- + /* + * Derive encryption and MAC Keys (and IVs) from master secret + * Sets a useful error code when returning SECFailure. +@@ -3898,7 +4038,9 @@ + PK11SymKey * symKey = NULL; + void * pwArg = ss->pkcs11PinArg; + int keySize; +- CK_SSL3_KEY_MAT_PARAMS key_material_params; ++ CK_TLS12_KEY_MAT_PARAMS key_material_params; /* may be used as a ++ * CK_SSL3_KEY_MAT_PARAMS */ ++ unsigned int key_material_params_len; + CK_SSL3_KEY_MAT_OUT returnedKeys; + CK_MECHANISM_TYPE key_derive; + CK_MECHANISM_TYPE bulk_mechanism; +@@ -3952,17 +4094,21 @@ + PORT_Assert( alg2Mech[calg].calg == calg); + bulk_mechanism = alg2Mech[calg].cmech; + +- params.data = (unsigned char *)&key_material_params; +- params.len = sizeof(key_material_params); +- + if (isTLS12) { +- key_derive = CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256; ++ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; ++ key_material_params.prfHashMechanism = CKM_SHA256; ++ key_material_params_len = sizeof(CK_TLS12_KEY_MAT_PARAMS); + } else if (isTLS) { + key_derive = CKM_TLS_KEY_AND_MAC_DERIVE; ++ key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS); + } else { + key_derive = CKM_SSL3_KEY_AND_MAC_DERIVE; ++ key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS); + } + ++ params.data = (unsigned char *)&key_material_params; ++ params.len = key_material_params_len; ++ + /* CKM_SSL3_KEY_AND_MAC_DERIVE is defined to set ENCRYPT, DECRYPT, and + * DERIVE by DEFAULT */ + symKey = PK11_Derive(pwSpec->master_secret, key_derive, ¶ms, +@@ -4273,6 +4419,12 @@ + PRUint8 b[4]; + PRUint8 * p = b; + ++ PORT_Assert(lenSize <= 4 && lenSize > 0); ++ if (lenSize < 4 && num >= (1L << (lenSize * 8))) { ++ PORT_SetError(SSL_ERROR_TX_RECORD_TOO_LONG); ++ return SECFailure; ++ } ++ + switch (lenSize) { + case 4: + *p++ = (num >> 24) & 0xff; +@@ -4365,17 +4517,12 @@ + * |sigAndHash| to the current handshake message. */ + SECStatus + ssl3_AppendSignatureAndHashAlgorithm( +- sslSocket *ss, const SSL3SignatureAndHashAlgorithm* sigAndHash) ++ sslSocket *ss, const SSLSignatureAndHashAlg* sigAndHash) + { +- unsigned char serialized[2]; ++ PRUint8 serialized[2]; + +- serialized[0] = ssl3_OIDToTLSHashAlgorithm(sigAndHash->hashAlg); +- if (serialized[0] == 0) { +- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); +- return SECFailure; +- } +- +- serialized[1] = sigAndHash->sigAlg; ++ serialized[0] = (PRUint8)sigAndHash->hashAlg; ++ serialized[1] = (PRUint8)sigAndHash->sigAlg; + + return ssl3_AppendHandshake(ss, serialized, sizeof(serialized)); + } +@@ -4470,6 +4617,7 @@ + PORT_Assert(bytes <= 3); + i->len = 0; + i->data = NULL; ++ i->type = siBuffer; + count = ssl3_ConsumeHandshakeNumber(ss, bytes, b, length); + if (count < 0) { /* Can't test for SECSuccess here. */ + return SECFailure; +@@ -4489,15 +4637,13 @@ + /* tlsHashOIDMap contains the mapping between TLS hash identifiers and the + * SECOidTag used internally by NSS. */ + static const struct { +- int tlsHash; ++ SSLHashType tlsHash; + SECOidTag oid; + } tlsHashOIDMap[] = { +- { tls_hash_md5, SEC_OID_MD5 }, +- { tls_hash_sha1, SEC_OID_SHA1 }, +- { tls_hash_sha224, SEC_OID_SHA224 }, +- { tls_hash_sha256, SEC_OID_SHA256 }, +- { tls_hash_sha384, SEC_OID_SHA384 }, +- { tls_hash_sha512, SEC_OID_SHA512 } ++ { ssl_hash_sha1, SEC_OID_SHA1 }, ++ { ssl_hash_sha256, SEC_OID_SHA256 }, ++ { ssl_hash_sha384, SEC_OID_SHA384 }, ++ { ssl_hash_sha512, SEC_OID_SHA512 } + }; + + /* ssl3_TLSHashAlgorithmToOID converts a TLS hash identifier into an OID value. +@@ -4505,7 +4651,7 @@ + * + * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ + SECOidTag +-ssl3_TLSHashAlgorithmToOID(int hashFunc) ++ssl3_TLSHashAlgorithmToOID(SSLHashType hashFunc) + { + unsigned int i; + +@@ -4517,42 +4663,24 @@ + return SEC_OID_UNKNOWN; + } + +-/* ssl3_OIDToTLSHashAlgorithm converts an OID to a TLS hash algorithm +- * identifier. If the hash is not recognised, zero is returned. +- * +- * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ +-static int +-ssl3_OIDToTLSHashAlgorithm(SECOidTag oid) +-{ +- unsigned int i; +- +- for (i = 0; i < PR_ARRAY_SIZE(tlsHashOIDMap); i++) { +- if (oid == tlsHashOIDMap[i].oid) { +- return tlsHashOIDMap[i].tlsHash; +- } +- } +- return 0; +-} +- + /* ssl3_TLSSignatureAlgorithmForKeyType returns the TLS 1.2 signature algorithm + * identifier for a given KeyType. */ + static SECStatus +-ssl3_TLSSignatureAlgorithmForKeyType(KeyType keyType, +- TLSSignatureAlgorithm *out) ++ssl3_TLSSignatureAlgorithmForKeyType(KeyType keyType, SSLSignType *out) + { + switch (keyType) { + case rsaKey: +- *out = tls_sig_rsa; +- return SECSuccess; ++ *out = ssl_sign_rsa; ++ return SECSuccess; + case dsaKey: +- *out = tls_sig_dsa; +- return SECSuccess; ++ *out = ssl_sign_dsa; ++ return SECSuccess; + case ecKey: +- *out = tls_sig_ecdsa; +- return SECSuccess; ++ *out = ssl_sign_ecdsa; ++ return SECSuccess; + default: +- PORT_SetError(SEC_ERROR_INVALID_KEY); +- return SECFailure; ++ PORT_SetError(SEC_ERROR_INVALID_KEY); ++ return SECFailure; + } + } + +@@ -4560,15 +4688,15 @@ + * algorithm identifier for the given certificate. */ + static SECStatus + ssl3_TLSSignatureAlgorithmForCertificate(CERTCertificate *cert, +- TLSSignatureAlgorithm *out) ++ SSLSignType *out) + { + SECKEYPublicKey *key; + KeyType keyType; + + key = CERT_ExtractPublicKey(cert); + if (key == NULL) { +- ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); +- return SECFailure; ++ ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); ++ return SECFailure; + } + + keyType = key->keyType; +@@ -4578,24 +4706,75 @@ + + /* ssl3_CheckSignatureAndHashAlgorithmConsistency checks that the signature + * algorithm identifier in |sigAndHash| is consistent with the public key in +- * |cert|. If so, SECSuccess is returned. Otherwise, PORT_SetError is called +- * and SECFailure is returned. */ ++ * |cert|. It also checks the hash algorithm against the configured signature ++ * algorithms. If all the tests pass, SECSuccess is returned. Otherwise, ++ * PORT_SetError is called and SECFailure is returned. */ + SECStatus + ssl3_CheckSignatureAndHashAlgorithmConsistency( +- const SSL3SignatureAndHashAlgorithm *sigAndHash, CERTCertificate* cert) ++ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash, ++ CERTCertificate* cert) + { + SECStatus rv; +- TLSSignatureAlgorithm sigAlg; ++ SSLSignType sigAlg; ++ unsigned int i; + + rv = ssl3_TLSSignatureAlgorithmForCertificate(cert, &sigAlg); + if (rv != SECSuccess) { +- return rv; ++ return rv; + } + if (sigAlg != sigAndHash->sigAlg) { +- PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM); +- return SECFailure; ++ PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM); ++ return SECFailure; + } +- return SECSuccess; ++ ++ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { ++ const SSLSignatureAndHashAlg *alg = &ss->ssl3.signatureAlgorithms[i]; ++ if (sigAndHash->sigAlg == alg->sigAlg && ++ sigAndHash->hashAlg == alg->hashAlg) { ++ return SECSuccess; ++ } ++ } ++ PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM); ++ return SECFailure; ++} ++ ++PRBool ++ssl3_IsSupportedSignatureAlgorithm(const SSLSignatureAndHashAlg *alg) ++{ ++ static const SSLHashType supportedHashes[] = { ++ ssl_hash_sha1, ++ ssl_hash_sha256, ++ ssl_hash_sha384, ++ ssl_hash_sha512 ++ }; ++ ++ static const SSLSignType supportedSigAlgs[] = { ++ ssl_sign_rsa, ++#ifndef NSS_DISABLE_ECC ++ ssl_sign_ecdsa, ++#endif ++ ssl_sign_dsa ++ }; ++ ++ unsigned int i; ++ PRBool hashOK = PR_FALSE; ++ PRBool signOK = PR_FALSE; ++ ++ for (i = 0; i < PR_ARRAY_SIZE(supportedHashes); ++i) { ++ if (alg->hashAlg == supportedHashes[i]) { ++ hashOK = PR_TRUE; ++ break; ++ } ++ } ++ ++ for (i = 0; i < PR_ARRAY_SIZE(supportedSigAlgs); ++i) { ++ if (alg->sigAlg == supportedSigAlgs[i]) { ++ signOK = PR_TRUE; ++ break; ++ } ++ } ++ ++ return hashOK && signOK; + } + + /* ssl3_ConsumeSignatureAndHashAlgorithm reads a SignatureAndHashAlgorithm +@@ -4605,25 +4784,24 @@ + * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ + SECStatus + ssl3_ConsumeSignatureAndHashAlgorithm(sslSocket *ss, +- SSL3Opaque **b, +- PRUint32 *length, +- SSL3SignatureAndHashAlgorithm *out) ++ SSL3Opaque **b, ++ PRUint32 *length, ++ SSLSignatureAndHashAlg *out) + { +- unsigned char bytes[2]; ++ PRUint8 bytes[2]; + SECStatus rv; + + rv = ssl3_ConsumeHandshake(ss, bytes, sizeof(bytes), b, length); + if (rv != SECSuccess) { +- return rv; ++ return rv; + } + +- out->hashAlg = ssl3_TLSHashAlgorithmToOID(bytes[0]); +- if (out->hashAlg == SEC_OID_UNKNOWN) { +- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); +- return SECFailure; ++ out->hashAlg = (SSLHashType)bytes[0]; ++ out->sigAlg = (SSLSignType)bytes[1]; ++ if (!ssl3_IsSupportedSignatureAlgorithm(out)) { ++ PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM); ++ return SECFailure; + } +- +- out->sigAlg = bytes[1]; + return SECSuccess; + } + +@@ -4653,7 +4831,12 @@ + SSL3Opaque sha_inner[MAX_MAC_LENGTH]; + + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); +- hashes->hashAlg = SEC_OID_UNKNOWN; ++ if (ss->ssl3.hs.hashType == handshake_hash_unknown) { ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); ++ return SECFailure; ++ } ++ ++ hashes->hashAlg = ssl_hash_none; + + #ifndef NO_PKCS11_BYPASS + if (ss->opt.bypassPKCS11 && +@@ -4661,11 +4844,6 @@ + /* compute them without PKCS11 */ + PRUint64 sha_cx[MAX_MAC_CONTEXT_LLONGS]; + +- if (!spec->msItem.data) { +- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); +- return SECFailure; +- } +- + ss->ssl3.hs.sha_clone(sha_cx, ss->ssl3.hs.sha_cx); + ss->ssl3.hs.sha_obj->end(sha_cx, hashes->u.raw, &hashes->len, + sizeof(hashes->u.raw)); +@@ -4674,7 +4852,7 @@ + + /* If we ever support ciphersuites where the PRF hash isn't SHA-256 + * then this will need to be updated. */ +- hashes->hashAlg = SEC_OID_SHA256; ++ hashes->hashAlg = ssl_hash_sha256; + rv = SECSuccess; + } else if (ss->opt.bypassPKCS11) { + /* compute them without PKCS11 */ +@@ -4684,11 +4862,6 @@ + #define md5cx ((MD5Context *)md5_cx) + #define shacx ((SHA1Context *)sha_cx) + +- if (!spec->msItem.data) { +- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); +- return SECFailure; +- } +- + MD5_Clone (md5cx, (MD5Context *)ss->ssl3.hs.md5_cx); + SHA1_Clone(shacx, (SHA1Context *)ss->ssl3.hs.sha_cx); + +@@ -4696,6 +4869,11 @@ + /* compute hashes for SSL3. */ + unsigned char s[4]; + ++ if (!spec->msItem.data) { ++ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); ++ return SECFailure; ++ } ++ + s[0] = (unsigned char)(sender >> 24); + s[1] = (unsigned char)(sender >> 16); + s[2] = (unsigned char)(sender >> 8); +@@ -4768,11 +4946,6 @@ + unsigned char stackBuf[1024]; + unsigned char *stateBuf = NULL; + +- if (!spec->master_secret) { +- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); +- return SECFailure; +- } +- + h = ss->ssl3.hs.sha; + stateBuf = PK11_SaveContextAlloc(h, stackBuf, + sizeof(stackBuf), &stateLen); +@@ -4789,7 +4962,7 @@ + } + /* If we ever support ciphersuites where the PRF hash isn't SHA-256 + * then this will need to be updated. */ +- hashes->hashAlg = SEC_OID_SHA256; ++ hashes->hashAlg = ssl_hash_sha256; + rv = SECSuccess; + + tls12_loser: +@@ -4812,11 +4985,6 @@ + unsigned char md5StackBuf[256]; + unsigned char shaStackBuf[512]; + +- if (!spec->master_secret) { +- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); +- return SECFailure; +- } +- + md5StateBuf = PK11_SaveContextAlloc(ss->ssl3.hs.md5, md5StackBuf, + sizeof md5StackBuf, &md5StateLen); + if (md5StateBuf == NULL) { +@@ -4837,6 +5005,11 @@ + /* compute hashes for SSL3. */ + unsigned char s[4]; + ++ if (!spec->master_secret) { ++ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); ++ return SECFailure; ++ } ++ + s[0] = (unsigned char)(sender >> 24); + s[1] = (unsigned char)(sender >> 16); + s[2] = (unsigned char)(sender >> 8); +@@ -4968,7 +5141,7 @@ + rv = SECFailure; + goto loser; + } +- hashes->hashAlg = SEC_OID_SHA1; ++ hashes->hashAlg = ssl_hash_sha1; + + loser: + PK11_DestroyContext(ss->ssl3.hs.backupHash, PR_TRUE); +@@ -5049,7 +5222,9 @@ + if (rv != SECSuccess) { + return rv; /* ssl3_InitState has set the error code. */ + } +- ss->ssl3.hs.sendingSCSV = PR_FALSE; /* Must be reset every handshake */ ++ /* These must be reset every handshake. */ ++ ss->ssl3.hs.sendingSCSV = PR_FALSE; ++ ss->ssl3.hs.preliminaryInfo = 0; + PORT_Assert(IS_DTLS(ss) || !resending); + + SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE); +@@ -5425,7 +5600,7 @@ + } + for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { + ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; +- if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange)) { ++ if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) { + actual_count++; + if (actual_count > num_suites) { + if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } +@@ -6083,14 +6258,6 @@ + } + } + +- rv = ssl3_InitPendingCipherSpec(ss, pms); +- PK11_FreeSymKey(pms); pms = NULL; +- +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); +- goto loser; +- } +- + rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, + isTLS ? enc_pms.len + 2 : enc_pms.len); + if (rv != SECSuccess) { +@@ -6105,6 +6272,15 @@ + goto loser; /* err set by ssl3_AppendHandshake* */ + } + ++ rv = ssl3_InitPendingCipherSpec(ss, pms); ++ PK11_FreeSymKey(pms); ++ pms = NULL; ++ ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ + rv = SECSuccess; + + loser: +@@ -6174,14 +6350,6 @@ + SECKEY_DestroyPrivateKey(privKey); + privKey = NULL; + +- rv = ssl3_InitPendingCipherSpec(ss, pms); +- PK11_FreeSymKey(pms); pms = NULL; +- +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); +- goto loser; +- } +- + rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, + pubKey->u.dh.publicValue.len + 2); + if (rv != SECSuccess) { +@@ -6197,8 +6365,16 @@ + goto loser; /* err set by ssl3_AppendHandshake* */ + } + +- rv = SECSuccess; ++ rv = ssl3_InitPendingCipherSpec(ss, pms); ++ PK11_FreeSymKey(pms); ++ pms = NULL; + ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ ++ rv = SECSuccess; + + loser: + +@@ -6240,9 +6416,9 @@ + isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); + /* enforce limits on kea key sizes. */ + if (ss->ssl3.hs.kea_def->is_limited) { +- int keyLen = SECKEY_PublicKeyStrength(serverKey); /* bytes */ ++ unsigned int keyLen = SECKEY_PublicKeyStrengthInBits(serverKey); + +- if (keyLen * BPB > ss->ssl3.hs.kea_def->key_size_limit) { ++ if (keyLen > ss->ssl3.hs.kea_def->key_size_limit) { + if (isTLS) + (void)SSL3_SendAlert(ss, alert_fatal, export_restriction); + else +@@ -6297,7 +6473,7 @@ + SSL3Hashes hashes; + KeyType keyType; + unsigned int len; +- SSL3SignatureAndHashAlgorithm sigAndHash; ++ SSLSignatureAndHashAlg sigAndHash; + + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); +@@ -6362,11 +6538,11 @@ + } + if (isTLS12) { + rv = ssl3_TLSSignatureAlgorithmForKeyType(keyType, +- &sigAndHash.sigAlg); ++ &sigAndHash.sigAlg); + if (rv != SECSuccess) { + goto done; + } +- sigAndHash.hashAlg = hashes.hashAlg; ++ sigAndHash.hashAlg = hashes.hashAlg; + + rv = ssl3_AppendSignatureAndHashAlgorithm(ss, &sigAndHash); + if (rv != SECSuccess) { +@@ -6474,6 +6650,7 @@ + errCode = SSL_ERROR_UNSUPPORTED_VERSION; + goto alert_loser; + } ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; + isTLS = (ss->version > SSL_LIBRARY_VERSION_3_0); + + rv = ssl3_InitHandshakeHashes(ss); +@@ -6509,7 +6686,7 @@ + ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; + if (temp == suite->cipher_suite) { + SSLVersionRange vrange = {ss->version, ss->version}; +- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { ++ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { + /* config_match already checks whether the cipher suite is + * acceptable for the version, but the check is repeated here + * in order to give a more precise error code. */ +@@ -6533,6 +6710,7 @@ + } + ss->ssl3.hs.cipher_suite = (ssl3CipherSuite)temp; + ss->ssl3.hs.suite_def = ssl_LookupCipherSuiteDef((ssl3CipherSuite)temp); ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; + PORT_Assert(ss->ssl3.hs.suite_def); + if (!ss->ssl3.hs.suite_def) { + PORT_SetError(errCode = SEC_ERROR_LIBRARY_FAILURE); +@@ -6619,6 +6797,32 @@ + + SECItem wrappedMS; /* wrapped master secret. */ + ++ /* [draft-ietf-tls-session-hash-06; Section 5.3] ++ * ++ * o If the original session did not use the "extended_master_secret" ++ * extension but the new ServerHello contains the extension, the ++ * client MUST abort the handshake. ++ */ ++ if (!sid->u.ssl3.keys.extendedMasterSecretUsed && ++ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { ++ errCode = SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET; ++ goto alert_loser; ++ } ++ ++ /* ++ * o If the original session used an extended master secret but the new ++ * ServerHello does not contain the "extended_master_secret" ++ * extension, the client SHOULD abort the handshake. ++ * ++ * TODO(ekr@rtfm.com): Add option to refuse to resume when EMS is not ++ * used at all (bug 1176526). ++ */ ++ if (sid->u.ssl3.keys.extendedMasterSecretUsed && ++ !ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { ++ errCode = SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET; ++ goto alert_loser; ++ } ++ + ss->sec.authAlgorithm = sid->authAlgorithm; + ss->sec.authKeyBits = sid->authKeyBits; + ss->sec.keaType = sid->keaType; +@@ -6721,7 +6925,7 @@ + ssl3_CopyPeerCertsFromSID(ss, sid); + } + +- /* NULL value for PMS signifies re-use of the old MS */ ++ /* NULL value for PMS because we are reusing the old MS */ + rv = ssl3_InitPendingCipherSpec(ss, NULL); + if (rv != SECSuccess) { + goto alert_loser; /* err code was set */ +@@ -6750,6 +6954,9 @@ + sid->u.ssl3.sessionIDLength = sidBytes.len; + PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes.data, sidBytes.len); + ++ sid->u.ssl3.keys.extendedMasterSecretUsed = ++ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); ++ + /* Copy Signed Certificate Timestamps, if any. */ + if (ss->xtnData.signedCertTimestamps.data) { + rv = SECITEM_CopyItem(NULL, &sid->u.ssl3.signedCertTimestamps, +@@ -6761,13 +6968,14 @@ + ss->ssl3.hs.isResuming = PR_FALSE; + if (ss->ssl3.hs.kea_def->signKeyType != sign_null) { + /* All current cipher suites other than those with sign_null (i.e., +- * DH_anon_* suites) require a certificate, so use that signal. */ ++ * (EC)DH_anon_* suites) require a certificate, so use that signal. */ + ss->ssl3.hs.ws = wait_server_cert; +- } else if (ss->ssl3.hs.kea_def->ephemeral) { +- /* Only ephemeral cipher suites use ServerKeyExchange. */ +- ss->ssl3.hs.ws = wait_server_key; + } else { +- ss->ssl3.hs.ws = wait_cert_request; ++ /* All the remaining cipher suites must be (EC)DH_anon_* and so ++ * must be ephemeral. Note, if we ever add PSK this might ++ * change. */ ++ PORT_Assert(ss->ssl3.hs.kea_def->ephemeral); ++ ss->ssl3.hs.ws = wait_server_key; + } + + winner: +@@ -6807,29 +7015,6 @@ + return SECFailure; + } + +-/* ssl3_BigIntGreaterThanOne returns true iff |mpint|, taken as an unsigned, +- * big-endian integer is > 1 */ +-static PRBool +-ssl3_BigIntGreaterThanOne(const SECItem* mpint) { +- unsigned char firstNonZeroByte = 0; +- unsigned int i; +- +- for (i = 0; i < mpint->len; i++) { +- if (mpint->data[i]) { +- firstNonZeroByte = mpint->data[i]; +- break; +- } +- } +- +- if (firstNonZeroByte == 0) +- return PR_FALSE; +- if (firstNonZeroByte > 1) +- return PR_TRUE; +- +- /* firstNonZeroByte == 1, therefore mpint > 1 iff the first non-zero byte +- * is followed by another byte. */ +- return (i < mpint->len - 1); +-} + + /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete + * ssl3 ServerKeyExchange message. +@@ -6846,9 +7031,9 @@ + SSL3AlertDescription desc = illegal_parameter; + SSL3Hashes hashes; + SECItem signature = {siBuffer, NULL, 0}; +- SSL3SignatureAndHashAlgorithm sigAndHash; ++ SSLSignatureAndHashAlg sigAndHash; + +- sigAndHash.hashAlg = SEC_OID_UNKNOWN; ++ sigAndHash.hashAlg = ssl_hash_none; + + SSL_TRC(3, ("%d: SSL3[%d]: handle server_key_exchange handshake", + SSL_GETPID(), ss->fd)); +@@ -6874,6 +7059,12 @@ + if (rv != SECSuccess) { + goto loser; /* malformed. */ + } ++ /* This exchange method is only used by export cipher suites. ++ * Those are broken and so this code will eventually be removed. */ ++ if (SECKEY_BigIntegerBitLength(&modulus) < 512) { ++ desc = isTLS ? insufficient_security : illegal_parameter; ++ goto alert_loser; ++ } + rv = ssl3_ConsumeHandshakeVariable(ss, &exponent, 2, &b, &length); + if (rv != SECSuccess) { + goto loser; /* malformed. */ +@@ -6884,7 +7075,7 @@ + if (rv != SECSuccess) { + goto loser; /* malformed or unsupported. */ + } +- rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( ++ rv = ssl3_CheckSignatureAndHashAlgorithmConsistency(ss, + &sigAndHash, ss->sec.peerCert); + if (rv != SECSuccess) { + goto loser; +@@ -6907,10 +7098,10 @@ + /* + * check to make sure the hash is signed by right guy + */ +- rv = ssl3_ComputeExportRSAKeyHash(sigAndHash.hashAlg, modulus, exponent, +- &ss->ssl3.hs.client_random, +- &ss->ssl3.hs.server_random, +- &hashes, ss->opt.bypassPKCS11); ++ rv = ssl3_ComputeExportRSAKeyHash(sigAndHash.hashAlg, modulus, exponent, ++ &ss->ssl3.hs.client_random, ++ &ss->ssl3.hs.server_random, ++ &hashes, ss->opt.bypassPKCS11); + if (rv != SECSuccess) { + errCode = + ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); +@@ -6936,7 +7127,6 @@ + + peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); + if (peerKey == NULL) { +- PORT_FreeArena(arena, PR_FALSE); + goto no_memory; + } + +@@ -6947,7 +7137,6 @@ + if (SECITEM_CopyItem(arena, &peerKey->u.rsa.modulus, &modulus) || + SECITEM_CopyItem(arena, &peerKey->u.rsa.publicExponent, &exponent)) + { +- PORT_FreeArena(arena, PR_FALSE); + goto no_memory; + } + ss->sec.peerKey = peerKey; +@@ -6959,13 +7148,22 @@ + SECItem dh_p = {siBuffer, NULL, 0}; + SECItem dh_g = {siBuffer, NULL, 0}; + SECItem dh_Ys = {siBuffer, NULL, 0}; ++ unsigned dh_p_bits; ++ unsigned dh_g_bits; ++ unsigned dh_Ys_bits; ++ PRInt32 minDH; + + rv = ssl3_ConsumeHandshakeVariable(ss, &dh_p, 2, &b, &length); + if (rv != SECSuccess) { + goto loser; /* malformed. */ + } +- if (dh_p.len < 1024/8 || +- (dh_p.len == 1024/8 && (dh_p.data[0] & 0x80) == 0)) { ++ ++ rv = NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &minDH); ++ if (rv != SECSuccess) { ++ minDH = SSL_DH_MIN_P_BITS; ++ } ++ dh_p_bits = SECKEY_BigIntegerBitLength(&dh_p); ++ if (dh_p_bits < minDH) { + errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY; + goto alert_loser; + } +@@ -6973,13 +7171,16 @@ + if (rv != SECSuccess) { + goto loser; /* malformed. */ + } +- if (dh_g.len > dh_p.len || !ssl3_BigIntGreaterThanOne(&dh_g)) ++ /* Abort if dh_g is 0, 1, or obviously too big. */ ++ dh_g_bits = SECKEY_BigIntegerBitLength(&dh_g); ++ if (dh_g_bits > dh_p_bits || dh_g_bits <= 1) + goto alert_loser; + rv = ssl3_ConsumeHandshakeVariable(ss, &dh_Ys, 2, &b, &length); + if (rv != SECSuccess) { + goto loser; /* malformed. */ + } +- if (dh_Ys.len > dh_p.len || !ssl3_BigIntGreaterThanOne(&dh_Ys)) ++ dh_Ys_bits = SECKEY_BigIntegerBitLength(&dh_Ys); ++ if (dh_Ys_bits > dh_p_bits || dh_Ys_bits <= 1) + goto alert_loser; + if (isTLS12) { + rv = ssl3_ConsumeSignatureAndHashAlgorithm(ss, &b, &length, +@@ -6987,7 +7188,7 @@ + if (rv != SECSuccess) { + goto loser; /* malformed or unsupported. */ + } +- rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( ++ rv = ssl3_CheckSignatureAndHashAlgorithmConsistency(ss, + &sigAndHash, ss->sec.peerCert); + if (rv != SECSuccess) { + goto loser; +@@ -7014,10 +7215,10 @@ + /* + * check to make sure the hash is signed by right guy + */ +- rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, dh_p, dh_g, dh_Ys, +- &ss->ssl3.hs.client_random, +- &ss->ssl3.hs.server_random, +- &hashes, ss->opt.bypassPKCS11); ++ rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, dh_p, dh_g, dh_Ys, ++ &ss->ssl3.hs.client_random, ++ &ss->ssl3.hs.server_random, ++ &hashes, ss->opt.bypassPKCS11); + if (rv != SECSuccess) { + errCode = + ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); +@@ -7041,7 +7242,7 @@ + goto no_memory; + } + +- ss->sec.peerKey = peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); ++ peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); + if (peerKey == NULL) { + goto no_memory; + } +@@ -7055,7 +7256,6 @@ + SECITEM_CopyItem(arena, &peerKey->u.dh.base, &dh_g) || + SECITEM_CopyItem(arena, &peerKey->u.dh.publicValue, &dh_Ys)) + { +- PORT_FreeArena(arena, PR_FALSE); + goto no_memory; + } + ss->sec.peerKey = peerKey; +@@ -7078,10 +7278,16 @@ + alert_loser: + (void)SSL3_SendAlert(ss, alert_fatal, desc); + loser: ++ if (arena) { ++ PORT_FreeArena(arena, PR_FALSE); ++ } + PORT_SetError( errCode ); + return SECFailure; + + no_memory: /* no-memory error has already been set. */ ++ if (arena) { ++ PORT_FreeArena(arena, PR_FALSE); ++ } + ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); + return SECFailure; + } +@@ -7092,7 +7298,7 @@ + */ + static SECStatus + ssl3_ExtractClientKeyInfo(sslSocket *ss, +- TLSSignatureAlgorithm *sigAlg, ++ SSLSignType *sigAlg, + PRBool *preferSha1) + { + SECStatus rv = SECSuccess; +@@ -7148,7 +7354,7 @@ + const SECItem *algorithms) + { + SECStatus rv; +- TLSSignatureAlgorithm sigAlg; ++ SSLSignType sigAlg; + PRBool preferSha1; + PRBool supportsSha1 = PR_FALSE; + PRBool supportsSha256 = PR_FALSE; +@@ -7173,9 +7379,9 @@ + /* Determine the server's hash support for that signature algorithm. */ + for (i = 0; i < algorithms->len; i += 2) { + if (algorithms->data[i+1] == sigAlg) { +- if (algorithms->data[i] == tls_hash_sha1) { ++ if (algorithms->data[i] == ssl_hash_sha1) { + supportsSha1 = PR_TRUE; +- } else if (algorithms->data[i] == tls_hash_sha256) { ++ } else if (algorithms->data[i] == ssl_hash_sha256) { + supportsSha256 = PR_TRUE; + } + } +@@ -7334,6 +7540,8 @@ + } else + #endif + if (ss->getClientAuthData != NULL) { ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); + /* XXX Should pass cert_types and algorithms in this call!! */ + rv = (SECStatus)(*ss->getClientAuthData)(ss->getClientAuthDataArg, + ss->fd, &ca_list, +@@ -7565,6 +7773,8 @@ + SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher", + SSL_GETPID(), ss->fd)); + } else { ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); + rv = (ss->canFalseStartCallback)(ss->fd, + ss->canFalseStartCallbackData, + &ss->ssl3.hs.canFalseStart); +@@ -7923,6 +8133,7 @@ + sid->u.ssl3.policy = SSL_ALLOWED; + sid->u.ssl3.clientWriteKey = NULL; + sid->u.ssl3.serverWriteKey = NULL; ++ sid->u.ssl3.keys.extendedMasterSecretUsed = PR_FALSE; + + if (is_server) { + SECStatus rv; +@@ -7975,7 +8186,7 @@ + + if (kea_def->is_limited && kea_def->exchKeyType == kt_rsa) { + /* see if we can legally use the key in the cert. */ +- int keyLen; /* bytes */ ++ unsigned int keyLen; /* bytes */ + + keyLen = PK11_GetPrivateModulusLen( + ss->serverCerts[kea_def->exchKeyType].SERVERKEY); +@@ -8022,6 +8233,22 @@ + /* An empty TLS Renegotiation Info (RI) extension */ + static const PRUint8 emptyRIext[5] = {0xff, 0x01, 0x00, 0x01, 0x00}; + ++static PRBool ++ssl3_KEAAllowsSessionTicket(SSL3KeyExchangeAlgorithm kea) ++{ ++ switch (kea) { ++ case kea_dhe_dss: ++ case kea_dhe_dss_export: ++ case kea_dh_dss_export: ++ case kea_dh_dss: ++ /* TODO: Fix session tickets for DSS. The server code rejects the ++ * session ticket received from the client. Bug 1174677 */ ++ return PR_FALSE; ++ default: ++ return PR_TRUE; ++ }; ++} ++ + /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete + * ssl3 Client Hello message. + * Caller must hold Handshake and RecvBuf locks. +@@ -8044,6 +8271,7 @@ + SECItem comps = {siBuffer, NULL, 0}; + PRBool haveSpecWriteLock = PR_FALSE; + PRBool haveXmitBufLock = PR_FALSE; ++ PRBool canOfferSessionTicket = PR_FALSE; + + SSL_TRC(3, ("%d: SSL3[%d]: handle client_hello handshake", + SSL_GETPID(), ss->fd)); +@@ -8051,6 +8279,7 @@ + PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); + PORT_Assert( ss->ssl3.initialized ); ++ ss->ssl3.hs.preliminaryInfo = 0; + + if (!ss->sec.isServer || + (ss->ssl3.hs.ws != wait_client_hello && +@@ -8116,6 +8345,7 @@ + errCode = SSL_ERROR_UNSUPPORTED_VERSION; + goto alert_loser; + } ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; + + rv = ssl3_InitHandshakeHashes(ss); + if (rv != SECSuccess) { +@@ -8283,8 +8513,7 @@ + * resuming.) + */ + if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn) && sid == NULL) { +- ssl3_RegisterServerHelloExtensionSender(ss, +- ssl_session_ticket_xtn, ssl3_SendSessionTicketXtn); ++ canOfferSessionTicket = PR_TRUE; + } + + if (sid != NULL) { +@@ -8367,7 +8596,7 @@ + * The product policy won't change during the process lifetime. + * Implemented ("isPresent") shouldn't change for servers. + */ +- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) ++ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) + break; + #else + if (!suite->enabled) +@@ -8380,6 +8609,7 @@ + ss->ssl3.hs.cipher_suite = suite->cipher_suite; + ss->ssl3.hs.suite_def = + ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; + + /* Use the cached compression method. */ + ss->ssl3.hs.compression = sid->u.ssl3.compression; +@@ -8416,7 +8646,7 @@ + for (j = 0; j < ssl_V3_SUITES_IMPLEMENTED; j++) { + ssl3CipherSuiteCfg *suite = &ss->cipherSuites[j]; + SSLVersionRange vrange = {ss->version, ss->version}; +- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { ++ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { + continue; + } + for (i = 0; i + 1 < suites.len; i += 2) { +@@ -8425,6 +8655,7 @@ + ss->ssl3.hs.cipher_suite = suite->cipher_suite; + ss->ssl3.hs.suite_def = + ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; + goto suite_found; + } + } +@@ -8433,6 +8664,15 @@ + goto alert_loser; + + suite_found: ++ if (canOfferSessionTicket) ++ canOfferSessionTicket = ssl3_KEAAllowsSessionTicket( ++ ss->ssl3.hs.suite_def->key_exchange_alg); ++ ++ if (canOfferSessionTicket) { ++ ssl3_RegisterServerHelloExtensionSender(ss, ++ ssl_session_ticket_xtn, ssl3_SendSessionTicketXtn); ++ } ++ + /* Select a compression algorithm. */ + for (i = 0; i < comps.len; i++) { + if (!compressionEnabled(ss, comps.data[i])) +@@ -8458,6 +8698,8 @@ + /* If there are any failures while processing the old sid, + * we don't consider them to be errors. Instead, We just behave + * as if the client had sent us no sid to begin with, and make a new one. ++ * The exception here is attempts to resume extended_master_secret ++ * sessions without the extension, which causes an alert. + */ + if (sid != NULL) do { + ssl3CipherSpec *pwSpec; +@@ -8469,6 +8711,30 @@ + break; /* not an error */ + } + ++ /* [draft-ietf-tls-session-hash-06; Section 5.3] ++ * o If the original session did not use the "extended_master_secret" ++ * extension but the new ClientHello contains the extension, then the ++ * server MUST NOT perform the abbreviated handshake. Instead, it ++ * SHOULD continue with a full handshake (as described in ++ * Section 5.2) to negotiate a new session. ++ * ++ * o If the original session used the "extended_master_secret" ++ * extension but the new ClientHello does not contain the extension, ++ * the server MUST abort the abbreviated handshake. ++ */ ++ if (ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { ++ if (!sid->u.ssl3.keys.extendedMasterSecretUsed) { ++ break; /* not an error */ ++ } ++ } else { ++ if (sid->u.ssl3.keys.extendedMasterSecretUsed) { ++ /* Note: we do not destroy the session */ ++ desc = handshake_failure; ++ errCode = SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET; ++ goto alert_loser; ++ } ++ } ++ + if (ss->sec.ci.sid) { + if (ss->sec.uncache) + ss->sec.uncache(ss->sec.ci.sid); +@@ -8610,7 +8876,7 @@ + haveSpecWriteLock = PR_FALSE; + } + +- /* NULL value for PMS signifies re-use of the old MS */ ++ /* NULL value for PMS because we are re-using the old MS */ + rv = ssl3_InitPendingCipherSpec(ss, NULL); + if (rv != SECSuccess) { + errCode = PORT_GetError(); +@@ -8654,6 +8920,9 @@ + if (ssl3_ExtensionNegotiated(ss, ssl_server_name_xtn)) { + int ret = 0; + if (ss->sniSocketConfig) do { /* not a loop */ ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); ++ + ret = SSL_SNI_SEND_ALERT; + /* If extension is negotiated, the len of names should > 0. */ + if (ss->xtnData.sniNameArrSize) { +@@ -8701,7 +8970,7 @@ + ret = SSL_SNI_SEND_ALERT; + break; + } +- } else if (ret < ss->xtnData.sniNameArrSize) { ++ } else if ((unsigned int)ret < ss->xtnData.sniNameArrSize) { + /* Application has configured new socket info. Lets check it + * and save the name. */ + SECStatus rv; +@@ -8752,7 +9021,7 @@ + ssl3_SendServerNameXtn); + } else { + /* Callback returned index outside of the boundary. */ +- PORT_Assert(ret < ss->xtnData.sniNameArrSize); ++ PORT_Assert((unsigned int)ret < ss->xtnData.sniNameArrSize); + errCode = SSL_ERROR_INTERNAL_ERROR_ALERT; + desc = internal_error; + ret = SSL_SNI_SEND_ALERT; +@@ -8798,13 +9067,16 @@ + } + ss->sec.ci.sid = sid; + ++ sid->u.ssl3.keys.extendedMasterSecretUsed = ++ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); + ss->ssl3.hs.isResuming = PR_FALSE; + ssl_GetXmitBufLock(ss); + rv = ssl3_SendServerHelloSequence(ss); + ssl_ReleaseXmitBufLock(ss); + if (rv != SECSuccess) { +- errCode = PORT_GetError(); +- goto loser; ++ errCode = PORT_GetError(); ++ desc = handshake_failure; ++ goto alert_loser; + } + + if (haveXmitBufLock) { +@@ -8896,6 +9168,7 @@ + errCode = SSL_ERROR_UNSUPPORTED_VERSION; + goto alert_loser; + } ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; + + rv = ssl3_InitHandshakeHashes(ss); + if (rv != SECSuccess) { +@@ -8951,7 +9224,7 @@ + for (j = 0; j < ssl_V3_SUITES_IMPLEMENTED; j++) { + ssl3CipherSuiteCfg *suite = &ss->cipherSuites[j]; + SSLVersionRange vrange = {ss->version, ss->version}; +- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { ++ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { + continue; + } + for (i = 0; i+2 < suite_length; i += 3) { +@@ -8960,6 +9233,7 @@ + ss->ssl3.hs.cipher_suite = suite->cipher_suite; + ss->ssl3.hs.suite_def = + ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); ++ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; + goto suite_found; + } + } +@@ -9150,6 +9424,154 @@ + return SECSuccess; + } + ++static SECStatus ++ssl3_PickSignatureHashAlgorithm(sslSocket *ss, ++ SSLSignatureAndHashAlg* out); ++ ++static SECStatus ++ssl3_SendDHServerKeyExchange(sslSocket *ss) ++{ ++ const ssl3KEADef * kea_def = ss->ssl3.hs.kea_def; ++ SECStatus rv = SECFailure; ++ int length; ++ PRBool isTLS; ++ SECItem signed_hash = {siBuffer, NULL, 0}; ++ SSL3Hashes hashes; ++ SSLSignatureAndHashAlg sigAndHash; ++ SECKEYDHParams dhParam; ++ ++ ssl3KeyPair *keyPair = NULL; ++ SECKEYPublicKey *pubKey = NULL; /* Ephemeral DH key */ ++ SECKEYPrivateKey *privKey = NULL; /* Ephemeral DH key */ ++ int certIndex = -1; ++ ++ if (kea_def->kea != kea_dhe_dss && kea_def->kea != kea_dhe_rsa) { ++ /* TODO: Support DH_anon. It might be sufficient to drop the signature. ++ See bug 1170510. */ ++ PORT_SetError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); ++ return SECFailure; ++ } ++ ++ dhParam.prime.data = ss->dheParams->prime.data; ++ dhParam.prime.len = ss->dheParams->prime.len; ++ dhParam.base.data = ss->dheParams->base.data; ++ dhParam.base.len = ss->dheParams->base.len; ++ ++ PRINT_BUF(60, (NULL, "Server DH p", dhParam.prime.data, ++ dhParam.prime.len)); ++ PRINT_BUF(60, (NULL, "Server DH g", dhParam.base.data, ++ dhParam.base.len)); ++ ++ /* Generate ephemeral DH keypair */ ++ privKey = SECKEY_CreateDHPrivateKey(&dhParam, &pubKey, NULL); ++ if (!privKey || !pubKey) { ++ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); ++ rv = SECFailure; ++ goto loser; ++ } ++ ++ keyPair = ssl3_NewKeyPair(privKey, pubKey); ++ if (!keyPair) { ++ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); ++ goto loser; ++ } ++ ++ PRINT_BUF(50, (ss, "DH public value:", ++ pubKey->u.dh.publicValue.data, ++ pubKey->u.dh.publicValue.len)); ++ ++ if (ssl3_PickSignatureHashAlgorithm(ss, &sigAndHash) != SECSuccess) { ++ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); ++ goto loser; ++ } ++ ++ rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, ++ pubKey->u.dh.prime, ++ pubKey->u.dh.base, ++ pubKey->u.dh.publicValue, ++ &ss->ssl3.hs.client_random, ++ &ss->ssl3.hs.server_random, ++ &hashes, ss->opt.bypassPKCS11); ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ ++ /* It has been suggested to test kea_def->signKeyType instead, and to use ++ * ssl_auth_* instead. Investigate what to do. See bug 102794. */ ++ if (kea_def->kea == kea_dhe_rsa) ++ certIndex = ssl_kea_rsa; ++ else ++ certIndex = ssl_kea_dh; ++ ++ isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); ++ rv = ssl3_SignHashes(&hashes, ss->serverCerts[certIndex].SERVERKEY, ++ &signed_hash, isTLS); ++ if (rv != SECSuccess) { ++ goto loser; /* ssl3_SignHashes has set err. */ ++ } ++ if (signed_hash.data == NULL) { ++ PORT_SetError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ length = 2 + pubKey->u.dh.prime.len + ++ 2 + pubKey->u.dh.base.len + ++ 2 + pubKey->u.dh.publicValue.len + ++ 2 + signed_hash.len; ++ ++ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { ++ length += 2; ++ } ++ ++ rv = ssl3_AppendHandshakeHeader(ss, server_key_exchange, length); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ ++ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.prime.data, ++ pubKey->u.dh.prime.len, 2); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ ++ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.base.data, ++ pubKey->u.dh.base.len, 2); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ ++ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.publicValue.data, ++ pubKey->u.dh.publicValue.len, 2); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ ++ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { ++ rv = ssl3_AppendSignatureAndHashAlgorithm(ss, &sigAndHash); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ } ++ ++ rv = ssl3_AppendHandshakeVariable(ss, signed_hash.data, ++ signed_hash.len, 2); ++ if (rv != SECSuccess) { ++ goto loser; /* err set by AppendHandshake. */ ++ } ++ PORT_Free(signed_hash.data); ++ ss->dheKeyPair = keyPair; ++ return SECSuccess; ++ ++loser: ++ if (signed_hash.data) ++ PORT_Free(signed_hash.data); ++ if (privKey) ++ SECKEY_DestroyPrivateKey(privKey); ++ if (pubKey) ++ SECKEY_DestroyPublicKey(pubKey); ++ return SECFailure; ++} ++ + /* ssl3_PickSignatureHashAlgorithm selects a hash algorithm to use when signing + * elements of the handshake. (The negotiated cipher suite determines the + * signature algorithm.) Prior to TLS 1.2, the MD5/SHA1 combination is always +@@ -9157,18 +9579,11 @@ + * hash combinations. */ + static SECStatus + ssl3_PickSignatureHashAlgorithm(sslSocket *ss, +- SSL3SignatureAndHashAlgorithm* out) ++ SSLSignatureAndHashAlg* out) + { +- TLSSignatureAlgorithm sigAlg; ++ SSLSignType sigAlg; ++ PRUint32 policy; + unsigned int i, j; +- /* hashPreference expresses our preferences for hash algorithms, most +- * preferable first. */ +- static const SECOidTag hashPreference[] = { +- SEC_OID_SHA256, +- SEC_OID_SHA384, +- SEC_OID_SHA512, +- SEC_OID_SHA1, +- }; + + switch (ss->ssl3.hs.kea_def->kea) { + case kea_rsa: +@@ -9181,48 +9596,63 @@ + case kea_rsa_fips: + case kea_ecdh_rsa: + case kea_ecdhe_rsa: +- sigAlg = tls_sig_rsa; +- break; ++ sigAlg = ssl_sign_rsa; ++ break; + case kea_dh_dss: + case kea_dh_dss_export: + case kea_dhe_dss: + case kea_dhe_dss_export: +- sigAlg = tls_sig_dsa; +- break; ++ sigAlg = ssl_sign_dsa; ++ break; + case kea_ecdh_ecdsa: + case kea_ecdhe_ecdsa: +- sigAlg = tls_sig_ecdsa; +- break; ++ sigAlg = ssl_sign_ecdsa; ++ break; + default: +- PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); +- return SECFailure; ++ PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); ++ return SECFailure; + } + out->sigAlg = sigAlg; + + if (ss->version <= SSL_LIBRARY_VERSION_TLS_1_1) { +- /* SEC_OID_UNKNOWN means the MD5/SHA1 combo hash used in TLS 1.1 and +- * prior. */ +- out->hashAlg = SEC_OID_UNKNOWN; +- return SECSuccess; ++ /* SEC_OID_UNKNOWN means the MD5/SHA1 combo hash used in TLS 1.1 and ++ * prior. */ ++ out->hashAlg = ssl_hash_none; ++ return SECSuccess; + } + + if (ss->ssl3.hs.numClientSigAndHash == 0) { +- /* If the client didn't provide any signature_algorithms extension then +- * we can assume that they support SHA-1: +- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ +- out->hashAlg = SEC_OID_SHA1; +- return SECSuccess; ++ /* If the client didn't provide any signature_algorithms extension then ++ * we can assume that they support SHA-1: ++ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ ++ out->hashAlg = ssl_hash_sha1; ++ return SECSuccess; + } + +- for (i = 0; i < PR_ARRAY_SIZE(hashPreference); i++) { +- for (j = 0; j < ss->ssl3.hs.numClientSigAndHash; j++) { +- const SSL3SignatureAndHashAlgorithm* sh = +- &ss->ssl3.hs.clientSigAndHash[j]; +- if (sh->sigAlg == sigAlg && sh->hashAlg == hashPreference[i]) { +- out->hashAlg = sh->hashAlg; +- return SECSuccess; +- } ++ /* Here we look for the first server preference that the client has ++ * indicated support for in their signature_algorithms extension. */ ++ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { ++ const SSLSignatureAndHashAlg *serverPref = ++ &ss->ssl3.signatureAlgorithms[i]; ++ SECOidTag hashOID; ++ if (serverPref->sigAlg != sigAlg) { ++ continue; ++ } ++ hashOID = ssl3_TLSHashAlgorithmToOID(serverPref->hashAlg); ++ if ((NSS_GetAlgorithmPolicy(hashOID, &policy) != SECSuccess) ++ || !(policy & NSS_USE_ALG_IN_SSL_KX)) { ++ /* we ignore hashes we don't support */ ++ continue; + } ++ for (j = 0; j < ss->ssl3.hs.numClientSigAndHash; j++) { ++ const SSLSignatureAndHashAlg *clientPref = ++ &ss->ssl3.hs.clientSigAndHash[j]; ++ if (clientPref->hashAlg == serverPref->hashAlg && ++ clientPref->sigAlg == sigAlg) { ++ out->hashAlg = serverPref->hashAlg; ++ return SECSuccess; ++ } ++ } + } + + PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); +@@ -9240,7 +9670,7 @@ + SECItem signed_hash = {siBuffer, NULL, 0}; + SSL3Hashes hashes; + SECKEYPublicKey * sdPub; /* public key for step-down */ +- SSL3SignatureAndHashAlgorithm sigAndHash; ++ SSLSignatureAndHashAlg sigAndHash; + + SSL_TRC(3, ("%d: SSL3[%d]: send server_key_exchange handshake", + SSL_GETPID(), ss->fd)); +@@ -9287,6 +9717,10 @@ + 2 + sdPub->u.rsa.publicExponent.len + + 2 + signed_hash.len; + ++ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { ++ length += 2; ++ } ++ + rv = ssl3_AppendHandshakeHeader(ss, server_key_exchange, length); + if (rv != SECSuccess) { + goto loser; /* err set by AppendHandshake. */ +@@ -9320,6 +9754,11 @@ + PORT_Free(signed_hash.data); + return SECSuccess; + ++ case ssl_kea_dh: { ++ rv = ssl3_SendDHServerKeyExchange(ss); ++ return rv; ++ } ++ + #ifndef NSS_DISABLE_ECC + case kt_ecdh: { + rv = ssl3_SendECDHServerKeyExchange(ss, &sigAndHash); +@@ -9327,7 +9766,6 @@ + } + #endif /* NSS_DISABLE_ECC */ + +- case kt_dh: + case kt_null: + default: + PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); +@@ -9339,6 +9777,36 @@ + return SECFailure; + } + ++static SECStatus ++ssl3_EncodeCertificateRequestSigAlgs(sslSocket *ss, PRUint8 *buf, ++ unsigned maxLen, PRUint32 *len) ++{ ++ unsigned int i; ++ ++ PORT_Assert(maxLen >= ss->ssl3.signatureAlgorithmCount * 2); ++ if (maxLen < ss->ssl3.signatureAlgorithmCount * 2) { ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); ++ return SECFailure; ++ } ++ ++ *len = 0; ++ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { ++ const SSLSignatureAndHashAlg *alg = &ss->ssl3.signatureAlgorithms[i]; ++ /* Note that we don't support a handshake hash with anything other than ++ * SHA-256, so asking for a signature from clients for something else ++ * would be inviting disaster. */ ++ if (alg->hashAlg == ssl_hash_sha256) { ++ buf[(*len)++] = (PRUint8)alg->hashAlg; ++ buf[(*len)++] = (PRUint8)alg->sigAlg; ++ } ++ } ++ ++ if (*len == 0) { ++ PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM); ++ return SECFailure; ++ } ++ return SECSuccess; ++} + + static SECStatus + ssl3_SendCertificateRequest(sslSocket *ss) +@@ -9347,7 +9815,6 @@ + SECItem * name; + CERTDistNames *ca_list; + const PRUint8 *certTypes; +- const PRUint8 *sigAlgs; + SECItem * names = NULL; + SECStatus rv; + int length; +@@ -9355,7 +9822,8 @@ + int calen = 0; + int nnames = 0; + int certTypesLength; +- int sigAlgsLength; ++ PRUint8 sigAlgs[MAX_SIGNATURE_ALGORITHMS * 2]; ++ unsigned int sigAlgsLength = 0; + + SSL_TRC(3, ("%d: SSL3[%d]: send certificate_request handshake", + SSL_GETPID(), ss->fd)); +@@ -9382,12 +9850,15 @@ + + certTypes = certificate_types; + certTypesLength = sizeof certificate_types; +- sigAlgs = supported_signature_algorithms; +- sigAlgsLength = sizeof supported_signature_algorithms; + + length = 1 + certTypesLength + 2 + calen; + if (isTLS12) { +- length += 2 + sigAlgsLength; ++ rv = ssl3_EncodeCertificateRequestSigAlgs(ss, sigAlgs, sizeof(sigAlgs), ++ &sigAlgsLength); ++ if (rv != SECSuccess) { ++ return rv; ++ } ++ length += 2 + sigAlgsLength; + } + + rv = ssl3_AppendHandshakeHeader(ss, certificate_request, length); +@@ -9453,7 +9924,7 @@ + int errCode = SSL_ERROR_RX_MALFORMED_CERT_VERIFY; + SSL3AlertDescription desc = handshake_failure; + PRBool isTLS, isTLS12; +- SSL3SignatureAndHashAlgorithm sigAndHash; ++ SSLSignatureAndHashAlg sigAndHash; + + SSL_TRC(3, ("%d: SSL3[%d]: handle certificate_verify handshake", + SSL_GETPID(), ss->fd)); +@@ -9469,6 +9940,13 @@ + goto alert_loser; + } + ++ if (!hashes) { ++ PORT_Assert(0); ++ desc = internal_error; ++ errCode = SEC_ERROR_LIBRARY_FAILURE; ++ goto alert_loser; ++ } ++ + if (isTLS12) { + rv = ssl3_ConsumeSignatureAndHashAlgorithm(ss, &b, &length, + &sigAndHash); +@@ -9476,7 +9954,7 @@ + goto loser; /* malformed or unsupported. */ + } + rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( +- &sigAndHash, ss->sec.peerCert); ++ ss, &sigAndHash, ss->sec.peerCert); + if (rv != SECSuccess) { + errCode = PORT_GetError(); + desc = decrypt_error; +@@ -9485,7 +9963,7 @@ + + /* We only support CertificateVerify messages that use the handshake + * hash. */ +- if (sigAndHash.hashAlg != hashes->hashAlg) { ++ if (sigAndHash.hashAlg != hashes->hashAlg) { + errCode = SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM; + desc = decrypt_error; + goto alert_loser; +@@ -9616,18 +10094,17 @@ + PRUint32 length, + SECKEYPrivateKey *serverKey) + { +- PK11SymKey * pms; + #ifndef NO_PKCS11_BYPASS + unsigned char * cr = (unsigned char *)&ss->ssl3.hs.client_random; + unsigned char * sr = (unsigned char *)&ss->ssl3.hs.server_random; + ssl3CipherSpec * pwSpec = ss->ssl3.pwSpec; + unsigned int outLen = 0; +-#endif + PRBool isTLS = PR_FALSE; ++ SECItem pmsItem = {siBuffer, NULL, 0}; ++ unsigned char rsaPmsBuf[SSL3_RSA_PMS_LENGTH]; ++#endif + SECStatus rv; + SECItem enc_pms; +- unsigned char rsaPmsBuf[SSL3_RSA_PMS_LENGTH]; +- SECItem pmsItem = {siBuffer, NULL, 0}; + + PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); +@@ -9635,8 +10112,10 @@ + + enc_pms.data = b; + enc_pms.len = length; ++#ifndef NO_PKCS11_BYPASS + pmsItem.data = rsaPmsBuf; + pmsItem.len = sizeof rsaPmsBuf; ++#endif + + if (ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0) { /* isTLS */ + PRInt32 kLen; +@@ -9648,13 +10127,24 @@ + if ((unsigned)kLen < enc_pms.len) { + enc_pms.len = kLen; + } ++#ifndef NO_PKCS11_BYPASS + isTLS = PR_TRUE; ++#endif + } else { ++#ifndef NO_PKCS11_BYPASS + isTLS = (PRBool)(ss->ssl3.hs.kea_def->tls_keygen != 0); ++#endif + } + + #ifndef NO_PKCS11_BYPASS + if (ss->opt.bypassPKCS11) { ++ /* We have not implemented a tls_ExtendedMasterKeyDeriveBypass ++ * and will not negotiate this extension in bypass mode. This ++ * assert just double-checks that. ++ */ ++ PORT_Assert( ++ !ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)); ++ + /* TRIPLE BYPASS, get PMS directly from RSA decryption. + * Use PK11_PrivDecryptPKCS1 to decrypt the PMS to a buffer, + * then, check for version rollback attack, then +@@ -9682,8 +10172,8 @@ + } + } + /* have PMS, build MS without PKCS11 */ +- rv = ssl3_MasterKeyDeriveBypass(pwSpec, cr, sr, &pmsItem, isTLS, +- PR_TRUE); ++ rv = ssl3_MasterSecretDeriveBypass(pwSpec, cr, sr, &pmsItem, isTLS, ++ PR_TRUE); + if (rv != SECSuccess) { + pwSpec->msItem.data = pwSpec->raw_master_secret; + pwSpec->msItem.len = SSL3_MASTER_SECRET_LENGTH; +@@ -9693,49 +10183,163 @@ + } else + #endif + { ++ PK11SymKey *tmpPms[2] = {NULL, NULL}; ++ PK11SlotInfo *slot; ++ int useFauxPms = 0; ++#define currentPms tmpPms[!useFauxPms] ++#define unusedPms tmpPms[useFauxPms] ++#define realPms tmpPms[1] ++#define fauxPms tmpPms[0] ++ + #ifndef NO_PKCS11_BYPASS + double_bypass: + #endif +- /* +- * unwrap pms out of the incoming buffer +- * Note: CKM_SSL3_MASTER_KEY_DERIVE is NOT the mechanism used to do +- * the unwrap. Rather, it is the mechanism with which the +- * unwrapped pms will be used. +- */ +- pms = PK11_PubUnwrapSymKey(serverKey, &enc_pms, +- CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); +- if (pms != NULL) { +- PRINT_BUF(60, (ss, "decrypted premaster secret:", +- PK11_GetKeyData(pms)->data, +- PK11_GetKeyData(pms)->len)); +- } else { +- /* unwrap failed. Generate a bogus PMS and carry on. */ +- PK11SlotInfo * slot = PK11_GetSlotFromPrivateKey(serverKey); + +- ssl_GetSpecWriteLock(ss); +- pms = ssl3_GenerateRSAPMS(ss, ss->ssl3.prSpec, slot); +- ssl_ReleaseSpecWriteLock(ss); +- PK11_FreeSlot(slot); +- } ++ /* ++ * Get as close to algorithm 2 from RFC 5246; Section 7.4.7.1 ++ * as we can within the constraints of the PKCS#11 interface. ++ * ++ * 1. Unconditionally generate a bogus PMS (what RFC 5246 ++ * calls R). ++ * 2. Attempt the RSA decryption to recover the PMS (what ++ * RFC 5246 calls M). ++ * 3. Set PMS = (M == NULL) ? R : M ++ * 4. Use ssl3_ComputeMasterSecret(PMS) to attempt to derive ++ * the MS from PMS. This includes performing the version ++ * check and length check. ++ * 5. If either the initial RSA decryption failed or ++ * ssl3_ComputeMasterSecret(PMS) failed, then discard ++ * M and set PMS = R. Else, discard R and set PMS = M. ++ * ++ * We do two derivations here because we can't rely on having ++ * a function that only performs the PMS version and length ++ * check. The only redundant cost is that this runs the PRF, ++ * which isn't necessary here. ++ */ ++ ++ /* Generate the bogus PMS (R) */ ++ slot = PK11_GetSlotFromPrivateKey(serverKey); ++ if (!slot) { ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); ++ return SECFailure; ++ } + +- if (pms == NULL) { +- /* last gasp. */ ++ if (!PK11_DoesMechanism(slot, CKM_SSL3_MASTER_KEY_DERIVE)) { ++ PK11_FreeSlot(slot); ++ slot = PK11_GetBestSlot(CKM_SSL3_MASTER_KEY_DERIVE, NULL); ++ if (!slot) { ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); ++ return SECFailure; ++ } ++ } ++ ++ ssl_GetSpecWriteLock(ss); ++ fauxPms = ssl3_GenerateRSAPMS(ss, ss->ssl3.prSpec, slot); ++ ssl_ReleaseSpecWriteLock(ss); ++ PK11_FreeSlot(slot); ++ ++ if (fauxPms == NULL) { + ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); + return SECFailure; + } + ++ /* ++ * unwrap pms out of the incoming buffer ++ * Note: CKM_SSL3_MASTER_KEY_DERIVE is NOT the mechanism used to do ++ * the unwrap. Rather, it is the mechanism with which the ++ * unwrapped pms will be used. ++ */ ++ realPms = PK11_PubUnwrapSymKey(serverKey, &enc_pms, ++ CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); ++ /* Temporarily use the PMS if unwrapping the real PMS fails. */ ++ useFauxPms |= (realPms == NULL); ++ ++ /* Attempt to derive the MS from the PMS. This is the only way to ++ * check the version field in the RSA PMS. If this fails, we ++ * then use the faux PMS in place of the PMS. Note that this ++ * operation should never fail if we are using the faux PMS ++ * since it is correctly formatted. */ ++ rv = ssl3_ComputeMasterSecret(ss, currentPms, NULL); ++ ++ /* If we succeeded, then select the true PMS and discard the ++ * FPMS. Else, select the FPMS and select the true PMS */ ++ useFauxPms |= (rv != SECSuccess); ++ ++ if (unusedPms) { ++ PK11_FreeSymKey(unusedPms); ++ } ++ + /* This step will derive the MS from the PMS, among other things. */ +- rv = ssl3_InitPendingCipherSpec(ss, pms); +- PK11_FreeSymKey(pms); ++ rv = ssl3_InitPendingCipherSpec(ss, currentPms); ++ PK11_FreeSymKey(currentPms); + } + + if (rv != SECSuccess) { + SEND_ALERT + return SECFailure; /* error code set by ssl3_InitPendingCipherSpec */ + } ++ ++#undef currentPms ++#undef unusedPms ++#undef realPms ++#undef fauxPms ++ + return SECSuccess; + } + ++static SECStatus ++ssl3_HandleDHClientKeyExchange(sslSocket *ss, ++ SSL3Opaque *b, ++ PRUint32 length, ++ SECKEYPublicKey *srvrPubKey, ++ SECKEYPrivateKey *serverKey) ++{ ++ PK11SymKey *pms; ++ SECStatus rv; ++ SECKEYPublicKey clntPubKey; ++ CK_MECHANISM_TYPE target; ++ PRBool isTLS; ++ ++ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); ++ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); ++ PORT_Assert( srvrPubKey ); ++ ++ clntPubKey.keyType = dhKey; ++ clntPubKey.u.dh.prime.len = srvrPubKey->u.dh.prime.len; ++ clntPubKey.u.dh.prime.data = srvrPubKey->u.dh.prime.data; ++ clntPubKey.u.dh.base.len = srvrPubKey->u.dh.base.len; ++ clntPubKey.u.dh.base.data = srvrPubKey->u.dh.base.data; ++ ++ rv = ssl3_ConsumeHandshakeVariable(ss, &clntPubKey.u.dh.publicValue, ++ 2, &b, &length); ++ if (rv != SECSuccess) { ++ goto loser; ++ } ++ ++ isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); ++ ++ if (isTLS) target = CKM_TLS_MASTER_KEY_DERIVE_DH; ++ else target = CKM_SSL3_MASTER_KEY_DERIVE_DH; ++ ++ /* Determine the PMS */ ++ pms = PK11_PubDerive(serverKey, &clntPubKey, PR_FALSE, NULL, NULL, ++ CKM_DH_PKCS_DERIVE, target, CKA_DERIVE, 0, NULL); ++ if (pms == NULL) { ++ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ ++ rv = ssl3_InitPendingCipherSpec(ss, pms); ++ PK11_FreeSymKey(pms); pms = NULL; ++ ++loser: ++ if (ss->dheKeyPair) { ++ ssl3_FreeKeyPair(ss->dheKeyPair); ++ ss->dheKeyPair = NULL; ++ } ++ return rv; ++} ++ + + /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete + * ssl3 ClientKeyExchange message from the remote client +@@ -9748,9 +10352,7 @@ + SECStatus rv; + const ssl3KEADef *kea_def; + ssl3KeyPair *serverKeyPair = NULL; +-#ifndef NSS_DISABLE_ECC + SECKEYPublicKey *serverPubKey = NULL; +-#endif /* NSS_DISABLE_ECC */ + + SSL_TRC(3, ("%d: SSL3[%d]: handle client_key_exchange handshake", + SSL_GETPID(), ss->fd)); +@@ -9780,6 +10382,16 @@ + ss->sec.keaKeyBits = EXPORT_RSA_KEY_LENGTH * BPB; + } else + skip: ++ if (kea_def->kea == kea_dhe_dss || ++ kea_def->kea == kea_dhe_rsa) { ++ if (ss->dheKeyPair) { ++ serverKeyPair = ss->dheKeyPair; ++ if (serverKeyPair->pubKey) { ++ ss->sec.keaKeyBits = ++ SECKEY_PublicKeyStrengthInBits(serverKeyPair->pubKey); ++ } ++ } ++ } else + #ifndef NSS_DISABLE_ECC + /* XXX Using SSLKEAType to index server certifiates + * does not work for (EC)DHE ciphers. Until we have +@@ -9825,6 +10437,21 @@ + } + break; + ++ case ssl_kea_dh: ++ if (ss->dheKeyPair && ss->dheKeyPair->pubKey) { ++ serverPubKey = ss->dheKeyPair->pubKey; ++ } ++ if (!serverPubKey) { ++ PORT_SetError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); ++ return SECFailure; ++ } ++ rv = ssl3_HandleDHClientKeyExchange(ss, b, length, ++ serverPubKey, serverKey); ++ if (rv != SECSuccess) { ++ SSL3_SendAlert(ss, alert_fatal, handshake_failure); ++ return SECFailure; /* error code set */ ++ } ++ break; + + #ifndef NSS_DISABLE_ECC + case kt_ecdh: +@@ -10454,6 +11081,8 @@ + + ss->ssl3.hs.authCertificatePending = PR_FALSE; + ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); + /* + * Ask caller-supplied callback function to validate cert chain. + */ +@@ -10498,40 +11127,60 @@ + ss->sec.authAlgorithm = ss->ssl3.hs.kea_def->signKeyType; + ss->sec.keaType = ss->ssl3.hs.kea_def->exchKeyType; + if (pubKey) { ++ KeyType pubKeyType; ++ PRInt32 minKey; + ss->sec.keaKeyBits = ss->sec.authKeyBits = + SECKEY_PublicKeyStrengthInBits(pubKey); +-#ifndef NSS_DISABLE_ECC +- if (ss->sec.keaType == kt_ecdh) { +- /* Get authKeyBits from signing key. +- * XXX The code below uses a quick approximation of +- * key size based on cert->signatureWrap.signature.data +- * (which contains the DER encoded signature). The field +- * cert->signatureWrap.signature.len contains the +- * length of the encoded signature in bits. +- */ +- if (ss->ssl3.hs.kea_def->kea == kea_ecdh_ecdsa) { +- ss->sec.authKeyBits = +- cert->signatureWrap.signature.data[3]*8; +- if (cert->signatureWrap.signature.data[4] == 0x00) +- ss->sec.authKeyBits -= 8; +- /* +- * XXX: if cert is not signed by ecdsa we should +- * destroy pubKey and goto bad_cert +- */ +- } else if (ss->ssl3.hs.kea_def->kea == kea_ecdh_rsa) { +- ss->sec.authKeyBits = cert->signatureWrap.signature.len; +- /* +- * XXX: if cert is not signed by rsa we should +- * destroy pubKey and goto bad_cert +- */ ++ pubKeyType = SECKEY_GetPublicKeyType(pubKey); ++ minKey = ss->sec.authKeyBits; ++ switch (pubKeyType) { ++ case rsaKey: ++ case rsaPssKey: ++ case rsaOaepKey: ++ rv = NSS_OptionGet(NSS_RSA_MIN_KEY_SIZE, &minKey); ++ if (rv != SECSuccess) { ++ minKey = SSL_RSA_MIN_MODULUS_BITS; + } ++ break; ++ case dsaKey: ++ rv = NSS_OptionGet(NSS_DSA_MIN_KEY_SIZE, &minKey); ++ if (rv != SECSuccess) { ++ minKey = SSL_DSA_MIN_P_BITS; ++ } ++ break; ++ case dhKey: ++ rv = NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &minKey); ++ if (rv != SECSuccess) { ++ minKey = SSL_DH_MIN_P_BITS; ++ } ++ break; ++ default: ++ break; + } +-#endif /* NSS_DISABLE_ECC */ ++ ++ /* Too small: not good enough. Send a fatal alert. */ ++ /* We aren't checking EC here on the understanding that we only ++ * support curves we like, a decision that might need revisiting. */ ++ if ( ss->sec.authKeyBits < minKey) { ++ PORT_SetError(SSL_ERROR_WEAK_SERVER_CERT_KEY); ++ (void)SSL3_SendAlert(ss, alert_fatal, ++ ss->version >= SSL_LIBRARY_VERSION_TLS_1_0 ++ ? insufficient_security ++ : illegal_parameter); ++ SECKEY_DestroyPublicKey(pubKey); ++ return SECFailure; ++ } + SECKEY_DestroyPublicKey(pubKey); + pubKey = NULL; + } + +- if (ss->ssl3.hs.kea_def->ephemeral) { ++ /* Ephemeral suites require ServerKeyExchange. Export cipher suites ++ * with RSA key exchange also require ServerKeyExchange if the ++ * authentication key exceeds the key size limit. */ ++ if (ss->ssl3.hs.kea_def->ephemeral || ++ (ss->ssl3.hs.kea_def->is_limited && ++ ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_rsa && ++ ss->sec.authKeyBits > ss->ssl3.hs.kea_def->key_size_limit)) { + ss->ssl3.hs.ws = wait_server_key; /* require server_key_exchange */ + } else { + ss->ssl3.hs.ws = wait_cert_request; /* disallow server_key_exchange */ +@@ -10643,16 +11292,42 @@ + const SSL3Hashes * hashes, + TLSFinished * tlsFinished) + { +- const char * label; +- unsigned int len; +- SECStatus rv; ++ SECStatus rv; ++ CK_TLS_MAC_PARAMS tls_mac_params; ++ SECItem param = {siBuffer, NULL, 0}; ++ PK11Context *prf_context; ++ unsigned int retLen; + +- label = isServer ? "server finished" : "client finished"; +- len = 15; ++ if (!spec->master_secret || spec->bypassCiphers) { ++ const char *label = isServer ? "server finished" : "client finished"; ++ unsigned int len = 15; + +- rv = ssl3_TLSPRFWithMasterSecret(spec, label, len, hashes->u.raw, +- hashes->len, tlsFinished->verify_data, +- sizeof tlsFinished->verify_data); ++ return ssl3_TLSPRFWithMasterSecret(spec, label, len, hashes->u.raw, ++ hashes->len, tlsFinished->verify_data, ++ sizeof tlsFinished->verify_data); ++ } ++ ++ if (spec->version < SSL_LIBRARY_VERSION_TLS_1_2) { ++ tls_mac_params.prfMechanism = CKM_TLS_PRF; ++ } else { ++ tls_mac_params.prfMechanism = CKM_SHA256; ++ } ++ tls_mac_params.ulMacLength = 12; ++ tls_mac_params.ulServerOrClient = isServer ? 1 : 2; ++ param.data = (unsigned char *)&tls_mac_params; ++ param.len = sizeof(tls_mac_params); ++ prf_context = PK11_CreateContextBySymKey(CKM_TLS_MAC, CKA_SIGN, ++ spec->master_secret, ¶m); ++ if (!prf_context) ++ return SECFailure; ++ ++ rv = PK11_DigestBegin(prf_context); ++ rv |= PK11_DigestOp(prf_context, hashes->u.raw, hashes->len); ++ rv |= PK11_DigestFinal(prf_context, tlsFinished->verify_data, &retLen, ++ sizeof tlsFinished->verify_data); ++ PORT_Assert(rv != SECSuccess || retLen == sizeof tlsFinished->verify_data); ++ ++ PK11_DestroyContext(prf_context, PR_TRUE); + + return rv; + } +@@ -11170,6 +11845,13 @@ + return SECFailure; + } + ++ if (!hashes) { ++ PORT_Assert(0); ++ SSL3_SendAlert(ss, alert_fatal, internal_error); ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); ++ return SECFailure; ++ } ++ + isTLS = (PRBool)(ss->ssl3.crSpec->version > SSL_LIBRARY_VERSION_3_0); + if (isTLS) { + TLSFinished tlsFinished; +@@ -11225,7 +11907,8 @@ + * ServerHello message.) + */ + if (isServer && !ss->ssl3.hs.isResuming && +- ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) { ++ ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn) && ++ ssl3_KEAAllowsSessionTicket(ss->ssl3.hs.suite_def->key_exchange_alg)) { + /* RFC 5077 Section 3.3: "In the case of a full handshake, the + * server MUST verify the client's Finished message before sending + * the ticket." Presumably, this also means that the client's +@@ -11278,7 +11961,8 @@ + return rv; + } + +- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) { ++ if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa || ++ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa) { + effectiveExchKeyType = kt_rsa; + } else { + effectiveExchKeyType = ss->ssl3.hs.kea_def->exchKeyType; +@@ -11398,6 +12082,7 @@ + SECStatus rv = SECSuccess; + SSL3HandshakeType type = ss->ssl3.hs.msg_type; + SSL3Hashes hashes; /* computed hashes are put here. */ ++ SSL3Hashes *hashesPtr = NULL; /* Set when hashes are computed */ + PRUint8 hdr[4]; + PRUint8 dtlsData[8]; + +@@ -11408,7 +12093,8 @@ + * current message. + */ + ssl_GetSpecReadLock(ss); /************************************/ +- if((type == finished) || (type == certificate_verify)) { ++ if(((type == finished) && (ss->ssl3.hs.ws == wait_finished)) || ++ ((type == certificate_verify) && (ss->ssl3.hs.ws == wait_cert_verify))) { + SSL3Sender sender = (SSL3Sender)0; + ssl3CipherSpec *rSpec = ss->ssl3.prSpec; + +@@ -11417,6 +12103,9 @@ + rSpec = ss->ssl3.crSpec; + } + rv = ssl3_ComputeHandshakeHashes(ss, rSpec, &hashes, sender); ++ if (rv == SECSuccess) { ++ hashesPtr = &hashes; ++ } + } + ssl_ReleaseSpecReadLock(ss); /************************************/ + if (rv != SECSuccess) { +@@ -11567,7 +12256,7 @@ + PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY); + return SECFailure; + } +- rv = ssl3_HandleCertificateVerify(ss, b, length, &hashes); ++ rv = ssl3_HandleCertificateVerify(ss, b, length, hashesPtr); + break; + case client_key_exchange: + if (!ss->sec.isServer) { +@@ -11586,7 +12275,7 @@ + rv = ssl3_HandleNewSessionTicket(ss, b, length); + break; + case finished: +- rv = ssl3_HandleFinished(ss, b, length, &hashes); ++ rv = ssl3_HandleFinished(ss, b, length, hashesPtr); + break; + default: + (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message); +@@ -11641,7 +12330,7 @@ + #define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */ + if (ss->ssl3.hs.msg_len > MAX_HANDSHAKE_MSG_LEN) { + (void)ssl3_DecodeError(ss); +- PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE); + return SECFailure; + } + #undef MAX_HANDSHAKE_MSG_LEN +@@ -11942,7 +12631,7 @@ + SSL3Opaque *givenHash; + sslBuffer *plaintext; + sslBuffer temp_buf; +- PRUint64 dtls_seq_num; ++ PRUint64 dtls_seq_num = 0; + unsigned int ivLen = 0; + unsigned int originalLen = 0; + unsigned int good; +@@ -12423,6 +13112,7 @@ + ss->ssl3.hs.sendingSCSV = PR_FALSE; + ssl3_InitCipherSpec(ss, ss->ssl3.crSpec); + ssl3_InitCipherSpec(ss, ss->ssl3.prSpec); ++ ss->ssl3.hs.preliminaryInfo = 0; + + ss->ssl3.hs.ws = (ss->sec.isServer) ? wait_client_hello : wait_server_hello; + #ifndef NSS_DISABLE_ECC +@@ -12496,8 +13186,6 @@ + } + } + +- +- + /* + * Creates the public and private RSA keys for SSL Step down. + * Called from SSL_ConfigSecureServer in sslsecur.c +@@ -12529,7 +13217,6 @@ + return rv; + } + +- + /* record the export policy for this cipher suite */ + SECStatus + ssl3_SetPolicy(ssl3CipherSuite which, int policy) +@@ -12631,6 +13318,79 @@ + } + + SECStatus ++SSL_SignaturePrefSet(PRFileDesc *fd, const SSLSignatureAndHashAlg *algorithms, ++ unsigned int count) ++{ ++ sslSocket *ss; ++ unsigned int i; ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SignaturePrefSet", ++ SSL_GETPID(), fd)); ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ if (!count || count > MAX_SIGNATURE_ALGORITHMS) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ ss->ssl3.signatureAlgorithmCount = 0; ++ for (i = 0; i < count; ++i) { ++ if (!ssl3_IsSupportedSignatureAlgorithm(&algorithms[i])) { ++ SSL_DBG(("%d: SSL[%d]: invalid signature algorithm set %d/%d", ++ SSL_GETPID(), fd, algorithms[i].sigAlg, ++ algorithms[i].hashAlg)); ++ continue; ++ } ++ ++ ss->ssl3.signatureAlgorithms[ss->ssl3.signatureAlgorithmCount++] = ++ algorithms[i]; ++ } ++ ++ if (ss->ssl3.signatureAlgorithmCount == 0) { ++ PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM); ++ return SECFailure; ++ } ++ return SECSuccess; ++} ++ ++SECStatus ++SSL_SignaturePrefGet(PRFileDesc *fd, SSLSignatureAndHashAlg *algorithms, ++ unsigned int *count, unsigned int maxCount) ++{ ++ sslSocket *ss; ++ unsigned int requiredSpace; ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SignaturePrefGet", ++ SSL_GETPID(), fd)); ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ if (!algorithms || !count || ++ maxCount < ss->ssl3.signatureAlgorithmCount) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ requiredSpace = ++ ss->ssl3.signatureAlgorithmCount * sizeof(SSLSignatureAndHashAlg); ++ PORT_Memcpy(algorithms, ss->ssl3.signatureAlgorithms, requiredSpace); ++ *count = ss->ssl3.signatureAlgorithmCount; ++ return SECSuccess; ++} ++ ++unsigned int ++SSL_SignatureMaxCount() { ++ return MAX_SIGNATURE_ALGORITHMS; ++} ++ ++SECStatus + ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciphers, unsigned int len) + { + /* |i| iterates over |ciphers| while |done| and |j| iterate over +@@ -12675,6 +13435,9 @@ + ssl3_InitSocketPolicy(sslSocket *ss) + { + PORT_Memcpy(ss->cipherSuites, cipherSuites, sizeof cipherSuites); ++ PORT_Memcpy(ss->ssl3.signatureAlgorithms, defaultSignatureAlgorithms, ++ sizeof(defaultSignatureAlgorithms)); ++ ss->ssl3.signatureAlgorithmCount = PR_ARRAY_SIZE(defaultSignatureAlgorithms); + } + + SECStatus +@@ -12764,7 +13527,7 @@ + /* ssl3_config_match_init was called by the caller of this function. */ + for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { + ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; +- if (config_match(suite, SSL_ALLOWED, PR_TRUE, &ss->vrange)) { ++ if (config_match(suite, SSL_ALLOWED, PR_TRUE, &ss->vrange, ss)) { + if (cs != NULL) { + *cs++ = 0x00; + *cs++ = (suite->cipher_suite >> 8) & 0xFF; +@@ -12898,6 +13661,10 @@ + } + } + ++ if (ss->ssl3.dheGroups) { ++ PORT_Free(ss->ssl3.dheGroups); ++ } ++ + ss->ssl3.initialized = PR_FALSE; + + SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2016-01-13 14:18:55.621954867 +0100 +@@ -214,7 +214,7 @@ + + /* Caller must set hiLevel error code. */ + static SECStatus +-ssl3_ComputeECDHKeyHash(SECOidTag hashAlg, ++ssl3_ComputeECDHKeyHash(SSLHashType hashAlg, + SECItem ec_params, SECItem server_ecpoint, + SSL3Random *client_rand, SSL3Random *server_rand, + SSL3Hashes *hashes, PRBool bypassPKCS11) +@@ -303,7 +303,7 @@ + pubKey->u.ec.publicValue.len)); + + if (isTLS12) { +- target = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; ++ target = CKM_TLS12_MASTER_KEY_DERIVE_DH; + } else if (isTLS) { + target = CKM_TLS_MASTER_KEY_DERIVE_DH; + } else { +@@ -325,14 +325,6 @@ + SECKEY_DestroyPrivateKey(privKey); + privKey = NULL; + +- rv = ssl3_InitPendingCipherSpec(ss, pms); +- PK11_FreeSymKey(pms); pms = NULL; +- +- if (rv != SECSuccess) { +- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); +- goto loser; +- } +- + rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, + pubKey->u.ec.publicValue.len + 1); + if (rv != SECSuccess) { +@@ -349,6 +341,14 @@ + goto loser; /* err set by ssl3_AppendHandshake* */ + } + ++ rv = ssl3_InitPendingCipherSpec(ss, pms); ++ PK11_FreeSymKey(pms); pms = NULL; ++ ++ if (rv != SECSuccess) { ++ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); ++ goto loser; ++ } ++ + rv = SECSuccess; + + loser: +@@ -394,7 +394,7 @@ + isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); + + if (isTLS12) { +- target = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; ++ target = CKM_TLS12_MASTER_KEY_DERIVE_DH; + } else if (isTLS) { + target = CKM_TLS_MASTER_KEY_DERIVE_DH; + } else { +@@ -615,9 +615,9 @@ + SECItem ec_params = {siBuffer, NULL, 0}; + SECItem ec_point = {siBuffer, NULL, 0}; + unsigned char paramBuf[3]; /* only for curve_type == named_curve */ +- SSL3SignatureAndHashAlgorithm sigAndHash; ++ SSLSignatureAndHashAlg sigAndHash; + +- sigAndHash.hashAlg = SEC_OID_UNKNOWN; ++ sigAndHash.hashAlg = ssl_hash_none; + + isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); + isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); +@@ -659,7 +659,7 @@ + goto loser; /* malformed or unsupported. */ + } + rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( +- &sigAndHash, ss->sec.peerCert); ++ ss, &sigAndHash, ss->sec.peerCert); + if (rv != SECSuccess) { + goto loser; + } +@@ -710,7 +710,7 @@ + goto no_memory; + } + +- ss->sec.peerKey = peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); ++ peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); + if (peerKey == NULL) { + goto no_memory; + } +@@ -731,7 +731,6 @@ + /* copy publicValue in peerKey */ + if (SECITEM_CopyItem(arena, &peerKey->u.ec.publicValue, &ec_point)) + { +- PORT_FreeArena(arena, PR_FALSE); + goto no_memory; + } + peerKey->pkcs11Slot = NULL; +@@ -745,10 +744,16 @@ + alert_loser: + (void)SSL3_SendAlert(ss, alert_fatal, desc); + loser: ++ if (arena) { ++ PORT_FreeArena(arena, PR_FALSE); ++ } + PORT_SetError( errCode ); + return SECFailure; + + no_memory: /* no-memory error has already been set. */ ++ if (arena) { ++ PORT_FreeArena(arena, PR_FALSE); ++ } + ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); + return SECFailure; + } +@@ -756,7 +761,7 @@ + SECStatus + ssl3_SendECDHServerKeyExchange( + sslSocket *ss, +- const SSL3SignatureAndHashAlgorithm *sigAndHash) ++ const SSLSignatureAndHashAlg *sigAndHash) + { + const ssl3KEADef * kea_def = ss->ssl3.hs.kea_def; + SECStatus rv = SECFailure; +@@ -977,9 +982,7 @@ + if (!suite) + suite = ecSuites; + for (; *suite; ++suite) { +- SECStatus rv = ssl3_CipherPrefSet(ss, *suite, PR_FALSE); +- +- PORT_Assert(rv == SECSuccess); /* else is coding error */ ++ PORT_CheckSuccess(ssl3_CipherPrefSet(ss, *suite, PR_FALSE)); + } + return SECSuccess; + } +@@ -1142,7 +1145,10 @@ + ecList = tlsECList; + } + +- if (append && maxBytes >= ecListSize) { ++ if (maxBytes < (PRUint32)ecListSize) { ++ return 0; ++ } ++ if (append) { + SECStatus rv = ssl3_AppendHandshake(ss, ecList, ecListSize); + if (rv != SECSuccess) + return -1; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2016-01-13 14:18:55.623954879 +0100 +@@ -101,6 +101,12 @@ + PRUint32 maxBytes); + static SECStatus ssl3_ServerHandleDraftVersionXtn(sslSocket *ss, PRUint16 ex_type, + SECItem *data); ++static PRInt32 ssl3_SendExtendedMasterSecretXtn(sslSocket *ss, PRBool append, ++ PRUint32 maxBytes); ++static SECStatus ssl3_HandleExtendedMasterSecretXtn(sslSocket *ss, ++ PRUint16 ex_type, ++ SECItem *data); ++ + + /* + * Write bytes. Using this function means the SECItem structure +@@ -266,6 +272,7 @@ + { ssl_cert_status_xtn, &ssl3_ServerHandleStatusRequestXtn }, + { ssl_signature_algorithms_xtn, &ssl3_ServerHandleSigAlgsXtn }, + { ssl_tls13_draft_version_xtn, &ssl3_ServerHandleDraftVersionXtn }, ++ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, + { -1, NULL } + }; + +@@ -281,6 +288,7 @@ + { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, + { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, + { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, ++ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, + { ssl_signed_certificate_timestamp_xtn, + &ssl3_ClientHandleSignedCertTimestampXtn }, + { -1, NULL } +@@ -319,6 +327,7 @@ + * extension. */ + { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, + { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, ++ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, + /* any extra entries will appear as { 0, NULL } */ + }; + +@@ -331,7 +340,7 @@ + static PRBool + arrayContainsExtension(const PRUint16 *array, PRUint32 len, PRUint16 ex_type) + { +- int i; ++ unsigned int i; + for (i = 0; i < len; i++) { + if (ex_type == array[i]) + return PR_TRUE; +@@ -433,12 +442,12 @@ + } + /* length of server_name_list */ + listLenBytes = ssl3_ConsumeHandshakeNumber(ss, 2, &data->data, &data->len); +- if (listLenBytes < 0 || listLenBytes != data->len) { +- (void)ssl3_DecodeError(ss); ++ if (listLenBytes < 0) { + return SECFailure; + } +- if (listLenBytes == 0) { +- return SECSuccess; /* ignore an empty extension */ ++ if (listLenBytes == 0 || listLenBytes != data->len) { ++ (void)ssl3_DecodeError(ss); ++ return SECFailure; + } + ldata = *data; + /* Calculate the size of the array.*/ +@@ -463,15 +472,12 @@ + } + listCount += 1; + } +- if (!listCount) { +- return SECFailure; /* nothing we can act on */ +- } + names = PORT_ZNewArray(SECItem, listCount); + if (!names) { + return SECFailure; + } + for (i = 0;i < listCount;i++) { +- int j; ++ unsigned int j; + PRInt32 type; + SECStatus rv; + PRBool nametypePresent = PR_FALSE; +@@ -559,7 +565,11 @@ + } + } + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } ++ if (append) { + SECStatus rv; + /* extension_type */ + rv = ssl3_AppendHandshakeNumber(ss, ssl_session_ticket_xtn, 2); +@@ -582,9 +592,6 @@ + xtnData->advertised[xtnData->numAdvertised++] = + ssl_session_ticket_xtn; + } +- } else if (maxBytes < extension_length) { +- PORT_Assert(0); +- return 0; + } + return extension_length; + +@@ -645,12 +652,17 @@ + + rv = ssl3_ValidateNextProtoNego(data->data, data->len); + if (rv != SECSuccess) { +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + (void)SSL3_SendAlert(ss, alert_fatal, decode_error); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + return rv; + } + + PORT_Assert(ss->nextProtoCallback); ++ /* For ALPN, the cipher suite isn't selected yet. Note that extensions ++ * sometimes affect what cipher suite is selected, e.g., for ECC. */ ++ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ++ ssl_preinfo_all & ~ssl_preinfo_cipher_suite) == ++ (ssl_preinfo_all & ~ssl_preinfo_cipher_suite)); + rv = ss->nextProtoCallback(ss->nextProtoArg, ss->fd, data->data, data->len, + result.data, &result.len, sizeof(resultBuffer)); + if (rv != SECSuccess) { +@@ -673,8 +685,8 @@ + ss->ssl3.nextProtoState != SSL_NEXT_PROTO_NEGOTIATED) { + /* The callback might say OK, but then it picks a default value - one + * that was not listed. That's OK for NPN, but not ALPN. */ +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL); + (void)SSL3_SendAlert(ss, alert_fatal, no_application_protocol); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL); + return SECFailure; + } + +@@ -693,8 +705,8 @@ + * despite it being permitted by the spec. */ + if (ss->firstHsDone || data->len == 0) { + /* Clients MUST send a non-empty ALPN extension. */ +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + return SECFailure; + } + +@@ -721,8 +733,8 @@ + rv = ssl3_RegisterServerHelloExtensionSender( + ss, ex_type, ssl3_ServerSendAppProtoXtn); + if (rv != SECSuccess) { +- PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + (void)SSL3_SendAlert(ss, alert_fatal, internal_error); ++ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + return rv; + } + } +@@ -742,8 +754,8 @@ + * we've negotiated NPN then we're required to send the NPN handshake + * message. Thus, these two extensions cannot both be negotiated on the + * same connection. */ +- PORT_SetError(SSL_ERROR_BAD_SERVER); + (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); ++ PORT_SetError(SSL_ERROR_BAD_SERVER); + return SECFailure; + } + +@@ -753,8 +765,8 @@ + * we sent the ClientHello and now. */ + if (!ss->nextProtoCallback) { + PORT_Assert(0); +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_CALLBACK); + (void)SSL3_SendAlert(ss, alert_fatal, internal_error); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_CALLBACK); + return SECFailure; + } + +@@ -778,16 +790,16 @@ + * uint8 len; // where len >= 1 + * uint8 protocol_name[len]; */ + if (data->len < 4 || data->len > 2 + 1 + 255) { +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + (void)SSL3_SendAlert(ss, alert_fatal, decode_error); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + return SECFailure; + } + + list_len = ssl3_ConsumeHandshakeNumber(ss, 2, &data->data, &data->len); + /* The list has to be the entire extension. */ + if (list_len != data->len) { +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + (void)SSL3_SendAlert(ss, alert_fatal, decode_error); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + return SECFailure; + } + +@@ -795,8 +807,8 @@ + &data->data, &data->len); + /* The list must have exactly one value. */ + if (rv != SECSuccess || data->len != 0) { +- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + (void)SSL3_SendAlert(ss, alert_fatal, decode_error); ++ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); + return SECFailure; + } + +@@ -819,7 +831,10 @@ + + extension_length = 4; + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ return 0; ++ } ++ if (append) { + SECStatus rv; + rv = ssl3_AppendHandshakeNumber(ss, ssl_next_proto_nego_xtn, 2); + if (rv != SECSuccess) +@@ -829,8 +844,6 @@ + goto loser; + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + ssl_next_proto_nego_xtn; +- } else if (maxBytes < extension_length) { +- return 0; + } + + return extension_length; +@@ -854,7 +867,10 @@ + 2 /* protocol name list length */ + + ss->opt.nextProtoNego.len; + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ return 0; ++ } ++ if (append) { + /* NPN requires that the client's fallback protocol is first in the + * list. However, ALPN sends protocols in preference order. So we + * allocate a buffer and move the first protocol to the end of the +@@ -894,8 +910,6 @@ + } + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + ssl_app_layer_protocol_xtn; +- } else if (maxBytes < extension_length) { +- return 0; + } + + return extension_length; +@@ -923,7 +937,10 @@ + 2 /* protocol name list */ + 1 /* name length */ + + ss->ssl3.nextProto.len; + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ return 0; ++ } ++ if (append) { + SECStatus rv; + rv = ssl3_AppendHandshakeNumber(ss, ssl_app_layer_protocol_xtn, 2); + if (rv != SECSuccess) { +@@ -942,8 +959,6 @@ + if (rv != SECSuccess) { + return -1; + } +- } else if (maxBytes < extension_length) { +- return 0; + } + + return extension_length; +@@ -1045,7 +1060,10 @@ + return 0; + + extension_length = 2 + 2; +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ return 0; ++ } ++ if (append) { + /* extension_type */ + rv = ssl3_AppendHandshakeNumber(ss, ssl_cert_status_xtn, 2); + if (rv != SECSuccess) +@@ -1078,7 +1096,11 @@ + */ + extension_length = 9; + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } ++ if (append) { + SECStatus rv; + TLSExtensionData *xtnData; + +@@ -1106,9 +1128,6 @@ + + xtnData = &ss->xtnData; + xtnData->advertised[xtnData->numAdvertised++] = ssl_cert_status_xtn; +- } else if (maxBytes < extension_length) { +- PORT_Assert(0); +- return 0; + } + return extension_length; + } +@@ -1120,7 +1139,7 @@ + SECStatus + ssl3_SendNewSessionTicket(sslSocket *ss) + { +- int i; ++ PRUint32 i; + SECStatus rv; + NewSessionTicket ticket; + SECItem plaintext; +@@ -1152,7 +1171,7 @@ + CK_MECHANISM_TYPE cipherMech = CKM_AES_CBC; + PK11Context *aes_ctx_pkcs11; + CK_MECHANISM_TYPE macMech = CKM_SHA256_HMAC; +- PK11Context *hmac_ctx_pkcs11; ++ PK11Context *hmac_ctx_pkcs11 = NULL; + unsigned char computed_mac[TLS_EX_SESS_TICKET_MAC_LENGTH]; + unsigned int computed_mac_length; + unsigned char iv[AES_BLOCK_SIZE]; +@@ -1200,7 +1219,8 @@ + sslSessionID sid; + PORT_Memset(&sid, 0, sizeof(sslSessionID)); + +- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) { ++ if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa || ++ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa) { + effectiveExchKeyType = kt_rsa; + } else { + effectiveExchKeyType = ss->ssl3.hs.kea_def->exchKeyType; +@@ -1243,6 +1263,7 @@ + + cert_length /* cert */ + + 1 /* server name type */ + + srvNameLen /* name len + length field */ ++ + 1 /* extendedMasterSecretUsed */ + + sizeof(ticket.ticket_lifetime_hint); + padding_length = AES_BLOCK_SIZE - + (ciphertext_length % AES_BLOCK_SIZE); +@@ -1341,6 +1362,11 @@ + if (rv != SECSuccess) goto loser; + } + ++ /* extendedMasterSecretUsed */ ++ rv = ssl3_AppendNumberToItem( ++ &plaintext, ss->sec.ci.sid->u.ssl3.keys.extendedMasterSecretUsed, 1); ++ if (rv != SECSuccess) goto loser; ++ + PORT_Assert(plaintext.len == padding_length); + for (i = 0; i < padding_length; i++) + plaintext.data[i] = (unsigned char)padding_length; +@@ -1410,14 +1436,18 @@ + goto loser; + + rv = PK11_DigestBegin(hmac_ctx_pkcs11); ++ if (rv != SECSuccess) goto loser; + rv = PK11_DigestOp(hmac_ctx_pkcs11, key_name, + SESS_TICKET_KEY_NAME_LEN); ++ if (rv != SECSuccess) goto loser; + rv = PK11_DigestOp(hmac_ctx_pkcs11, iv, sizeof(iv)); ++ if (rv != SECSuccess) goto loser; + rv = PK11_DigestOp(hmac_ctx_pkcs11, (unsigned char *)length_buf, 2); ++ if (rv != SECSuccess) goto loser; + rv = PK11_DigestOp(hmac_ctx_pkcs11, ciphertext.data, ciphertext.len); ++ if (rv != SECSuccess) goto loser; + rv = PK11_DigestFinal(hmac_ctx_pkcs11, computed_mac, + &computed_mac_length, sizeof(computed_mac)); +- PK11_DestroyContext(hmac_ctx_pkcs11, PR_TRUE); + if (rv != SECSuccess) goto loser; + } + +@@ -1446,6 +1476,8 @@ + if (rv != SECSuccess) goto loser; + + loser: ++ if (hmac_ctx_pkcs11) ++ PK11_DestroyContext(hmac_ctx_pkcs11, PR_TRUE); + if (plaintext_item.data) + SECITEM_FreeItem(&plaintext_item, PR_FALSE); + if (ciphertext.data) +@@ -1495,7 +1527,7 @@ + if (data->len == 0) { + ss->xtnData.emptySessionTicket = PR_TRUE; + } else { +- int i; ++ PRUint32 i; + SECItem extension_data; + EncryptedSessionTicket enc_session_ticket; + unsigned char computed_mac[TLS_EX_SESS_TICKET_MAC_LENGTH]; +@@ -1698,9 +1730,10 @@ + goto loser; + } + +- /* Read ticket_version (which is ignored for now.) */ ++ /* Read ticket_version and reject if the version is wrong */ + temp = ssl3_ConsumeHandshakeNumber(ss, 2, &buffer, &buffer_len); +- if (temp < 0) goto no_ticket; ++ if (temp != TLS_EX_SESS_TICKET_VERSION) goto no_ticket; ++ + parsed_session_ticket->ticket_version = (SSL3ProtocolVersion)temp; + + /* Read SSLVersion. */ +@@ -1801,6 +1834,13 @@ + parsed_session_ticket->srvName.type = nameType; + } + ++ /* Read extendedMasterSecretUsed */ ++ temp = ssl3_ConsumeHandshakeNumber(ss, 1, &buffer, &buffer_len); ++ if (temp < 0) ++ goto no_ticket; ++ PORT_Assert(temp == PR_TRUE || temp == PR_FALSE); ++ parsed_session_ticket->extendedMasterSecretUsed = (PRBool)temp; ++ + /* Done parsing. Check that all bytes have been consumed. */ + if (buffer_len != padding_length) + goto no_ticket; +@@ -1847,6 +1887,8 @@ + parsed_session_ticket->ms_is_wrapped; + sid->u.ssl3.masterValid = PR_TRUE; + sid->u.ssl3.keys.resumable = PR_TRUE; ++ sid->u.ssl3.keys.extendedMasterSecretUsed = parsed_session_ticket-> ++ extendedMasterSecretUsed; + + /* Copy over client cert from session ticket if there is one. */ + if (parsed_session_ticket->peer_cert.data != NULL) { +@@ -2085,7 +2127,10 @@ + (ss->sec.isServer ? ss->ssl3.hs.finishedBytes * 2 + : ss->ssl3.hs.finishedBytes); + needed = 5 + len; +- if (append && maxBytes >= needed) { ++ if (maxBytes < (PRUint32)needed) { ++ return 0; ++ } ++ if (append) { + SECStatus rv; + /* extension_type */ + rv = ssl3_AppendHandshakeNumber(ss, ssl_renegotiation_info_xtn, 2); +@@ -2138,8 +2183,8 @@ + } + if (len && NSS_SecureMemcmp(ss->ssl3.hs.finishedMsgs.data, + data->data + 1, len)) { +- PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE); + (void)SSL3_SendAlert(ss, alert_fatal, handshake_failure); ++ PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE); + return SECFailure; + } + /* remember that we got this extension and it was correct. */ +@@ -2263,8 +2308,8 @@ + } + + if (!found) { +- PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); + (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); + return SECFailure; + } + +@@ -2277,8 +2322,8 @@ + + /* We didn't offer an MKI, so this must be 0 length */ + if (litem.len != 0) { +- PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); + (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); + return SECFailure; + } + +@@ -2374,7 +2419,7 @@ + SECStatus rv; + SECItem algorithms; + const unsigned char *b; +- unsigned int numAlgorithms, i, j; ++ unsigned int numAlgorithms, i; + + /* Ignore this extension if we aren't doing TLS 1.2 or greater. */ + if (ss->version < SSL_LIBRARY_VERSION_TLS_1_2) { +@@ -2388,8 +2433,8 @@ + } + /* Trailing data, empty value, or odd-length value is invalid. */ + if (data->len != 0 || algorithms.len == 0 || (algorithms.len & 1) != 0) { +- PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); + (void)SSL3_SendAlert(ss, alert_fatal, decode_error); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); + return SECFailure; + } + +@@ -2401,30 +2446,24 @@ + } + + ss->ssl3.hs.clientSigAndHash = +- PORT_NewArray(SSL3SignatureAndHashAlgorithm, numAlgorithms); ++ PORT_NewArray(SSLSignatureAndHashAlg, numAlgorithms); + if (!ss->ssl3.hs.clientSigAndHash) { +- PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); + (void)SSL3_SendAlert(ss, alert_fatal, internal_error); ++ PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); + return SECFailure; + } + ss->ssl3.hs.numClientSigAndHash = 0; + + b = algorithms.data; +- for (i = j = 0; i < numAlgorithms; i++) { +- unsigned char tls_hash = *(b++); +- unsigned char tls_sig = *(b++); +- SECOidTag hash = ssl3_TLSHashAlgorithmToOID(tls_hash); +- +- if (hash == SEC_OID_UNKNOWN) { +- /* We ignore formats that we don't understand. */ +- continue; +- } +- /* tls_sig support will be checked later in +- * ssl3_PickSignatureHashAlgorithm. */ +- ss->ssl3.hs.clientSigAndHash[j].hashAlg = hash; +- ss->ssl3.hs.clientSigAndHash[j].sigAlg = tls_sig; +- ++j; +- ++ss->ssl3.hs.numClientSigAndHash; ++ ss->ssl3.hs.numClientSigAndHash = 0; ++ for (i = 0; i < numAlgorithms; i++) { ++ SSLSignatureAndHashAlg *sigAndHash = ++ &ss->ssl3.hs.clientSigAndHash[ss->ssl3.hs.numClientSigAndHash]; ++ sigAndHash->hashAlg = (SSLHashType)*(b++); ++ sigAndHash->sigAlg = (SSLSignType)*(b++); ++ if (ssl3_IsSupportedSignatureAlgorithm(sigAndHash)) { ++ ++ss->ssl3.hs.numClientSigAndHash; ++ } + } + + if (!ss->ssl3.hs.numClientSigAndHash) { +@@ -2442,60 +2481,60 @@ + /* ssl3_ClientSendSigAlgsXtn sends the signature_algorithm extension for TLS + * 1.2 ClientHellos. */ + static PRInt32 +-ssl3_ClientSendSigAlgsXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) ++ssl3_ClientSendSigAlgsXtn(sslSocket *ss, PRBool append, PRUint32 maxBytes) + { +- static const unsigned char signatureAlgorithms[] = { +- /* This block is the contents of our signature_algorithms extension, in +- * wire format. See +- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ +- tls_hash_sha256, tls_sig_rsa, +- tls_hash_sha384, tls_sig_rsa, +- tls_hash_sha512, tls_sig_rsa, +- tls_hash_sha1, tls_sig_rsa, +-#ifndef NSS_DISABLE_ECC +- tls_hash_sha256, tls_sig_ecdsa, +- tls_hash_sha384, tls_sig_ecdsa, +- tls_hash_sha512, tls_sig_ecdsa, +- tls_hash_sha1, tls_sig_ecdsa, +-#endif +- tls_hash_sha256, tls_sig_dsa, +- tls_hash_sha1, tls_sig_dsa, +- }; + PRInt32 extension_length; ++ unsigned int i; ++ PRInt32 pos=0; ++ PRUint32 policy; ++ PRUint8 buf[MAX_SIGNATURE_ALGORITHMS * 2]; + + if (ss->version < SSL_LIBRARY_VERSION_TLS_1_2) { + return 0; + } + ++ for (i=0; i < ss->ssl3.signatureAlgorithmCount; i++) { ++ SECOidTag hashOID = ssl3_TLSHashAlgorithmToOID( ++ ss->ssl3.signatureAlgorithms[i].hashAlg); ++ if ((NSS_GetAlgorithmPolicy(hashOID, & policy) != SECSuccess) || ++ (policy & NSS_USE_ALG_IN_SSL_KX)) { ++ buf[pos++] = ss->ssl3.signatureAlgorithms[i].hashAlg; ++ buf[pos++] = ss->ssl3.signatureAlgorithms[i].sigAlg; ++ } ++ } ++ + extension_length = + 2 /* extension type */ + + 2 /* extension length */ + + 2 /* supported_signature_algorithms length */ + +- sizeof(signatureAlgorithms); ++ pos; ++ ++ if (maxBytes < extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } + +- if (append && maxBytes >= extension_length) { ++ if (append) { + SECStatus rv; + rv = ssl3_AppendHandshakeNumber(ss, ssl_signature_algorithms_xtn, 2); +- if (rv != SECSuccess) +- goto loser; ++ if (rv != SECSuccess) { ++ return -1; ++ } + rv = ssl3_AppendHandshakeNumber(ss, extension_length - 4, 2); +- if (rv != SECSuccess) +- goto loser; +- rv = ssl3_AppendHandshakeVariable(ss, signatureAlgorithms, +- sizeof(signatureAlgorithms), 2); +- if (rv != SECSuccess) +- goto loser; ++ if (rv != SECSuccess) { ++ return -1; ++ } ++ ++ rv = ssl3_AppendHandshakeVariable(ss, buf, extension_length - 6, 2); ++ if (rv != SECSuccess) { ++ return -1; ++ } ++ + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + ssl_signature_algorithms_xtn; +- } else if (maxBytes < extension_length) { +- PORT_Assert(0); +- return 0; + } + + return extension_length; +- +-loser: +- return -1; + } + + unsigned int +@@ -2565,7 +2604,11 @@ + } + + extension_length = 6; /* Type + length + number */ +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < (PRUint32)extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } ++ if (append) { + SECStatus rv; + rv = ssl3_AppendHandshakeNumber(ss, ssl_tls13_draft_version_xtn, 2); + if (rv != SECSuccess) +@@ -2578,9 +2621,6 @@ + goto loser; + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + ssl_tls13_draft_version_xtn; +- } else if (maxBytes < extension_length) { +- PORT_Assert(0); +- return 0; + } + + return extension_length; +@@ -2633,6 +2673,51 @@ + return SECSuccess; + } + ++static PRInt32 ++ssl3_SendExtendedMasterSecretXtn(sslSocket * ss, PRBool append, ++ PRUint32 maxBytes) ++{ ++ PRInt32 extension_length; ++ ++ if (!ss->opt.enableExtendedMS) { ++ return 0; ++ } ++ ++#ifndef NO_PKCS11_BYPASS ++ /* Extended MS can only be used w/o bypass mode */ ++ if (ss->opt.bypassPKCS11) { ++ PORT_Assert(0); ++ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); ++ return -1; ++ } ++#endif ++ ++ /* Always send the extension in this function, since the ++ * client always sends it and this function is only called on ++ * the server if we negotiated the extension. */ ++ extension_length = 4; /* Type + length (0) */ ++ if (maxBytes < extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } ++ ++ if (append) { ++ SECStatus rv; ++ rv = ssl3_AppendHandshakeNumber(ss, ssl_extended_master_secret_xtn, 2); ++ if (rv != SECSuccess) ++ goto loser; ++ rv = ssl3_AppendHandshakeNumber(ss, 0, 2); ++ if (rv != SECSuccess) ++ goto loser; ++ ss->xtnData.advertised[ss->xtnData.numAdvertised++] = ++ ssl_extended_master_secret_xtn; ++ } ++ ++ return extension_length; ++loser: ++ return -1; ++} ++ + /* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp + * extension for TLS ClientHellos. */ + static PRInt32 +@@ -2646,7 +2731,12 @@ + if (!ss->opt.enableSignedCertTimestamps) + return 0; + +- if (append && maxBytes >= extension_length) { ++ if (maxBytes < extension_length) { ++ PORT_Assert(0); ++ return 0; ++ } ++ ++ if (append) { + SECStatus rv; + /* extension_type */ + rv = ssl3_AppendHandshakeNumber(ss, +@@ -2660,9 +2750,6 @@ + goto loser; + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = + ssl_signed_certificate_timestamp_xtn; +- } else if (maxBytes < extension_length) { +- PORT_Assert(0); +- return 0; + } + + return extension_length; +@@ -2671,6 +2758,46 @@ + } + + static SECStatus ++ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, ++ SECItem *data) ++{ ++ if (ss->version < SSL_LIBRARY_VERSION_TLS_1_0) { ++ return SECSuccess; ++ } ++ ++ if (!ss->opt.enableExtendedMS) { ++ return SECSuccess; ++ } ++ ++#ifndef NO_PKCS11_BYPASS ++ /* Extended MS can only be used w/o bypass mode */ ++ if (ss->opt.bypassPKCS11) { ++ PORT_Assert(0); ++ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); ++ return SECFailure; ++ } ++#endif ++ ++ if (data->len != 0) { ++ SSL_TRC(30, ("%d: SSL3[%d]: Bogus extended master secret extension", ++ SSL_GETPID(), ss->fd)); ++ return SECFailure; ++ } ++ ++ SSL_DBG(("%d: SSL[%d]: Negotiated extended master secret extension.", ++ SSL_GETPID(), ss->fd)); ++ ++ /* Keep track of negotiated extensions. */ ++ ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type; ++ ++ if (ss->sec.isServer) { ++ return ssl3_RegisterServerHelloExtensionSender( ++ ss, ex_type, ssl3_SendExtendedMasterSecretXtn); ++ } ++ return SECSuccess; ++} ++ ++static SECStatus + ssl3_ClientHandleSignedCertTimestampXtn(sslSocket *ss, PRUint16 ex_type, + SECItem *data) + { +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2016-01-13 14:18:55.623954879 +0100 +@@ -71,8 +71,8 @@ + break; + } + +- PORT_Assert( nb <= gs->remainder ); +- if (nb > gs->remainder) { ++ PORT_Assert( (unsigned int)nb <= gs->remainder ); ++ if ((unsigned int)nb > gs->remainder) { + /* ssl_DefRecv is misbehaving! this error is fatal to SSL. */ + gs->state = GS_INIT; /* so we don't crash next time */ + rv = SECFailure; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2016-01-13 14:18:55.623954879 +0100 +@@ -218,32 +218,6 @@ + } u; + } SSL3ServerParams; + +-/* This enum reflects HashAlgorithm enum from +- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 +- * +- * When updating, be sure to also update ssl3_TLSHashAlgorithmToOID. */ +-enum { +- tls_hash_md5 = 1, +- tls_hash_sha1 = 2, +- tls_hash_sha224 = 3, +- tls_hash_sha256 = 4, +- tls_hash_sha384 = 5, +- tls_hash_sha512 = 6 +-}; +- +-/* This enum reflects SignatureAlgorithm enum from +- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ +-typedef enum { +- tls_sig_rsa = 1, +- tls_sig_dsa = 2, +- tls_sig_ecdsa = 3 +-} TLSSignatureAlgorithm; +- +-typedef struct { +- SECOidTag hashAlg; +- TLSSignatureAlgorithm sigAlg; +-} SSL3SignatureAndHashAlgorithm; +- + /* SSL3HashesIndividually contains a combination MD5/SHA1 hash, as used in TLS + * prior to 1.2. */ + typedef struct { +@@ -252,11 +226,11 @@ + } SSL3HashesIndividually; + + /* SSL3Hashes contains an SSL hash value. The digest is contained in |u.raw| +- * which, if |hashAlg==SEC_OID_UNKNOWN| is also a SSL3HashesIndividually ++ * which, if |hashAlg==ssl_hash_none| is also a SSL3HashesIndividually + * struct. */ + typedef struct { + unsigned int len; +- SECOidTag hashAlg; ++ SSLHashType hashAlg; + union { + PRUint8 raw[64]; + SSL3HashesIndividually s; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2016-01-13 14:18:55.624954885 +0100 +@@ -304,8 +304,7 @@ + &certStatusArray->items[0], + ss->pkcs11PinArg) + != SECSuccess) { +- PRErrorCode error = PR_GetError(); +- PORT_Assert(error != 0); ++ PORT_Assert(PR_GetError() != 0); + } + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2016-01-13 14:18:55.625954891 +0100 +@@ -22,20 +22,6 @@ + + static PRBool policyWasSet; + +-/* This ordered list is indexed by (SSL_CK_xx * 3) */ +-/* Second and third bytes are MSB and LSB of master key length. */ +-static const PRUint8 allCipherSuites[] = { +- 0, 0, 0, +- SSL_CK_RC4_128_WITH_MD5, 0x00, 0x80, +- SSL_CK_RC4_128_EXPORT40_WITH_MD5, 0x00, 0x80, +- SSL_CK_RC2_128_CBC_WITH_MD5, 0x00, 0x80, +- SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5, 0x00, 0x80, +- SSL_CK_IDEA_128_CBC_WITH_MD5, 0x00, 0x80, +- SSL_CK_DES_64_CBC_WITH_MD5, 0x00, 0x40, +- SSL_CK_DES_192_EDE3_CBC_WITH_MD5, 0x00, 0xC0, +- 0, 0, 0 +-}; +- + #define ssl2_NUM_SUITES_IMPLEMENTED 6 + + /* This list is sent back to the client when the client-hello message +@@ -851,7 +837,7 @@ + { + PRUint8 * out; + int rv; +- int amount; ++ unsigned int amount; + int count = 0; + + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); +@@ -927,7 +913,7 @@ + int amount; + PRUint8 macLen; + int nout; +- int buflen; ++ unsigned int buflen; + + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); + +@@ -1031,7 +1017,7 @@ + int amount; /* of plaintext to go in record. */ + unsigned int padding; /* add this many padding byte. */ + int nout; /* ciphertext size after header. */ +- int buflen; /* size of generated record. */ ++ unsigned int buflen; /* size of generated record. */ + + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); + +@@ -1555,7 +1541,7 @@ + unsigned int ddLen; /* length of RSA decrypted data in kbuf */ + unsigned int keySize; + unsigned int dkLen; /* decrypted key length in bytes */ +- int modulusLen; ++ int modulusLen; + SECStatus rv; + PRUint16 allowed; /* cipher kinds enabled and allowed by policy */ + PRUint8 mkbuf[SSL_MAX_MASTER_KEY_BYTES]; +@@ -1617,11 +1603,11 @@ + } + + modulusLen = PK11_GetPrivateModulusLen(sc->SERVERKEY); +- if (modulusLen == -1) { ++ if (modulusLen < 0) { + /* XXX If the key is bad, then PK11_PubDecryptRaw will fail below. */ + modulusLen = ekLen; + } +- if (ekLen > modulusLen || ekLen + ckLen < keySize) { ++ if (ekLen > (unsigned int)modulusLen || ekLen + ckLen < keySize) { + SSL_DBG(("%d: SSL[%d]: invalid encrypted key length, ekLen=%d (bytes)!", + SSL_GETPID(), ss->fd, ekLen)); + PORT_SetError(SSL_ERROR_BAD_CLIENT); +@@ -2495,7 +2481,6 @@ + PRUint8 * cid; + unsigned len, certType, certLen, responseLen; + int rv; +- int rv2; + + PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); + +@@ -2613,7 +2598,7 @@ + data + SSL_HL_CLIENT_CERTIFICATE_HBYTES + certLen, + responseLen); + if (rv) { +- rv2 = ssl2_SendErrorMessage(ss, SSL_PE_BAD_CERTIFICATE); ++ (void)ssl2_SendErrorMessage(ss, SSL_PE_BAD_CERTIFICATE); + SET_ERROR_CODE + goto loser; + } +@@ -2741,7 +2726,7 @@ + PRUint8 * cs; + PRUint8 * data; + SECStatus rv; +- int needed, sidHit, certLen, csLen, cidLen, certType, err; ++ unsigned int needed, sidHit, certLen, csLen, cidLen, certType, err; + + PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); + +@@ -3669,12 +3654,14 @@ + */ + + #include "nss.h" +-extern const char __nss_ssl_rcsid[]; +-extern const char __nss_ssl_sccsid[]; ++extern const char __nss_ssl_version[]; + + PRBool + NSSSSL_VersionCheck(const char *importedVersion) + { ++#define NSS_VERSION_VARIABLE __nss_ssl_version ++#include "verref.h" ++ + /* + * This is the secret handshake algorithm. + * +@@ -3684,9 +3671,6 @@ + * not compatible with future major, minor, or + * patch releases. + */ +- volatile char c; /* force a reference that won't get optimized away */ +- +- c = __nss_ssl_rcsid[0] + __nss_ssl_sccsid[0]; + return NSS_VersionCheck(importedVersion); + } + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2016-01-13 14:18:55.625954891 +0100 +@@ -70,14 +70,17 @@ + #endif /* NSS_DISABLE_ECC */ + + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, ++ TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, ++ TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, + TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, + TLS_DHE_RSA_WITH_AES_256_CBC_SHA, + TLS_DHE_DSS_WITH_AES_256_CBC_SHA, + TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, ++ TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, + TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, + TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2016-01-13 14:18:55.626954897 +0100 +@@ -198,9 +198,19 @@ + + SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT = (SSL_ERROR_BASE + 131), + +-SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 132), +-SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 133), +-SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 134), ++SSL_ERROR_WEAK_SERVER_CERT_KEY = (SSL_ERROR_BASE + 132), ++ ++SSL_ERROR_RX_SHORT_DTLS_READ = (SSL_ERROR_BASE + 133), ++ ++SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 134), ++SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 135), ++ ++SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 136), ++SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 137), ++ ++SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 138), ++SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 139), ++SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 140), + + SSL_ERROR_END_OF_LIST /* let the c compiler determine the value of this. */ + } SSLErrorCodes; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2016-01-13 14:18:55.613954821 +0100 +@@ -423,11 +423,29 @@ + "The server rejected the handshake because the client downgraded to a lower " + "TLS version than the server supports.") + +-ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 132), ++ER3(SSL_ERROR_WEAK_SERVER_CERT_KEY, (SSL_ERROR_BASE + 132), ++"The server certificate included a public key that was too weak.") ++ ++ER3(SSL_ERROR_RX_SHORT_DTLS_READ, (SSL_ERROR_BASE + 133), ++"Not enough room in buffer for DTLS record.") ++ ++ER3(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM, (SSL_ERROR_BASE + 134), ++"No supported TLS signature algorithm was configured.") ++ ++ER3(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM, (SSL_ERROR_BASE + 135), ++"The peer used an unsupported combination of signature and hash algorithm.") ++ ++ER3(SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 136), ++"The peer tried to resume without a correct extended_master_secret extension") ++ ++ER3(SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 137), ++"The peer tried to resume with an unexpected extended_master_secret extension") ++ ++ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 138), + "SSL received a malformed TLS Channel ID extension.") + +-ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 133), ++ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 139), + "The application provided an invalid TLS Channel ID key.") + +-ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 134), ++ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 140), + "The application could not get a TLS Channel ID.") +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2016-01-13 14:18:55.614954827 +0100 +@@ -185,14 +185,26 @@ + /* SSL_REUSE_SERVER_ECDHE_KEY controls whether the ECDHE server key is + * reused for multiple handshakes or generated each time. + * SSL_REUSE_SERVER_ECDHE_KEY is currently enabled by default. ++ * This socket option is for ECDHE, only. It is unrelated to DHE. + */ + #define SSL_REUSE_SERVER_ECDHE_KEY 27 + + #define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in + * handshakes. */ + ++/* SSL_ENABLE_SERVER_DHE controls whether DHE is enabled for the server socket. ++ */ ++#define SSL_ENABLE_SERVER_DHE 29 ++ ++/* Use draft-ietf-tls-session-hash. Controls whether we offer the ++ * extended_master_secret extension which, when accepted, hashes ++ * the handshake transcript into the master secret. This option is ++ * disabled by default. ++ */ ++#define SSL_ENABLE_EXTENDED_MASTER_SECRET 30 ++ + /* Request Signed Certificate Timestamps via TLS extension (client) */ +-#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 29 ++#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 31 + + #ifdef SSL_DEPRECATED_FUNCTION + /* Old deprecated function names */ +@@ -295,6 +307,86 @@ + SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); + SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); + ++/* ++** Control for TLS signature algorithms for TLS 1.2 only. ++** ++** This governs what signature algorithms are sent by a client in the ++** signature_algorithms extension. A client will not accept a signature from a ++** server unless it uses an enabled algorithm. ++** ++** This also governs what the server sends in the supported_signature_algorithms ++** field of a CertificateRequest. It also changes what the server uses to sign ++** ServerKeyExchange: a server uses the first entry from this list that is ++** compatible with the client's advertised signature_algorithms extension and ++** the selected server certificate. ++** ++** Omitting SHA-256 from this list might be foolish. Support is mandatory in ++** TLS 1.2 and there might be interoperability issues. For a server, NSS only ++** supports SHA-256 for verifying a TLS 1.2 CertificateVerify. This list needs ++** to include SHA-256 if client authentication is requested or required, or ++** creating a CertificateRequest will fail. ++*/ ++SSL_IMPORT SECStatus SSL_SignaturePrefSet( ++ PRFileDesc *fd, const SSLSignatureAndHashAlg *algorithms, ++ unsigned int count); ++ ++/* ++** Get the currently configured signature algorithms. ++** ++** The algorithms are written to |algorithms| but not if there are more than ++** |maxCount| values configured. The number of algorithms that are in use are ++** written to |count|. This fails if |maxCount| is insufficiently large. ++*/ ++SSL_IMPORT SECStatus SSL_SignaturePrefGet( ++ PRFileDesc *fd, SSLSignatureAndHashAlg *algorithms, unsigned int *count, ++ unsigned int maxCount); ++ ++/* ++** Returns the maximum number of signature algorithms that are supported and ++** can be set or retrieved using SSL_SignaturePrefSet or SSL_SignaturePrefGet. ++*/ ++SSL_IMPORT unsigned int SSL_SignatureMaxCount(); ++ ++/* SSL_DHEGroupPrefSet is used to configure the set of allowed/enabled DHE group ++** parameters that can be used by NSS for the given server socket. ++** The first item in the array is used as the default group, if no other ++** selection criteria can be used by NSS. ++** The set is provided as an array of identifiers as defined by SSLDHEGroupType. ++** If more than one group identifier is provided, NSS will select the one to use. ++** For example, a TLS extension sent by the client might indicate a preference. ++*/ ++SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, ++ SSLDHEGroupType *groups, ++ PRUint16 num_groups); ++ ++/* Enable the use of a DHE group that's smaller than the library default, ++** for backwards compatibility reasons. The DH parameters will be created ++** at the time this function is called, which might take a very long time. ++** The function will block until generation is completed. ++** The intention is to enforce that fresh and safe parameters are generated ++** each time a process is started. ++** At the time this API was initially implemented, the API will enable the ++** use of 1024 bit DHE parameters. This value might get increased in future ++** versions of NSS. ++** ++** It is allowed to call this API will a NULL value for parameter fd, ++** which will prepare the global parameters that NSS will reuse for the remainder ++** of the process lifetime. This can be used early after startup of a process, ++** to avoid a delay when handling incoming client connections. ++** This preparation with a NULL for parameter fd will NOT enable the weak group ++** on sockets. The function needs to be called again for every socket that ++** should use the weak group. ++** ++** It is allowed to use this API in combination with the SSL_DHEGroupPrefSet API. ++** If both APIs have been called, the weakest group will be used, ++** unless it is certain that the client supports larger group parameters. ++** The weak group will be used as the default group, overriding the preference ++** for the first group potentially set with a call to SSL_DHEGroupPrefSet ++** (The first group set using SSL_DHEGroupPrefSet will still be enabled, but ++** it's no longer the default group.) ++*/ ++SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); ++ + /* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|, + * which must be an array of cipher suite ids of length |len|. All the given + * cipher suite ids must appear in the array that is returned by +@@ -1012,10 +1104,27 @@ + SSL_IMPORT SSL3Statistics * SSL_GetStatistics(void); + + /* Report more information than SSL_SecurityStatus. +-** Caller supplies the info struct. Function fills it in. +-*/ ++ * Caller supplies the info struct. This function fills it in. ++ * The information here will be zeroed prior to details being confirmed. The ++ * details are confirmed either when a Finished message is received, or - for a ++ * client - when the second flight of messages have been sent. This function ++ * therefore produces unreliable results prior to receiving the ++ * SSLHandshakeCallback or the SSLCanFalseStartCallback. ++ */ + SSL_IMPORT SECStatus SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, + PRUintn len); ++/* Get preliminary information about a channel. ++ * This function can be called prior to handshake details being confirmed (see ++ * SSL_GetChannelInfo above for what that means). Thus, information provided by ++ * this function is available to SSLAuthCertificate, SSLGetClientAuthData, ++ * SSLSNISocketConfig, and other callbacks that might be called during the ++ * processing of the first flight of client of server handshake messages. ++ * Values are marked as being unavailable when renegotiation is initiated. ++ */ ++SSL_IMPORT SECStatus ++SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, ++ SSLPreliminaryChannelInfo *info, ++ PRUintn len); + SSL_IMPORT SECStatus SSL_GetCipherSuiteInfo(PRUint16 cipherSuite, + SSLCipherSuiteInfo *info, PRUintn len); + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2016-01-13 14:18:55.627954902 +0100 +@@ -1,3 +1,4 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + /* + * This file is PRIVATE to SSL and should be the first thing included by + * any SSL implementation file. +@@ -181,6 +182,7 @@ + typedef struct ssl3BulkCipherDefStr ssl3BulkCipherDef; + typedef struct ssl3MACDefStr ssl3MACDef; + typedef struct ssl3KeyPairStr ssl3KeyPair; ++typedef struct ssl3DHParamsStr ssl3DHParams; + + struct ssl3CertNodeStr { + struct ssl3CertNodeStr *next; +@@ -300,13 +302,19 @@ + } ssl3CipherSuiteCfg; + + #ifndef NSS_DISABLE_ECC +-#define ssl_V3_SUITES_IMPLEMENTED 63 ++#define ssl_V3_SUITES_IMPLEMENTED 66 + #else +-#define ssl_V3_SUITES_IMPLEMENTED 37 ++#define ssl_V3_SUITES_IMPLEMENTED 40 + #endif /* NSS_DISABLE_ECC */ + + #define MAX_DTLS_SRTP_CIPHER_SUITES 4 + ++/* MAX_SIGNATURE_ALGORITHMS allows for a large number of combinations of ++ * SSLSignType and SSLHashType, but not all combinations (specifically, this ++ * doesn't allow space for combinations with MD5). */ ++#define MAX_SIGNATURE_ALGORITHMS 15 ++ ++ + typedef struct sslOptionsStr { + /* If SSL_SetNextProtoNego has been called, then this contains the + * list of supported protocols. */ +@@ -339,7 +347,9 @@ + unsigned int enableALPN : 1; /* 27 */ + unsigned int reuseServerECDHEKey : 1; /* 28 */ + unsigned int enableFallbackSCSV : 1; /* 29 */ +- unsigned int enableSignedCertTimestamps : 1; /* 30 */ ++ unsigned int enableServerDhe : 1; /* 30 */ ++ unsigned int enableExtendedMS : 1; /* 31 */ ++ unsigned int enableSignedCertTimestamps : 1; /* 32 */ + } sslOptions; + + typedef enum { sslHandshakingUndetermined = 0, +@@ -521,6 +531,7 @@ + PRUint16 wrapped_master_secret_len; + PRUint8 msIsWrapped; + PRUint8 resumable; ++ PRUint8 extendedMasterSecretUsed; + } ssl3SidKeys; /* 52 bytes */ + + typedef struct { +@@ -766,10 +777,10 @@ + * is_limited identifies a suite as having a limit on the key size. + * key_size_limit provides the corresponding limit. */ + PRBool is_limited; +- int key_size_limit; ++ unsigned int key_size_limit; + PRBool tls_keygen; +- /* True if the key exchange for the suite can be ephemeral. Or to be more +- * precise: true if the ServerKeyExchange message is required. */ ++ /* True if the key exchange for the suite is ephemeral. Or to be more ++ * precise: true if the ServerKeyExchange message is always required. */ + PRBool ephemeral; + } ssl3KEADef; + +@@ -955,12 +966,14 @@ + PRBool cacheSID; + + PRBool canFalseStart; /* Can/did we False Start */ ++ /* Which preliminaryinfo values have been set. */ ++ PRUint32 preliminaryInfo; + + /* clientSigAndHash contains the contents of the signature_algorithms + * extension (if any) from the client. This is only valid for TLS 1.2 + * or later. */ +- SSL3SignatureAndHashAlgorithm *clientSigAndHash; +- unsigned int numClientSigAndHash; ++ SSLSignatureAndHashAlg *clientSigAndHash; ++ unsigned int numClientSigAndHash; + + /* This group of values is used for DTLS */ + PRUint16 sendMessageSeq; /* The sending message sequence +@@ -1044,9 +1057,17 @@ + PRUint16 dtlsSRTPCipherCount; + PRUint16 dtlsSRTPCipherSuite; /* 0 if not selected */ + PRBool fatalAlertSent; ++ PRUint16 numDHEGroups; /* used by server */ ++ SSLDHEGroupType * dheGroups; /* used by server */ ++ PRBool dheWeakGroupEnabled; /* used by server */ ++ ++ /* TLS 1.2 introduces separate signature algorithm negotiation. ++ * This is our preference order. */ ++ SSLSignatureAndHashAlg signatureAlgorithms[MAX_SIGNATURE_ALGORITHMS]; ++ unsigned int signatureAlgorithmCount; + }; + +-#define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the ++#define DTLS_MAX_MTU 1500U /* Ethernet MTU but without subtracting the + * headers, so slightly larger than expected */ + #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram) + +@@ -1063,6 +1084,11 @@ + PRInt32 refCount; /* use PR_Atomic calls for this. */ + }; + ++struct ssl3DHParamsStr { ++ SECItem prime; /* p */ ++ SECItem base; /* g */ ++}; ++ + typedef struct SSLWrappedSymWrappingKeyStr { + SSL3Opaque wrappedSymmetricWrappingkey[512]; + CK_MECHANISM_TYPE symWrapMechanism; +@@ -1093,6 +1119,7 @@ + CK_MECHANISM_TYPE msWrapMech; + PRUint16 ms_length; + SSL3Opaque master_secret[48]; ++ PRBool extendedMasterSecretUsed; + ClientIdentity client_identity; + SECItem peer_cert; + PRUint32 timestamp; +@@ -1275,6 +1302,9 @@ + + ssl3KeyPair * stepDownKeyPair; /* RSA step down keys */ + ++ const ssl3DHParams *dheParams; /* DHE param */ ++ ssl3KeyPair * dheKeyPair; /* DHE keys */ ++ + /* Callbacks */ + SSLAuthCertificate authCertificate; + void *authCertificateArg; +@@ -1634,7 +1664,7 @@ + extern SECStatus ssl3_KeyAndMacDeriveBypass(ssl3CipherSpec * pwSpec, + const unsigned char * cr, const unsigned char * sr, + PRBool isTLS, PRBool isExport); +-extern SECStatus ssl3_MasterKeyDeriveBypass( ssl3CipherSpec * pwSpec, ++extern SECStatus ssl3_MasterSecretDeriveBypass( ssl3CipherSpec * pwSpec, + const unsigned char * cr, const unsigned char * sr, + const SECItem * pms, PRBool isTLS, PRBool isRSA); + +@@ -1688,6 +1718,8 @@ + */ + extern SECStatus ssl3_CreateRSAStepDownKeys(sslSocket *ss); + ++extern SECStatus ssl3_SelectDHParams(sslSocket *ss); ++ + #ifndef NSS_DISABLE_ECC + extern void ssl3_FilterECCipherSuitesByServerCerts(sslSocket *ss); + extern PRBool ssl3_IsECCEnabled(sslSocket *ss); +@@ -1790,11 +1822,11 @@ + SSL3Opaque *b, PRUint32 length, + SECKEYPublicKey *srvrPubKey, + SECKEYPrivateKey *srvrPrivKey); +-extern SECStatus ssl3_SendECDHServerKeyExchange(sslSocket *ss, +- const SSL3SignatureAndHashAlgorithm *sigAndHash); ++extern SECStatus ssl3_SendECDHServerKeyExchange( ++ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash); + #endif + +-extern SECStatus ssl3_ComputeCommonKeyHash(SECOidTag hashAlg, ++extern SECStatus ssl3_ComputeCommonKeyHash(SSLHashType hashAlg, + PRUint8 * hashBuf, + unsigned int bufLen, SSL3Hashes *hashes, + PRBool bypassPKCS11); +@@ -1808,21 +1840,22 @@ + PRInt32 lenSize); + extern SECStatus ssl3_AppendHandshakeVariable( sslSocket *ss, + const SSL3Opaque *src, PRInt32 bytes, PRInt32 lenSize); +-extern SECStatus ssl3_AppendSignatureAndHashAlgorithm(sslSocket *ss, +- const SSL3SignatureAndHashAlgorithm* sigAndHash); ++extern SECStatus ssl3_AppendSignatureAndHashAlgorithm( ++ sslSocket *ss, const SSLSignatureAndHashAlg* sigAndHash); + extern SECStatus ssl3_ConsumeHandshake(sslSocket *ss, void *v, PRInt32 bytes, + SSL3Opaque **b, PRUint32 *length); + extern PRInt32 ssl3_ConsumeHandshakeNumber(sslSocket *ss, PRInt32 bytes, + SSL3Opaque **b, PRUint32 *length); + extern SECStatus ssl3_ConsumeHandshakeVariable(sslSocket *ss, SECItem *i, + PRInt32 bytes, SSL3Opaque **b, PRUint32 *length); +-extern SECOidTag ssl3_TLSHashAlgorithmToOID(int hashFunc); ++extern PRBool ssl3_IsSupportedSignatureAlgorithm( ++ const SSLSignatureAndHashAlg *alg); + extern SECStatus ssl3_CheckSignatureAndHashAlgorithmConsistency( +- const SSL3SignatureAndHashAlgorithm *sigAndHash, +- CERTCertificate* cert); +-extern SECStatus ssl3_ConsumeSignatureAndHashAlgorithm(sslSocket *ss, +- SSL3Opaque **b, PRUint32 *length, +- SSL3SignatureAndHashAlgorithm *out); ++ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash, ++ CERTCertificate* cert); ++extern SECStatus ssl3_ConsumeSignatureAndHashAlgorithm( ++ sslSocket *ss, SSL3Opaque **b, PRUint32 *length, ++ SSLSignatureAndHashAlg *out); + extern SECStatus ssl3_SignHashes(SSL3Hashes *hash, SECKEYPrivateKey *key, + SECItem *buf, PRBool isTLS); + extern SECStatus ssl3_VerifySignedHashes(SSL3Hashes *hash, +@@ -1890,7 +1923,7 @@ + + /* Tell clients to consider tickets valid for this long. */ + #define TLS_EX_SESS_TICKET_LIFETIME_HINT (2 * 24 * 60 * 60) /* 2 days */ +-#define TLS_EX_SESS_TICKET_VERSION (0x0100) ++#define TLS_EX_SESS_TICKET_VERSION (0x0101) + + extern SECStatus ssl3_ValidateNextProtoNego(const unsigned char* data, + unsigned int length); +@@ -2024,6 +2057,8 @@ + const char *label, unsigned int labelLen, + const unsigned char *val, unsigned int valLen, + unsigned char *out, unsigned int outLen); ++extern SECOidTag ++ssl3_TLSHashAlgorithmToOID(SSLHashType hashFunc); + + #ifdef TRACE + #define SSL_TRACE(msg) ssl_Trace msg +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2016-01-13 14:18:55.628954908 +0100 +@@ -67,6 +67,8 @@ + inf.creationTime = sid->creationTime; + inf.lastAccessTime = sid->lastAccessTime; + inf.expirationTime = sid->expirationTime; ++ inf.extendedMasterSecretUsed = sid->u.ssl3.keys.extendedMasterSecretUsed; ++ + if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ + inf.sessionIDLength = SSL2_SESSIONID_BYTES; + memcpy(inf.sessionID, sid->u.ssl2.sessionID, +@@ -85,6 +87,42 @@ + return SECSuccess; + } + ++SECStatus ++SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, ++ SSLPreliminaryChannelInfo *info, ++ PRUintn len) ++{ ++ sslSocket *ss; ++ SSLPreliminaryChannelInfo inf; ++ ++ if (!info || len < sizeof inf.length) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_GetPreliminaryChannelInfo", ++ SSL_GETPID(), fd)); ++ return SECFailure; ++ } ++ ++ if (ss->version < SSL_LIBRARY_VERSION_3_0) { ++ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_VERSION); ++ return SECFailure; ++ } ++ ++ memset(&inf, 0, sizeof(inf)); ++ inf.length = PR_MIN(sizeof(inf), len); ++ ++ inf.valuesSet = ss->ssl3.hs.preliminaryInfo; ++ inf.protocolVersion = ss->version; ++ inf.cipherSuite = ss->ssl3.hs.cipher_suite; ++ ++ memcpy(info, &inf, inf.length); ++ return SECSuccess; ++} ++ + + #define CS(x) x, #x + #define CK(x) x | 0xff00, #x +@@ -136,6 +174,7 @@ + {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_DHE, C_AES, B_256, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, + {0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA), S_DSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, ++{0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA256), S_DSA, K_DHE, C_AES, B_256, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_256, M_SHA, 0, 0, 0, }, + {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_RSA, C_AES, B_256, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_RSA, C_AES, B_256, M_SHA, 1, 0, 0, }, +@@ -146,7 +185,9 @@ + {0,CS(TLS_DHE_RSA_WITH_AES_128_CBC_SHA256), S_RSA, K_DHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_DHE_RSA_WITH_AES_128_GCM_SHA256), S_RSA, K_DHE, C_AESGCM, B_128, M_AEAD_128, 1, 0, 0, }, + {0,CS(TLS_DHE_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_DHE, C_AES, B_128, M_SHA, 1, 0, 0, }, ++{0,CS(TLS_DHE_DSS_WITH_AES_128_GCM_SHA256), S_DSA, K_DHE, C_AESGCM, B_128, M_AEAD_128, 1, 0, 0, }, + {0,CS(TLS_DHE_DSS_WITH_AES_128_CBC_SHA), S_DSA, K_DHE, C_AES, B_128, M_SHA, 1, 0, 0, }, ++{0,CS(TLS_DHE_DSS_WITH_AES_128_CBC_SHA256), S_DSA, K_DHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, + {0,CS(TLS_RSA_WITH_SEED_CBC_SHA), S_RSA, K_RSA, C_SEED,B_128, M_SHA, 1, 0, 0, }, + {0,CS(TLS_RSA_WITH_CAMELLIA_128_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_128, M_SHA, 0, 0, 0, }, + {0,CS(TLS_RSA_WITH_RC4_128_SHA), S_RSA, K_RSA, C_RC4, B_128, M_SHA, 0, 0, 0, }, +@@ -247,12 +288,10 @@ + { + const SSLCipherSuiteInfo * pInfo = suiteInfo; + unsigned int i; +- SECStatus rv; + + for (i = 0; i < NUM_SUITEINFOS; ++i, ++pInfo) { + if (pInfo->isExportable) { +- rv = SSL_CipherPrefSetDefault(pInfo->cipherSuite, PR_FALSE); +- PORT_Assert(rv == SECSuccess); ++ PORT_CheckSuccess(SSL_CipherPrefSetDefault(pInfo->cipherSuite, PR_FALSE)); + } + } + return SECSuccess; +@@ -268,12 +307,10 @@ + { + const SSLCipherSuiteInfo * pInfo = suiteInfo; + unsigned int i; +- SECStatus rv; + + for (i = 0; i < NUM_SUITEINFOS; ++i, ++pInfo) { + if (pInfo->isExportable) { +- rv = SSL_CipherPrefSet(fd, pInfo->cipherSuite, PR_FALSE); +- PORT_Assert(rv == SECSuccess); ++ PORT_CheckSuccess(SSL_CipherPrefSet(fd, pInfo->cipherSuite, PR_FALSE)); + } + } + return SECSuccess; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2016-01-13 14:18:55.628954908 +0100 +@@ -504,7 +504,7 @@ + return SECSuccess; + } + +-#elif defined(XP_UNIX) ++#elif defined(XP_UNIX) && !defined(DARWIN) + + #include + #include "unix_err.h" +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2016-01-13 14:18:55.628954908 +0100 +@@ -67,7 +67,8 @@ + } sslMutex; + typedef pid_t sslPID; + +-#elif defined(XP_UNIX) /* other types of Unix */ ++/* other types of unix, except OS X */ ++#elif defined(XP_UNIX) && !defined(DARWIN) + + #include /* for pid_t */ + #include /* for sem_t, and sem_* functions */ +@@ -83,7 +84,7 @@ + + typedef pid_t sslPID; + +-#else ++#else /* no support for cross-process locking */ + + /* what platform is this ?? */ + +@@ -95,7 +96,11 @@ + } u; + } sslMutex; + ++#ifdef DARWIN ++typedef pid_t sslPID; ++#else + typedef int sslPID; ++#endif + + #endif + +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2016-01-13 14:18:55.629954914 +0100 +@@ -177,6 +177,7 @@ + #define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003C + #define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003D + ++#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 0x0040 + #define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0041 + #define TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x0042 + #define TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0043 +@@ -191,6 +192,7 @@ + #define TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x0065 + #define TLS_DHE_DSS_WITH_RC4_128_SHA 0x0066 + #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067 ++#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 0x006A + #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006B + + #define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0084 +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2016-01-13 14:18:55.629954914 +0100 +@@ -138,6 +138,9 @@ + ss->gs.readOffset = 0; + + if (ss->handshakeCallback) { ++ PORT_Assert(ss->version < SSL_LIBRARY_VERSION_3_0 || ++ (ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == ++ ssl_preinfo_all); + (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); + } + } +@@ -654,6 +657,16 @@ + SSL_GETPID(), ss->fd, available)); + } + ++ if (IS_DTLS(ss) && (len < available)) { ++ /* DTLS does not allow you to do partial reads */ ++ SSL_TRC(30, ("%d: SSL[%d]: DTLS short read. len=%d available=%d", ++ SSL_GETPID(), ss->fd, len, available)); ++ ss->gs.readOffset += available; ++ PORT_SetError(SSL_ERROR_RX_SHORT_DTLS_READ); ++ rv = SECFailure; ++ goto done; ++ } ++ + /* Dole out clear data to reader */ + amount = PR_MIN(len, available); + PORT_Memcpy(out, ss->gs.buf.buf + ss->gs.readOffset, amount); +@@ -693,6 +706,7 @@ + case SEC_OID_PKCS1_RSA_ENCRYPTION: + keaType = kt_rsa; + break; ++ case SEC_OID_ANSIX9_DSA_SIGNATURE: /* hah, signature, not a key? */ + case SEC_OID_X942_DIFFIE_HELMAN_KEY: + keaType = kt_dh; + break; +@@ -789,6 +803,11 @@ + goto loser; + } + } ++ if (kea == ssl_kea_dh || kea == ssl_kea_rsa) { ++ if (ssl3_SelectDHParams(ss) != SECSuccess) { ++ goto loser; ++ } ++ } + return SECSuccess; + + loser: +@@ -1177,11 +1196,8 @@ + int + ssl_SecureRecv(sslSocket *ss, unsigned char *buf, int len, int flags) + { +- sslSecurityInfo *sec; + int rv = 0; + +- sec = &ss->sec; +- + if (ss->shutdownHow & ssl_SHUTDOWN_RCV) { + PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR); + return PR_FAILURE; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2016-01-13 14:18:55.631954926 +0100 +@@ -120,14 +120,14 @@ + /* 2 */ ssl3CipherSuite cipherSuite; + /* 2 */ PRUint16 compression; /* SSLCompressionMethod */ + +-/* 52 */ ssl3SidKeys keys; /* keys, wrapped as needed. */ ++/* 54 */ ssl3SidKeys keys; /* keys, wrapped as needed. */ + + /* 4 */ PRUint32 masterWrapMech; + /* 4 */ SSL3KEAType exchKeyType; + /* 4 */ PRInt32 certIndex; + /* 4 */ PRInt32 srvNameIndex; + /* 32 */ PRUint8 srvNameHash[SHA256_LENGTH]; /* SHA256 name hash */ +-/*104 */} ssl3; ++/*108 */} ssl3; + /* force sizeof(sidCacheEntry) to be a multiple of cache line size */ + struct { + /*120 */ PRUint8 filler[120]; /* 72+120==192, a multiple of 16 */ +@@ -507,7 +507,6 @@ + to->sessionIDLength = from->u.ssl3.sessionIDLength; + to->u.ssl3.certIndex = -1; + to->u.ssl3.srvNameIndex = -1; +- + PORT_Memcpy(to->sessionID, from->u.ssl3.sessionID, + to->sessionIDLength); + +@@ -637,7 +636,7 @@ + to->authKeyBits = from->authKeyBits; + to->keaType = from->keaType; + to->keaKeyBits = from->keaKeyBits; +- ++ + return to; + + loser: +@@ -1228,20 +1227,32 @@ + /* Fix pointers in our private copy of cache descriptor to point to + ** spaces in shared memory + */ +- ptr = (ptrdiff_t)cache->cacheMem; +- *(ptrdiff_t *)(&cache->sidCacheLocks) += ptr; +- *(ptrdiff_t *)(&cache->keyCacheLock ) += ptr; +- *(ptrdiff_t *)(&cache->certCacheLock) += ptr; +- *(ptrdiff_t *)(&cache->srvNameCacheLock) += ptr; +- *(ptrdiff_t *)(&cache->sidCacheSets ) += ptr; +- *(ptrdiff_t *)(&cache->sidCacheData ) += ptr; +- *(ptrdiff_t *)(&cache->certCacheData) += ptr; +- *(ptrdiff_t *)(&cache->keyCacheData ) += ptr; +- *(ptrdiff_t *)(&cache->ticketKeyNameSuffix) += ptr; +- *(ptrdiff_t *)(&cache->ticketEncKey ) += ptr; +- *(ptrdiff_t *)(&cache->ticketMacKey ) += ptr; +- *(ptrdiff_t *)(&cache->ticketKeysValid) += ptr; +- *(ptrdiff_t *)(&cache->srvNameCacheData) += ptr; ++ cache->sidCacheLocks = (sidCacheLock *) ++ (cache->cacheMem + (ptrdiff_t)cache->sidCacheLocks); ++ cache->keyCacheLock = (sidCacheLock *) ++ (cache->cacheMem + (ptrdiff_t)cache->keyCacheLock); ++ cache->certCacheLock = (sidCacheLock *) ++ (cache->cacheMem + (ptrdiff_t)cache->certCacheLock); ++ cache->srvNameCacheLock = (sidCacheLock *) ++ (cache->cacheMem + (ptrdiff_t)cache->srvNameCacheLock); ++ cache->sidCacheSets = (sidCacheSet *) ++ (cache->cacheMem + (ptrdiff_t)cache->sidCacheSets); ++ cache->sidCacheData = (sidCacheEntry *) ++ (cache->cacheMem + (ptrdiff_t)cache->sidCacheData); ++ cache->certCacheData = (certCacheEntry *) ++ (cache->cacheMem + (ptrdiff_t)cache->certCacheData); ++ cache->keyCacheData = (SSLWrappedSymWrappingKey *) ++ (cache->cacheMem + (ptrdiff_t)cache->keyCacheData); ++ cache->ticketKeyNameSuffix = (PRUint8 *) ++ (cache->cacheMem + (ptrdiff_t)cache->ticketKeyNameSuffix); ++ cache->ticketEncKey = (encKeyCacheEntry *) ++ (cache->cacheMem + (ptrdiff_t)cache->ticketEncKey); ++ cache->ticketMacKey = (encKeyCacheEntry *) ++ (cache->cacheMem + (ptrdiff_t)cache->ticketMacKey); ++ cache->ticketKeysValid = (PRUint32 *) ++ (cache->cacheMem + (ptrdiff_t)cache->ticketKeysValid); ++ cache->srvNameCacheData = (srvNameCacheEntry *) ++ (cache->cacheMem + (ptrdiff_t)cache->srvNameCacheData); + + /* initialize the locks */ + init_time = ssl_Time(); +@@ -1484,7 +1495,6 @@ + char * fmString = NULL; + char * myEnvString = NULL; + unsigned int decoLen; +- ptrdiff_t ptr; + inheritance inherit; + cacheDesc my; + #ifdef WINNT +@@ -1580,20 +1590,32 @@ + /* Fix pointers in our private copy of cache descriptor to point to + ** spaces in shared memory, whose address is now in "my". + */ +- ptr = (ptrdiff_t)my.cacheMem; +- *(ptrdiff_t *)(&cache->sidCacheLocks) += ptr; +- *(ptrdiff_t *)(&cache->keyCacheLock ) += ptr; +- *(ptrdiff_t *)(&cache->certCacheLock) += ptr; +- *(ptrdiff_t *)(&cache->srvNameCacheLock) += ptr; +- *(ptrdiff_t *)(&cache->sidCacheSets ) += ptr; +- *(ptrdiff_t *)(&cache->sidCacheData ) += ptr; +- *(ptrdiff_t *)(&cache->certCacheData) += ptr; +- *(ptrdiff_t *)(&cache->keyCacheData ) += ptr; +- *(ptrdiff_t *)(&cache->ticketKeyNameSuffix) += ptr; +- *(ptrdiff_t *)(&cache->ticketEncKey ) += ptr; +- *(ptrdiff_t *)(&cache->ticketMacKey ) += ptr; +- *(ptrdiff_t *)(&cache->ticketKeysValid) += ptr; +- *(ptrdiff_t *)(&cache->srvNameCacheData) += ptr; ++ cache->sidCacheLocks = (sidCacheLock *) ++ (my.cacheMem + (ptrdiff_t)cache->sidCacheLocks); ++ cache->keyCacheLock = (sidCacheLock *) ++ (my.cacheMem + (ptrdiff_t)cache->keyCacheLock); ++ cache->certCacheLock = (sidCacheLock *) ++ (my.cacheMem + (ptrdiff_t)cache->certCacheLock); ++ cache->srvNameCacheLock = (sidCacheLock *) ++ (my.cacheMem + (ptrdiff_t)cache->srvNameCacheLock); ++ cache->sidCacheSets = (sidCacheSet *) ++ (my.cacheMem + (ptrdiff_t)cache->sidCacheSets); ++ cache->sidCacheData = (sidCacheEntry *) ++ (my.cacheMem + (ptrdiff_t)cache->sidCacheData); ++ cache->certCacheData = (certCacheEntry *) ++ (my.cacheMem + (ptrdiff_t)cache->certCacheData); ++ cache->keyCacheData = (SSLWrappedSymWrappingKey *) ++ (my.cacheMem + (ptrdiff_t)cache->keyCacheData); ++ cache->ticketKeyNameSuffix = (PRUint8 *) ++ (my.cacheMem + (ptrdiff_t)cache->ticketKeyNameSuffix); ++ cache->ticketEncKey = (encKeyCacheEntry *) ++ (my.cacheMem + (ptrdiff_t)cache->ticketEncKey); ++ cache->ticketMacKey = (encKeyCacheEntry *) ++ (my.cacheMem + (ptrdiff_t)cache->ticketMacKey); ++ cache->ticketKeysValid = (PRUint32 *) ++ (my.cacheMem + (ptrdiff_t)cache->ticketKeysValid); ++ cache->srvNameCacheData = (srvNameCacheEntry *) ++ (my.cacheMem + (ptrdiff_t)cache->srvNameCacheData); + + cache->cacheMemMap = my.cacheMemMap; + cache->cacheMem = my.cacheMem; +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2016-01-13 14:18:55.632954931 +0100 +@@ -19,6 +19,7 @@ + #endif + #include "pk11pub.h" + #include "nss.h" ++#include "pk11pqg.h" + + /* This is a bodge to allow this code to be compiled against older NSS headers + * that don't contain the TLS 1.2 changes. */ +@@ -90,6 +91,8 @@ + PR_FALSE, /* enableALPN */ + PR_TRUE, /* reuseServerECDHEKey */ + PR_FALSE, /* enableFallbackSCSV */ ++ PR_TRUE, /* enableServerDhe */ ++ PR_FALSE, /* enableExtendedMS */ + PR_FALSE, /* enableSignedCertTimestamps */ + }; + +@@ -232,6 +235,24 @@ + PORT_Memcpy(ss->ssl3.dtlsSRTPCiphers, os->ssl3.dtlsSRTPCiphers, + sizeof(PRUint16) * os->ssl3.dtlsSRTPCipherCount); + ss->ssl3.dtlsSRTPCipherCount = os->ssl3.dtlsSRTPCipherCount; ++ PORT_Memcpy(ss->ssl3.signatureAlgorithms, os->ssl3.signatureAlgorithms, ++ sizeof(ss->ssl3.signatureAlgorithms[0]) * ++ os->ssl3.signatureAlgorithmCount); ++ ss->ssl3.signatureAlgorithmCount = os->ssl3.signatureAlgorithmCount; ++ ++ ss->ssl3.dheWeakGroupEnabled = os->ssl3.dheWeakGroupEnabled; ++ ss->ssl3.numDHEGroups = os->ssl3.numDHEGroups; ++ if (os->ssl3.dheGroups) { ++ ss->ssl3.dheGroups = PORT_NewArray(SSLDHEGroupType, ++ os->ssl3.numDHEGroups); ++ if (!ss->ssl3.dheGroups) { ++ goto loser; ++ } ++ PORT_Memcpy(ss->ssl3.dheGroups, os->ssl3.dheGroups, ++ sizeof(SSLDHEGroupType) * os->ssl3.numDHEGroups); ++ } else { ++ ss->ssl3.dheGroups = NULL; ++ } + + if (os->cipherSpecs) { + ss->cipherSpecs = (unsigned char*)PORT_Alloc(os->sizeCipherSpecs); +@@ -275,6 +296,10 @@ + ssl3_GetKeyPairRef(os->stepDownKeyPair); + ss->ephemeralECDHKeyPair = !os->ephemeralECDHKeyPair ? NULL : + ssl3_GetKeyPairRef(os->ephemeralECDHKeyPair); ++ ss->dheKeyPair = !os->dheKeyPair ? NULL : ++ ssl3_GetKeyPairRef(os->dheKeyPair); ++ ss->dheParams = os->dheParams; ++ + /* + * XXX the preceding CERT_ and SECKEY_ functions can fail and return NULL. + * XXX We should detect this, and not just march on with NULL pointers. +@@ -398,8 +423,11 @@ + ssl3_FreeKeyPair(ss->ephemeralECDHKeyPair); + ss->ephemeralECDHKeyPair = NULL; + } ++ if (ss->dheKeyPair) { ++ ssl3_FreeKeyPair(ss->dheKeyPair); ++ ss->dheKeyPair = NULL; ++ } + SECITEM_FreeItem(&ss->opt.nextProtoNego, PR_FALSE); +- PORT_Assert(!ss->xtnData.sniNameArr); + if (ss->xtnData.sniNameArr) { + PORT_Free(ss->xtnData.sniNameArr); + ss->xtnData.sniNameArr = NULL; +@@ -808,6 +836,14 @@ + ss->opt.enableFallbackSCSV = on; + break; + ++ case SSL_ENABLE_SERVER_DHE: ++ ss->opt.enableServerDhe = on; ++ break; ++ ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ ss->opt.enableExtendedMS = on; ++ break; ++ + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + ss->opt.enableSignedCertTimestamps = on; + break; +@@ -887,6 +923,9 @@ + case SSL_REUSE_SERVER_ECDHE_KEY: + on = ss->opt.reuseServerECDHEKey; break; + case SSL_ENABLE_FALLBACK_SCSV: on = ss->opt.enableFallbackSCSV; break; ++ case SSL_ENABLE_SERVER_DHE: on = ss->opt.enableServerDhe; break; ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ on = ss->opt.enableExtendedMS; break; + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + on = ss->opt.enableSignedCertTimestamps; + break; +@@ -959,6 +998,12 @@ + case SSL_ENABLE_FALLBACK_SCSV: + on = ssl_defaults.enableFallbackSCSV; + break; ++ case SSL_ENABLE_SERVER_DHE: ++ on = ssl_defaults.enableServerDhe; ++ break; ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ on = ssl_defaults.enableExtendedMS; ++ break; + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + on = ssl_defaults.enableSignedCertTimestamps; + break; +@@ -1145,6 +1190,14 @@ + ssl_defaults.enableFallbackSCSV = on; + break; + ++ case SSL_ENABLE_SERVER_DHE: ++ ssl_defaults.enableServerDhe = on; ++ break; ++ ++ case SSL_ENABLE_EXTENDED_MASTER_SECRET: ++ ssl_defaults.enableExtendedMS = on; ++ break; ++ + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: + ssl_defaults.enableSignedCertTimestamps = on; + break; +@@ -1381,6 +1434,148 @@ + } + + SECStatus ++SSL_DHEGroupPrefSet(PRFileDesc *fd, ++ SSLDHEGroupType *groups, ++ PRUint16 num_groups) ++{ ++ sslSocket *ss; ++ ++ if ((num_groups && !groups) || (!num_groups && groups)) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_DHEGroupPrefSet", SSL_GETPID(), fd)); ++ return SECFailure; ++ } ++ ++ if (ss->ssl3.dheGroups) { ++ PORT_Free(ss->ssl3.dheGroups); ++ ss->ssl3.dheGroups = NULL; ++ ss->ssl3.numDHEGroups = 0; ++ } ++ ++ if (groups) { ++ ss->ssl3.dheGroups = PORT_NewArray(SSLDHEGroupType, num_groups); ++ if (!ss->ssl3.dheGroups) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return SECFailure; ++ } ++ PORT_Memcpy(ss->ssl3.dheGroups, groups, ++ sizeof(SSLDHEGroupType) * num_groups); ++ } ++ return SECSuccess; ++} ++ ++ ++PRCallOnceType gWeakDHParamsRegisterOnce; ++int gWeakDHParamsRegisterError; ++ ++PRCallOnceType gWeakDHParamsOnce; ++int gWeakDHParamsError; ++/* As our code allocates type PQGParams, we'll keep it around, ++ * even though we only make use of it's parameters through gWeakDHParam. */ ++static PQGParams *gWeakParamsPQG; ++static ssl3DHParams *gWeakDHParams; ++ ++static PRStatus ++ssl3_CreateWeakDHParams(void) ++{ ++ PQGVerify *vfy; ++ SECStatus rv, passed; ++ ++ PORT_Assert(!gWeakDHParams && !gWeakParamsPQG); ++ ++ rv = PK11_PQG_ParamGenV2(1024, 160, 64 /*maximum seed that will work*/, ++ &gWeakParamsPQG, &vfy); ++ if (rv != SECSuccess) { ++ gWeakDHParamsError = PORT_GetError(); ++ return PR_FAILURE; ++ } ++ ++ rv = PK11_PQG_VerifyParams(gWeakParamsPQG, vfy, &passed); ++ if (rv != SECSuccess || passed != SECSuccess) { ++ SSL_DBG(("%d: PK11_PQG_VerifyParams failed in ssl3_CreateWeakDHParams", ++ SSL_GETPID())); ++ gWeakDHParamsError = PORT_GetError(); ++ return PR_FAILURE; ++ } ++ ++ gWeakDHParams = PORT_ArenaNew(gWeakParamsPQG->arena, ssl3DHParams); ++ if (!gWeakDHParams) { ++ gWeakDHParamsError = PORT_GetError(); ++ return PR_FAILURE; ++ } ++ ++ gWeakDHParams->prime.data = gWeakParamsPQG->prime.data; ++ gWeakDHParams->prime.len = gWeakParamsPQG->prime.len; ++ gWeakDHParams->base.data = gWeakParamsPQG->base.data; ++ gWeakDHParams->base.len = gWeakParamsPQG->base.len; ++ ++ PK11_PQG_DestroyVerify(vfy); ++ return PR_SUCCESS; ++} ++ ++static SECStatus ++ssl3_WeakDHParamsShutdown(void *appData, void *nssData) ++{ ++ if (gWeakParamsPQG) { ++ PK11_PQG_DestroyParams(gWeakParamsPQG); ++ gWeakParamsPQG = NULL; ++ gWeakDHParams = NULL; ++ } ++ return SECSuccess; ++} ++ ++static PRStatus ++ssl3_WeakDHParamsRegisterShutdown(void) ++{ ++ SECStatus rv; ++ rv = NSS_RegisterShutdown(ssl3_WeakDHParamsShutdown, NULL); ++ if (rv != SECSuccess) { ++ gWeakDHParamsRegisterError = PORT_GetError(); ++ } ++ return (PRStatus)rv; ++} ++ ++/* global init strategy inspired by ssl3_CreateECDHEphemeralKeys */ ++SECStatus ++SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled) ++{ ++ sslSocket *ss; ++ PRStatus status; ++ ++ if (enabled) { ++ status = PR_CallOnce(&gWeakDHParamsRegisterOnce, ++ ssl3_WeakDHParamsRegisterShutdown); ++ if (status != PR_SUCCESS) { ++ PORT_SetError(gWeakDHParamsRegisterError); ++ return SECFailure; ++ } ++ ++ status = PR_CallOnce(&gWeakDHParamsOnce, ssl3_CreateWeakDHParams); ++ if (status != PR_SUCCESS) { ++ PORT_SetError(gWeakDHParamsError); ++ return SECFailure; ++ } ++ } ++ ++ if (!fd) ++ return SECSuccess; ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_DHEGroupPrefSet", SSL_GETPID(), fd)); ++ return SECFailure; ++ } ++ ++ ss->ssl3.dheWeakGroupEnabled = enabled; ++ return SECSuccess; ++} ++ ++SECStatus + SSL_GetChannelBinding(PRFileDesc *fd, + SSLChannelBindingType binding_type, + unsigned char *out, +@@ -1402,6 +1597,62 @@ + return ssl3_GetTLSUniqueChannelBinding(ss, out, outLen, outLenMax); + } + ++#include "dhe-param.c" ++ ++static const SSLDHEGroupType ssl_default_dhe_groups[] = { ++ ssl_ff_dhe_2048_group ++}; ++ ++/* Keep this array synchronized with the index definitions in SSLDHEGroupType */ ++static const ssl3DHParams *all_ssl3DHParams[] = { ++ NULL, /* ssl_dhe_group_none */ ++ &ff_dhe_2048, ++ &ff_dhe_3072, ++ &ff_dhe_4096, ++ &ff_dhe_6144, ++ &ff_dhe_8192, ++}; ++ ++static SSLDHEGroupType ++selectDHEGroup(sslSocket *ss, const SSLDHEGroupType *groups, PRUint16 num_groups) ++{ ++ if (!groups || !num_groups) ++ return ssl_dhe_group_none; ++ ++ /* We don't have automatic group parameter selection yet ++ * (potentially) based on socket parameters, e.g. key sizes. ++ * For now, we return the first available group from the allowed list. */ ++ return groups[0]; ++} ++ ++/* Ensure DH parameters have been selected */ ++SECStatus ++ssl3_SelectDHParams(sslSocket *ss) ++{ ++ SSLDHEGroupType selectedGroup = ssl_dhe_group_none; ++ ++ if (ss->ssl3.dheWeakGroupEnabled) { ++ ss->dheParams = gWeakDHParams; ++ } else { ++ if (ss->ssl3.dheGroups) { ++ selectedGroup = selectDHEGroup(ss, ss->ssl3.dheGroups, ++ ss->ssl3.numDHEGroups); ++ } else { ++ size_t number_of_default_groups = PR_ARRAY_SIZE(ssl_default_dhe_groups); ++ selectedGroup = selectDHEGroup(ss, ssl_default_dhe_groups, ++ number_of_default_groups); ++ } ++ ++ if (selectedGroup == ssl_dhe_group_none || ++ selectedGroup >= ssl_dhe_group_max) { ++ return SECFailure; ++ } ++ ++ ss->dheParams = all_ssl3DHParams[selectedGroup]; ++ } ++ ++ return SECSuccess; ++} + + /* LOCKS ??? XXX */ + static PRFileDesc * +@@ -1699,6 +1950,10 @@ + PORT_Memcpy(ss->ssl3.dtlsSRTPCiphers, sm->ssl3.dtlsSRTPCiphers, + sizeof(PRUint16) * sm->ssl3.dtlsSRTPCipherCount); + ss->ssl3.dtlsSRTPCipherCount = sm->ssl3.dtlsSRTPCipherCount; ++ PORT_Memcpy(ss->ssl3.signatureAlgorithms, sm->ssl3.signatureAlgorithms, ++ sizeof(ss->ssl3.signatureAlgorithms[0]) * ++ sm->ssl3.signatureAlgorithmCount); ++ ss->ssl3.signatureAlgorithmCount = sm->ssl3.signatureAlgorithmCount; + + if (!ss->opt.useSecurity) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); +@@ -3122,6 +3377,10 @@ + } + ss->requestedCertTypes = NULL; + ss->stepDownKeyPair = NULL; ++ ++ ss->dheParams = NULL; ++ ss->dheKeyPair = NULL; ++ + ss->dbHandle = CERT_GetDefaultCertDB(); + + /* Provide default implementation of hooks */ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2016-01-13 14:18:55.633954937 +0100 +@@ -1,3 +1,4 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ + /* + * This file contains prototypes for the public SSL functions. + * +@@ -68,13 +69,35 @@ + #define kt_ecdh ssl_kea_ecdh + #define kt_kea_size ssl_kea_size + ++ ++/* Values of this enum match the SignatureAlgorithm enum from ++ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ + typedef enum { +- ssl_sign_null = 0, ++ ssl_sign_null = 0, /* "anonymous" in TLS */ + ssl_sign_rsa = 1, + ssl_sign_dsa = 2, + ssl_sign_ecdsa = 3 + } SSLSignType; + ++/* Values of this enum match the HashAlgorithm enum from ++ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ ++typedef enum { ++ /* ssl_hash_none is used internally to mean the pre-1.2 combination of MD5 ++ * and SHA1. The other values are only used in TLS 1.2. */ ++ ssl_hash_none = 0, ++ ssl_hash_md5 = 1, ++ ssl_hash_sha1 = 2, ++ ssl_hash_sha224 = 3, ++ ssl_hash_sha256 = 4, ++ ssl_hash_sha384 = 5, ++ ssl_hash_sha512 = 6 ++} SSLHashType; ++ ++typedef struct SSLSignatureAndHashAlgStr { ++ SSLHashType hashAlg; ++ SSLSignType sigAlg; ++} SSLSignatureAndHashAlg; ++ + typedef enum { + ssl_auth_null = 0, + ssl_auth_rsa = 1, +@@ -136,8 +159,31 @@ + /* compression method info */ + const char * compressionMethodName; + SSLCompressionMethod compressionMethod; ++ ++ /* The following fields are added in NSS 3.21. ++ * This field only has meaning in TLS < 1.3 and will be set to ++ * PR_FALSE in TLS 1.3. ++ */ ++ PRBool extendedMasterSecretUsed; + } SSLChannelInfo; + ++/* Preliminary channel info */ ++#define ssl_preinfo_version (1U << 0) ++#define ssl_preinfo_cipher_suite (1U << 1) ++#define ssl_preinfo_all (ssl_preinfo_version|ssl_preinfo_cipher_suite) ++ ++typedef struct SSLPreliminaryChannelInfoStr { ++ /* This is set to the length of the struct. */ ++ PRUint32 length; ++ /* A bitfield over SSLPreliminaryValueSet that describes which ++ * preliminary values are set (see ssl_preinfo_*). */ ++ PRUint32 valuesSet; ++ /* Protocol version: test (valuesSet & ssl_preinfo_version) */ ++ PRUint16 protocolVersion; ++ /* Cipher suite: test (valuesSet & ssl_preinfo_cipher_suite) */ ++ PRUint16 cipherSuite; ++} SSLPreliminaryChannelInfo; ++ + typedef struct SSLCipherSuiteInfoStr { + PRUint16 length; + PRUint16 cipherSuite; +@@ -204,6 +250,7 @@ + ssl_app_layer_protocol_xtn = 16, + ssl_signed_certificate_timestamp_xtn = 18, /* RFC 6962 */ + ssl_padding_xtn = 21, ++ ssl_extended_master_secret_xtn = 23, + ssl_session_ticket_xtn = 35, + ssl_next_proto_nego_xtn = 13172, + ssl_channel_id_xtn = 30032, +@@ -211,6 +258,16 @@ + ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ + } SSLExtensionType; + +-#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ ++#define SSL_MAX_EXTENSIONS 14 /* doesn't include ssl_padding_xtn. */ ++ ++typedef enum { ++ ssl_dhe_group_none = 0, ++ ssl_ff_dhe_2048_group = 1, ++ ssl_ff_dhe_3072_group = 2, ++ ssl_ff_dhe_4096_group = 3, ++ ssl_ff_dhe_6144_group = 4, ++ ssl_ff_dhe_8192_group = 5, ++ ssl_dhe_group_max ++} SSLDHEGroupType; + + #endif /* __sslt_h_ */ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2016-01-13 14:18:55.633954937 +0100 +@@ -12,20 +12,7 @@ + #define _DEBUG_STRING "" + #endif + +-#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) +-#define _DATE_AND_TIME "Sep 02 2008 08:00:00" +-#else +-#define _DATE_AND_TIME __DATE__ " " __TIME__ +-#endif +- +- + /* +- * Version information for the 'ident' and 'what commands +- * +- * NOTE: the first component of the concatenated rcsid string +- * must not end in a '$' to prevent rcs keyword substitution. ++ * Version information + */ +-const char __nss_ssl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING +- " " _DATE_AND_TIME " $"; +-const char __nss_ssl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING +- " " _DATE_AND_TIME; ++const char __nss_ssl_version[] = "Version: NSS " NSS_VERSION _DEBUG_STRING; From d75352c0ea4502722b86a6bef6cc10d49b7512cb Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 13 Jan 2016 14:43:47 +0100 Subject: [PATCH 026/437] Fix nss321 patch (need diff -Nur, not just -ur) --- ...ine-opensource-src-5.6.0-beta-nss321.patch | 579 ++++++++++++++++-- 1 file changed, 530 insertions(+), 49 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-nss321.patch b/qtwebengine-opensource-src-5.6.0-beta-nss321.patch index 1a5ebbd..47adf98 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-nss321.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-nss321.patch @@ -1,4 +1,4 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2016-01-13 14:18:55.587954670 +0100 @@ -695,6 +695,8 @@ @@ -18,7 +18,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secon ] sources -= [ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2016-01-13 14:18:55.588954676 +0100 @@ -1,7 +1,7 @@ @@ -78,7 +78,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ssl3_DisableNonDTLSSuites(ss); } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2016-01-13 14:18:55.588954676 +0100 @@ -46,9 +46,3 @@ @@ -91,7 +91,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p -patch -p2 < $patches_dir/norenegotiatelock.patch - -patch -p2 < $patches_dir/dh1024.patch -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2016-01-13 14:18:55.589954682 +0100 @@ -1,8 +1,8 @@ @@ -185,7 +185,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p @@ -164,6 +164,7 @@ lock_cache(void) static void ssl_DestroySID(sslSessionID *sid) -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2016-01-13 14:18:55.589954682 +0100 @@ -1,8 +1,8 @@ @@ -277,7 +277,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p return SECSuccess; /* already done. */ } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2016-01-13 14:18:55.590954688 +0100 @@ -1,8 +1,8 @@ @@ -521,7 +521,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ssl_calg_aes = 7, ssl_calg_camellia = 8, ssl_calg_seed = 9, -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2016-01-13 14:18:55.591954693 +0100 @@ -1,25 +1,25 @@ @@ -899,7 +899,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p - #endif /* __sslt_h_ */ + typedef enum { + ssl_dhe_group_none = 0, -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2016-01-13 14:18:55.591954693 +0100 @@ -1,10 +1,10 @@ @@ -973,7 +973,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p } SECStatus -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2016-01-13 14:18:55.609954798 +0100 @@ -1,8 +1,8 @@ @@ -1228,8 +1228,25 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ss->sniSocketConfig = NULL; ss->sniSocketConfigArg = NULL; ss->getClientAuthData = NULL; -Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: dh1024.patch. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch 1970-01-01 01:00:00.000000000 +0100 +@@ -1,14 +0,0 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index a67a9d1..02b0dda 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -6964,7 +6964,8 @@ ssl3_HandleServerKeyExchange(sslSocket *ss, SSL3Opaque *b, PRUint32 length) +- if (rv != SECSuccess) { +- goto loser; /* malformed. */ +- } +-- if (dh_p.len < 512/8) { +-+ if (dh_p.len < 1024/8 || +-+ (dh_p.len == 1024/8 && (dh_p.data[0] & 0x80) == 0)) { +- errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY; +- goto alert_loser; +- } +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2016-01-13 14:18:55.609954798 +0100 @@ -1,8 +1,8 @@ @@ -1263,7 +1280,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p return &ss->sec.ci.sid->peerCertStatus; } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2016-01-13 14:18:55.609954798 +0100 @@ -1,8 +1,8 @@ @@ -1356,8 +1373,26 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p - ss->dbHandle = CERT_GetDefaultCertDB(); + ss->dheParams = NULL; -Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: norenegotiatelock.patch. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch 1970-01-01 01:00:00.000000000 +0100 +@@ -1,15 +0,0 @@ +-diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c +-index f5afab7..a67a9d1 100644 +---- a/ssl/ssl3con.c +-+++ b/ssl/ssl3con.c +-@@ -5547,9 +5547,7 @@ ssl3_HandleHelloRequest(sslSocket *ss) +- return SECFailure; +- } +- if (ss->opt.enableRenegotiation == SSL_RENEGOTIATE_NEVER) { +-- ssl_GetXmitBufLock(ss); +-- rv = SSL3_SendAlert(ss, alert_warning, no_renegotiation); +-- ssl_ReleaseXmitBufLock(ss); +-+ (void)SSL3_SendAlert(ss, alert_warning, no_renegotiation); +- PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED); +- return SECFailure; +- } +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2016-01-13 14:18:55.610954804 +0100 @@ -1,8 +1,8 @@ @@ -1533,8 +1568,38 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p @@ -136,7 +136,7 @@ ssl_DestroySID(sslSessionID *sid) } -Nur in qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches: removebuildmetadata.patch. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch 1970-01-01 01:00:00.000000000 +0100 +@@ -1,27 +0,0 @@ +-diff --git a/ssl/sslver.c b/ssl/sslver.c +-index 35e0317..ea60888 100644 +---- a/ssl/sslver.c +-+++ b/ssl/sslver.c +-@@ -12,6 +12,13 @@ +- #define _DEBUG_STRING "" +- #endif +- +-+#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) +-+#define _DATE_AND_TIME "Sep 02 2008 08:00:00" +-+#else +-+#define _DATE_AND_TIME __DATE__ " " __TIME__ +-+#endif +-+ +-+ +- /* +- * Version information for the 'ident' and 'what commands +- * +-@@ -19,6 +26,6 @@ +- * must not end in a '$' to prevent rcs keyword substitution. +- */ +- const char __nss_ssl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING +-- " " __DATE__ " " __TIME__ " $"; +-+ " " _DATE_AND_TIME " $"; +- const char __nss_ssl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING +-- " " __DATE__ " " __TIME__; +-+ " " _DATE_AND_TIME; +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2016-01-13 14:18:55.610954804 +0100 @@ -1,8 +1,8 @@ @@ -1562,7 +1627,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p } extensionLength = 512 - recordLength; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2016-01-13 14:18:55.610954804 +0100 @@ -1,8 +1,8 @@ @@ -1630,7 +1695,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p return SECSuccess; } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2016-01-13 14:18:55.610954804 +0100 @@ -1,8 +1,8 @@ @@ -1664,7 +1729,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p #include "prtypes.h" -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2016-01-13 14:18:55.611954809 +0100 @@ -1,8 +1,8 @@ @@ -1699,7 +1764,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p valLen, out, outLen); } ssl_ReleaseSpecReadLock(ss); -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2016-01-13 14:18:55.611954809 +0100 @@ -1,8 +1,8 @@ @@ -1750,7 +1815,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p return rv; } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2016-01-13 14:18:55.612954815 +0100 @@ -1,18 +1,17 @@ @@ -2082,7 +2147,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p - #endif /* __sslt_h_ */ + typedef enum { + ssl_dhe_group_none = 0, -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2016-01-13 14:18:55.612954815 +0100 @@ -1,8 +1,8 @@ @@ -2108,7 +2173,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p /* we can, presume we can do all curves */ PK11_FreeSlot(slot); return PR_FALSE; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2016-01-13 14:18:55.612954815 +0100 @@ -1,8 +1,8 @@ @@ -2181,7 +2246,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ssl_GetSSL3HandshakeLock(ss); ss->vrange = *vrange; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2016-01-13 14:18:55.612954815 +0100 @@ -1,10 +1,10 @@ @@ -2267,7 +2332,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p - - /* LOCKS ??? XXX */ + static const SSLDHEGroupType ssl_default_dhe_groups[] = { -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium 2016-01-13 14:18:55.588954676 +0100 @@ -1,6 +1,6 @@ @@ -2304,7 +2369,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p Apply the patches to NSS by running the patches/applypatches.sh script. Read the comments at the top of patches/applypatches.sh for instructions. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2016-01-13 14:18:55.613954821 +0100 @@ -431,7 +431,7 @@ @@ -2316,8 +2381,424 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ssl3CipherSpec * pwSpec, const unsigned char * cr, const unsigned char * sr, -Nur in qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl: dhe-param.c. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c 2016-01-13 14:18:55.613954821 +0100 +@@ -0,0 +1,413 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++static const unsigned char ff_dhe_g2[] = { 2 }; ++ ++static const unsigned char ff_dhe_2048_p[] = { ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, ++ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, ++ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, ++ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, ++ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, ++ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, ++ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, ++ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, ++ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, ++ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, ++ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, ++ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, ++ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, ++ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, ++ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, ++ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, ++ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, ++ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, ++ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, ++ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, ++ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, ++ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, ++ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, ++ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, ++ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, ++ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, ++ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, ++ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, ++ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, ++ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++}; ++ ++static const ssl3DHParams ff_dhe_2048 = { ++ { siBuffer, (unsigned char *)ff_dhe_2048_p, sizeof(ff_dhe_2048_p) }, ++ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, ++}; ++ ++static const unsigned char ff_dhe_3072_p[] = { ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, ++ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, ++ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, ++ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, ++ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, ++ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, ++ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, ++ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, ++ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, ++ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, ++ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, ++ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, ++ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, ++ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, ++ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, ++ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, ++ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, ++ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, ++ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, ++ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, ++ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, ++ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, ++ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, ++ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, ++ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, ++ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, ++ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, ++ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, ++ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, ++ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, ++ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, ++ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, ++ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, ++ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, ++ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, ++ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, ++ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, ++ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, ++ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, ++ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, ++ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, ++ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, ++ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, ++ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, ++ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, ++ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++}; ++ ++static const ssl3DHParams ff_dhe_3072 = { ++ { siBuffer, (unsigned char *)ff_dhe_3072_p, sizeof(ff_dhe_3072_p) }, ++ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, ++}; ++ ++static const unsigned char ff_dhe_4096_p[] = { ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, ++ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, ++ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, ++ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, ++ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, ++ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, ++ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, ++ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, ++ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, ++ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, ++ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, ++ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, ++ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, ++ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, ++ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, ++ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, ++ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, ++ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, ++ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, ++ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, ++ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, ++ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, ++ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, ++ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, ++ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, ++ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, ++ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, ++ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, ++ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, ++ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, ++ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, ++ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, ++ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, ++ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, ++ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, ++ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, ++ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, ++ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, ++ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, ++ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, ++ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, ++ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, ++ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, ++ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, ++ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, ++ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, ++ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, ++ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, ++ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, ++ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, ++ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, ++ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, ++ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, ++ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, ++ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, ++ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, ++ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, ++ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, ++ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, ++ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, ++ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, ++ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++}; ++ ++static const ssl3DHParams ff_dhe_4096 = { ++ { siBuffer, (unsigned char *)ff_dhe_4096_p, sizeof(ff_dhe_4096_p) }, ++ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, ++}; ++ ++static const unsigned char ff_dhe_6144_p[] = { ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, ++ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, ++ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, ++ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, ++ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, ++ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, ++ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, ++ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, ++ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, ++ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, ++ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, ++ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, ++ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, ++ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, ++ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, ++ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, ++ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, ++ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, ++ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, ++ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, ++ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, ++ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, ++ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, ++ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, ++ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, ++ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, ++ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, ++ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, ++ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, ++ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, ++ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, ++ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, ++ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, ++ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, ++ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, ++ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, ++ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, ++ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, ++ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, ++ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, ++ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, ++ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, ++ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, ++ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, ++ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, ++ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, ++ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, ++ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, ++ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, ++ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, ++ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, ++ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, ++ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, ++ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, ++ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, ++ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, ++ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, ++ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, ++ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, ++ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, ++ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, ++ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, ++ 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, ++ 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, ++ 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, ++ 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, ++ 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, ++ 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, ++ 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, ++ 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, ++ 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, ++ 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, ++ 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, ++ 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, ++ 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, ++ 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, ++ 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, ++ 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, ++ 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, ++ 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, ++ 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, ++ 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, ++ 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, ++ 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, ++ 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, ++ 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, ++ 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, ++ 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, ++ 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, ++ 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, ++ 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, ++ 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, ++ 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, ++ 0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++}; ++ ++static const ssl3DHParams ff_dhe_6144 = { ++ { siBuffer, (unsigned char *)ff_dhe_6144_p, sizeof(ff_dhe_6144_p) }, ++ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, ++}; ++ ++static const unsigned char ff_dhe_8192_p[] = { ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, ++ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, ++ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, ++ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, ++ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, ++ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, ++ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, ++ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, ++ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, ++ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, ++ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, ++ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, ++ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, ++ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, ++ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, ++ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, ++ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, ++ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, ++ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, ++ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, ++ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, ++ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, ++ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, ++ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, ++ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, ++ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, ++ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, ++ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, ++ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, ++ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, ++ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, ++ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, ++ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, ++ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, ++ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, ++ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, ++ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, ++ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, ++ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, ++ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, ++ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, ++ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, ++ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, ++ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, ++ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, ++ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, ++ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, ++ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, ++ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, ++ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, ++ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, ++ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, ++ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, ++ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, ++ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, ++ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, ++ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, ++ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, ++ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, ++ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, ++ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, ++ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, ++ 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, ++ 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, ++ 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, ++ 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, ++ 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, ++ 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, ++ 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, ++ 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, ++ 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, ++ 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, ++ 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, ++ 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, ++ 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, ++ 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, ++ 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, ++ 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, ++ 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, ++ 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, ++ 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, ++ 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, ++ 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, ++ 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, ++ 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, ++ 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, ++ 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, ++ 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, ++ 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, ++ 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, ++ 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, ++ 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, ++ 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, ++ 0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, ++ 0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, ++ 0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, ++ 0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, ++ 0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, ++ 0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, ++ 0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, ++ 0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, ++ 0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, ++ 0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, ++ 0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, ++ 0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, ++ 0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, ++ 0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, ++ 0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, ++ 0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, ++ 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, ++ 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, ++ 0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, ++ 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, ++ 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, ++ 0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, ++ 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, ++ 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, ++ 0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, ++ 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, ++ 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, ++ 0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, ++ 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, ++ 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, ++ 0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, ++ 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, ++ 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, ++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ++}; ++ ++static const ssl3DHParams ff_dhe_8192 = { ++ { siBuffer, (unsigned char *)ff_dhe_8192_p, sizeof(ff_dhe_8192_p) }, ++ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, ++}; +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2016-01-13 14:18:55.614954827 +0100 @@ -104,9 +104,7 @@ @@ -2358,7 +2839,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p content_len - fragment_offset); PORT_Assert(fragment_len < DTLS_MAX_MTU - 12); /* Make totally sure that we are within the buffer. -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2016-01-13 14:18:55.620954862 +0100 @@ -25,6 +25,8 @@ @@ -5475,7 +5956,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ss->ssl3.initialized = PR_FALSE; SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2016-01-13 14:18:55.621954867 +0100 @@ -214,7 +214,7 @@ @@ -5622,7 +6103,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p SECStatus rv = ssl3_AppendHandshake(ss, ecList, ecListSize); if (rv != SECSuccess) return -1; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2016-01-13 14:18:55.623954879 +0100 @@ -101,6 +101,12 @@ @@ -6390,7 +6871,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ssl3_ClientHandleSignedCertTimestampXtn(sslSocket *ss, PRUint16 ex_type, SECItem *data) { -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2016-01-13 14:18:55.623954879 +0100 @@ -71,8 +71,8 @@ @@ -6404,7 +6885,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p /* ssl_DefRecv is misbehaving! this error is fatal to SSL. */ gs->state = GS_INIT; /* so we don't crash next time */ rv = SECFailure; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2016-01-13 14:18:55.623954879 +0100 @@ -218,32 +218,6 @@ @@ -6454,7 +6935,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p union { PRUint8 raw[64]; SSL3HashesIndividually s; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2016-01-13 14:18:55.624954885 +0100 @@ -304,8 +304,7 @@ @@ -6467,7 +6948,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p } } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2016-01-13 14:18:55.625954891 +0100 @@ -22,20 +22,6 @@ @@ -6594,7 +7075,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p return NSS_VersionCheck(importedVersion); } -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2016-01-13 14:18:55.625954891 +0100 @@ -70,14 +70,17 @@ @@ -6615,7 +7096,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2016-01-13 14:18:55.626954897 +0100 @@ -198,9 +198,19 @@ @@ -6641,7 +7122,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p SSL_ERROR_END_OF_LIST /* let the c compiler determine the value of this. */ } SSLErrorCodes; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2016-01-13 14:18:55.613954821 +0100 @@ -423,11 +423,29 @@ @@ -6677,7 +7158,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p -ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 134), +ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 140), "The application could not get a TLS Channel ID.") -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2016-01-13 14:18:55.614954827 +0100 @@ -185,14 +185,26 @@ @@ -6825,7 +7306,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p SSL_IMPORT SECStatus SSL_GetCipherSuiteInfo(PRUint16 cipherSuite, SSLCipherSuiteInfo *info, PRUintn len); -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2016-01-13 14:18:55.627954902 +0100 @@ -1,3 +1,4 @@ @@ -7044,7 +7525,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p #ifdef TRACE #define SSL_TRACE(msg) ssl_Trace msg -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2016-01-13 14:18:55.628954908 +0100 @@ -67,6 +67,8 @@ @@ -7145,7 +7626,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p } } return SECSuccess; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2016-01-13 14:18:55.628954908 +0100 @@ -504,7 +504,7 @@ @@ -7157,7 +7638,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p #include #include "unix_err.h" -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2016-01-13 14:18:55.628954908 +0100 @@ -67,7 +67,8 @@ @@ -7191,7 +7672,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p #endif -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2016-01-13 14:18:55.629954914 +0100 @@ -177,6 +177,7 @@ @@ -7210,7 +7691,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006B #define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0084 -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2016-01-13 14:18:55.629954914 +0100 @@ -138,6 +138,9 @@ @@ -7272,7 +7753,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p if (ss->shutdownHow & ssl_SHUTDOWN_RCV) { PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR); return PR_FAILURE; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2016-01-13 14:18:55.631954926 +0100 @@ -120,14 +120,14 @@ @@ -7411,7 +7892,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p cache->cacheMemMap = my.cacheMemMap; cache->cacheMem = my.cacheMem; -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2016-01-13 14:18:55.632954931 +0100 @@ -19,6 +19,7 @@ @@ -7767,7 +8248,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p ss->dbHandle = CERT_GetDefaultCertDB(); /* Provide default implementation of hooks */ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2016-01-13 14:18:55.633954937 +0100 @@ -1,3 +1,4 @@ @@ -7870,7 +8351,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_p +} SSLDHEGroupType; #endif /* __sslt_h_ */ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2016-01-13 14:18:55.633954937 +0100 @@ -12,20 +12,7 @@ From 4a9d03d5e8d2c3fd13d68ebcceec9a76acf7880b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 13 Jan 2016 23:39:31 +0100 Subject: [PATCH 027/437] Add missing nssoptions.h header needed by the nss321 patch File copied from upstream NSS. --- qt5-qtwebengine.spec | 3 +++ ...ensource-src-5.6.0-beta-nssoptions-h.patch | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d9d3bde..da525df 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -63,6 +63,8 @@ Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch # update the bundled patched NSS SSL implementation to NSS 3.21, matching the # system NSS (backport of https://codereview.chromium.org/1511123006) Patch7: qtwebengine-opensource-src-5.6.0-beta-nss321.patch +# add missing nssoptions.h header needed by the above, from upstream NSS +Patch8: qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -280,6 +282,7 @@ BuildArch: noarch %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf %patch7 -p1 -b .nss321 +%patch8 -p1 -b .nssoptions-h %build export STRIP=strip diff --git a/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch b/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch new file mode 100644 index 0000000..8f19296 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch @@ -0,0 +1,25 @@ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h qtwebengine-opensource-src-5.6.0-beta-nssoptions-h/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nssoptions-h/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 2016-01-13 23:34:30.880040223 +0100 +@@ -0,0 +1,21 @@ ++/* ++ * NSS utility functions ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++/* ++ * Include the default limits here ++ */ ++/* SSL default limits are here so we don't have to import a private SSL header ++ * file into NSS proper */ ++ ++/* The minimum server key sizes accepted by the clients. ++ * Not 1024 to be conservative. */ ++#define SSL_RSA_MIN_MODULUS_BITS 1023 ++/* 1023 to avoid cases where p = 2q+1 for a 512-bit q turns out to be ++ * only 1023 bits and similar. We don't have good data on whether this ++ * happens because NSS used to count bit lengths incorrectly. */ ++#define SSL_DH_MIN_P_BITS 1023 ++#define SSL_DSA_MIN_P_BITS 1023 ++ From 12c45adaf56bed79676c973f68b8d416d03fd478 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 14 Jan 2016 00:01:36 +0100 Subject: [PATCH 028/437] Add missing verref.h header needed by the nss321 patch File copied from upstream NSS. --- qt5-qtwebengine.spec | 6 +- ...pensource-src-5.6.0-beta-nss-headers.patch | 69 +++++++++++++++++++ ...ensource-src-5.6.0-beta-nssoptions-h.patch | 25 ------- 3 files changed, 72 insertions(+), 28 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index da525df..118648b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -63,8 +63,8 @@ Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch # update the bundled patched NSS SSL implementation to NSS 3.21, matching the # system NSS (backport of https://codereview.chromium.org/1511123006) Patch7: qtwebengine-opensource-src-5.6.0-beta-nss321.patch -# add missing nssoptions.h header needed by the above, from upstream NSS -Patch8: qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch +# add missing nssoptions.h and verref.h headers needed by the above, from NSS +Patch8: qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -282,7 +282,7 @@ BuildArch: noarch %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf %patch7 -p1 -b .nss321 -%patch8 -p1 -b .nssoptions-h +%patch8 -p1 -b .nss-headers %build export STRIP=strip diff --git a/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch b/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch new file mode 100644 index 0000000..f47a3c8 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch @@ -0,0 +1,69 @@ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 2016-01-13 23:34:30.880040223 +0100 +@@ -0,0 +1,21 @@ ++/* ++ * NSS utility functions ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++/* ++ * Include the default limits here ++ */ ++/* SSL default limits are here so we don't have to import a private SSL header ++ * file into NSS proper */ ++ ++/* The minimum server key sizes accepted by the clients. ++ * Not 1024 to be conservative. */ ++#define SSL_RSA_MIN_MODULUS_BITS 1023 ++/* 1023 to avoid cases where p = 2q+1 for a 512-bit q turns out to be ++ * only 1023 bits and similar. We don't have good data on whether this ++ * happens because NSS used to count bit lengths incorrectly. */ ++#define SSL_DH_MIN_P_BITS 1023 ++#define SSL_DSA_MIN_P_BITS 1023 ++ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h 2016-01-13 23:59:22.996128771 +0100 +@@ -0,0 +1,40 @@ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++/* This header is used inline in a function to ensure that a version string ++ * symbol is linked in and not optimized out. A volatile reference is added to ++ * the variable identified by NSS_VERSION_VARIABLE. ++ * ++ * Use this as follows: ++ * ++ * #define NSS_VERSION_VARIABLE __nss_ssl_version ++ * #include "verref.h" ++ */ ++ ++/* Suppress unused variable warnings. */ ++#ifdef _MSC_VER ++#pragma warning(push) ++#pragma warning(disable: 4101) ++#endif ++/* This works for both gcc and clang */ ++#if defined(__GNUC__) && !defined(NSS_NO_GCC48) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-variable" ++#endif ++ ++#ifndef NSS_VERSION_VARIABLE ++#error NSS_VERSION_VARIABLE must be set before including "verref.h" ++#endif ++{ ++ extern const char NSS_VERSION_VARIABLE[]; ++ volatile const char _nss_version_c = NSS_VERSION_VARIABLE[0]; ++} ++#undef NSS_VERSION_VARIABLE ++ ++#ifdef _MSC_VER ++#pragma warning(pop) ++#endif ++#if defined(__GNUC__) && !defined(NSS_NO_GCC48) ++#pragma GCC diagnostic pop ++#endif diff --git a/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch b/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch deleted file mode 100644 index 8f19296..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-nssoptions-h.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h qtwebengine-opensource-src-5.6.0-beta-nssoptions-h/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nssoptions-h/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 2016-01-13 23:34:30.880040223 +0100 -@@ -0,0 +1,21 @@ -+/* -+ * NSS utility functions -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+/* -+ * Include the default limits here -+ */ -+/* SSL default limits are here so we don't have to import a private SSL header -+ * file into NSS proper */ -+ -+/* The minimum server key sizes accepted by the clients. -+ * Not 1024 to be conservative. */ -+#define SSL_RSA_MIN_MODULUS_BITS 1023 -+/* 1023 to avoid cases where p = 2q+1 for a 512-bit q turns out to be -+ * only 1023 bits and similar. We don't have good data on whether this -+ * happens because NSS used to count bit lengths incorrectly. */ -+#define SSL_DH_MIN_P_BITS 1023 -+#define SSL_DSA_MIN_P_BITS 1023 -+ From 9a15e3c582902772e7876660afd06f57c4ff48d2 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 14 Jan 2016 17:37:36 +0100 Subject: [PATCH 029/437] Drop nss321 backport, do an NSS/BoringSSL "chimera build" instead * Thu Jan 14 2016 Kevin Kofler - 5.6.0-0.13.beta - Drop nss321 backport (and the related nss-headers patch), it did not help - Do an NSS/BoringSSL "chimera build" as will be the default in Chromium 47 - Update License accordingly (add "OpenSSL") - Fix the "chimera build" to call EnsureNSSHttpIOInit (backport from Chromium) --- qt5-qtwebengine.spec | 39 +- ...urce-src-5.6.0-beta-chimera-nss-init.patch | 29 + ...-opensource-src-5.6.0-beta-linux-pri.patch | 19 +- ...pensource-src-5.6.0-beta-nss-headers.patch | 69 - ...ine-opensource-src-5.6.0-beta-nss321.patch | 8379 ----------------- 5 files changed, 69 insertions(+), 8466 deletions(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-nss321.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 118648b..2747598 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,12 +24,12 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.12.beta%{?dist} +Release: 0.13.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html # The other licenses are from Chromium and the code it bundles -License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and (MPLv1.1 or GPLv2 or LGPLv2) +License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg # wget http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/submodules/qtwebengine-opensource-src-5.6.0-beta.7z @@ -41,7 +41,8 @@ Source2: clean_ffmpeg.sh Source3: process_ffmpeg_gyp.py # do not compile with -Wno-format, which also bypasses -Werror-format-security Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch -# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +# some tweaks to linux.pri (system libs, link libpci, run unbundling script, +# do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment) Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch @@ -60,11 +61,9 @@ Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch -# update the bundled patched NSS SSL implementation to NSS 3.21, matching the -# system NSS (backport of https://codereview.chromium.org/1511123006) -Patch7: qtwebengine-opensource-src-5.6.0-beta-nss321.patch -# add missing nssoptions.h and verref.h headers needed by the above, from NSS -Patch8: qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch +# fix the NSS/BoringSSL "chimera build" to call EnsureNSSHttpIOInit +# backport of https://codereview.chromium.org/1385473003 +Patch7: qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -164,6 +163,15 @@ Provides: bundled(chromium) = 45 # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, # except where specified otherwise. Provides: bundled(angle) = 2422 +# Google's fork of OpenSSL +# We cannot build against NSS instead because it no longer works with NSS 3.21: +# HTTPS on, ironically, Google's sites (Google, YouTube, etc.) stops working +# completely and produces only ERR_SSL_PROTOCOL_ERROR errors: +# http://kaosx.us/phpBB3/viewtopic.php?t=1235 +# https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1520568 +# So we have to do what Chromium 47 now defaults to: a "chimera build", i.e., +# use the BoringSSL code and the system NSS certificates. +Provides: bundled(boringssl) Provides: bundled(brotli) # Don't get too excited. MPEG and other legally problematic stuff is stripped # out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and process_ffmpeg_gyp.py. @@ -220,12 +228,6 @@ Provides: bundled(xdg-user-dirs) = 0.10 # Check src/3rdparty/chromium/third_party/net/*/README.chromium for version # numbers, except where specified otherwise. Provides: bundled(mozilla_security_manager) = 1.9.2 -# Ewww... Chromium uses the system NSS, but bundles a heavily patched version of -# its SSL implementation. This might crash and burn sooner or later! -# See also Patch7, which updates it from 3.19 to 3.21, because the mix of -# versions was indeed causing issues. (Ironically, HTTPS not working on Google's -# own sites!) -Provides: bundled(nss) = 3.21 # Bundled in src/3rdparty/chromium/url/third_party: # Check src/3rdparty/chromium/third_party/url/*/README.chromium for version @@ -281,8 +283,7 @@ BuildArch: noarch %patch4 -p1 -b .no-neon %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf -%patch7 -p1 -b .nss321 -%patch8 -p1 -b .nss-headers +%patch7 -p1 -b .chimera-nss-init %build export STRIP=strip @@ -352,6 +353,12 @@ popd %changelog +* Thu Jan 14 2016 Kevin Kofler - 5.6.0-0.13.beta +- Drop nss321 backport (and the related nss-headers patch), it did not help +- Do an NSS/BoringSSL "chimera build" as will be the default in Chromium 47 +- Update License accordingly (add "OpenSSL") +- Fix the "chimera build" to call EnsureNSSHttpIOInit (backport from Chromium) + * Wed Jan 13 2016 Kevin Kofler - 5.6.0-0.12.beta - Update forked NSS SSL code to 3.21, match system NSS (backport from Chromium) diff --git a/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch b/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch new file mode 100644 index 0000000..f6dbbdc --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch @@ -0,0 +1,29 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc 2016-01-14 17:11:38.432633534 +0100 +@@ -57,6 +57,10 @@ + #include "net/ssl/ssl_platform_key.h" + #endif + ++#if defined(USE_NSS_CERTS) || defined(OS_IOS) ++#include "net/cert_net/nss_ocsp.h" ++#endif ++ + namespace net { + + namespace { +@@ -795,6 +799,14 @@ + DCHECK(!ssl_); + DCHECK(!transport_bio_); + ++#if defined(USE_NSS_CERTS) || defined(OS_IOS) ++ if (ssl_config_.cert_io_enabled) { ++ // TODO(davidben): Move this out of SSLClientSocket. See ++ // https://crbug.com/539520. ++ EnsureNSSHttpIOInit(); ++ } ++#endif ++ + SSLContext* context = SSLContext::GetInstance(); + crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); + diff --git a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch index 7280fb6..cf24289 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch @@ -1,7 +1,22 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri --- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-06 04:43:23.115923478 +0100 -@@ -40,6 +40,28 @@ ++++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-14 17:31:05.765975551 +0100 +@@ -18,7 +18,13 @@ + use_kerberos=0 \ + use_pango=0 + +-!use?(nss) { ++use?(nss) { ++# do a "chimera build" (BoringSSL code, NSS certs): This is the default in ++# Chromium 47+, and it is the only variant that works with NSS 3.21. ++ GYP_CONFIG += use_nss_certs=1 \ ++ use_openssl=1 \ ++ use_openssl_certs=0 ++} else { + GYP_CONFIG += use_nss_certs=0 \ + use_openssl=1 \ + use_openssl_certs=1 +@@ -40,6 +46,28 @@ use?(system_snappy): GYP_CONFIG += use_system_snappy=1 use?(system_speex): GYP_CONFIG += use_system_speex=1 use?(system_vpx): GYP_CONFIG += use_system_libvpx=1 diff --git a/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch b/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch deleted file mode 100644 index f47a3c8..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-nss-headers.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/nssoptions.h 2016-01-13 23:34:30.880040223 +0100 -@@ -0,0 +1,21 @@ -+/* -+ * NSS utility functions -+ * -+ * This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+/* -+ * Include the default limits here -+ */ -+/* SSL default limits are here so we don't have to import a private SSL header -+ * file into NSS proper */ -+ -+/* The minimum server key sizes accepted by the clients. -+ * Not 1024 to be conservative. */ -+#define SSL_RSA_MIN_MODULUS_BITS 1023 -+/* 1023 to avoid cases where p = 2q+1 for a 512-bit q turns out to be -+ * only 1023 bits and similar. We don't have good data on whether this -+ * happens because NSS used to count bit lengths incorrectly. */ -+#define SSL_DH_MIN_P_BITS 1023 -+#define SSL_DSA_MIN_P_BITS 1023 -+ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss-headers/src/3rdparty/chromium/net/third_party/nss/ssl/bodge/verref.h 2016-01-13 23:59:22.996128771 +0100 -@@ -0,0 +1,40 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+/* This header is used inline in a function to ensure that a version string -+ * symbol is linked in and not optimized out. A volatile reference is added to -+ * the variable identified by NSS_VERSION_VARIABLE. -+ * -+ * Use this as follows: -+ * -+ * #define NSS_VERSION_VARIABLE __nss_ssl_version -+ * #include "verref.h" -+ */ -+ -+/* Suppress unused variable warnings. */ -+#ifdef _MSC_VER -+#pragma warning(push) -+#pragma warning(disable: 4101) -+#endif -+/* This works for both gcc and clang */ -+#if defined(__GNUC__) && !defined(NSS_NO_GCC48) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wunused-variable" -+#endif -+ -+#ifndef NSS_VERSION_VARIABLE -+#error NSS_VERSION_VARIABLE must be set before including "verref.h" -+#endif -+{ -+ extern const char NSS_VERSION_VARIABLE[]; -+ volatile const char _nss_version_c = NSS_VERSION_VARIABLE[0]; -+} -+#undef NSS_VERSION_VARIABLE -+ -+#ifdef _MSC_VER -+#pragma warning(pop) -+#endif -+#if defined(__GNUC__) && !defined(NSS_NO_GCC48) -+#pragma GCC diagnostic pop -+#endif diff --git a/qtwebengine-opensource-src-5.6.0-beta-nss321.patch b/qtwebengine-opensource-src-5.6.0-beta-nss321.patch deleted file mode 100644 index 47adf98..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-nss321.patch +++ /dev/null @@ -1,8379 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/build/secondary/third_party/nss/BUILD.gn 2016-01-13 14:18:55.587954670 +0100 -@@ -695,6 +695,8 @@ - "nss/lib/freebl/win_rand.c", - "nss/lib/nss/nss.h", - "nss/lib/nss/nssinit.c", -+ "nss/lib/nss/nssoptions.c", -+ "nss/lib/nss/nssoptions.h", - "nss/lib/nss/nssrenam.h", - "nss/lib/nss/utilwrap.c", - "nss/lib/pk11wrap/debug_module.c", -@@ -859,6 +861,7 @@ - "nss/lib/util/utilpars.h", - "nss/lib/util/utilparst.h", - "nss/lib/util/utilrename.h", -+ "nss/lib/util/verref.h", - ] - - sources -= [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/aesgcmchromium.patch 2016-01-13 14:18:55.588954676 +0100 -@@ -1,7 +1,7 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 1167d6d..dabe333 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index c5cb1eb..299e414 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c - @@ -8,6 +8,7 @@ - - /* TODO(ekr): Implement HelloVerifyRequest on server side. OK for now. */ -@@ -10,7 +10,7 @@ - #include "cert.h" - #include "ssl.h" - #include "cryptohi.h" /* for DSAU_ stuff */ --@@ -44,6 +45,9 @@ -+@@ -46,6 +47,9 @@ - #ifdef NSS_ENABLE_ZLIB - #include "zlib.h" - #endif -@@ -20,7 +20,7 @@ - - #ifndef PK11_SETATTRS - #define PK11_SETATTRS(x,id,v,l) (x)->type = (id); \ --@@ -1874,6 +1878,63 @@ ssl3_BuildRecordPseudoHeader(unsigned char *out, -+@@ -1897,6 +1901,63 @@ ssl3_BuildRecordPseudoHeader(unsigned char *out, - return 13; - } - -@@ -84,7 +84,7 @@ - static SECStatus - ssl3_AESGCM(ssl3KeyMaterial *keys, - PRBool doDecrypt, --@@ -1925,10 +1986,10 @@ ssl3_AESGCM(ssl3KeyMaterial *keys, -+@@ -1948,10 +2009,10 @@ ssl3_AESGCM(ssl3KeyMaterial *keys, - gcmParams.ulTagBits = tagSize * 8; - - if (doDecrypt) { -@@ -97,7 +97,7 @@ - maxout, in, inlen); - } - *outlen += (int) uOutLen; --@@ -5162,6 +5223,10 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5337,6 +5398,10 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - ssl3_DisableNonDTLSSuites(ss); - } - -@@ -108,7 +108,7 @@ - /* how many suites are permitted by policy and user preference? */ - num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE); - if (!num_suites) { --@@ -8172,6 +8237,10 @@ ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -8400,6 +8465,10 @@ ssl3_HandleClientHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - ssl3_DisableNonDTLSSuites(ss); - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/applypatches.sh 2016-01-13 14:18:55.588954676 +0100 -@@ -46,9 +46,3 @@ - patch -p2 < $patches_dir/nssrwlock.patch - - patch -p2 < $patches_dir/reorderextensions.patch -- --patch -p2 < $patches_dir/removebuildmetadata.patch -- --patch -p2 < $patches_dir/norenegotiatelock.patch -- --patch -p2 < $patches_dir/dh1024.patch -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachecerts.patch 2016-01-13 14:18:55.589954682 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 163572c..60af5b0 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -43,6 +43,7 @@ -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 8f1c547..9aaf601 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -45,6 +45,7 @@ - - static SECStatus ssl3_AuthCertificate(sslSocket *ss); - static void ssl3_CleanupPeerCerts(sslSocket *ss); -@@ -10,15 +10,15 @@ - static PK11SymKey *ssl3_GenerateRSAPMS(sslSocket *ss, ssl3CipherSpec *spec, - PK11SlotInfo * serverKeySlot); - static SECStatus ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms); --@@ -6549,6 +6550,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -6751,6 +6752,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - /* copy the peer cert from the SID */ - if (sid->peerCert != NULL) { - ss->sec.peerCert = CERT_DupCertificate(sid->peerCert); - + ssl3_CopyPeerCertsFromSID(ss, sid); - } - -- /* NULL value for PMS signifies re-use of the old MS */ --@@ -8140,6 +8142,7 @@ compression_found: -+ /* NULL value for PMS because we are reusing the old MS */ -+@@ -8405,6 +8407,7 @@ compression_found: - ss->sec.ci.sid = sid; - if (sid->peerCert != NULL) { - ss->sec.peerCert = CERT_DupCertificate(sid->peerCert); -@@ -26,7 +26,7 @@ - } - - /* --@@ -9763,6 +9766,44 @@ ssl3_CleanupPeerCerts(sslSocket *ss) -+@@ -10389,6 +10392,44 @@ ssl3_CleanupPeerCerts(sslSocket *ss) - ss->ssl3.peerCertChain = NULL; - } - -@@ -71,7 +71,7 @@ - /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete - * ssl3 CertificateStatus message. - * Caller must hold Handshake and RecvBuf locks. --@@ -10041,6 +10082,7 @@ ssl3_AuthCertificate(sslSocket *ss) -+@@ -10669,6 +10710,7 @@ ssl3_AuthCertificate(sslSocket *ss) - } - - ss->sec.ci.sid->peerCert = CERT_DupCertificate(ss->sec.peerCert); -@@ -79,11 +79,11 @@ - - if (!ss->sec.isServer) { - CERTCertificate *cert = ss->sec.peerCert; --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 1b38a52..086f6d2 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -597,6 +597,8 @@ typedef enum { never_cached, -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index ad31aae..9dcc29e 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -608,6 +608,8 @@ typedef enum { never_cached, - invalid_cache /* no longer in any cache. */ - } Cached; - -@@ -92,7 +92,7 @@ - struct sslSessionIDStr { - /* The global cache lock must be held when accessing these members when the - * sid is in any cache. --@@ -611,6 +613,7 @@ struct sslSessionIDStr { -+@@ -622,6 +624,7 @@ struct sslSessionIDStr { - */ - - CERTCertificate * peerCert; -@@ -100,10 +100,10 @@ - SECItemArray peerCertStatus; /* client only */ - const char * peerID; /* client only */ - const char * urlSvrName; /* client only */ --diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c -+diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c - index 2e861f1..be11008 100644 ----- a/ssl/sslnonce.c --+++ b/ssl/sslnonce.c -+--- a/lib/ssl/sslnonce.c -++++ b/lib/ssl/sslnonce.c - @@ -164,6 +164,7 @@ lock_cache(void) - static void - ssl_DestroySID(sslSessionID *sid) -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cachelocks.patch 2016-01-13 14:18:55.589954682 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 6819b03..6a4a443 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -5748,7 +5748,6 @@ SSL3_ShutdownServerCache(void) -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 2533679..ba3d012 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -5921,7 +5921,6 @@ SSL3_ShutdownServerCache(void) - } - - PZ_Unlock(symWrapKeysLock); -@@ -10,7 +10,7 @@ - return SECSuccess; - } - --@@ -5800,7 +5799,7 @@ getWrappingKey( sslSocket * ss, -+@@ -5973,7 +5972,7 @@ getWrappingKey( sslSocket * ss, - - pSymWrapKey = &symWrapKeys[symWrapMechIndex].symWrapKey[exchKeyType]; - -@@ -19,11 +19,11 @@ - - PZ_Lock(symWrapKeysLock); - --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 88b2eba..c4c87b4 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1924,9 +1924,7 @@ extern SECStatus ssl_InitSymWrapKeysLock(void); -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index d5f326f..d53c446 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1957,9 +1957,7 @@ extern SECStatus ssl_InitSymWrapKeysLock(void); - - extern SECStatus ssl_FreeSymWrapKeysLock(void); - -@@ -34,10 +34,10 @@ - - /***************** platform client auth ****************/ - --diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c -+diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c - index 1326a8b..c45849d 100644 ----- a/ssl/sslnonce.c --+++ b/ssl/sslnonce.c -+--- a/lib/ssl/sslnonce.c -++++ b/lib/ssl/sslnonce.c - @@ -35,91 +35,55 @@ static PZLock * cacheLock = NULL; - #define LOCK_CACHE lock_cache() - #define UNLOCK_CACHE PZ_Unlock(cacheLock) -@@ -204,11 +204,11 @@ - PZ_Lock(cacheLock); - } - --diff --git a/ssl/sslsnce.c b/ssl/sslsnce.c --index 4d9ef38..3279200 100644 ----- a/ssl/sslsnce.c --+++ b/ssl/sslsnce.c --@@ -1352,7 +1352,7 @@ SSL_ConfigServerSessionIDCache( int maxCacheEntries, -+diff --git a/lib/ssl/sslsnce.c b/lib/ssl/sslsnce.c -+index f31b2e9..3856c13 100644 -+--- a/lib/ssl/sslsnce.c -++++ b/lib/ssl/sslsnce.c -+@@ -1363,7 +1363,7 @@ SSL_ConfigServerSessionIDCache( int maxCacheEntries, - PRUint32 ssl3_timeout, - const char * directory) - { -@@ -217,7 +217,7 @@ - return SSL_ConfigServerSessionIDCacheInstance(&globalCache, - maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE); - } --@@ -1466,7 +1466,7 @@ SSL_ConfigServerSessionIDCacheWithOpt( -+@@ -1477,7 +1477,7 @@ SSL_ConfigServerSessionIDCacheWithOpt( - PRBool enableMPCache) - { - if (!enableMPCache) { -@@ -226,7 +226,7 @@ - return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, - ssl2_timeout, ssl3_timeout, directory, PR_FALSE, - maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); --@@ -1511,7 +1511,7 @@ SSL_InheritMPServerSIDCacheInstance(cacheDesc *cache, const char * envString) -+@@ -1521,7 +1521,7 @@ SSL_InheritMPServerSIDCacheInstance(cacheDesc *cache, const char * envString) - return SECSuccess; /* already done. */ - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/chacha20poly1305.patch 2016-01-13 14:18:55.590954688 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index dabe333..6819b03 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -41,6 +41,21 @@ -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 299e414..2533679 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -43,6 +43,21 @@ - #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) - #endif - -@@ -24,16 +24,16 @@ - #include - #ifdef NSS_ENABLE_ZLIB - #include "zlib.h" --@@ -105,6 +120,8 @@ static ssl3CipherSuiteCfg cipherSuites[ssl_V3_SUITES_IMPLEMENTED] = { -+@@ -110,6 +125,8 @@ static ssl3CipherSuiteCfg cipherSuites[ssl_V3_SUITES_IMPLEMENTED] = { - /* cipher_suite policy enabled isPresent */ - - #ifndef NSS_DISABLE_ECC - + { TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - + { TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -+ { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA is out of order to work around --@@ -296,6 +313,7 @@ static const ssl3BulkCipherDef bulk_cipher_defs[] = { -+@@ -307,6 +324,7 @@ static const ssl3BulkCipherDef bulk_cipher_defs[] = { - {cipher_camellia_256, calg_camellia, 32,32, type_block, 16,16, 0, 0}, - {cipher_seed, calg_seed, 16,16, type_block, 16,16, 0, 0}, - {cipher_aes_128_gcm, calg_aes_gcm, 16,16, type_aead, 4, 0,16, 8}, -@@ -41,16 +41,16 @@ - {cipher_missing, calg_null, 0, 0, type_stream, 0, 0, 0, 0}, - }; - --@@ -422,6 +440,8 @@ static const ssl3CipherSuiteDef cipher_suite_defs[] = -+@@ -433,6 +451,8 @@ static const ssl3CipherSuiteDef cipher_suite_defs[] = - {TLS_RSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_rsa}, - {TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_ecdhe_rsa}, - {TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_ecdhe_ecdsa}, - + {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_rsa}, - + {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_ecdsa}, - -- #ifndef NSS_DISABLE_ECC -- {TLS_ECDH_ECDSA_WITH_NULL_SHA, cipher_null, mac_sha, kea_ecdh_ecdsa}, --@@ -487,6 +507,7 @@ static const SSLCipher2Mech alg2Mech[] = { -+ {TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_dhe_dss}, -+ {TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, cipher_aes_128, hmac_sha256, kea_dhe_dss}, -+@@ -502,6 +522,7 @@ static const SSLCipher2Mech alg2Mech[] = { - { calg_camellia , CKM_CAMELLIA_CBC }, - { calg_seed , CKM_SEED_CBC }, - { calg_aes_gcm , CKM_AES_GCM }, -@@ -58,7 +58,7 @@ - /* { calg_init , (CK_MECHANISM_TYPE)0x7fffffffL } */ - }; - --@@ -662,6 +683,8 @@ ssl3_CipherSuiteAllowedForVersionRange( -+@@ -679,6 +700,8 @@ ssl3_CipherSuiteAllowedForVersionRange( - case TLS_RSA_WITH_NULL_SHA256: - return vrange->max == SSL_LIBRARY_VERSION_TLS_1_2; - -@@ -67,7 +67,7 @@ - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: --@@ -2070,6 +2093,46 @@ ssl3_AESGCMBypass(ssl3KeyMaterial *keys, -+@@ -2093,6 +2116,46 @@ ssl3_AESGCMBypass(ssl3KeyMaterial *keys, - } - #endif - -@@ -114,7 +114,7 @@ - /* Initialize encryption and MAC contexts for pending spec. - * Master Secret already is derived. - * Caller holds Spec write lock. --@@ -2103,13 +2166,17 @@ ssl3_InitPendingContextsPKCS11(sslSocket *ss) -+@@ -2126,13 +2189,17 @@ ssl3_InitPendingContextsPKCS11(sslSocket *ss) - pwSpec->client.write_mac_context = NULL; - pwSpec->server.write_mac_context = NULL; - -@@ -134,11 +134,11 @@ - return SECSuccess; - } - --diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c --index 9b91270..31e0774 100644 ----- a/ssl/ssl3ecc.c --+++ b/ssl/ssl3ecc.c --@@ -921,6 +921,7 @@ static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { -+diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c -+index cf8e741..ab5ab14 100644 -+--- a/lib/ssl/ssl3ecc.c -++++ b/lib/ssl/ssl3ecc.c -+@@ -926,6 +926,7 @@ static const ssl3CipherSuite ecdhe_ecdsa_suites[] = { - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, -@@ -146,7 +146,7 @@ - TLS_ECDHE_ECDSA_WITH_NULL_SHA, - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - 0 /* end of list marker */ --@@ -932,6 +933,7 @@ static const ssl3CipherSuite ecdhe_rsa_suites[] = { -+@@ -937,6 +938,7 @@ static const ssl3CipherSuite ecdhe_rsa_suites[] = { - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, -@@ -154,7 +154,7 @@ - TLS_ECDHE_RSA_WITH_NULL_SHA, - TLS_ECDHE_RSA_WITH_RC4_128_SHA, - 0 /* end of list marker */ --@@ -944,6 +946,7 @@ static const ssl3CipherSuite ecSuites[] = { -+@@ -949,6 +951,7 @@ static const ssl3CipherSuite ecSuites[] = { - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, -@@ -162,7 +162,7 @@ - TLS_ECDHE_ECDSA_WITH_NULL_SHA, - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, --@@ -951,6 +954,7 @@ static const ssl3CipherSuite ecSuites[] = { -+@@ -956,6 +959,7 @@ static const ssl3CipherSuite ecSuites[] = { - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, -@@ -170,10 +170,10 @@ - TLS_ECDHE_RSA_WITH_NULL_SHA, - TLS_ECDHE_RSA_WITH_RC4_128_SHA, - TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, --diff --git a/ssl/sslenum.c b/ssl/sslenum.c --index 09ce43f..a036627 100644 ----- a/ssl/sslenum.c --+++ b/ssl/sslenum.c -+diff --git a/lib/ssl/sslenum.c b/lib/ssl/sslenum.c -+index f69aed2..b4a8844 100644 -+--- a/lib/ssl/sslenum.c -++++ b/lib/ssl/sslenum.c - @@ -37,17 +37,21 @@ - * - * Exception: Because some servers ignore the high-order byte of the cipher -@@ -199,11 +199,11 @@ - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA must appear before --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index ea71975..88b2eba 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -65,6 +65,7 @@ typedef SSLSignType SSL3SignType; -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 60dd243..d5f326f 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -66,6 +66,7 @@ typedef SSLSignType SSL3SignType; - #define calg_camellia ssl_calg_camellia - #define calg_seed ssl_calg_seed - #define calg_aes_gcm ssl_calg_aes_gcm -@@ -211,16 +211,16 @@ - - #define mac_null ssl_mac_null - #define mac_md5 ssl_mac_md5 --@@ -299,7 +300,7 @@ typedef struct { -+@@ -301,7 +302,7 @@ typedef struct { - } ssl3CipherSuiteCfg; - - #ifndef NSS_DISABLE_ECC ---#define ssl_V3_SUITES_IMPLEMENTED 61 --+#define ssl_V3_SUITES_IMPLEMENTED 63 -+-#define ssl_V3_SUITES_IMPLEMENTED 64 -++#define ssl_V3_SUITES_IMPLEMENTED 66 - #else -- #define ssl_V3_SUITES_IMPLEMENTED 37 -+ #define ssl_V3_SUITES_IMPLEMENTED 40 - #endif /* NSS_DISABLE_ECC */ --@@ -485,6 +486,7 @@ typedef enum { -+@@ -495,6 +496,7 @@ typedef enum { - cipher_camellia_256, - cipher_seed, - cipher_aes_128_gcm, -@@ -228,11 +228,11 @@ - cipher_missing /* reserved for no such supported cipher */ - /* This enum must match ssl3_cipherName[] in ssl3con.c. */ - } SSL3BulkCipher; --diff --git a/ssl/sslinfo.c b/ssl/sslinfo.c --index ba230d2..845d9f0 100644 ----- a/ssl/sslinfo.c --+++ b/ssl/sslinfo.c --@@ -110,6 +110,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len) -+diff --git a/lib/ssl/sslinfo.c b/lib/ssl/sslinfo.c -+index 7048eb8..bef3190 100644 -+--- a/lib/ssl/sslinfo.c -++++ b/lib/ssl/sslinfo.c -+@@ -148,6 +148,7 @@ SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, - #define C_NULL "NULL", calg_null - #define C_SJ "SKIPJACK", calg_sj - #define C_AESGCM "AES-GCM", calg_aes_gcm -@@ -240,7 +240,7 @@ - - #define B_256 256, 256, 256 - #define B_128 128, 128, 128 --@@ -188,12 +189,14 @@ static const SSLCipherSuiteInfo suiteInfo[] = { -+@@ -229,12 +230,14 @@ static const SSLCipherSuiteInfo suiteInfo[] = { - {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA, 1, 0, 0, }, - {0,CS(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), S_ECDSA, K_ECDHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), S_ECDSA, K_ECDHE, C_AES, B_256, M_SHA, 1, 0, 0, }, -@@ -255,11 +255,11 @@ - - {0,CS(TLS_ECDHE_RSA_WITH_NULL_SHA), S_RSA, K_ECDHE, C_NULL, B_0, M_SHA, 0, 0, 0, }, - {0,CS(TLS_ECDHE_RSA_WITH_RC4_128_SHA), S_RSA, K_ECDHE, C_RC4, B_128, M_SHA, 0, 0, 0, }, --diff --git a/ssl/sslproto.h b/ssl/sslproto.h --index e02442c..dc653c9 100644 ----- a/ssl/sslproto.h --+++ b/ssl/sslproto.h --@@ -258,6 +258,9 @@ -+diff --git a/lib/ssl/sslproto.h b/lib/ssl/sslproto.h -+index 2db47a5..36ae6c9 100644 -+--- a/lib/ssl/sslproto.h -++++ b/lib/ssl/sslproto.h -+@@ -260,6 +260,9 @@ - #define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F - #define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031 - -@@ -269,11 +269,11 @@ - /* Netscape "experimental" cipher suites. */ - #define SSL_RSA_OLDFIPS_WITH_3DES_EDE_CBC_SHA 0xffe0 - #define SSL_RSA_OLDFIPS_WITH_DES_CBC_SHA 0xffe1 --diff --git a/ssl/sslt.h b/ssl/sslt.h --index 430d216..fe0ad07 100644 ----- a/ssl/sslt.h --+++ b/ssl/sslt.h --@@ -94,7 +94,8 @@ typedef enum { -+diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h -+index 5593579..a2eff62 100644 -+--- a/lib/ssl/sslt.h -++++ b/lib/ssl/sslt.h -+@@ -117,7 +117,8 @@ typedef enum { - ssl_calg_aes = 7, - ssl_calg_camellia = 8, - ssl_calg_seed = 9, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/channelid.patch 2016-01-13 14:18:55.591954693 +0100 -@@ -1,25 +1,25 @@ --diff --git a/ssl/SSLerrs.h b/ssl/SSLerrs.h --index 174037b..81da41c 100644 ----- a/ssl/SSLerrs.h --+++ b/ssl/SSLerrs.h --@@ -422,3 +422,12 @@ ER3(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL, (SSL_ERROR_BASE + 130), -- ER3(SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT, (SSL_ERROR_BASE + 131), -- "The server rejected the handshake because the client downgraded to a lower " -- "TLS version than the server supports.") -+diff --git a/lib/ssl/SSLerrs.h b/lib/ssl/SSLerrs.h -+index 6028396..3d21ab8 100644 -+--- a/lib/ssl/SSLerrs.h -++++ b/lib/ssl/SSLerrs.h -+@@ -440,3 +440,12 @@ ER3(SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 136), -+ -+ ER3(SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 137), -+ "The peer tried to resume with an unexpected extended_master_secret extension") - + --+ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 132), -++ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 138), - +"SSL received a malformed TLS Channel ID extension.") - + --+ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 133), -++ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 139), - +"The application provided an invalid TLS Channel ID key.") - + --+ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 134), -++ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 140), - +"The application could not get a TLS Channel ID.") --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 593dd00..716537d 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -1025,6 +1025,34 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 85ced8a..120c257 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -1135,6 +1135,34 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, - SSL_IMPORT SECStatus SSL_HandshakeResumedSession(PRFileDesc *fd, - PRBool *last_handshake_resumed); - -@@ -54,11 +54,11 @@ - /* - ** How long should we wait before retransmitting the next flight of - ** the DTLS handshake? Returns SECFailure if not DTLS or not in a --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 29e8f1c..c0e8e79 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -55,6 +55,7 @@ static SECStatus ssl3_SendCertificateStatus( sslSocket *ss); -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 304e03b..2ae8ce9 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -57,6 +57,7 @@ static SECStatus ssl3_SendCertificateStatus( sslSocket *ss); - static SECStatus ssl3_SendEmptyCertificate( sslSocket *ss); - static SECStatus ssl3_SendCertificateRequest(sslSocket *ss); - static SECStatus ssl3_SendNextProto( sslSocket *ss); -@@ -66,7 +66,7 @@ - static SECStatus ssl3_SendFinished( sslSocket *ss, PRInt32 flags); - static SECStatus ssl3_SendServerHello( sslSocket *ss); - static SECStatus ssl3_SendServerHelloDone( sslSocket *ss); --@@ -6296,6 +6297,15 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -6470,6 +6471,15 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - } - #endif /* NSS_PLATFORM_CLIENT_AUTH */ - -@@ -82,7 +82,7 @@ - temp = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); - if (temp < 0) { - goto loser; /* alert has been sent */ --@@ -6578,7 +6588,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -6780,7 +6790,7 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - if (rv != SECSuccess) { - goto alert_loser; /* err code was set */ - } -@@ -91,9 +91,9 @@ - } while (0); - - if (sid_match) --@@ -6613,6 +6623,27 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -- } else { -- ss->ssl3.hs.ws = wait_cert_request; -+@@ -6819,6 +6829,27 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+ PORT_Assert(ss->ssl3.hs.kea_def->ephemeral); -+ ss->ssl3.hs.ws = wait_server_key; - } - + - +winner: -@@ -119,7 +119,7 @@ - return SECSuccess; - - alert_loser: --@@ -7565,7 +7596,14 @@ ssl3_SendClientSecondRound(sslSocket *ss) -+@@ -7774,7 +7805,14 @@ ssl3_SendClientSecondRound(sslSocket *ss) - if (rv != SECSuccess) { - goto loser; /* err code was set. */ - } -@@ -134,7 +134,7 @@ - if (ss->opt.enableFalseStart) { - if (!ss->ssl3.hs.authCertificatePending) { - /* When we fix bug 589047, we will need to know whether we are --@@ -7602,6 +7640,33 @@ ssl3_SendClientSecondRound(sslSocket *ss) -+@@ -7811,6 +7849,33 @@ ssl3_SendClientSecondRound(sslSocket *ss) - - ssl_ReleaseXmitBufLock(ss); /*******************************/ - -@@ -168,7 +168,7 @@ - if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) - ss->ssl3.hs.ws = wait_new_session_ticket; - else --@@ -10590,6 +10655,184 @@ ssl3_RecordKeyLog(sslSocket *ss) -+@@ -11264,6 +11329,184 @@ ssl3_RecordKeyLog(sslSocket *ss) - } - - /* called from ssl3_SendClientSecondRound -@@ -353,7 +353,7 @@ - * ssl3_HandleClientHello - * ssl3_HandleFinished - */ --@@ -10849,11 +11092,16 @@ ssl3_HandleFinished(sslSocket *ss, SSL3Opaque *b, PRUint32 length, -+@@ -11531,11 +11774,16 @@ ssl3_HandleFinished(sslSocket *ss, SSL3Opaque *b, PRUint32 length, - flags = ssl_SEND_FLAG_FORCE_INTO_BUFFER; - } - -@@ -374,7 +374,7 @@ - } - - if (IS_DTLS(ss)) { --@@ -12333,6 +12581,11 @@ ssl3_DestroySSL3Info(sslSocket *ss) -+@@ -13095,6 +13343,11 @@ ssl3_DestroySSL3Info(sslSocket *ss) - ssl_FreePlatformKey(ss->ssl3.platformClientKey); - #endif /* NSS_PLATFORM_CLIENT_AUTH */ - -@@ -386,10 +386,10 @@ - if (ss->ssl3.peerCertArena != NULL) - ssl3_CleanupPeerCerts(ss); - --diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c --index 0a2288a..4d17587 100644 ----- a/ssl/ssl3ext.c --+++ b/ssl/ssl3ext.c -+diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c -+index 5661a5c..78825cb 100644 -+--- a/lib/ssl/ssl3ext.c -++++ b/lib/ssl/ssl3ext.c - @@ -73,6 +73,10 @@ static SECStatus ssl3_ClientHandleUseSRTPXtn(sslSocket * ss, PRUint16 ex_type, - SECItem *data); - static SECStatus ssl3_ServerHandleUseSRTPXtn(sslSocket * ss, PRUint16 ex_type, -@@ -401,15 +401,15 @@ - static PRInt32 ssl3_ServerSendStatusRequestXtn(sslSocket * ss, - PRBool append, PRUint32 maxBytes); - static SECStatus ssl3_ServerHandleStatusRequestXtn(sslSocket *ss, --@@ -269,6 +273,7 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { -+@@ -276,6 +280,7 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { - { ssl_next_proto_nego_xtn, &ssl3_ClientHandleNextProtoNegoXtn }, - { ssl_app_layer_protocol_xtn, &ssl3_ClientHandleAppProtoXtn }, - { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, - + { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, - { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, -+ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, - { -1, NULL } -- }; --@@ -296,6 +301,7 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { -+@@ -304,6 +309,7 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { - { ssl_next_proto_nego_xtn, &ssl3_ClientSendNextProtoNegoXtn }, - { ssl_app_layer_protocol_xtn, &ssl3_ClientSendAppProtoXtn }, - { ssl_use_srtp_xtn, &ssl3_ClientSendUseSRTPXtn }, -@@ -417,7 +417,7 @@ - { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, - { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, - { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, --@@ -930,6 +936,61 @@ ssl3_ServerSendAppProtoXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) -+@@ -945,6 +951,61 @@ ssl3_ServerSendAppProtoXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) - } - - static SECStatus -@@ -479,10 +479,10 @@ - ssl3_ClientHandleStatusRequestXtn(sslSocket *ss, PRUint16 ex_type, - SECItem *data) - { --diff --git a/ssl/ssl3prot.h b/ssl/ssl3prot.h --index 485d7dd..78fbcaa 100644 ----- a/ssl/ssl3prot.h --+++ b/ssl/ssl3prot.h -+diff --git a/lib/ssl/ssl3prot.h b/lib/ssl/ssl3prot.h -+index a93bef1..848bdee 100644 -+--- a/lib/ssl/ssl3prot.h -++++ b/lib/ssl/ssl3prot.h - @@ -136,7 +136,8 @@ typedef enum { - client_key_exchange = 16, - finished = 20, -@@ -493,10 +493,10 @@ - } SSL3HandshakeType; - - typedef struct { --diff --git a/ssl/sslauth.c b/ssl/sslauth.c --index 7f9c43b..c2d9201 100644 ----- a/ssl/sslauth.c --+++ b/ssl/sslauth.c -+diff --git a/lib/ssl/sslauth.c b/lib/ssl/sslauth.c -+index e6981f0..03b23b4 100644 -+--- a/lib/ssl/sslauth.c -++++ b/lib/ssl/sslauth.c - @@ -216,6 +216,24 @@ SSL_GetClientAuthDataHook(PRFileDesc *s, SSLGetClientAuthData func, - return SECSuccess; - } -@@ -522,26 +522,26 @@ - #ifdef NSS_PLATFORM_CLIENT_AUTH - /* NEED LOCKS IN HERE. */ - SECStatus --diff --git a/ssl/sslerr.h b/ssl/sslerr.h --index 12dbb1d..24bf893 100644 ----- a/ssl/sslerr.h --+++ b/ssl/sslerr.h --@@ -198,6 +198,10 @@ SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL = (SSL_ERROR_BASE + 130), -- -- SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT = (SSL_ERROR_BASE + 131), -- --+SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 132), --+SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 133), --+SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 134), -+diff --git a/lib/ssl/sslerr.h b/lib/ssl/sslerr.h -+index 192a107..835b812 100644 -+--- a/lib/ssl/sslerr.h -++++ b/lib/ssl/sslerr.h -+@@ -208,6 +208,10 @@ SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 135), -+ SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 136), -+ SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 137), -+ -++SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 138), -++SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 139), -++SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 140), - + - SSL_ERROR_END_OF_LIST /* let the c compiler determine the value of this. */ - } SSLErrorCodes; - #endif /* NO_SECURITY_ERROR_ENUM */ --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 2cf0b3a..e11860e 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -711,6 +711,14 @@ struct sslSessionIDStr { -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index c089889..c286518 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -722,6 +722,14 @@ struct sslSessionIDStr { - - SECItem srvName; - -@@ -556,7 +556,7 @@ - /* This lock is lazily initialized by CacheSID when a sid is first - * cached. Before then, there is no need to lock anything because - * the sid isn't being shared by anything. --@@ -986,6 +994,9 @@ struct ssl3StateStr { -+@@ -999,6 +1007,9 @@ struct ssl3StateStr { - CERTCertificateList *clientCertChain; /* used by client */ - PRBool sendEmptyCert; /* used by client */ - -@@ -566,7 +566,7 @@ - int policy; - /* This says what cipher suites we can do, and should - * be either SSL_ALLOWED or SSL_RESTRICTED --@@ -1264,6 +1275,8 @@ const unsigned char * preferredCipher; -+@@ -1294,6 +1305,8 @@ const unsigned char * preferredCipher; - void *pkcs11PinArg; - SSLNextProtoCallback nextProtoCallback; - void *nextProtoArg; -@@ -575,7 +575,7 @@ - - PRIntervalTime rTimeout; /* timeout for NSPR I/O */ - PRIntervalTime wTimeout; /* timeout for NSPR I/O */ --@@ -1610,6 +1623,11 @@ extern SECStatus ssl3_RestartHandshakeAfterCertReq(sslSocket * ss, -+@@ -1640,6 +1653,11 @@ extern SECStatus ssl3_RestartHandshakeAfterCertReq(sslSocket * ss, - SECKEYPrivateKey * key, - CERTCertificateList *certChain); - -@@ -587,10 +587,10 @@ - extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error); - - /* --diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c -+diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c - index be11008..1326a8b 100644 ----- a/ssl/sslnonce.c --+++ b/ssl/sslnonce.c -+--- a/lib/ssl/sslnonce.c -++++ b/lib/ssl/sslnonce.c - @@ -180,6 +180,9 @@ ssl_DestroySID(sslSessionID *sid) - if (sid->u.ssl3.srvName.data) { - SECITEM_FreeItem(&sid->u.ssl3.srvName, PR_FALSE); -@@ -601,11 +601,11 @@ - - if (sid->u.ssl3.lock) { - PR_DestroyRWLock(sid->u.ssl3.lock); --diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c --index d44336e..5c6751a 100644 ----- a/ssl/sslsecur.c --+++ b/ssl/sslsecur.c --@@ -1582,6 +1582,42 @@ SSL_RestartHandshakeAfterCertReq(PRFileDesc * fd, -+diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c -+index f77d6fa..cca55bb 100644 -+--- a/lib/ssl/sslsecur.c -++++ b/lib/ssl/sslsecur.c -+@@ -1598,6 +1598,42 @@ SSL_RestartHandshakeAfterCertReq(PRFileDesc * fd, - return ret; - } - -@@ -648,11 +648,11 @@ - /* DO NOT USE. This function was exported in ssl.def with the wrong signature; - * this implementation exists to maintain link-time compatibility. - */ --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 9431fe4..042f24f 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -288,6 +288,8 @@ ssl_DupSocket(sslSocket *os) -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index 11e66f2..efba686 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -313,6 +313,8 @@ ssl_DupSocket(sslSocket *os) - ss->canFalseStartCallback = os->canFalseStartCallback; - ss->canFalseStartCallbackData = os->canFalseStartCallbackData; - ss->pkcs11PinArg = os->pkcs11PinArg; -@@ -661,7 +661,7 @@ - - /* Create security data */ - rv = ssl_CopySecurityInfo(ss, os); --@@ -1733,6 +1735,10 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) -+@@ -1987,6 +1989,10 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) - ss->handshakeCallbackData = sm->handshakeCallbackData; - if (sm->pkcs11PinArg) - ss->pkcs11PinArg = sm->pkcs11PinArg; -@@ -672,7 +672,7 @@ - return fd; - loser: - return NULL; --@@ -3021,6 +3027,8 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) -+@@ -3279,6 +3285,8 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) - ss->badCertArg = NULL; - ss->pkcs11PinArg = NULL; - ss->ephemeralECDHKeyPair = NULL; -@@ -681,12 +681,12 @@ - - ssl_ChooseOps(ss); - ssl2_InitSocketPolicy(ss); --diff --git a/ssl/sslt.h b/ssl/sslt.h --index 1d28feb..0900f28 100644 ----- a/ssl/sslt.h --+++ b/ssl/sslt.h --@@ -191,10 +191,11 @@ typedef enum { -- ssl_padding_xtn = 21, -+diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h -+index cd742bb..b6616e2 100644 -+--- a/lib/ssl/sslt.h -++++ b/lib/ssl/sslt.h -+@@ -238,11 +238,12 @@ typedef enum { -+ ssl_extended_master_secret_xtn = 23, - ssl_session_ticket_xtn = 35, - ssl_next_proto_nego_xtn = 13172, - + ssl_channel_id_xtn = 30032, -@@ -694,7 +694,8 @@ - ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ - } SSLExtensionType; - ---#define SSL_MAX_EXTENSIONS 11 /* doesn't include ssl_padding_xtn. */ --+#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ -+-#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ -++#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ - -- #endif /* __sslt_h_ */ -+ typedef enum { -+ ssl_dhe_group_none = 0, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/cipherorder.patch 2016-01-13 14:18:55.591954693 +0100 -@@ -1,10 +1,10 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index e9f5fb0..be6d88e 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -295,6 +295,13 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDefault(PRInt32 cipher, PRBool *enabled); -- SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); -- SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index db09425..437a822 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -387,6 +387,13 @@ SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, -+ */ -+ SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); - - +/* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|, - + * which must be an array of cipher suite ids of length |len|. All the given -@@ -16,12 +16,12 @@ - /* SSLChannelBindingType enumerates the types of supported channel binding - * values. See RFC 5929. */ - typedef enum SSLChannelBindingType { --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 54c5b80..26b87c6 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -12631,6 +12631,46 @@ ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBool *enabled) -- return rv; -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 5c09f25..572bba9 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -13390,6 +13390,46 @@ SSL_SignatureMaxCount() { -+ return MAX_SIGNATURE_ALGORITHMS; - } - - +SECStatus -@@ -67,11 +67,11 @@ - /* copy global default policy into socket. */ - void - ssl3_InitSocketPolicy(sslSocket *ss) --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 0fd0a89..d12228e 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1754,6 +1754,8 @@ extern SECStatus ssl3_CipherPrefSet(sslSocket *ss, ssl3CipherSuite which, PRBool -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 080debe..3403091 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1786,6 +1786,8 @@ extern SECStatus ssl3_CipherPrefSet(sslSocket *ss, ssl3CipherSuite which, PRBool - extern SECStatus ssl3_CipherPrefGet(sslSocket *ss, ssl3CipherSuite which, PRBool *on); - extern SECStatus ssl2_CipherPrefSet(sslSocket *ss, PRInt32 which, PRBool enabled); - extern SECStatus ssl2_CipherPrefGet(sslSocket *ss, PRInt32 which, PRBool *enabled); -@@ -80,11 +80,11 @@ - - extern SECStatus ssl3_SetPolicy(ssl3CipherSuite which, PRInt32 policy); - extern SECStatus ssl3_GetPolicy(ssl3CipherSuite which, PRInt32 *policy); --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 72058f5..09a0fb5 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -1316,6 +1316,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt32 which, PRBool enabled) -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index 28e3543..8ad1517 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -1369,6 +1369,19 @@ SSL_CipherPrefSet(PRFileDesc *fd, PRInt32 which, PRBool enabled) - } - - SECStatus -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/clientauth.patch 2016-01-13 14:18:55.609954798 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 91a47a6..4e7d52e 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -543,6 +543,48 @@ typedef SECStatus (PR_CALLBACK *SSLGetClientAuthData)(void *arg, -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 2a52769..48fa018 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -636,6 +636,48 @@ typedef SECStatus (PR_CALLBACK *SSLGetClientAuthData)(void *arg, - SSL_IMPORT SECStatus SSL_GetClientAuthDataHook(PRFileDesc *fd, - SSLGetClientAuthData f, void *a); - -@@ -51,11 +51,11 @@ - - /* - ** SNI extension processing callback function. --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 60af5b0..b9014ef 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -2503,6 +2503,9 @@ ssl3_ClientAuthTokenPresent(sslSessionID *sid) { -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 9aaf601..cc193cd 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -2530,6 +2530,9 @@ ssl3_ClientAuthTokenPresent(sslSessionID *sid) { - PRBool isPresent = PR_TRUE; - - /* we only care if we are doing client auth */ -@@ -65,7 +65,7 @@ - if (!sid || !sid->u.ssl3.clAuthValid) { - return PR_TRUE; - } --@@ -6178,25 +6181,36 @@ ssl3_SendCertificateVerify(sslSocket *ss) -+@@ -6352,25 +6355,36 @@ ssl3_SendCertificateVerify(sslSocket *ss) - - isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); - isTLS12 = (PRBool)(ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); -@@ -119,7 +119,7 @@ - if (rv != SECSuccess) { - goto done; /* err code was set by ssl3_SignHashes */ - } --@@ -6275,6 +6289,12 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -6449,6 +6463,12 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey); - ss->ssl3.clientPrivateKey = NULL; - } -@@ -132,7 +132,7 @@ - - temp = ssl3_ConsumeHandshakeNumber(ss, 2, &b, &length); - if (temp < 0) { --@@ -6904,6 +6924,18 @@ ssl3_ExtractClientKeyInfo(sslSocket *ss, -+@@ -7109,6 +7129,18 @@ ssl3_ExtractClientKeyInfo(sslSocket *ss, - goto done; - } - -@@ -151,7 +151,7 @@ - /* If the key is a 1024-bit RSA or DSA key, assume conservatively that - * it may be unable to sign SHA-256 hashes. This is the case for older - * Estonian ID cards that have 1024-bit RSA keys. In FIPS 186-2 and --@@ -7002,6 +7034,10 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -7207,6 +7239,10 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - SECItem cert_types = {siBuffer, NULL, 0}; - SECItem algorithms = {siBuffer, NULL, 0}; - CERTDistNames ca_list; -@@ -162,7 +162,7 @@ - - SSL_TRC(3, ("%d: SSL3[%d]: handle certificate_request handshake", - SSL_GETPID(), ss->fd)); --@@ -7017,6 +7053,7 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -7222,6 +7258,7 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - PORT_Assert(ss->ssl3.clientCertChain == NULL); - PORT_Assert(ss->ssl3.clientCertificate == NULL); - PORT_Assert(ss->ssl3.clientPrivateKey == NULL); -@@ -170,7 +170,7 @@ - - isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); - isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); --@@ -7096,6 +7133,18 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -7301,6 +7338,18 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - desc = no_certificate; - ss->ssl3.hs.ws = wait_hello_done; - -@@ -187,9 +187,9 @@ - + } else - +#endif - if (ss->getClientAuthData != NULL) { -- /* XXX Should pass cert_types and algorithms in this call!! */ -- rv = (SECStatus)(*ss->getClientAuthData)(ss->getClientAuthDataArg, --@@ -7105,12 +7154,55 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); -+@@ -7312,12 +7361,55 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - } else { - rv = SECFailure; /* force it to send a no_certificate alert */ - } -@@ -245,7 +245,7 @@ - /* check what the callback function returned */ - if ((!ss->ssl3.clientCertificate) || (!ss->ssl3.clientPrivateKey)) { - /* we are missing either the key or cert */ --@@ -7172,6 +7264,10 @@ loser: -+@@ -7379,6 +7471,10 @@ loser: - done: - if (arena != NULL) - PORT_FreeArena(arena, PR_FALSE); -@@ -256,7 +256,7 @@ - return rv; - } - --@@ -7288,7 +7384,8 @@ ssl3_SendClientSecondRound(sslSocket *ss) -+@@ -7497,7 +7593,8 @@ ssl3_SendClientSecondRound(sslSocket *ss) - - sendClientCert = !ss->ssl3.sendEmptyCert && - ss->ssl3.clientCertChain != NULL && -@@ -266,7 +266,7 @@ - - if (!sendClientCert && - ss->ssl3.hs.hashType == handshake_hash_single && --@@ -12148,6 +12245,10 @@ ssl3_DestroySSL3Info(sslSocket *ss) -+@@ -12910,6 +13007,10 @@ ssl3_DestroySSL3Info(sslSocket *ss) - - if (ss->ssl3.clientPrivateKey != NULL) - SECKEY_DestroyPrivateKey(ss->ssl3.clientPrivateKey); -@@ -277,10 +277,10 @@ - - if (ss->ssl3.peerCertArena != NULL) - ssl3_CleanupPeerCerts(ss); --diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c --index 28d21c4..0a2288a 100644 ----- a/ssl/ssl3ext.c --+++ b/ssl/ssl3ext.c -+diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c -+index cf04aba..5661a5c 100644 -+--- a/lib/ssl/ssl3ext.c -++++ b/lib/ssl/ssl3ext.c - @@ -11,8 +11,8 @@ - #include "nssrenam.h" - #include "nss.h" -@@ -291,10 +291,10 @@ - #include "pk11pub.h" - #ifdef NO_PKCS11_BYPASS - #include "blapit.h" --diff --git a/ssl/sslauth.c b/ssl/sslauth.c --index ed74d94..7f9c43b 100644 ----- a/ssl/sslauth.c --+++ b/ssl/sslauth.c -+diff --git a/lib/ssl/sslauth.c b/lib/ssl/sslauth.c -+index b144336..e6981f0 100644 -+--- a/lib/ssl/sslauth.c -++++ b/lib/ssl/sslauth.c - @@ -216,6 +216,28 @@ SSL_GetClientAuthDataHook(PRFileDesc *s, SSLGetClientAuthData func, - return SECSuccess; - } -@@ -324,11 +324,11 @@ - /* NEED LOCKS IN HERE. */ - SECStatus - SSL_SetPKCS11PinArg(PRFileDesc *s, void *arg) --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 086f6d2..bbc9bd2 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -20,6 +20,7 @@ -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 9dcc29e..94bb9f4 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -21,6 +21,7 @@ - #include "sslerr.h" - #include "ssl3prot.h" - #include "hasht.h" -@@ -336,7 +336,7 @@ - #include "nssilock.h" - #include "pkcs11t.h" - #if defined(XP_UNIX) || defined(XP_BEOS) --@@ -31,6 +32,15 @@ -+@@ -32,6 +33,15 @@ - - #include "sslt.h" /* for some formerly private types, now public */ - -@@ -352,7 +352,7 @@ - /* to make some of these old enums public without namespace pollution, - ** it was necessary to prepend ssl_ to the names. - ** These #defines preserve compatibility with the old code here in libssl. --@@ -443,6 +453,14 @@ struct sslGatherStr { -+@@ -453,6 +463,14 @@ struct sslGatherStr { - #define GS_DATA 3 - #define GS_PAD 4 - -@@ -367,7 +367,7 @@ - - - /* --@@ -961,6 +979,10 @@ struct ssl3StateStr { -+@@ -974,6 +992,10 @@ struct ssl3StateStr { - - CERTCertificate * clientCertificate; /* used by client */ - SECKEYPrivateKey * clientPrivateKey; /* used by client */ -@@ -378,7 +378,7 @@ - CERTCertificateList *clientCertChain; /* used by client */ - PRBool sendEmptyCert; /* used by client */ - --@@ -1223,6 +1245,10 @@ const unsigned char * preferredCipher; -+@@ -1253,6 +1275,10 @@ const unsigned char * preferredCipher; - void *authCertificateArg; - SSLGetClientAuthData getClientAuthData; - void *getClientAuthDataArg; -@@ -389,7 +389,7 @@ - SSLSNISocketConfig sniSocketConfig; - void *sniSocketConfigArg; - SSLBadCertHandler handleBadCert; --@@ -1863,6 +1889,26 @@ extern SECStatus ssl_InitSessionCacheLocks(PRBool lazyInit); -+@@ -1896,6 +1922,26 @@ extern SECStatus ssl_InitSessionCacheLocks(PRBool lazyInit); - - extern SECStatus ssl_FreeSessionCacheLocks(void); - -@@ -416,11 +416,11 @@ - - /**************** DTLS-specific functions **************/ - extern void dtls_FreeQueuedMessage(DTLSQueuedMessage *msg); --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 282bb85..6c09992 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -275,6 +275,10 @@ ssl_DupSocket(sslSocket *os) -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index f735009..21754d6 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -300,6 +300,10 @@ ssl_DupSocket(sslSocket *os) - ss->authCertificateArg = os->authCertificateArg; - ss->getClientAuthData = os->getClientAuthData; - ss->getClientAuthDataArg = os->getClientAuthDataArg; -@@ -431,7 +431,7 @@ - ss->sniSocketConfig = os->sniSocketConfig; - ss->sniSocketConfigArg = os->sniSocketConfigArg; - ss->handleBadCert = os->handleBadCert; --@@ -1709,6 +1713,12 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) -+@@ -1963,6 +1967,12 @@ SSL_ReconfigFD(PRFileDesc *model, PRFileDesc *fd) - ss->getClientAuthData = sm->getClientAuthData; - if (sm->getClientAuthDataArg) - ss->getClientAuthDataArg = sm->getClientAuthDataArg; -@@ -444,7 +444,7 @@ - if (sm->sniSocketConfig) - ss->sniSocketConfig = sm->sniSocketConfig; - if (sm->sniSocketConfigArg) --@@ -2974,6 +2984,10 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) -+@@ -3232,6 +3242,10 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) - ss->sniSocketConfig = NULL; - ss->sniSocketConfigArg = NULL; - ss->getClientAuthData = NULL; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/dh1024.patch 1970-01-01 01:00:00.000000000 +0100 -@@ -1,14 +0,0 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index a67a9d1..02b0dda 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -6964,7 +6964,8 @@ ssl3_HandleServerKeyExchange(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -- if (rv != SECSuccess) { -- goto loser; /* malformed. */ -- } --- if (dh_p.len < 512/8) { --+ if (dh_p.len < 1024/8 || --+ (dh_p.len == 1024/8 && (dh_p.data[0] & 0x80) == 0)) { -- errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY; -- goto alert_loser; -- } -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/didhandshakeresume.patch 2016-01-13 14:18:55.609954798 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 4e7d52e..34142fc 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -1007,6 +1007,9 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 48fa018..0983b5f 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -1117,6 +1117,9 @@ SSL_IMPORT SECStatus SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, - SSLExtensionType extId, - PRBool *yes); - -@@ -12,11 +12,11 @@ - /* - ** How long should we wait before retransmitting the next flight of - ** the DTLS handshake? Returns SECFailure if not DTLS or not in a --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 6c09992..1a9c584 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -1897,6 +1897,20 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index 21754d6..b73f8f6 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -2151,6 +2151,20 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) - return &ss->sec.ci.sid->peerCertStatus; - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/getrequestedclientcerttypes.patch 2016-01-13 14:18:55.609954798 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 34142fc..e2d1b09 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -803,6 +803,16 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 0983b5f..cf9f6db 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -896,6 +896,16 @@ SSL_IMPORT SECStatus SSL_ReHandshakeWithTimeout(PRFileDesc *fd, - PRBool flushCache, - PRIntervalTime timeout); - -@@ -19,11 +19,11 @@ - - #ifdef SSL_DEPRECATED_FUNCTION - /* deprecated! --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index b9014ef..800c28e 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -7061,6 +7061,9 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index cc193cd..27038f3 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -7266,6 +7266,9 @@ ssl3_HandleCertificateRequest(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - if (rv != SECSuccess) - goto loser; /* malformed, alert has been sent */ - -@@ -33,7 +33,7 @@ - if (isTLS12) { - rv = ssl3_ConsumeHandshakeVariable(ss, &algorithms, 2, &b, &length); - if (rv != SECSuccess) --@@ -7262,6 +7265,7 @@ loser: -+@@ -7469,6 +7472,7 @@ loser: - PORT_SetError(errCode); - rv = SECFailure; - done: -@@ -41,11 +41,11 @@ - if (arena != NULL) - PORT_FreeArena(arena, PR_FALSE); - #ifdef NSS_PLATFORM_CLIENT_AUTH --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index bbc9bd2..46e618a 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1238,6 +1238,10 @@ struct sslSocketStr { -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 94bb9f4..c7231a7 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1265,6 +1265,10 @@ struct sslSocketStr { - unsigned int sizeCipherSpecs; - const unsigned char * preferredCipher; - -@@ -55,12 +55,12 @@ - + - ssl3KeyPair * stepDownKeyPair; /* RSA step down keys */ - -- /* Callbacks */ --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 1a9c584..9431fe4 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -1911,6 +1911,20 @@ SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { -+ const ssl3DHParams *dheParams; /* DHE param */ -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index b73f8f6..11e66f2 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -2165,6 +2165,20 @@ SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { - return SECSuccess; - } - -@@ -81,11 +81,11 @@ - /************************************************************************/ - /* The following functions are the TOP LEVEL SSL functions. - ** They all get called through the NSPRIOMethods table below. --@@ -2989,6 +3003,7 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) -+@@ -3243,6 +3257,7 @@ ssl_NewSocket(PRBool makeLocks, SSLProtocolVariant protocolVariant) - sc->serverKeyBits = 0; - ss->certStatusArray[i] = NULL; - } - + ss->requestedCertTypes = NULL; - ss->stepDownKeyPair = NULL; -- ss->dbHandle = CERT_GetDefaultCertDB(); - -+ ss->dheParams = NULL; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/norenegotiatelock.patch 1970-01-01 01:00:00.000000000 +0100 -@@ -1,15 +0,0 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index f5afab7..a67a9d1 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -5547,9 +5547,7 @@ ssl3_HandleHelloRequest(sslSocket *ss) -- return SECFailure; -- } -- if (ss->opt.enableRenegotiation == SSL_RENEGOTIATE_NEVER) { --- ssl_GetXmitBufLock(ss); --- rv = SSL3_SendAlert(ss, alert_warning, no_renegotiation); --- ssl_ReleaseXmitBufLock(ss); --+ (void)SSL3_SendAlert(ss, alert_warning, no_renegotiation); -- PORT_SetError(SSL_ERROR_RENEGOTIATION_NOT_ALLOWED); -- return SECFailure; -- } -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/nssrwlock.patch 2016-01-13 14:18:55.610954804 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 0ac85da..f5afab7 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -5261,7 +5261,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index afab931..e5e620f 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - * the lock across the calls to ssl3_CallHelloExtensionSenders. - */ - if (sid->u.ssl3.lock) { -@@ -11,7 +11,7 @@ - } - - if (isTLS || (ss->firstHsDone && ss->peerRequestedProtection)) { --@@ -5270,7 +5270,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5445,7 +5445,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - - extLen = ssl3_CallHelloExtensionSenders(ss, PR_FALSE, maxBytes, NULL); - if (extLen < 0) { -@@ -20,7 +20,7 @@ - return SECFailure; - } - total_exten_len += extLen; --@@ -5297,7 +5297,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5472,7 +5472,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - /* how many suites are permitted by policy and user preference? */ - num_suites = count_cipher_suites(ss, ss->ssl3.policy, PR_TRUE); - if (!num_suites) { -@@ -29,7 +29,7 @@ - return SECFailure; /* count_cipher_suites has set error code. */ - } - --@@ -5342,7 +5342,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5517,7 +5517,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - - rv = ssl3_AppendHandshakeHeader(ss, client_hello, length); - if (rv != SECSuccess) { -@@ -38,7 +38,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - --@@ -5361,21 +5361,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5536,21 +5536,21 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - rv = ssl3_AppendHandshakeNumber(ss, ss->clientHelloVersion, 2); - } - if (rv != SECSuccess) { -@@ -63,7 +63,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - --@@ -5385,7 +5385,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5560,7 +5560,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - else - rv = ssl3_AppendHandshakeNumber(ss, 0, 1); - if (rv != SECSuccess) { -@@ -72,7 +72,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - --@@ -5393,14 +5393,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5568,14 +5568,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - rv = ssl3_AppendHandshakeVariable( - ss, ss->ssl3.hs.cookie, ss->ssl3.hs.cookieLen, 1); - if (rv != SECSuccess) { -@@ -89,7 +89,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - --@@ -5409,7 +5409,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5584,7 +5584,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - rv = ssl3_AppendHandshakeNumber(ss, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, - sizeof(ssl3CipherSuite)); - if (rv != SECSuccess) { -@@ -98,7 +98,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - actual_count++; --@@ -5418,7 +5418,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5593,7 +5593,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - rv = ssl3_AppendHandshakeNumber(ss, TLS_FALLBACK_SCSV, - sizeof(ssl3CipherSuite)); - if (rv != SECSuccess) { -@@ -107,8 +107,8 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - actual_count++; --@@ -5428,7 +5428,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -- if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange)) { -+@@ -5603,7 +5603,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+ if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) { - actual_count++; - if (actual_count > num_suites) { - - if (sid->u.ssl3.lock) { PR_RWLock_Unlock(sid->u.ssl3.lock); } -@@ -116,7 +116,7 @@ - /* set error card removal/insertion error */ - PORT_SetError(SSL_ERROR_TOKEN_INSERTION_REMOVAL); - return SECFailure; --@@ -5436,7 +5436,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5611,7 +5611,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - rv = ssl3_AppendHandshakeNumber(ss, suite->cipher_suite, - sizeof(ssl3CipherSuite)); - if (rv != SECSuccess) { -@@ -125,7 +125,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - } --@@ -5447,14 +5447,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5622,14 +5622,14 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - * the server.. */ - if (actual_count != num_suites) { - /* Card removal/insertion error */ -@@ -142,7 +142,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - for (i = 0; i < compressionMethodsCount; i++) { --@@ -5462,7 +5462,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5637,7 +5637,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - continue; - rv = ssl3_AppendHandshakeNumber(ss, compressions[i], 1); - if (rv != SECSuccess) { -@@ -151,7 +151,7 @@ - return rv; /* err set by ssl3_AppendHandshake* */ - } - } --@@ -5473,20 +5473,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5648,20 +5648,20 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - - rv = ssl3_AppendHandshakeNumber(ss, maxBytes, 2); - if (rv != SECSuccess) { -@@ -175,7 +175,7 @@ - return SECFailure; - } - maxBytes -= extLen; --@@ -5495,7 +5495,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) -+@@ -5670,7 +5670,7 @@ ssl3_SendClientHello(sslSocket *ss, PRBool resending) - } - - if (sid->u.ssl3.lock) { -@@ -184,11 +184,11 @@ - } - - if (ss->xtnData.sentSessionTicketInClientHello) { --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index d12228e..efcbf9f 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -731,7 +731,7 @@ struct sslSessionIDStr { -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 3403091..874e59c 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -742,7 +742,7 @@ struct sslSessionIDStr { - * cached. Before then, there is no need to lock anything because - * the sid isn't being shared by anything. - */ -@@ -197,10 +197,10 @@ - - /* The lock must be held while reading or writing these members - * because they change while the sid is cached. --diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c -+diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c - index cefdda6..28ad364 100644 ----- a/ssl/sslnonce.c --+++ b/ssl/sslnonce.c -+--- a/lib/ssl/sslnonce.c -++++ b/lib/ssl/sslnonce.c - @@ -136,7 +136,7 @@ ssl_DestroySID(sslSessionID *sid) - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/removebuildmetadata.patch 1970-01-01 01:00:00.000000000 +0100 -@@ -1,27 +0,0 @@ --diff --git a/ssl/sslver.c b/ssl/sslver.c --index 35e0317..ea60888 100644 ----- a/ssl/sslver.c --+++ b/ssl/sslver.c --@@ -12,6 +12,13 @@ -- #define _DEBUG_STRING "" -- #endif -- --+#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) --+#define _DATE_AND_TIME "Sep 02 2008 08:00:00" --+#else --+#define _DATE_AND_TIME __DATE__ " " __TIME__ --+#endif --+ --+ -- /* -- * Version information for the 'ident' and 'what commands -- * --@@ -19,6 +26,6 @@ -- * must not end in a '$' to prevent rcs keyword substitution. -- */ -- const char __nss_ssl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING --- " " __DATE__ " " __TIME__ " $"; --+ " " _DATE_AND_TIME " $"; -- const char __nss_ssl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING --- " " __DATE__ " " __TIME__; --+ " " _DATE_AND_TIME; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/reorderextensions.patch 2016-01-13 14:18:55.610954804 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c --index c18d6f6..9214a2e 100644 ----- a/ssl/ssl3ext.c --+++ b/ssl/ssl3ext.c --@@ -313,6 +313,10 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { -+diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c -+index 9cfd541..eb3fb70 100644 -+--- a/lib/ssl/ssl3ext.c -++++ b/lib/ssl/ssl3ext.c -+@@ -321,6 +321,10 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { - { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, - { ssl_signed_certificate_timestamp_xtn, - &ssl3_ClientSendSignedCertTimestampXtn }, -@@ -12,8 +12,8 @@ - + * extension. */ - { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, - { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, -- /* any extra entries will appear as { 0, NULL } */ --@@ -2507,9 +2511,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength) -+ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, -+@@ -2546,9 +2550,11 @@ ssl3_CalculatePaddingExtensionLength(unsigned int clientHelloLength) - } - - extensionLength = 512 - recordLength; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/restartclientauth.patch 2016-01-13 14:18:55.610954804 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index e2d1b09..593dd00 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -409,6 +409,11 @@ SSL_IMPORT SECStatus SSL_ForceHandshake(PRFileDesc *fd); -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index cf9f6db..85ced8a 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -502,6 +502,11 @@ SSL_IMPORT SECStatus SSL_ForceHandshake(PRFileDesc *fd); - SSL_IMPORT SECStatus SSL_ForceHandshakeWithTimeout(PRFileDesc *fd, - PRIntervalTime timeout); - -@@ -14,11 +14,11 @@ - /* - ** Query security status of socket. *on is set to one if security is - ** enabled. *keySize will contain the stream key size used. *issuer will --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 800c28e..29e8f1c 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -7275,6 +7275,85 @@ done: -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 27038f3..304e03b 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -7482,6 +7482,85 @@ done: - return rv; - } - -@@ -104,11 +104,11 @@ - static SECStatus - ssl3_CheckFalseStart(sslSocket *ss) - { --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 46e618a..2cf0b3a 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1599,16 +1599,17 @@ extern SECStatus ssl3_MasterKeyDeriveBypass( ssl3CipherSpec * pwSpec, -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index c7231a7..c089889 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1629,16 +1629,17 @@ extern SECStatus ssl3_MasterSecretDeriveBypass( ssl3CipherSpec * pwSpec, - /* These functions are called from secnav, even though they're "private". */ - - extern int ssl2_SendErrorMessage(struct sslSocketStr *ss, int error); -@@ -130,11 +130,11 @@ - extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error); - - /* --diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c --index ea2d408..d44336e 100644 ----- a/ssl/sslsecur.c --+++ b/ssl/sslsecur.c --@@ -1516,17 +1516,70 @@ SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHandle) -+diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c -+index 53b4885..f77d6fa 100644 -+--- a/lib/ssl/sslsecur.c -++++ b/lib/ssl/sslsecur.c -+@@ -1532,17 +1532,70 @@ SSL_CertDBHandleSet(PRFileDesc *fd, CERTCertDBHandle *dbHandle) - return SECSuccess; - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secitemarray.patch 2016-01-13 14:18:55.610954804 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index 0ece0ed..ea71975 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1373,6 +1373,15 @@ extern sslSessionIDUncacheFunc ssl_sid_uncache; -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index 976330e..60dd243 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1403,6 +1403,15 @@ extern sslSessionIDUncacheFunc ssl_sid_uncache; - - SEC_BEGIN_PROTOS - -@@ -18,11 +18,11 @@ - /* Internal initialization and installation of the SSL error tables */ - extern SECStatus ssl_Init(void); - extern SECStatus ssl_InitializePRErrorTable(void); --diff --git a/ssl/sslt.h b/ssl/sslt.h --index 0900f28..430d216 100644 ----- a/ssl/sslt.h --+++ b/ssl/sslt.h --@@ -10,6 +10,19 @@ -+diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h -+index b6616e2..5593579 100644 -+--- a/lib/ssl/sslt.h -++++ b/lib/ssl/sslt.h -+@@ -11,6 +11,19 @@ - - #include "prtypes.h" - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/secretexporterlocks.patch 2016-01-13 14:18:55.611954809 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/sslinfo.c b/ssl/sslinfo.c --index 00f2f38..ba230d2 100644 ----- a/ssl/sslinfo.c --+++ b/ssl/sslinfo.c --@@ -350,8 +350,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, -+diff --git a/lib/ssl/sslinfo.c b/lib/ssl/sslinfo.c -+index 216ab0f..7048eb8 100644 -+--- a/lib/ssl/sslinfo.c -++++ b/lib/ssl/sslinfo.c -+@@ -387,8 +387,13 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, - return SECFailure; - } - -@@ -16,7 +16,7 @@ - return SECFailure; - } - --@@ -362,13 +367,17 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, -+@@ -399,13 +404,17 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, - } - val = PORT_Alloc(valLen); - if (!val) { -@@ -34,7 +34,7 @@ - if (hasContext) { - val[i++] = contextLen >> 8; - val[i++] = contextLen; --@@ -389,6 +398,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, -+@@ -426,6 +435,8 @@ SSL_ExportKeyingMaterial(PRFileDesc *fd, - valLen, out, outLen); - } - ssl_ReleaseSpecReadLock(ss); -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/sessioncache.patch 2016-01-13 14:18:55.611954809 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index be6d88e..57771cd 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -900,6 +900,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd); -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 437a822..bc417a5 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -992,6 +992,18 @@ SSL_IMPORT int SSL_DataPending(PRFileDesc *fd); - SSL_IMPORT SECStatus SSL_InvalidateSession(PRFileDesc *fd); - - /* -@@ -21,11 +21,11 @@ - ** Return a SECItem containing the SSL session ID associated with the fd. - */ - SSL_IMPORT SECItem *SSL_GetSessionID(PRFileDesc *fd); --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 26b87c6..0ac85da 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -11375,7 +11375,7 @@ ssl3_FinishHandshake(sslSocket * ss) -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 572bba9..afab931 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -12058,7 +12058,7 @@ ssl3_FinishHandshake(sslSocket * ss) - ss->ssl3.hs.receivedNewSessionTicket = PR_FALSE; - } - -@@ -34,11 +34,11 @@ - PORT_Assert(ss->sec.ci.sid->cached == never_cached); - (*ss->sec.cache)(ss->sec.ci.sid); - ss->ssl3.hs.cacheSID = PR_FALSE; --diff --git a/ssl/sslsecur.c b/ssl/sslsecur.c --index 5c6751a..00ab455 100644 ----- a/ssl/sslsecur.c --+++ b/ssl/sslsecur.c --@@ -1467,6 +1467,49 @@ SSL_InvalidateSession(PRFileDesc *fd) -+diff --git a/lib/ssl/sslsecur.c b/lib/ssl/sslsecur.c -+index cca55bb..b4b8e95 100644 -+--- a/lib/ssl/sslsecur.c -++++ b/lib/ssl/sslsecur.c -+@@ -1483,6 +1483,49 @@ SSL_InvalidateSession(PRFileDesc *fd) - return rv; - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/signedcertificatetimestamps.patch 2016-01-13 14:18:55.612954815 +0100 -@@ -1,18 +1,17 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 80717db..e9f5fb0 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -191,6 +191,9 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); -- #define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in -- * handshakes. */ -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index eb7f7ec..db09425 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -203,6 +203,8 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); -+ */ -+ #define SSL_ENABLE_EXTENDED_MASTER_SECRET 30 - - +/* Request Signed Certificate Timestamps via TLS extension (client) */ --+#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 29 --+ -++#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 31 -+ - #ifdef SSL_DEPRECATED_FUNCTION - /* Old deprecated function names */ -- SSL_IMPORT SECStatus SSL_Enable(PRFileDesc *fd, int option, PRBool on); --@@ -493,6 +496,23 @@ SSL_IMPORT CERTCertList *SSL_PeerCertificateChain(PRFileDesc *fd); -+@@ -586,6 +588,23 @@ SSL_IMPORT CERTCertList *SSL_PeerCertificateChain(PRFileDesc *fd); - */ - SSL_IMPORT const SECItemArray * SSL_PeerStapledOCSPResponses(PRFileDesc *fd); - -@@ -36,13 +35,13 @@ - /* SSL_SetStapledOCSPResponses stores an array of one or multiple OCSP responses - * in the fd's data, which may be sent as part of a server side cert_status - * handshake message. Parameter |responses| is for the server certificate of --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 6a4a443..54c5b80 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -6752,6 +6752,14 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -- sid->u.ssl3.sessionIDLength = sidBytes.len; -- PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes.data, sidBytes.len); -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index ba3d012..5c09f25 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -6957,6 +6957,14 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+ sid->u.ssl3.keys.extendedMasterSecretUsed = -+ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); - - + /* Copy Signed Certificate Timestamps, if any. */ - + if (ss->xtnData.signedCertTimestamps.data) { -@@ -55,7 +54,7 @@ - ss->ssl3.hs.isResuming = PR_FALSE; - if (ss->ssl3.hs.kea_def->signKeyType != sign_null) { - /* All current cipher suites other than those with sign_null (i.e., --@@ -6765,6 +6773,10 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) -+@@ -6971,6 +6979,10 @@ ssl3_HandleServerHello(sslSocket *ss, SSL3Opaque *b, PRUint32 length) - } - - winner: -@@ -66,7 +65,7 @@ - /* If we will need a ChannelID key then we make the callback now. This - * allows the handshake to be restarted cleanly if the callback returns - * SECWouldBlock. */ --@@ -6790,6 +6802,9 @@ alert_loser: -+@@ -6996,6 +7008,9 @@ alert_loser: - (void)SSL3_SendAlert(ss, alert_fatal, desc); - - loser: -@@ -76,10 +75,10 @@ - errCode = ssl_MapLowLevelError(errCode); - return SECFailure; - } --diff --git a/ssl/ssl3ext.c b/ssl/ssl3ext.c --index 4d17587..c18d6f6 100644 ----- a/ssl/ssl3ext.c --+++ b/ssl/ssl3ext.c -+diff --git a/lib/ssl/ssl3ext.c b/lib/ssl/ssl3ext.c -+index 78825cb..9cfd541 100644 -+--- a/lib/ssl/ssl3ext.c -++++ b/lib/ssl/ssl3ext.c - @@ -90,6 +90,12 @@ static PRInt32 ssl3_ClientSendSigAlgsXtn(sslSocket *ss, PRBool append, - PRUint32 maxBytes); - static SECStatus ssl3_ServerHandleSigAlgsXtn(sslSocket *ss, PRUint16 ex_type, -@@ -93,16 +92,16 @@ - - static PRInt32 ssl3_ClientSendDraftVersionXtn(sslSocket *ss, PRBool append, - PRUint32 maxBytes); --@@ -275,6 +281,8 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { -- { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, -+@@ -283,6 +289,8 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { - { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, - { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, -+ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, - + { ssl_signed_certificate_timestamp_xtn, - + &ssl3_ClientHandleSignedCertTimestampXtn }, - { -1, NULL } - }; - --@@ -303,6 +311,8 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { -+@@ -311,6 +319,8 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { - { ssl_use_srtp_xtn, &ssl3_ClientSendUseSRTPXtn }, - { ssl_channel_id_xtn, &ssl3_ClientSendChannelIDXtn }, - { ssl_cert_status_xtn, &ssl3_ClientSendStatusRequestXtn }, -@@ -110,12 +109,16 @@ - + &ssl3_ClientSendSignedCertTimestampXtn }, - { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, - { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, -- /* any extra entries will appear as { 0, NULL } */ --@@ -2616,3 +2626,65 @@ ssl3_ServerHandleDraftVersionXtn(sslSocket * ss, PRUint16 ex_type, -+ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, -+@@ -2698,11 +2708,48 @@ ssl3_SendExtendedMasterSecretXtn(sslSocket * ss, PRBool append, -+ } - -- return SECSuccess; -+ return extension_length; -+- -+ loser: -+ return -1; - } --+ -+ - +/* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp - + * extension for TLS ClientHellos. */ - +static PRInt32 -@@ -129,7 +132,12 @@ - + if (!ss->opt.enableSignedCertTimestamps) - + return 0; - + --+ if (append && maxBytes >= extension_length) { -++ if (maxBytes < extension_length) { -++ PORT_Assert(0); -++ return 0; -++ } -++ -++ if (append) { - + SECStatus rv; - + /* extension_type */ - + rv = ssl3_AppendHandshakeNumber(ss, -@@ -143,15 +151,19 @@ - + goto loser; - + ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - + ssl_signed_certificate_timestamp_xtn; --+ } else if (maxBytes < extension_length) { --+ PORT_Assert(0); --+ return 0; - + } - + - + return extension_length; - +loser: - + return -1; - +} -+ -+ static SECStatus -+ ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, -+@@ -2743,3 +2790,28 @@ ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, -+ } -+ return SECSuccess; -+ } - + - +static SECStatus - +ssl3_ClientHandleSignedCertTimestampXtn(sslSocket *ss, PRUint16 ex_type, -@@ -177,19 +189,19 @@ - + ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type; - + return SECSuccess; - +} --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index c4c87b4..0fd0a89 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -339,6 +339,7 @@ typedef struct sslOptionsStr { -- unsigned int enableALPN : 1; /* 27 */ -- unsigned int reuseServerECDHEKey : 1; /* 28 */ -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index d53c446..080debe 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -349,6 +349,7 @@ typedef struct sslOptionsStr { - unsigned int enableFallbackSCSV : 1; /* 29 */ --+ unsigned int enableSignedCertTimestamps : 1; /* 30 */ -+ unsigned int enableServerDhe : 1; /* 30 */ -+ unsigned int enableExtendedMS : 1; /* 31 */ -++ unsigned int enableSignedCertTimestamps : 1; /* 32 */ - } sslOptions; - - typedef enum { sslHandshakingUndetermined = 0, --@@ -721,6 +722,11 @@ struct sslSessionIDStr { -+@@ -732,6 +733,11 @@ struct sslSessionIDStr { - * resumption handshake to the original handshake. */ - SECItem originalHandshakeHash; - -@@ -201,7 +213,7 @@ - /* This lock is lazily initialized by CacheSID when a sid is first - * cached. Before then, there is no need to lock anything because - * the sid isn't being shared by anything. --@@ -835,6 +841,18 @@ struct TLSExtensionDataStr { -+@@ -846,6 +852,18 @@ struct TLSExtensionDataStr { - * is beyond ssl3_HandleClientHello function. */ - SECItem *sniNameArr; - PRUint32 sniNameArrSize; -@@ -220,10 +232,10 @@ - }; - - typedef SECStatus (*sslRestartTarget)(sslSocket *); --diff --git a/ssl/sslnonce.c b/ssl/sslnonce.c -+diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c - index c45849d..cefdda6 100644 ----- a/ssl/sslnonce.c --+++ b/ssl/sslnonce.c -+--- a/lib/ssl/sslnonce.c -++++ b/lib/ssl/sslnonce.c - @@ -131,6 +131,9 @@ ssl_DestroySID(sslSessionID *sid) - if (sid->u.ssl3.originalHandshakeHash.data) { - SECITEM_FreeItem(&sid->u.ssl3.originalHandshakeHash, PR_FALSE); -@@ -234,22 +246,22 @@ - - if (sid->u.ssl3.lock) { - PR_DestroyRWLock(sid->u.ssl3.lock); --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 6a6c8d1..72058f5 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -89,7 +89,8 @@ static sslOptions ssl_defaults = { -- PR_TRUE, /* enableNPN */ -- PR_FALSE, /* enableALPN */ -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index 6d700a7..28e3543 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -92,7 +92,8 @@ static sslOptions ssl_defaults = { - PR_TRUE, /* reuseServerECDHEKey */ --- PR_FALSE /* enableFallbackSCSV */ --+ PR_FALSE, /* enableFallbackSCSV */ -+ PR_FALSE, /* enableFallbackSCSV */ -+ PR_TRUE, /* enableServerDhe */ -+- PR_FALSE /* enableExtendedMS */ -++ PR_FALSE, /* enableExtendedMS */ - + PR_FALSE, /* enableSignedCertTimestamps */ - }; - - /* --@@ -807,6 +808,10 @@ SSL_OptionSet(PRFileDesc *fd, PRInt32 which, PRBool on) -- ss->opt.enableFallbackSCSV = on; -+@@ -843,6 +844,10 @@ SSL_OptionSet(PRFileDesc *fd, PRInt32 which, PRBool on) -+ ss->opt.enableExtendedMS = on; - break; - - + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: -@@ -259,19 +271,19 @@ - default: - PORT_SetError(SEC_ERROR_INVALID_ARGS); - rv = SECFailure; --@@ -882,6 +887,9 @@ SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn) -- case SSL_REUSE_SERVER_ECDHE_KEY: -- on = ss->opt.reuseServerECDHEKey; break; -- case SSL_ENABLE_FALLBACK_SCSV: on = ss->opt.enableFallbackSCSV; break; -+@@ -921,6 +926,9 @@ SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn) -+ case SSL_ENABLE_SERVER_DHE: on = ss->opt.enableServerDhe; break; -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ on = ss->opt.enableExtendedMS; break; - + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - + on = ss->opt.enableSignedCertTimestamps; - + break; - - default: - PORT_SetError(SEC_ERROR_INVALID_ARGS); --@@ -951,6 +959,9 @@ SSL_OptionGetDefault(PRInt32 which, PRBool *pOn) -- case SSL_ENABLE_FALLBACK_SCSV: -- on = ssl_defaults.enableFallbackSCSV; -+@@ -996,6 +1004,9 @@ SSL_OptionGetDefault(PRInt32 which, PRBool *pOn) -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ on = ssl_defaults.enableExtendedMS; - break; - + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - + on = ssl_defaults.enableSignedCertTimestamps; -@@ -279,8 +291,8 @@ - - default: - PORT_SetError(SEC_ERROR_INVALID_ARGS); --@@ -1134,6 +1145,10 @@ SSL_OptionSetDefault(PRInt32 which, PRBool on) -- ssl_defaults.enableFallbackSCSV = on; -+@@ -1187,6 +1198,10 @@ SSL_OptionSetDefault(PRInt32 which, PRBool on) -+ ssl_defaults.enableExtendedMS = on; - break; - - + case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: -@@ -290,7 +302,7 @@ - default: - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; --@@ -1963,6 +1978,29 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) -+@@ -2218,6 +2233,29 @@ SSL_PeerStapledOCSPResponses(PRFileDesc *fd) - return &ss->sec.ci.sid->peerCertStatus; - } - -@@ -320,23 +332,24 @@ - SECStatus - SSL_HandshakeResumedSession(PRFileDesc *fd, PRBool *handshake_resumed) { - sslSocket *ss = ssl_FindSocket(fd); --diff --git a/ssl/sslt.h b/ssl/sslt.h --index fe0ad07..c36b8c7 100644 ----- a/ssl/sslt.h --+++ b/ssl/sslt.h --@@ -202,6 +202,7 @@ typedef enum { -+diff --git a/lib/ssl/sslt.h b/lib/ssl/sslt.h -+index a2eff62..36e34df 100644 -+--- a/lib/ssl/sslt.h -++++ b/lib/ssl/sslt.h -+@@ -248,6 +248,7 @@ typedef enum { - ssl_signature_algorithms_xtn = 13, - ssl_use_srtp_xtn = 14, - ssl_app_layer_protocol_xtn = 16, - + ssl_signed_certificate_timestamp_xtn = 18, /* RFC 6962 */ - ssl_padding_xtn = 21, -+ ssl_extended_master_secret_xtn = 23, - ssl_session_ticket_xtn = 35, -- ssl_next_proto_nego_xtn = 13172, --@@ -210,6 +211,6 @@ typedef enum { -+@@ -257,7 +258,7 @@ typedef enum { - ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ - } SSLExtensionType; - ---#define SSL_MAX_EXTENSIONS 12 /* doesn't include ssl_padding_xtn. */ --+#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ -+-#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ -++#define SSL_MAX_EXTENSIONS 14 /* doesn't include ssl_padding_xtn. */ - -- #endif /* __sslt_h_ */ -+ typedef enum { -+ ssl_dhe_group_none = 0, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/suitebonly.patch 2016-01-13 14:18:55.612954815 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c --index aca2b74..dac7a9e 100644 ----- a/ssl/ssl3ecc.c --+++ b/ssl/ssl3ecc.c --@@ -1090,6 +1090,7 @@ static const PRUint8 ecPtFmt[6] = { -+diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c -+index 94008a0..6d89bbe 100644 -+--- a/lib/ssl/ssl3ecc.c -++++ b/lib/ssl/ssl3ecc.c -+@@ -1093,6 +1093,7 @@ static const PRUint8 ecPtFmt[6] = { - static PRBool - ssl3_SuiteBOnly(sslSocket *ss) - { -@@ -10,7 +10,7 @@ - /* See if we can support small curves (like 163). If not, assume we can - * only support Suite-B curves (P-256, P-384, P-521). */ - PK11SlotInfo *slot = --@@ -1103,6 +1104,9 @@ ssl3_SuiteBOnly(sslSocket *ss) -+@@ -1106,6 +1107,9 @@ ssl3_SuiteBOnly(sslSocket *ss) - /* we can, presume we can do all curves */ - PK11_FreeSlot(slot); - return PR_FALSE; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tls12chromium.patch 2016-01-13 14:18:55.612954815 +0100 -@@ -1,8 +1,8 @@ --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index 7c06815..1167d6d 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -31,6 +31,15 @@ -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index ce92cf1..c5cb1eb 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -33,6 +33,15 @@ - #include "blapi.h" - #endif - -@@ -18,10 +18,10 @@ - #include - #ifdef NSS_ENABLE_ZLIB - #include "zlib.h" --diff --git a/ssl/ssl3ecc.c b/ssl/ssl3ecc.c --index dac7a9e..9b91270 100644 ----- a/ssl/ssl3ecc.c --+++ b/ssl/ssl3ecc.c -+diff --git a/lib/ssl/ssl3ecc.c b/lib/ssl/ssl3ecc.c -+index 6d89bbe..cf8e741 100644 -+--- a/lib/ssl/ssl3ecc.c -++++ b/lib/ssl/ssl3ecc.c - @@ -31,6 +31,12 @@ - - #include -@@ -35,16 +35,17 @@ - #ifndef NSS_DISABLE_ECC - - #ifndef PK11_SETATTRS --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 14ff328..6a6c8d1 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -17,8 +17,15 @@ -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index c9a4493..6d700a7 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -17,9 +17,16 @@ - #ifndef NO_PKCS11_BYPASS - #include "blapi.h" - #endif - +#include "pk11pub.h" - #include "nss.h" -+ #include "pk11pqg.h" - - +/* This is a bodge to allow this code to be compiled against older NSS headers - + * that don't contain the TLS 1.2 changes. */ -@@ -55,7 +56,7 @@ - #define SET_ERROR_CODE /* reminder */ - - static const sslSocketOps ssl_default_ops = { /* No SSL. */ --@@ -1878,6 +1885,24 @@ SSL_VersionRangeGet(PRFileDesc *fd, SSLVersionRange *vrange) -+@@ -2133,6 +2140,24 @@ SSL_VersionRangeGet(PRFileDesc *fd, SSLVersionRange *vrange) - return SECSuccess; - } - -@@ -80,7 +81,7 @@ - SECStatus - SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) - { --@@ -1898,6 +1923,20 @@ SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) -+@@ -2153,6 +2178,20 @@ SSL_VersionRangeSet(PRFileDesc *fd, const SSLVersionRange *vrange) - ssl_GetSSL3HandshakeLock(ss); - - ss->vrange = *vrange; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/patches/tlsunique.patch 2016-01-13 14:18:55.612954815 +0100 -@@ -1,10 +1,10 @@ --diff --git a/ssl/ssl.h b/ssl/ssl.h --index 716537d..80717db 100644 ----- a/ssl/ssl.h --+++ b/ssl/ssl.h --@@ -292,6 +292,27 @@ SSL_IMPORT SECStatus SSL_CipherPrefGetDefault(PRInt32 cipher, PRBool *enabled); -- SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); -- SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); -+diff --git a/lib/ssl/ssl.h b/lib/ssl/ssl.h -+index 120c257..eb7f7ec 100644 -+--- a/lib/ssl/ssl.h -++++ b/lib/ssl/ssl.h -+@@ -385,6 +385,27 @@ SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, -+ */ -+ SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); - - +/* SSLChannelBindingType enumerates the types of supported channel binding - + * values. See RFC 5929. */ -@@ -30,12 +30,12 @@ - /* SSL Version Range API - ** - ** This API should be used to control SSL 3.0 & TLS support instead of the --diff --git a/ssl/ssl3con.c b/ssl/ssl3con.c --index c0e8e79..7c06815 100644 ----- a/ssl/ssl3con.c --+++ b/ssl/ssl3con.c --@@ -12479,6 +12479,68 @@ ssl3_InitSocketPolicy(sslSocket *ss) -- PORT_Memcpy(ss->cipherSuites, cipherSuites, sizeof cipherSuites); -+diff --git a/lib/ssl/ssl3con.c b/lib/ssl/ssl3con.c -+index 2ae8ce9..ce92cf1 100644 -+--- a/lib/ssl/ssl3con.c -++++ b/lib/ssl/ssl3con.c -+@@ -13241,6 +13241,68 @@ ssl3_InitSocketPolicy(sslSocket *ss) -+ ss->ssl3.signatureAlgorithmCount = PR_ARRAY_SIZE(defaultSignatureAlgorithms); - } - - +SECStatus -@@ -103,11 +103,11 @@ - /* ssl3_config_match_init must have already been called by - * the caller of this function. - */ --diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h --index e11860e..0ece0ed 100644 ----- a/ssl/sslimpl.h --+++ b/ssl/sslimpl.h --@@ -1864,6 +1864,11 @@ extern PRBool ssl_GetSessionTicketKeysPKCS11(SECKEYPrivateKey *svrPrivKey, -+diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h -+index c286518..976330e 100644 -+--- a/lib/ssl/sslimpl.h -++++ b/lib/ssl/sslimpl.h -+@@ -1897,6 +1897,11 @@ extern PRBool ssl_GetSessionTicketKeysPKCS11(SECKEYPrivateKey *svrPrivKey, - extern SECStatus ssl3_ValidateNextProtoNego(const unsigned char* data, - unsigned int length); - -@@ -119,12 +119,12 @@ - /* Construct a new NSPR socket for the app to use */ - extern PRFileDesc *ssl_NewPRSocket(sslSocket *ss, PRFileDesc *fd); - extern void ssl_FreePRSocket(PRFileDesc *fd); --diff --git a/ssl/sslsock.c b/ssl/sslsock.c --index 042f24f..14ff328 100644 ----- a/ssl/sslsock.c --+++ b/ssl/sslsock.c --@@ -1345,6 +1345,27 @@ NSS_SetFrancePolicy(void) -- return NSS_SetDomesticPolicy(); -+diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c -+index efba686..c9a4493 100644 -+--- a/lib/ssl/sslsock.c -++++ b/lib/ssl/sslsock.c -+@@ -1540,6 +1540,28 @@ SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled) -+ return SECSuccess; - } - - +SECStatus -@@ -148,6 +148,7 @@ - + - + return ssl3_GetTLSUniqueChannelBinding(ss, out, outLen, outLenMax); - +} -++ -+ #include "dhe-param.c" - -- -- /* LOCKS ??? XXX */ -+ static const SSLDHEGroupType ssl_default_dhe_groups[] = { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/README.chromium 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/README.chromium 2016-01-13 14:18:55.588954676 +0100 -@@ -1,6 +1,6 @@ - Name: Network Security Services (NSS) - URL: http://www.mozilla.org/projects/security/pki/nss/ --Version: 3.19 RTM -+Version: 3.21 RTM - Security Critical: Yes - License: MPL 2 - License File: NOT_SHIPPED -@@ -11,7 +11,7 @@ - The same module appears in crypto/third_party/nss (and third_party/nss on some - platforms), so we don't repeat the license file here. - --The snapshot was updated to the hg tag: NSS_3_19_RTM -+The snapshot was updated to the hg tag: NSS_3_21_RTM - - Patches: - -@@ -100,16 +100,6 @@ - length. - patches/reorderextensions.patch - -- * Make the build metadata deterministic -- patches/removebuildmetadata.patch -- -- * Fix locking bug in ssl3_HandleHelloRequest when rejecting a renegotiation. -- patches/norenegotiatelock.patch -- https://bugzilla.mozilla.org/show_bug.cgi?id=1162521 -- -- * Increase the minimum DH group size to 1024 -- patches/dh1024.patch -- - Apply the patches to NSS by running the patches/applypatches.sh script. Read - the comments at the top of patches/applypatches.sh for instructions. - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/derive.c 2016-01-13 14:18:55.613954821 +0100 -@@ -431,7 +431,7 @@ - * so isRSA is always true. - */ - SECStatus --ssl3_MasterKeyDeriveBypass( -+ssl3_MasterSecretDeriveBypass( - ssl3CipherSpec * pwSpec, - const unsigned char * cr, - const unsigned char * sr, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dhe-param.c 2016-01-13 14:18:55.613954821 +0100 -@@ -0,0 +1,413 @@ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+static const unsigned char ff_dhe_g2[] = { 2 }; -+ -+static const unsigned char ff_dhe_2048_p[] = { -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, -+ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, -+ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, -+ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, -+ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, -+ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, -+ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, -+ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, -+ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, -+ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, -+ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, -+ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, -+ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, -+ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, -+ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, -+ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, -+ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, -+ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, -+ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, -+ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, -+ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, -+ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, -+ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, -+ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, -+ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, -+ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, -+ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, -+ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, -+ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, -+ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x28, 0x5C, 0x97, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+}; -+ -+static const ssl3DHParams ff_dhe_2048 = { -+ { siBuffer, (unsigned char *)ff_dhe_2048_p, sizeof(ff_dhe_2048_p) }, -+ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, -+}; -+ -+static const unsigned char ff_dhe_3072_p[] = { -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, -+ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, -+ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, -+ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, -+ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, -+ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, -+ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, -+ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, -+ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, -+ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, -+ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, -+ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, -+ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, -+ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, -+ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, -+ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, -+ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, -+ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, -+ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, -+ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, -+ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, -+ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, -+ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, -+ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, -+ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, -+ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, -+ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, -+ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, -+ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, -+ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, -+ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, -+ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, -+ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, -+ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, -+ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, -+ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, -+ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, -+ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, -+ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, -+ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, -+ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, -+ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, -+ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, -+ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, -+ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, -+ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0xC6, 0x2E, 0x37, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+}; -+ -+static const ssl3DHParams ff_dhe_3072 = { -+ { siBuffer, (unsigned char *)ff_dhe_3072_p, sizeof(ff_dhe_3072_p) }, -+ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, -+}; -+ -+static const unsigned char ff_dhe_4096_p[] = { -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, -+ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, -+ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, -+ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, -+ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, -+ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, -+ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, -+ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, -+ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, -+ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, -+ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, -+ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, -+ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, -+ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, -+ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, -+ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, -+ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, -+ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, -+ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, -+ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, -+ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, -+ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, -+ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, -+ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, -+ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, -+ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, -+ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, -+ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, -+ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, -+ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, -+ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, -+ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, -+ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, -+ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, -+ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, -+ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, -+ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, -+ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, -+ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, -+ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, -+ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, -+ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, -+ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, -+ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, -+ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, -+ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, -+ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, -+ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, -+ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, -+ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, -+ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, -+ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, -+ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, -+ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, -+ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, -+ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, -+ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, -+ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, -+ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, -+ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, -+ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, -+ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x65, 0x5F, 0x6A, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+}; -+ -+static const ssl3DHParams ff_dhe_4096 = { -+ { siBuffer, (unsigned char *)ff_dhe_4096_p, sizeof(ff_dhe_4096_p) }, -+ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, -+}; -+ -+static const unsigned char ff_dhe_6144_p[] = { -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, -+ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, -+ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, -+ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, -+ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, -+ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, -+ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, -+ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, -+ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, -+ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, -+ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, -+ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, -+ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, -+ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, -+ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, -+ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, -+ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, -+ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, -+ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, -+ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, -+ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, -+ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, -+ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, -+ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, -+ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, -+ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, -+ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, -+ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, -+ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, -+ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, -+ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, -+ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, -+ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, -+ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, -+ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, -+ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, -+ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, -+ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, -+ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, -+ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, -+ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, -+ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, -+ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, -+ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, -+ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, -+ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, -+ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, -+ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, -+ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, -+ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, -+ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, -+ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, -+ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, -+ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, -+ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, -+ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, -+ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, -+ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, -+ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, -+ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, -+ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, -+ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, -+ 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, -+ 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, -+ 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, -+ 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, -+ 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, -+ 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, -+ 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, -+ 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, -+ 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, -+ 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, -+ 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, -+ 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, -+ 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, -+ 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, -+ 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, -+ 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, -+ 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, -+ 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, -+ 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, -+ 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, -+ 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, -+ 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, -+ 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, -+ 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, -+ 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, -+ 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, -+ 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, -+ 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, -+ 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, -+ 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, -+ 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, -+ 0xA4, 0x0E, 0x32, 0x9C, 0xD0, 0xE4, 0x0E, 0x65, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+}; -+ -+static const ssl3DHParams ff_dhe_6144 = { -+ { siBuffer, (unsigned char *)ff_dhe_6144_p, sizeof(ff_dhe_6144_p) }, -+ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, -+}; -+ -+static const unsigned char ff_dhe_8192_p[] = { -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xAD, 0xF8, 0x54, 0x58, 0xA2, 0xBB, 0x4A, 0x9A, -+ 0xAF, 0xDC, 0x56, 0x20, 0x27, 0x3D, 0x3C, 0xF1, -+ 0xD8, 0xB9, 0xC5, 0x83, 0xCE, 0x2D, 0x36, 0x95, -+ 0xA9, 0xE1, 0x36, 0x41, 0x14, 0x64, 0x33, 0xFB, -+ 0xCC, 0x93, 0x9D, 0xCE, 0x24, 0x9B, 0x3E, 0xF9, -+ 0x7D, 0x2F, 0xE3, 0x63, 0x63, 0x0C, 0x75, 0xD8, -+ 0xF6, 0x81, 0xB2, 0x02, 0xAE, 0xC4, 0x61, 0x7A, -+ 0xD3, 0xDF, 0x1E, 0xD5, 0xD5, 0xFD, 0x65, 0x61, -+ 0x24, 0x33, 0xF5, 0x1F, 0x5F, 0x06, 0x6E, 0xD0, -+ 0x85, 0x63, 0x65, 0x55, 0x3D, 0xED, 0x1A, 0xF3, -+ 0xB5, 0x57, 0x13, 0x5E, 0x7F, 0x57, 0xC9, 0x35, -+ 0x98, 0x4F, 0x0C, 0x70, 0xE0, 0xE6, 0x8B, 0x77, -+ 0xE2, 0xA6, 0x89, 0xDA, 0xF3, 0xEF, 0xE8, 0x72, -+ 0x1D, 0xF1, 0x58, 0xA1, 0x36, 0xAD, 0xE7, 0x35, -+ 0x30, 0xAC, 0xCA, 0x4F, 0x48, 0x3A, 0x79, 0x7A, -+ 0xBC, 0x0A, 0xB1, 0x82, 0xB3, 0x24, 0xFB, 0x61, -+ 0xD1, 0x08, 0xA9, 0x4B, 0xB2, 0xC8, 0xE3, 0xFB, -+ 0xB9, 0x6A, 0xDA, 0xB7, 0x60, 0xD7, 0xF4, 0x68, -+ 0x1D, 0x4F, 0x42, 0xA3, 0xDE, 0x39, 0x4D, 0xF4, -+ 0xAE, 0x56, 0xED, 0xE7, 0x63, 0x72, 0xBB, 0x19, -+ 0x0B, 0x07, 0xA7, 0xC8, 0xEE, 0x0A, 0x6D, 0x70, -+ 0x9E, 0x02, 0xFC, 0xE1, 0xCD, 0xF7, 0xE2, 0xEC, -+ 0xC0, 0x34, 0x04, 0xCD, 0x28, 0x34, 0x2F, 0x61, -+ 0x91, 0x72, 0xFE, 0x9C, 0xE9, 0x85, 0x83, 0xFF, -+ 0x8E, 0x4F, 0x12, 0x32, 0xEE, 0xF2, 0x81, 0x83, -+ 0xC3, 0xFE, 0x3B, 0x1B, 0x4C, 0x6F, 0xAD, 0x73, -+ 0x3B, 0xB5, 0xFC, 0xBC, 0x2E, 0xC2, 0x20, 0x05, -+ 0xC5, 0x8E, 0xF1, 0x83, 0x7D, 0x16, 0x83, 0xB2, -+ 0xC6, 0xF3, 0x4A, 0x26, 0xC1, 0xB2, 0xEF, 0xFA, -+ 0x88, 0x6B, 0x42, 0x38, 0x61, 0x1F, 0xCF, 0xDC, -+ 0xDE, 0x35, 0x5B, 0x3B, 0x65, 0x19, 0x03, 0x5B, -+ 0xBC, 0x34, 0xF4, 0xDE, 0xF9, 0x9C, 0x02, 0x38, -+ 0x61, 0xB4, 0x6F, 0xC9, 0xD6, 0xE6, 0xC9, 0x07, -+ 0x7A, 0xD9, 0x1D, 0x26, 0x91, 0xF7, 0xF7, 0xEE, -+ 0x59, 0x8C, 0xB0, 0xFA, 0xC1, 0x86, 0xD9, 0x1C, -+ 0xAE, 0xFE, 0x13, 0x09, 0x85, 0x13, 0x92, 0x70, -+ 0xB4, 0x13, 0x0C, 0x93, 0xBC, 0x43, 0x79, 0x44, -+ 0xF4, 0xFD, 0x44, 0x52, 0xE2, 0xD7, 0x4D, 0xD3, -+ 0x64, 0xF2, 0xE2, 0x1E, 0x71, 0xF5, 0x4B, 0xFF, -+ 0x5C, 0xAE, 0x82, 0xAB, 0x9C, 0x9D, 0xF6, 0x9E, -+ 0xE8, 0x6D, 0x2B, 0xC5, 0x22, 0x36, 0x3A, 0x0D, -+ 0xAB, 0xC5, 0x21, 0x97, 0x9B, 0x0D, 0xEA, 0xDA, -+ 0x1D, 0xBF, 0x9A, 0x42, 0xD5, 0xC4, 0x48, 0x4E, -+ 0x0A, 0xBC, 0xD0, 0x6B, 0xFA, 0x53, 0xDD, 0xEF, -+ 0x3C, 0x1B, 0x20, 0xEE, 0x3F, 0xD5, 0x9D, 0x7C, -+ 0x25, 0xE4, 0x1D, 0x2B, 0x66, 0x9E, 0x1E, 0xF1, -+ 0x6E, 0x6F, 0x52, 0xC3, 0x16, 0x4D, 0xF4, 0xFB, -+ 0x79, 0x30, 0xE9, 0xE4, 0xE5, 0x88, 0x57, 0xB6, -+ 0xAC, 0x7D, 0x5F, 0x42, 0xD6, 0x9F, 0x6D, 0x18, -+ 0x77, 0x63, 0xCF, 0x1D, 0x55, 0x03, 0x40, 0x04, -+ 0x87, 0xF5, 0x5B, 0xA5, 0x7E, 0x31, 0xCC, 0x7A, -+ 0x71, 0x35, 0xC8, 0x86, 0xEF, 0xB4, 0x31, 0x8A, -+ 0xED, 0x6A, 0x1E, 0x01, 0x2D, 0x9E, 0x68, 0x32, -+ 0xA9, 0x07, 0x60, 0x0A, 0x91, 0x81, 0x30, 0xC4, -+ 0x6D, 0xC7, 0x78, 0xF9, 0x71, 0xAD, 0x00, 0x38, -+ 0x09, 0x29, 0x99, 0xA3, 0x33, 0xCB, 0x8B, 0x7A, -+ 0x1A, 0x1D, 0xB9, 0x3D, 0x71, 0x40, 0x00, 0x3C, -+ 0x2A, 0x4E, 0xCE, 0xA9, 0xF9, 0x8D, 0x0A, 0xCC, -+ 0x0A, 0x82, 0x91, 0xCD, 0xCE, 0xC9, 0x7D, 0xCF, -+ 0x8E, 0xC9, 0xB5, 0x5A, 0x7F, 0x88, 0xA4, 0x6B, -+ 0x4D, 0xB5, 0xA8, 0x51, 0xF4, 0x41, 0x82, 0xE1, -+ 0xC6, 0x8A, 0x00, 0x7E, 0x5E, 0x0D, 0xD9, 0x02, -+ 0x0B, 0xFD, 0x64, 0xB6, 0x45, 0x03, 0x6C, 0x7A, -+ 0x4E, 0x67, 0x7D, 0x2C, 0x38, 0x53, 0x2A, 0x3A, -+ 0x23, 0xBA, 0x44, 0x42, 0xCA, 0xF5, 0x3E, 0xA6, -+ 0x3B, 0xB4, 0x54, 0x32, 0x9B, 0x76, 0x24, 0xC8, -+ 0x91, 0x7B, 0xDD, 0x64, 0xB1, 0xC0, 0xFD, 0x4C, -+ 0xB3, 0x8E, 0x8C, 0x33, 0x4C, 0x70, 0x1C, 0x3A, -+ 0xCD, 0xAD, 0x06, 0x57, 0xFC, 0xCF, 0xEC, 0x71, -+ 0x9B, 0x1F, 0x5C, 0x3E, 0x4E, 0x46, 0x04, 0x1F, -+ 0x38, 0x81, 0x47, 0xFB, 0x4C, 0xFD, 0xB4, 0x77, -+ 0xA5, 0x24, 0x71, 0xF7, 0xA9, 0xA9, 0x69, 0x10, -+ 0xB8, 0x55, 0x32, 0x2E, 0xDB, 0x63, 0x40, 0xD8, -+ 0xA0, 0x0E, 0xF0, 0x92, 0x35, 0x05, 0x11, 0xE3, -+ 0x0A, 0xBE, 0xC1, 0xFF, 0xF9, 0xE3, 0xA2, 0x6E, -+ 0x7F, 0xB2, 0x9F, 0x8C, 0x18, 0x30, 0x23, 0xC3, -+ 0x58, 0x7E, 0x38, 0xDA, 0x00, 0x77, 0xD9, 0xB4, -+ 0x76, 0x3E, 0x4E, 0x4B, 0x94, 0xB2, 0xBB, 0xC1, -+ 0x94, 0xC6, 0x65, 0x1E, 0x77, 0xCA, 0xF9, 0x92, -+ 0xEE, 0xAA, 0xC0, 0x23, 0x2A, 0x28, 0x1B, 0xF6, -+ 0xB3, 0xA7, 0x39, 0xC1, 0x22, 0x61, 0x16, 0x82, -+ 0x0A, 0xE8, 0xDB, 0x58, 0x47, 0xA6, 0x7C, 0xBE, -+ 0xF9, 0xC9, 0x09, 0x1B, 0x46, 0x2D, 0x53, 0x8C, -+ 0xD7, 0x2B, 0x03, 0x74, 0x6A, 0xE7, 0x7F, 0x5E, -+ 0x62, 0x29, 0x2C, 0x31, 0x15, 0x62, 0xA8, 0x46, -+ 0x50, 0x5D, 0xC8, 0x2D, 0xB8, 0x54, 0x33, 0x8A, -+ 0xE4, 0x9F, 0x52, 0x35, 0xC9, 0x5B, 0x91, 0x17, -+ 0x8C, 0xCF, 0x2D, 0xD5, 0xCA, 0xCE, 0xF4, 0x03, -+ 0xEC, 0x9D, 0x18, 0x10, 0xC6, 0x27, 0x2B, 0x04, -+ 0x5B, 0x3B, 0x71, 0xF9, 0xDC, 0x6B, 0x80, 0xD6, -+ 0x3F, 0xDD, 0x4A, 0x8E, 0x9A, 0xDB, 0x1E, 0x69, -+ 0x62, 0xA6, 0x95, 0x26, 0xD4, 0x31, 0x61, 0xC1, -+ 0xA4, 0x1D, 0x57, 0x0D, 0x79, 0x38, 0xDA, 0xD4, -+ 0xA4, 0x0E, 0x32, 0x9C, 0xCF, 0xF4, 0x6A, 0xAA, -+ 0x36, 0xAD, 0x00, 0x4C, 0xF6, 0x00, 0xC8, 0x38, -+ 0x1E, 0x42, 0x5A, 0x31, 0xD9, 0x51, 0xAE, 0x64, -+ 0xFD, 0xB2, 0x3F, 0xCE, 0xC9, 0x50, 0x9D, 0x43, -+ 0x68, 0x7F, 0xEB, 0x69, 0xED, 0xD1, 0xCC, 0x5E, -+ 0x0B, 0x8C, 0xC3, 0xBD, 0xF6, 0x4B, 0x10, 0xEF, -+ 0x86, 0xB6, 0x31, 0x42, 0xA3, 0xAB, 0x88, 0x29, -+ 0x55, 0x5B, 0x2F, 0x74, 0x7C, 0x93, 0x26, 0x65, -+ 0xCB, 0x2C, 0x0F, 0x1C, 0xC0, 0x1B, 0xD7, 0x02, -+ 0x29, 0x38, 0x88, 0x39, 0xD2, 0xAF, 0x05, 0xE4, -+ 0x54, 0x50, 0x4A, 0xC7, 0x8B, 0x75, 0x82, 0x82, -+ 0x28, 0x46, 0xC0, 0xBA, 0x35, 0xC3, 0x5F, 0x5C, -+ 0x59, 0x16, 0x0C, 0xC0, 0x46, 0xFD, 0x82, 0x51, -+ 0x54, 0x1F, 0xC6, 0x8C, 0x9C, 0x86, 0xB0, 0x22, -+ 0xBB, 0x70, 0x99, 0x87, 0x6A, 0x46, 0x0E, 0x74, -+ 0x51, 0xA8, 0xA9, 0x31, 0x09, 0x70, 0x3F, 0xEE, -+ 0x1C, 0x21, 0x7E, 0x6C, 0x38, 0x26, 0xE5, 0x2C, -+ 0x51, 0xAA, 0x69, 0x1E, 0x0E, 0x42, 0x3C, 0xFC, -+ 0x99, 0xE9, 0xE3, 0x16, 0x50, 0xC1, 0x21, 0x7B, -+ 0x62, 0x48, 0x16, 0xCD, 0xAD, 0x9A, 0x95, 0xF9, -+ 0xD5, 0xB8, 0x01, 0x94, 0x88, 0xD9, 0xC0, 0xA0, -+ 0xA1, 0xFE, 0x30, 0x75, 0xA5, 0x77, 0xE2, 0x31, -+ 0x83, 0xF8, 0x1D, 0x4A, 0x3F, 0x2F, 0xA4, 0x57, -+ 0x1E, 0xFC, 0x8C, 0xE0, 0xBA, 0x8A, 0x4F, 0xE8, -+ 0xB6, 0x85, 0x5D, 0xFE, 0x72, 0xB0, 0xA6, 0x6E, -+ 0xDE, 0xD2, 0xFB, 0xAB, 0xFB, 0xE5, 0x8A, 0x30, -+ 0xFA, 0xFA, 0xBE, 0x1C, 0x5D, 0x71, 0xA8, 0x7E, -+ 0x2F, 0x74, 0x1E, 0xF8, 0xC1, 0xFE, 0x86, 0xFE, -+ 0xA6, 0xBB, 0xFD, 0xE5, 0x30, 0x67, 0x7F, 0x0D, -+ 0x97, 0xD1, 0x1D, 0x49, 0xF7, 0xA8, 0x44, 0x3D, -+ 0x08, 0x22, 0xE5, 0x06, 0xA9, 0xF4, 0x61, 0x4E, -+ 0x01, 0x1E, 0x2A, 0x94, 0x83, 0x8F, 0xF8, 0x8C, -+ 0xD6, 0x8C, 0x8B, 0xB7, 0xC5, 0xC6, 0x42, 0x4C, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+}; -+ -+static const ssl3DHParams ff_dhe_8192 = { -+ { siBuffer, (unsigned char *)ff_dhe_8192_p, sizeof(ff_dhe_8192_p) }, -+ { siBuffer, (unsigned char *)ff_dhe_g2, sizeof(ff_dhe_g2) }, -+}; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/dtlscon.c 2016-01-13 14:18:55.614954827 +0100 -@@ -104,9 +104,7 @@ - const ssl3CipherSuite * suite; - - for (suite = nonDTLSSuites; *suite; ++suite) { -- SECStatus rv = ssl3_CipherPrefSet(ss, *suite, PR_FALSE); -- -- PORT_Assert(rv == SECSuccess); /* else is coding error */ -+ PORT_CheckSuccess(ssl3_CipherPrefSet(ss, *suite, PR_FALSE)); - } - return SECSuccess; - } -@@ -229,7 +227,7 @@ - #define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */ - if (message_length > MAX_HANDSHAKE_MSG_LEN) { - (void)ssl3_DecodeError(ss); -- PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE); - return SECFailure; - } - #undef MAX_HANDSHAKE_MSG_LEN -@@ -396,7 +394,7 @@ - * This avoids having to fill in the bitmask in the common - * case of adjacent fragments received in sequence - */ -- if (fragment_offset <= ss->ssl3.hs.recvdHighWater) { -+ if (fragment_offset <= (unsigned int)ss->ssl3.hs.recvdHighWater) { - /* Either this is the adjacent fragment or an overlapping - * fragment */ - ss->ssl3.hs.recvdHighWater = fragment_offset + -@@ -676,7 +674,7 @@ - - /* The reason we use 8 here is that that's the length of - * the new DTLS data that we add to the header */ -- fragment_len = PR_MIN(room_left - (SSL3_BUFFER_FUDGE + 8), -+ fragment_len = PR_MIN((PRUint32)room_left - (SSL3_BUFFER_FUDGE + 8), - content_len - fragment_offset); - PORT_Assert(fragment_len < DTLS_MAX_MTU - 12); - /* Make totally sure that we are within the buffer. -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3con.c 2016-01-13 14:18:55.620954862 +0100 -@@ -25,6 +25,8 @@ - #include "prerror.h" - #include "pratom.h" - #include "prthread.h" -+#include "nss.h" -+#include "nssoptions.h" - - #include "pk11func.h" - #include "secmod.h" -@@ -91,8 +93,11 @@ - static SECStatus ssl3_UpdateHandshakeHashes( sslSocket *ss, - const unsigned char *b, - unsigned int l); -+static SECStatus ssl3_ComputeHandshakeHashes(sslSocket *ss, -+ ssl3CipherSpec *spec, -+ SSL3Hashes *hashes, -+ PRUint32 sender); - static SECStatus ssl3_FlushHandshakeMessages(sslSocket *ss, PRInt32 flags); --static int ssl3_OIDToTLSHashAlgorithm(SECOidTag oid); - - static SECStatus Null_Cipher(void *ctx, unsigned char *output, int *outputLen, - int maxOutputLen, const unsigned char *input, -@@ -122,17 +127,17 @@ - #ifndef NSS_DISABLE_ECC - { TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -+ { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA is out of order to work around - * bug 946147. - */ -- { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -- { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -+ { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, -@@ -140,14 +145,17 @@ - #endif /* NSS_DISABLE_ECC */ - - { TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_RSA_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - { TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - { TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_RSA_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - { TLS_DHE_DSS_WITH_AES_256_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, - { TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -+ { TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - { TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_ALLOWED, PR_TRUE, PR_FALSE}, -@@ -205,6 +213,23 @@ - { TLS_RSA_WITH_NULL_MD5, SSL_ALLOWED, PR_FALSE, PR_FALSE}, - }; - -+static const SSLSignatureAndHashAlg defaultSignatureAlgorithms[] = { -+ {ssl_hash_sha256, ssl_sign_rsa}, -+ {ssl_hash_sha384, ssl_sign_rsa}, -+ {ssl_hash_sha512, ssl_sign_rsa}, -+ {ssl_hash_sha1, ssl_sign_rsa}, -+#ifndef NSS_DISABLE_ECC -+ {ssl_hash_sha256, ssl_sign_ecdsa}, -+ {ssl_hash_sha384, ssl_sign_ecdsa}, -+ {ssl_hash_sha512, ssl_sign_ecdsa}, -+ {ssl_hash_sha1, ssl_sign_ecdsa}, -+#endif -+ {ssl_hash_sha256, ssl_sign_dsa}, -+ {ssl_hash_sha1, ssl_sign_dsa} -+}; -+PR_STATIC_ASSERT(PR_ARRAY_SIZE(defaultSignatureAlgorithms) <= -+ MAX_SIGNATURE_ALGORITHMS); -+ - /* Verify that SSL_ImplementedCiphers and cipherSuites are in consistent order. - */ - #ifdef DEBUG -@@ -265,20 +290,6 @@ - ct_DSS_sign, - }; - --/* This block is the contents of the supported_signature_algorithms field of -- * our TLS 1.2 CertificateRequest message, in wire format. See -- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 -- * -- * This block contains only sha256 entries because we only support TLS 1.2 -- * CertificateVerify messages that use the handshake hash. */ --static const PRUint8 supported_signature_algorithms[] = { -- tls_hash_sha256, tls_sig_rsa, --#ifndef NSS_DISABLE_ECC -- tls_hash_sha256, tls_sig_ecdsa, --#endif -- tls_hash_sha256, tls_sig_dsa, --}; -- - #define EXPORT_RSA_KEY_LENGTH 64 /* bytes */ - - -@@ -322,8 +333,8 @@ - /* kea exchKeyType signKeyType is_limited limit tls_keygen ephemeral */ - {kea_null, kt_null, sign_null, PR_FALSE, 0, PR_FALSE, PR_FALSE}, - {kea_rsa, kt_rsa, sign_rsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, -- {kea_rsa_export, kt_rsa, sign_rsa, PR_TRUE, 512, PR_FALSE, PR_TRUE}, -- {kea_rsa_export_1024,kt_rsa, sign_rsa, PR_TRUE, 1024, PR_FALSE, PR_TRUE}, -+ {kea_rsa_export, kt_rsa, sign_rsa, PR_TRUE, 512, PR_FALSE, PR_FALSE}, -+ {kea_rsa_export_1024,kt_rsa, sign_rsa, PR_TRUE, 1024, PR_FALSE, PR_FALSE}, - {kea_dh_dss, kt_dh, sign_dsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, - {kea_dh_dss_export, kt_dh, sign_dsa, PR_TRUE, 512, PR_FALSE, PR_FALSE}, - {kea_dh_rsa, kt_dh, sign_rsa, PR_FALSE, 0, PR_FALSE, PR_FALSE}, -@@ -443,6 +454,10 @@ - {TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_rsa}, - {TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, cipher_chacha20, mac_aead, kea_ecdhe_ecdsa}, - -+ {TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, cipher_aes_128_gcm, mac_aead, kea_dhe_dss}, -+ {TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, cipher_aes_128, hmac_sha256, kea_dhe_dss}, -+ {TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, cipher_aes_256, hmac_sha256, kea_dhe_dss}, -+ - #ifndef NSS_DISABLE_ECC - {TLS_ECDH_ECDSA_WITH_NULL_SHA, cipher_null, mac_sha, kea_ecdh_ecdsa}, - {TLS_ECDH_ECDSA_WITH_RC4_128_SHA, cipher_rc4, mac_sha, kea_ecdh_ecdsa}, -@@ -680,6 +695,8 @@ - case TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: - case TLS_RSA_WITH_AES_128_CBC_SHA256: - case TLS_RSA_WITH_AES_128_GCM_SHA256: -+ case TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: -+ case TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: - case TLS_RSA_WITH_NULL_SHA256: - return vrange->max == SSL_LIBRARY_VERSION_TLS_1_2; - -@@ -688,6 +705,7 @@ - case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: - case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: - case TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: -+ case TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: - return vrange->max >= SSL_LIBRARY_VERSION_TLS_1_2; - - /* RFC 4492: ECC cipher suites need TLS extensions to negotiate curves and -@@ -810,16 +828,11 @@ - * that the server uses an RSA cert for (EC)DHE-RSA. - */ - switch (cipher_def->key_exchange_alg) { -+ case kea_dhe_dss: -+ svrAuth = ss->serverCerts + ssl_kea_dh; -+ break; - case kea_ecdhe_rsa: --#if NSS_SERVER_DHE_IMPLEMENTED -- /* XXX NSS does not yet implement the server side of _DHE_ -- * cipher suites. Correcting the computation for svrAuth, -- * as the case below does, causes NSS SSL servers to begin to -- * negotiate cipher suites they do not implement. So, until -- * server side _DHE_ is implemented, keep this disabled. -- */ - case kea_dhe_rsa: --#endif - svrAuth = ss->serverCerts + kt_rsa; - break; - case kea_ecdh_ecdsa: -@@ -831,6 +844,8 @@ - * simultaneously. For now, both of them use - * whatever is in the certificate slot for kt_ecdh - */ -+ case kea_dhe_dss_export: -+ case kea_dhe_rsa_export: - default: - svrAuth = ss->serverCerts + exchKeyType; - break; -@@ -867,11 +882,22 @@ - * cipher suite. */ - static PRBool - config_match(ssl3CipherSuiteCfg *suite, int policy, PRBool enabled, -- const SSLVersionRange *vrange) -+ const SSLVersionRange *vrange, const sslSocket *ss) - { -+ const ssl3CipherSuiteDef *cipher_def; -+ - PORT_Assert(policy != SSL_NOT_ALLOWED && enabled != PR_FALSE); - if (policy == SSL_NOT_ALLOWED || !enabled) -- return PR_FALSE; -+ return PR_FALSE; -+ -+ cipher_def = ssl_LookupCipherSuiteDef(suite->cipher_suite); -+ PORT_Assert(cipher_def != NULL); -+ -+ PORT_Assert(ss != NULL); -+ if (ss->sec.isServer && !ss->opt.enableServerDhe && -+ kea_defs[cipher_def->key_exchange_alg].exchKeyType == ssl_kea_dh) -+ return PR_FALSE; -+ - return (PRBool)(suite->enabled && - suite->isPresent && - suite->policy != SSL_NOT_ALLOWED && -@@ -892,7 +918,7 @@ - return 0; - } - for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { -- if (config_match(&ss->cipherSuites[i], policy, enabled, &ss->vrange)) -+ if (config_match(&ss->cipherSuites[i], policy, enabled, &ss->vrange, ss)) - count++; - } - if (count <= 0) { -@@ -984,9 +1010,9 @@ - break; - case dsaKey: - doDerEncode = isTLS; -- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. -+ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. - * In that case, we use just the SHA1 part. */ -- if (hash->hashAlg == SEC_OID_UNKNOWN) { -+ if (hash->hashAlg == ssl_hash_none) { - hashItem.data = hash->u.s.sha; - hashItem.len = sizeof(hash->u.s.sha); - } else { -@@ -997,9 +1023,9 @@ - #ifndef NSS_DISABLE_ECC - case ecKey: - doDerEncode = PR_TRUE; -- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. -+ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. - * In that case, we use just the SHA1 part. */ -- if (hash->hashAlg == SEC_OID_UNKNOWN) { -+ if (hash->hashAlg == ssl_hash_none) { - hashItem.data = hash->u.s.sha; - hashItem.len = sizeof(hash->u.s.sha); - } else { -@@ -1014,7 +1040,7 @@ - } - PRINT_BUF(60, (NULL, "hash(es) to be signed", hashItem.data, hashItem.len)); - -- if (hash->hashAlg == SEC_OID_UNKNOWN) { -+ if (hash->hashAlg == ssl_hash_none) { - signatureLen = PK11_SignatureLen(key); - if (signatureLen <= 0) { - PORT_SetError(SEC_ERROR_INVALID_KEY); -@@ -1028,7 +1054,8 @@ - - rv = PK11_Sign(key, buf, &hashItem); - } else { -- rv = SGN_Digest(key, hash->hashAlg, buf, &hashItem); -+ SECOidTag hashOID = ssl3_TLSHashAlgorithmToOID(hash->hashAlg); -+ rv = SGN_Digest(key, hashOID, buf, &hashItem); - } - if (rv != SECSuccess) { - ssl_MapLowLevelError(SSL_ERROR_SIGN_HASHES_FAILURE); -@@ -1076,7 +1103,7 @@ - return SECFailure; - } - -- hashAlg = hash->hashAlg; -+ hashAlg = ssl3_TLSHashAlgorithmToOID(hash->hashAlg); - switch (key->keyType) { - case rsaKey: - encAlg = SEC_OID_PKCS1_RSA_ENCRYPTION; -@@ -1085,9 +1112,9 @@ - break; - case dsaKey: - encAlg = SEC_OID_ANSIX9_DSA_SIGNATURE; -- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. -+ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. - * In that case, we use just the SHA1 part. */ -- if (hash->hashAlg == SEC_OID_UNKNOWN) { -+ if (hash->hashAlg == ssl_hash_none) { - hashItem.data = hash->u.s.sha; - hashItem.len = sizeof(hash->u.s.sha); - } else { -@@ -1108,13 +1135,13 @@ - #ifndef NSS_DISABLE_ECC - case ecKey: - encAlg = SEC_OID_ANSIX962_EC_PUBLIC_KEY; -- /* SEC_OID_UNKNOWN is used to specify the MD5/SHA1 concatenated hash. -+ /* ssl_hash_none is used to specify the MD5/SHA1 concatenated hash. - * In that case, we use just the SHA1 part. - * ECDSA signatures always encode the integers r and s using ASN.1 - * (unlike DSA where ASN.1 encoding is used with TLS but not with - * SSL3). So we can use VFY_VerifyDigestDirect for ECDSA. - */ -- if (hash->hashAlg == SEC_OID_UNKNOWN) { -+ if (hash->hashAlg == ssl_hash_none) { - hashAlg = SEC_OID_SHA1; - hashItem.data = hash->u.s.sha; - hashItem.len = sizeof(hash->u.s.sha); -@@ -1142,8 +1169,8 @@ - */ - rv = PK11_Verify(key, buf, &hashItem, pwArg); - } else { -- rv = VFY_VerifyDigestDirect(&hashItem, key, buf, encAlg, hashAlg, -- pwArg); -+ rv = VFY_VerifyDigestDirect(&hashItem, key, buf, encAlg, hashAlg, -+ pwArg); - } - SECKEY_DestroyPublicKey(key); - if (signature) { -@@ -1159,75 +1186,71 @@ - /* Caller must set hiLevel error code. */ - /* Called from ssl3_ComputeExportRSAKeyHash - * ssl3_ComputeDHKeyHash -- * which are called from ssl3_HandleServerKeyExchange. -+ * which are called from ssl3_HandleServerKeyExchange. - * -- * hashAlg: either the OID for a hash algorithm or SEC_OID_UNKNOWN to specify -- * the pre-1.2, MD5/SHA1 combination hash. -+ * hashAlg: ssl_hash_none indicates the pre-1.2, MD5/SHA1 combination hash. - */ - SECStatus --ssl3_ComputeCommonKeyHash(SECOidTag hashAlg, -- PRUint8 * hashBuf, unsigned int bufLen, -- SSL3Hashes *hashes, PRBool bypassPKCS11) -+ssl3_ComputeCommonKeyHash(SSLHashType hashAlg, -+ PRUint8 * hashBuf, unsigned int bufLen, -+ SSL3Hashes *hashes, PRBool bypassPKCS11) - { -- SECStatus rv = SECSuccess; -+ SECStatus rv; -+ SECOidTag hashOID; - - #ifndef NO_PKCS11_BYPASS - if (bypassPKCS11) { -- if (hashAlg == SEC_OID_UNKNOWN) { -- MD5_HashBuf (hashes->u.s.md5, hashBuf, bufLen); -- SHA1_HashBuf(hashes->u.s.sha, hashBuf, bufLen); -- hashes->len = MD5_LENGTH + SHA1_LENGTH; -- } else if (hashAlg == SEC_OID_SHA1) { -- SHA1_HashBuf(hashes->u.raw, hashBuf, bufLen); -- hashes->len = SHA1_LENGTH; -- } else if (hashAlg == SEC_OID_SHA256) { -- SHA256_HashBuf(hashes->u.raw, hashBuf, bufLen); -- hashes->len = SHA256_LENGTH; -- } else if (hashAlg == SEC_OID_SHA384) { -- SHA384_HashBuf(hashes->u.raw, hashBuf, bufLen); -- hashes->len = SHA384_LENGTH; -- } else if (hashAlg == SEC_OID_SHA512) { -- SHA512_HashBuf(hashes->u.raw, hashBuf, bufLen); -- hashes->len = SHA512_LENGTH; -- } else { -- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -- return SECFailure; -- } -- } else -+ if (hashAlg == ssl_hash_none) { -+ MD5_HashBuf (hashes->u.s.md5, hashBuf, bufLen); -+ SHA1_HashBuf(hashes->u.s.sha, hashBuf, bufLen); -+ hashes->len = MD5_LENGTH + SHA1_LENGTH; -+ } else if (hashAlg == ssl_hash_sha1) { -+ SHA1_HashBuf(hashes->u.raw, hashBuf, bufLen); -+ hashes->len = SHA1_LENGTH; -+ } else if (hashAlg == ssl_hash_sha256) { -+ SHA256_HashBuf(hashes->u.raw, hashBuf, bufLen); -+ hashes->len = SHA256_LENGTH; -+ } else if (hashAlg == ssl_hash_sha384) { -+ SHA384_HashBuf(hashes->u.raw, hashBuf, bufLen); -+ hashes->len = SHA384_LENGTH; -+ } else if (hashAlg == ssl_hash_sha512) { -+ SHA512_HashBuf(hashes->u.raw, hashBuf, bufLen); -+ hashes->len = SHA512_LENGTH; -+ } else { -+ PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -+ return SECFailure; -+ } -+ } else - #endif - { -- if (hashAlg == SEC_OID_UNKNOWN) { -- rv = PK11_HashBuf(SEC_OID_MD5, hashes->u.s.md5, hashBuf, bufLen); -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE); -- rv = SECFailure; -- goto done; -- } -- -- rv = PK11_HashBuf(SEC_OID_SHA1, hashes->u.s.sha, hashBuf, bufLen); -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE); -- rv = SECFailure; -- } -- hashes->len = MD5_LENGTH + SHA1_LENGTH; -- } else { -- hashes->len = HASH_ResultLenByOidTag(hashAlg); -- if (hashes->len > sizeof(hashes->u.raw)) { -- ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -- rv = SECFailure; -- goto done; -- } -- rv = PK11_HashBuf(hashAlg, hashes->u.raw, hashBuf, bufLen); -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE); -- rv = SECFailure; -- } -- } -+ if (hashAlg == ssl_hash_none) { -+ rv = PK11_HashBuf(SEC_OID_MD5, hashes->u.s.md5, hashBuf, bufLen); -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_MD5_DIGEST_FAILURE); -+ return rv; -+ } -+ rv = PK11_HashBuf(SEC_OID_SHA1, hashes->u.s.sha, hashBuf, bufLen); -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_SHA_DIGEST_FAILURE); -+ return rv; -+ } -+ hashes->len = MD5_LENGTH + SHA1_LENGTH; -+ } else { -+ hashOID = ssl3_TLSHashAlgorithmToOID(hashAlg); -+ hashes->len = HASH_ResultLenByOidTag(hashOID); -+ if (hashes->len == 0 || hashes->len > sizeof(hashes->u.raw)) { -+ ssl_MapLowLevelError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -+ return SECFailure; -+ } -+ rv = PK11_HashBuf(hashOID, hashes->u.raw, hashBuf, bufLen); -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_DIGEST_FAILURE); -+ return rv; -+ } -+ } - } - hashes->hashAlg = hashAlg; -- --done: -- return rv; -+ return SECSuccess; - } - - /* Caller must set hiLevel error code. -@@ -1235,10 +1258,10 @@ - ** ssl3_HandleServerKeyExchange. - */ - static SECStatus --ssl3_ComputeExportRSAKeyHash(SECOidTag hashAlg, -- SECItem modulus, SECItem publicExponent, -- SSL3Random *client_rand, SSL3Random *server_rand, -- SSL3Hashes *hashes, PRBool bypassPKCS11) -+ssl3_ComputeExportRSAKeyHash(SSLHashType hashAlg, -+ SECItem modulus, SECItem publicExponent, -+ SSL3Random *client_rand, SSL3Random *server_rand, -+ SSL3Hashes *hashes, PRBool bypassPKCS11) - { - PRUint8 * hashBuf; - PRUint8 * pBuf; -@@ -1276,7 +1299,7 @@ - bypassPKCS11); - - PRINT_BUF(95, (NULL, "RSAkey hash: ", hashBuf, bufLen)); -- if (hashAlg == SEC_OID_UNKNOWN) { -+ if (hashAlg == ssl_hash_none) { - PRINT_BUF(95, (NULL, "RSAkey hash: MD5 result", - hashes->u.s.md5, MD5_LENGTH)); - PRINT_BUF(95, (NULL, "RSAkey hash: SHA1 result", -@@ -1294,10 +1317,10 @@ - /* Caller must set hiLevel error code. */ - /* Called from ssl3_HandleServerKeyExchange. */ - static SECStatus --ssl3_ComputeDHKeyHash(SECOidTag hashAlg, -- SECItem dh_p, SECItem dh_g, SECItem dh_Ys, -- SSL3Random *client_rand, SSL3Random *server_rand, -- SSL3Hashes *hashes, PRBool bypassPKCS11) -+ssl3_ComputeDHKeyHash(SSLHashType hashAlg, -+ SECItem dh_p, SECItem dh_g, SECItem dh_Ys, -+ SSL3Random *client_rand, SSL3Random *server_rand, -+ SSL3Hashes *hashes, PRBool bypassPKCS11) - { - PRUint8 * hashBuf; - PRUint8 * pBuf; -@@ -1340,7 +1363,7 @@ - bypassPKCS11); - - PRINT_BUF(95, (NULL, "DHkey hash: ", hashBuf, bufLen)); -- if (hashAlg == SEC_OID_UNKNOWN) { -+ if (hashAlg == ssl_hash_none) { - PRINT_BUF(95, (NULL, "DHkey hash: MD5 result", - hashes->u.s.md5, MD5_LENGTH)); - PRINT_BUF(95, (NULL, "DHkey hash: SHA1 result", -@@ -2298,7 +2321,11 @@ - * Sets error code, but caller probably should override to disambiguate. - * NULL pms means re-use old master_secret. - * -- * This code is common to the bypass and PKCS11 execution paths. -+ * This code is common to the bypass and PKCS11 execution paths. For -+ * the bypass case, pms is NULL. If the old master secret is reused, -+ * pms is NULL and the master secret is already in either -+ * pwSpec->msItem.len (the bypass case) or pwSpec->master_secret. -+ * - * For the bypass case, pms is NULL. - */ - SECStatus -@@ -2682,7 +2709,7 @@ - PRUint32 fragLen; - PRUint32 p1Len, p2Len, oddLen = 0; - PRUint16 headerLen; -- int ivLen = 0; -+ unsigned int ivLen = 0; - int cipherBytes = 0; - unsigned char pseudoHeader[13]; - unsigned int pseudoHeaderLen; -@@ -3244,7 +3271,8 @@ - { - static const PRInt32 allowedFlags = ssl_SEND_FLAG_FORCE_INTO_BUFFER | - ssl_SEND_FLAG_CAP_RECORD_VERSION; -- PRInt32 rv = SECSuccess; -+ PRInt32 count = -1; -+ SECStatus rv = SECSuccess; - - PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); - PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); -@@ -3258,18 +3286,19 @@ - PORT_SetError(SEC_ERROR_INVALID_ARGS); - rv = SECFailure; - } else { -- rv = ssl3_SendRecord(ss, 0, content_handshake, ss->sec.ci.sendBuf.buf, -+ count = ssl3_SendRecord(ss, 0, content_handshake, ss->sec.ci.sendBuf.buf, - ss->sec.ci.sendBuf.len, flags); - } -- if (rv < 0) { -+ if (count < 0) { - int err = PORT_GetError(); - PORT_Assert(err != PR_WOULD_BLOCK_ERROR); - if (err == PR_WOULD_BLOCK_ERROR) { - PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); - } -- } else if (rv < ss->sec.ci.sendBuf.len) { -+ rv = SECFailure; -+ } else if ((unsigned int)count < ss->sec.ci.sendBuf.len) { - /* short write should never happen */ -- PORT_Assert(rv >= ss->sec.ci.sendBuf.len); -+ PORT_Assert((unsigned int)count >= ss->sec.ci.sendBuf.len); - PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); - rv = SECFailure; - } else { -@@ -3705,13 +3734,70 @@ - return SECSuccess; - } - --/* This method uses PKCS11 to derive the MS from the PMS, where PMS --** is a PKCS11 symkey. This is used in all cases except the --** "triple bypass" with RSA key exchange. --** Called from ssl3_InitPendingCipherSpec. prSpec is pwSpec. -+/* This method completes the derivation of the MS from the PMS. -+** -+** 1. Derive the MS, if possible, else return an error. -+** -+** 2. Check the version if |pms_version| is non-zero and if wrong, -+** return an error. -+** -+** 3. If |msp| is nonzero, return MS in |*msp|. -+ -+** Called from: -+** ssl3_ComputeMasterSecretInt -+** tls_ComputeExtendedMasterSecretInt - */ - static SECStatus --ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms) -+ssl3_ComputeMasterSecretFinish(sslSocket *ss, -+ CK_MECHANISM_TYPE master_derive, -+ CK_MECHANISM_TYPE key_derive, -+ CK_VERSION *pms_version, -+ SECItem *params, CK_FLAGS keyFlags, -+ PK11SymKey *pms, PK11SymKey **msp) -+{ -+ PK11SymKey *ms = NULL; -+ -+ ms = PK11_DeriveWithFlags(pms, master_derive, -+ params, key_derive, -+ CKA_DERIVE, 0, keyFlags); -+ if (!ms) { -+ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); -+ return SECFailure; -+ } -+ -+ if (pms_version && ss->opt.detectRollBack) { -+ SSL3ProtocolVersion client_version; -+ client_version = pms_version->major << 8 | pms_version->minor; -+ -+ if (IS_DTLS(ss)) { -+ client_version = dtls_DTLSVersionToTLSVersion(client_version); -+ } -+ -+ if (client_version != ss->clientHelloVersion) { -+ /* Destroy MS. Version roll-back detected. */ -+ PK11_FreeSymKey(ms); -+ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); -+ return SECFailure; -+ } -+ } -+ -+ if (msp) { -+ *msp = ms; -+ } else { -+ PK11_FreeSymKey(ms); -+ } -+ -+ return SECSuccess; -+} -+ -+/* Compute the ordinary (pre draft-ietf-tls-session-hash) master -+ ** secret and return it in |*msp|. -+ ** -+ ** Called from: ssl3_ComputeMasterSecret -+ */ -+static SECStatus -+ssl3_ComputeMasterSecretInt(sslSocket *ss, PK11SymKey *pms, -+ PK11SymKey **msp) - { - ssl3CipherSpec * pwSpec = ss->ssl3.pwSpec; - const ssl3KEADef *kea_def= ss->ssl3.hs.kea_def; -@@ -3721,28 +3807,27 @@ - (pwSpec->version > SSL_LIBRARY_VERSION_3_0)); - PRBool isTLS12= - (PRBool)(isTLS && pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); -- /* -+ /* - * Whenever isDH is true, we need to use CKM_TLS_MASTER_KEY_DERIVE_DH - * which, unlike CKM_TLS_MASTER_KEY_DERIVE, converts arbitrary size -- * data into a 48-byte value. -+ * data into a 48-byte value, and does not expect to return the version. - */ - PRBool isDH = (PRBool) ((ss->ssl3.hs.kea_def->exchKeyType == kt_dh) || - (ss->ssl3.hs.kea_def->exchKeyType == kt_ecdh)); -- SECStatus rv = SECFailure; - CK_MECHANISM_TYPE master_derive; - CK_MECHANISM_TYPE key_derive; - SECItem params; - CK_FLAGS keyFlags; - CK_VERSION pms_version; -- CK_SSL3_MASTER_KEY_DERIVE_PARAMS master_params; -+ CK_VERSION *pms_version_ptr = NULL; -+ /* master_params may be used as a CK_SSL3_MASTER_KEY_DERIVE_PARAMS */ -+ CK_TLS12_MASTER_KEY_DERIVE_PARAMS master_params; -+ unsigned int master_params_len; - -- PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); -- PORT_Assert( ss->opt.noLocks || ssl_HaveSpecWriteLock(ss)); -- PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); - if (isTLS12) { -- if(isDH) master_derive = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; -- else master_derive = CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256; -- key_derive = CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256; -+ if(isDH) master_derive = CKM_TLS12_MASTER_KEY_DERIVE_DH; -+ else master_derive = CKM_TLS12_MASTER_KEY_DERIVE; -+ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; - keyFlags = CKF_SIGN | CKF_VERIFY; - } else if (isTLS) { - if(isDH) master_derive = CKM_TLS_MASTER_KEY_DERIVE_DH; -@@ -3756,87 +3841,142 @@ - keyFlags = 0; - } - -- if (pms || !pwSpec->master_secret) { -- if (isDH) { -- master_params.pVersion = NULL; -- } else { -- master_params.pVersion = &pms_version; -- } -- master_params.RandomInfo.pClientRandom = cr; -- master_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH; -- master_params.RandomInfo.pServerRandom = sr; -- master_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH; -+ if (!isDH) { -+ pms_version_ptr = &pms_version; -+ } - -- params.data = (unsigned char *) &master_params; -- params.len = sizeof master_params; -+ master_params.pVersion = pms_version_ptr; -+ master_params.RandomInfo.pClientRandom = cr; -+ master_params.RandomInfo.ulClientRandomLen = SSL3_RANDOM_LENGTH; -+ master_params.RandomInfo.pServerRandom = sr; -+ master_params.RandomInfo.ulServerRandomLen = SSL3_RANDOM_LENGTH; -+ if (isTLS12) { -+ master_params.prfHashMechanism = CKM_SHA256; -+ master_params_len = sizeof(CK_TLS12_MASTER_KEY_DERIVE_PARAMS); -+ } else { -+ /* prfHashMechanism is not relevant with this PRF */ -+ master_params_len = sizeof(CK_SSL3_MASTER_KEY_DERIVE_PARAMS); - } - -- if (pms != NULL) { --#if defined(TRACE) -- if (ssl_trace >= 100) { -- SECStatus extractRV = PK11_ExtractKeyValue(pms); -- if (extractRV == SECSuccess) { -- SECItem * keyData = PK11_GetKeyData(pms); -- if (keyData && keyData->data && keyData->len) { -- ssl_PrintBuf(ss, "Pre-Master Secret", -- keyData->data, keyData->len); -- } -- } -- } --#endif -- pwSpec->master_secret = PK11_DeriveWithFlags(pms, master_derive, -- ¶ms, key_derive, CKA_DERIVE, 0, keyFlags); -- if (!isDH && pwSpec->master_secret && ss->opt.detectRollBack) { -- SSL3ProtocolVersion client_version; -- client_version = pms_version.major << 8 | pms_version.minor; -+ params.data = (unsigned char *) &master_params; -+ params.len = master_params_len; - -- if (IS_DTLS(ss)) { -- client_version = dtls_DTLSVersionToTLSVersion(client_version); -- } -+ return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive, -+ pms_version_ptr, ¶ms, -+ keyFlags, pms, msp); -+} - -- if (client_version != ss->clientHelloVersion) { -- /* Destroy it. Version roll-back detected. */ -- PK11_FreeSymKey(pwSpec->master_secret); -- pwSpec->master_secret = NULL; -- } -- } -- if (pwSpec->master_secret == NULL) { -- /* Generate a faux master secret in the same slot as the old one. */ -- PK11SlotInfo * slot = PK11_GetSlotFromKey((PK11SymKey *)pms); -- PK11SymKey * fpms = ssl3_GenerateRSAPMS(ss, pwSpec, slot); -+/* Compute the draft-ietf-tls-session-hash master -+** secret and return it in |*msp|. -+** -+** Called from: ssl3_ComputeMasterSecret -+*/ -+static SECStatus -+tls_ComputeExtendedMasterSecretInt(sslSocket *ss, PK11SymKey *pms, -+ PK11SymKey **msp) -+{ -+ ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec; -+ CK_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_PARAMS extended_master_params; -+ SSL3Hashes hashes; -+ /* -+ * Determine whether to use the DH/ECDH or RSA derivation modes. -+ */ -+ /* -+ * TODO(ekr@rtfm.com): Verify that the slot can handle this key expansion -+ * mode. Bug 1198298 */ -+ PRBool isDH = (PRBool) ((ss->ssl3.hs.kea_def->exchKeyType == kt_dh) || -+ (ss->ssl3.hs.kea_def->exchKeyType == kt_ecdh)); -+ CK_MECHANISM_TYPE master_derive; -+ CK_MECHANISM_TYPE key_derive; -+ SECItem params; -+ const CK_FLAGS keyFlags = CKF_SIGN | CKF_VERIFY; -+ CK_VERSION pms_version; -+ CK_VERSION *pms_version_ptr = NULL; -+ SECStatus rv; - -- PK11_FreeSlot(slot); -- if (fpms != NULL) { -- pwSpec->master_secret = PK11_DeriveWithFlags(fpms, -- master_derive, ¶ms, key_derive, -- CKA_DERIVE, 0, keyFlags); -- PK11_FreeSymKey(fpms); -- } -- } -+ rv = ssl3_ComputeHandshakeHashes(ss, pwSpec, &hashes, 0); -+ if (rv != SECSuccess) { -+ PORT_Assert(0); /* Should never fail */ -+ ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); -+ return SECFailure; - } -- if (pwSpec->master_secret == NULL) { -- /* Generate a faux master secret from the internal slot. */ -- PK11SlotInfo * slot = PK11_GetInternalSlot(); -- PK11SymKey * fpms = ssl3_GenerateRSAPMS(ss, pwSpec, slot); - -- PK11_FreeSlot(slot); -- if (fpms != NULL) { -- pwSpec->master_secret = PK11_DeriveWithFlags(fpms, -- master_derive, ¶ms, key_derive, -- CKA_DERIVE, 0, keyFlags); -- if (pwSpec->master_secret == NULL) { -- pwSpec->master_secret = fpms; /* use the fpms as the master. */ -- fpms = NULL; -- } -- } -- if (fpms) { -- PK11_FreeSymKey(fpms); -- } -+ if (isDH) { -+ master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH; -+ } else { -+ master_derive = CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE; -+ pms_version_ptr = &pms_version; - } -- if (pwSpec->master_secret == NULL) { -- ssl_MapLowLevelError(SSL_ERROR_SESSION_KEY_GEN_FAILURE); -- return rv; -+ -+ if (pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { -+ /* TLS 1.2 */ -+ extended_master_params.prfHashMechanism = CKM_SHA256; -+ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; -+ } else { -+ /* TLS < 1.2 */ -+ extended_master_params.prfHashMechanism = CKM_TLS_PRF; -+ key_derive = CKM_TLS_KEY_AND_MAC_DERIVE; -+ } -+ -+ extended_master_params.pVersion = pms_version_ptr; -+ extended_master_params.pSessionHash = hashes.u.raw; -+ extended_master_params.ulSessionHashLen = hashes.len; -+ -+ params.data = (unsigned char *) &extended_master_params; -+ params.len = sizeof extended_master_params; -+ -+ return ssl3_ComputeMasterSecretFinish(ss, master_derive, key_derive, -+ pms_version_ptr, ¶ms, -+ keyFlags, pms, msp); -+} -+ -+ -+/* Wrapper method to compute the master secret and return it in |*msp|. -+** -+** Called from ssl3_ComputeMasterSecret -+*/ -+static SECStatus -+ssl3_ComputeMasterSecret(sslSocket *ss, PK11SymKey *pms, -+ PK11SymKey **msp) -+{ -+ PORT_Assert(pms != NULL); -+ PORT_Assert(ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); -+ PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); -+ -+ if (ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { -+ return tls_ComputeExtendedMasterSecretInt(ss, pms, msp); -+ } else { -+ return ssl3_ComputeMasterSecretInt(ss, pms, msp); -+ } -+} -+ -+/* This method uses PKCS11 to derive the MS from the PMS, where PMS -+** is a PKCS11 symkey. We call ssl3_ComputeMasterSecret to do the -+** computations and then modify the pwSpec->state as a side effect. -+** -+** This is used in all cases except the "triple bypass" with RSA key -+** exchange. -+** -+** Called from ssl3_InitPendingCipherSpec. prSpec is pwSpec. -+*/ -+static SECStatus -+ssl3_DeriveMasterSecret(sslSocket *ss, PK11SymKey *pms) -+{ -+ SECStatus rv; -+ PK11SymKey* ms = NULL; -+ ssl3CipherSpec *pwSpec = ss->ssl3.pwSpec; -+ -+ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); -+ PORT_Assert( ss->opt.noLocks || ssl_HaveSpecWriteLock(ss)); -+ PORT_Assert(ss->ssl3.prSpec == ss->ssl3.pwSpec); -+ -+ if (pms) { -+ rv = ssl3_ComputeMasterSecret(ss, pms, &ms); -+ pwSpec->master_secret = ms; -+ if (rv != SECSuccess) -+ return rv; - } -+ - #ifndef NO_PKCS11_BYPASS - if (ss->opt.bypassPKCS11) { - SECItem * keydata; -@@ -3847,7 +3987,7 @@ - rv = PK11_ExtractKeyValue(pwSpec->master_secret); - if (rv != SECSuccess) { - return rv; -- } -+ } - /* This returns the address of the secItem inside the key struct, - * not a copy or a reference. So, there's no need to free it. - */ -@@ -3862,10 +4002,10 @@ - } - } - #endif -+ - return SECSuccess; - } - -- - /* - * Derive encryption and MAC Keys (and IVs) from master secret - * Sets a useful error code when returning SECFailure. -@@ -3898,7 +4038,9 @@ - PK11SymKey * symKey = NULL; - void * pwArg = ss->pkcs11PinArg; - int keySize; -- CK_SSL3_KEY_MAT_PARAMS key_material_params; -+ CK_TLS12_KEY_MAT_PARAMS key_material_params; /* may be used as a -+ * CK_SSL3_KEY_MAT_PARAMS */ -+ unsigned int key_material_params_len; - CK_SSL3_KEY_MAT_OUT returnedKeys; - CK_MECHANISM_TYPE key_derive; - CK_MECHANISM_TYPE bulk_mechanism; -@@ -3952,17 +4094,21 @@ - PORT_Assert( alg2Mech[calg].calg == calg); - bulk_mechanism = alg2Mech[calg].cmech; - -- params.data = (unsigned char *)&key_material_params; -- params.len = sizeof(key_material_params); -- - if (isTLS12) { -- key_derive = CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256; -+ key_derive = CKM_TLS12_KEY_AND_MAC_DERIVE; -+ key_material_params.prfHashMechanism = CKM_SHA256; -+ key_material_params_len = sizeof(CK_TLS12_KEY_MAT_PARAMS); - } else if (isTLS) { - key_derive = CKM_TLS_KEY_AND_MAC_DERIVE; -+ key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS); - } else { - key_derive = CKM_SSL3_KEY_AND_MAC_DERIVE; -+ key_material_params_len = sizeof(CK_SSL3_KEY_MAT_PARAMS); - } - -+ params.data = (unsigned char *)&key_material_params; -+ params.len = key_material_params_len; -+ - /* CKM_SSL3_KEY_AND_MAC_DERIVE is defined to set ENCRYPT, DECRYPT, and - * DERIVE by DEFAULT */ - symKey = PK11_Derive(pwSpec->master_secret, key_derive, ¶ms, -@@ -4273,6 +4419,12 @@ - PRUint8 b[4]; - PRUint8 * p = b; - -+ PORT_Assert(lenSize <= 4 && lenSize > 0); -+ if (lenSize < 4 && num >= (1L << (lenSize * 8))) { -+ PORT_SetError(SSL_ERROR_TX_RECORD_TOO_LONG); -+ return SECFailure; -+ } -+ - switch (lenSize) { - case 4: - *p++ = (num >> 24) & 0xff; -@@ -4365,17 +4517,12 @@ - * |sigAndHash| to the current handshake message. */ - SECStatus - ssl3_AppendSignatureAndHashAlgorithm( -- sslSocket *ss, const SSL3SignatureAndHashAlgorithm* sigAndHash) -+ sslSocket *ss, const SSLSignatureAndHashAlg* sigAndHash) - { -- unsigned char serialized[2]; -+ PRUint8 serialized[2]; - -- serialized[0] = ssl3_OIDToTLSHashAlgorithm(sigAndHash->hashAlg); -- if (serialized[0] == 0) { -- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -- return SECFailure; -- } -- -- serialized[1] = sigAndHash->sigAlg; -+ serialized[0] = (PRUint8)sigAndHash->hashAlg; -+ serialized[1] = (PRUint8)sigAndHash->sigAlg; - - return ssl3_AppendHandshake(ss, serialized, sizeof(serialized)); - } -@@ -4470,6 +4617,7 @@ - PORT_Assert(bytes <= 3); - i->len = 0; - i->data = NULL; -+ i->type = siBuffer; - count = ssl3_ConsumeHandshakeNumber(ss, bytes, b, length); - if (count < 0) { /* Can't test for SECSuccess here. */ - return SECFailure; -@@ -4489,15 +4637,13 @@ - /* tlsHashOIDMap contains the mapping between TLS hash identifiers and the - * SECOidTag used internally by NSS. */ - static const struct { -- int tlsHash; -+ SSLHashType tlsHash; - SECOidTag oid; - } tlsHashOIDMap[] = { -- { tls_hash_md5, SEC_OID_MD5 }, -- { tls_hash_sha1, SEC_OID_SHA1 }, -- { tls_hash_sha224, SEC_OID_SHA224 }, -- { tls_hash_sha256, SEC_OID_SHA256 }, -- { tls_hash_sha384, SEC_OID_SHA384 }, -- { tls_hash_sha512, SEC_OID_SHA512 } -+ { ssl_hash_sha1, SEC_OID_SHA1 }, -+ { ssl_hash_sha256, SEC_OID_SHA256 }, -+ { ssl_hash_sha384, SEC_OID_SHA384 }, -+ { ssl_hash_sha512, SEC_OID_SHA512 } - }; - - /* ssl3_TLSHashAlgorithmToOID converts a TLS hash identifier into an OID value. -@@ -4505,7 +4651,7 @@ - * - * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ - SECOidTag --ssl3_TLSHashAlgorithmToOID(int hashFunc) -+ssl3_TLSHashAlgorithmToOID(SSLHashType hashFunc) - { - unsigned int i; - -@@ -4517,42 +4663,24 @@ - return SEC_OID_UNKNOWN; - } - --/* ssl3_OIDToTLSHashAlgorithm converts an OID to a TLS hash algorithm -- * identifier. If the hash is not recognised, zero is returned. -- * -- * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ --static int --ssl3_OIDToTLSHashAlgorithm(SECOidTag oid) --{ -- unsigned int i; -- -- for (i = 0; i < PR_ARRAY_SIZE(tlsHashOIDMap); i++) { -- if (oid == tlsHashOIDMap[i].oid) { -- return tlsHashOIDMap[i].tlsHash; -- } -- } -- return 0; --} -- - /* ssl3_TLSSignatureAlgorithmForKeyType returns the TLS 1.2 signature algorithm - * identifier for a given KeyType. */ - static SECStatus --ssl3_TLSSignatureAlgorithmForKeyType(KeyType keyType, -- TLSSignatureAlgorithm *out) -+ssl3_TLSSignatureAlgorithmForKeyType(KeyType keyType, SSLSignType *out) - { - switch (keyType) { - case rsaKey: -- *out = tls_sig_rsa; -- return SECSuccess; -+ *out = ssl_sign_rsa; -+ return SECSuccess; - case dsaKey: -- *out = tls_sig_dsa; -- return SECSuccess; -+ *out = ssl_sign_dsa; -+ return SECSuccess; - case ecKey: -- *out = tls_sig_ecdsa; -- return SECSuccess; -+ *out = ssl_sign_ecdsa; -+ return SECSuccess; - default: -- PORT_SetError(SEC_ERROR_INVALID_KEY); -- return SECFailure; -+ PORT_SetError(SEC_ERROR_INVALID_KEY); -+ return SECFailure; - } - } - -@@ -4560,15 +4688,15 @@ - * algorithm identifier for the given certificate. */ - static SECStatus - ssl3_TLSSignatureAlgorithmForCertificate(CERTCertificate *cert, -- TLSSignatureAlgorithm *out) -+ SSLSignType *out) - { - SECKEYPublicKey *key; - KeyType keyType; - - key = CERT_ExtractPublicKey(cert); - if (key == NULL) { -- ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); -- return SECFailure; -+ ssl_MapLowLevelError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); -+ return SECFailure; - } - - keyType = key->keyType; -@@ -4578,24 +4706,75 @@ - - /* ssl3_CheckSignatureAndHashAlgorithmConsistency checks that the signature - * algorithm identifier in |sigAndHash| is consistent with the public key in -- * |cert|. If so, SECSuccess is returned. Otherwise, PORT_SetError is called -- * and SECFailure is returned. */ -+ * |cert|. It also checks the hash algorithm against the configured signature -+ * algorithms. If all the tests pass, SECSuccess is returned. Otherwise, -+ * PORT_SetError is called and SECFailure is returned. */ - SECStatus - ssl3_CheckSignatureAndHashAlgorithmConsistency( -- const SSL3SignatureAndHashAlgorithm *sigAndHash, CERTCertificate* cert) -+ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash, -+ CERTCertificate* cert) - { - SECStatus rv; -- TLSSignatureAlgorithm sigAlg; -+ SSLSignType sigAlg; -+ unsigned int i; - - rv = ssl3_TLSSignatureAlgorithmForCertificate(cert, &sigAlg); - if (rv != SECSuccess) { -- return rv; -+ return rv; - } - if (sigAlg != sigAndHash->sigAlg) { -- PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM); -- return SECFailure; -+ PORT_SetError(SSL_ERROR_INCORRECT_SIGNATURE_ALGORITHM); -+ return SECFailure; - } -- return SECSuccess; -+ -+ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { -+ const SSLSignatureAndHashAlg *alg = &ss->ssl3.signatureAlgorithms[i]; -+ if (sigAndHash->sigAlg == alg->sigAlg && -+ sigAndHash->hashAlg == alg->hashAlg) { -+ return SECSuccess; -+ } -+ } -+ PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM); -+ return SECFailure; -+} -+ -+PRBool -+ssl3_IsSupportedSignatureAlgorithm(const SSLSignatureAndHashAlg *alg) -+{ -+ static const SSLHashType supportedHashes[] = { -+ ssl_hash_sha1, -+ ssl_hash_sha256, -+ ssl_hash_sha384, -+ ssl_hash_sha512 -+ }; -+ -+ static const SSLSignType supportedSigAlgs[] = { -+ ssl_sign_rsa, -+#ifndef NSS_DISABLE_ECC -+ ssl_sign_ecdsa, -+#endif -+ ssl_sign_dsa -+ }; -+ -+ unsigned int i; -+ PRBool hashOK = PR_FALSE; -+ PRBool signOK = PR_FALSE; -+ -+ for (i = 0; i < PR_ARRAY_SIZE(supportedHashes); ++i) { -+ if (alg->hashAlg == supportedHashes[i]) { -+ hashOK = PR_TRUE; -+ break; -+ } -+ } -+ -+ for (i = 0; i < PR_ARRAY_SIZE(supportedSigAlgs); ++i) { -+ if (alg->sigAlg == supportedSigAlgs[i]) { -+ signOK = PR_TRUE; -+ break; -+ } -+ } -+ -+ return hashOK && signOK; - } - - /* ssl3_ConsumeSignatureAndHashAlgorithm reads a SignatureAndHashAlgorithm -@@ -4605,25 +4784,24 @@ - * See https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ - SECStatus - ssl3_ConsumeSignatureAndHashAlgorithm(sslSocket *ss, -- SSL3Opaque **b, -- PRUint32 *length, -- SSL3SignatureAndHashAlgorithm *out) -+ SSL3Opaque **b, -+ PRUint32 *length, -+ SSLSignatureAndHashAlg *out) - { -- unsigned char bytes[2]; -+ PRUint8 bytes[2]; - SECStatus rv; - - rv = ssl3_ConsumeHandshake(ss, bytes, sizeof(bytes), b, length); - if (rv != SECSuccess) { -- return rv; -+ return rv; - } - -- out->hashAlg = ssl3_TLSHashAlgorithmToOID(bytes[0]); -- if (out->hashAlg == SEC_OID_UNKNOWN) { -- PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -- return SECFailure; -+ out->hashAlg = (SSLHashType)bytes[0]; -+ out->sigAlg = (SSLSignType)bytes[1]; -+ if (!ssl3_IsSupportedSignatureAlgorithm(out)) { -+ PORT_SetError(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM); -+ return SECFailure; - } -- -- out->sigAlg = bytes[1]; - return SECSuccess; - } - -@@ -4653,7 +4831,12 @@ - SSL3Opaque sha_inner[MAX_MAC_LENGTH]; - - PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); -- hashes->hashAlg = SEC_OID_UNKNOWN; -+ if (ss->ssl3.hs.hashType == handshake_hash_unknown) { -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); -+ return SECFailure; -+ } -+ -+ hashes->hashAlg = ssl_hash_none; - - #ifndef NO_PKCS11_BYPASS - if (ss->opt.bypassPKCS11 && -@@ -4661,11 +4844,6 @@ - /* compute them without PKCS11 */ - PRUint64 sha_cx[MAX_MAC_CONTEXT_LLONGS]; - -- if (!spec->msItem.data) { -- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -- return SECFailure; -- } -- - ss->ssl3.hs.sha_clone(sha_cx, ss->ssl3.hs.sha_cx); - ss->ssl3.hs.sha_obj->end(sha_cx, hashes->u.raw, &hashes->len, - sizeof(hashes->u.raw)); -@@ -4674,7 +4852,7 @@ - - /* If we ever support ciphersuites where the PRF hash isn't SHA-256 - * then this will need to be updated. */ -- hashes->hashAlg = SEC_OID_SHA256; -+ hashes->hashAlg = ssl_hash_sha256; - rv = SECSuccess; - } else if (ss->opt.bypassPKCS11) { - /* compute them without PKCS11 */ -@@ -4684,11 +4862,6 @@ - #define md5cx ((MD5Context *)md5_cx) - #define shacx ((SHA1Context *)sha_cx) - -- if (!spec->msItem.data) { -- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -- return SECFailure; -- } -- - MD5_Clone (md5cx, (MD5Context *)ss->ssl3.hs.md5_cx); - SHA1_Clone(shacx, (SHA1Context *)ss->ssl3.hs.sha_cx); - -@@ -4696,6 +4869,11 @@ - /* compute hashes for SSL3. */ - unsigned char s[4]; - -+ if (!spec->msItem.data) { -+ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -+ return SECFailure; -+ } -+ - s[0] = (unsigned char)(sender >> 24); - s[1] = (unsigned char)(sender >> 16); - s[2] = (unsigned char)(sender >> 8); -@@ -4768,11 +4946,6 @@ - unsigned char stackBuf[1024]; - unsigned char *stateBuf = NULL; - -- if (!spec->master_secret) { -- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -- return SECFailure; -- } -- - h = ss->ssl3.hs.sha; - stateBuf = PK11_SaveContextAlloc(h, stackBuf, - sizeof(stackBuf), &stateLen); -@@ -4789,7 +4962,7 @@ - } - /* If we ever support ciphersuites where the PRF hash isn't SHA-256 - * then this will need to be updated. */ -- hashes->hashAlg = SEC_OID_SHA256; -+ hashes->hashAlg = ssl_hash_sha256; - rv = SECSuccess; - - tls12_loser: -@@ -4812,11 +4985,6 @@ - unsigned char md5StackBuf[256]; - unsigned char shaStackBuf[512]; - -- if (!spec->master_secret) { -- PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -- return SECFailure; -- } -- - md5StateBuf = PK11_SaveContextAlloc(ss->ssl3.hs.md5, md5StackBuf, - sizeof md5StackBuf, &md5StateLen); - if (md5StateBuf == NULL) { -@@ -4837,6 +5005,11 @@ - /* compute hashes for SSL3. */ - unsigned char s[4]; - -+ if (!spec->master_secret) { -+ PORT_SetError(SSL_ERROR_RX_UNEXPECTED_HANDSHAKE); -+ return SECFailure; -+ } -+ - s[0] = (unsigned char)(sender >> 24); - s[1] = (unsigned char)(sender >> 16); - s[2] = (unsigned char)(sender >> 8); -@@ -4968,7 +5141,7 @@ - rv = SECFailure; - goto loser; - } -- hashes->hashAlg = SEC_OID_SHA1; -+ hashes->hashAlg = ssl_hash_sha1; - - loser: - PK11_DestroyContext(ss->ssl3.hs.backupHash, PR_TRUE); -@@ -5049,7 +5222,9 @@ - if (rv != SECSuccess) { - return rv; /* ssl3_InitState has set the error code. */ - } -- ss->ssl3.hs.sendingSCSV = PR_FALSE; /* Must be reset every handshake */ -+ /* These must be reset every handshake. */ -+ ss->ssl3.hs.sendingSCSV = PR_FALSE; -+ ss->ssl3.hs.preliminaryInfo = 0; - PORT_Assert(IS_DTLS(ss) || !resending); - - SECITEM_FreeItem(&ss->ssl3.hs.newSessionTicket.ticket, PR_FALSE); -@@ -5425,7 +5600,7 @@ - } - for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { - ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; -- if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange)) { -+ if (config_match(suite, ss->ssl3.policy, PR_TRUE, &ss->vrange, ss)) { - actual_count++; - if (actual_count > num_suites) { - if (sid->u.ssl3.lock) { NSSRWLock_UnlockRead(sid->u.ssl3.lock); } -@@ -6083,14 +6258,6 @@ - } - } - -- rv = ssl3_InitPendingCipherSpec(ss, pms); -- PK11_FreeSymKey(pms); pms = NULL; -- -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -- goto loser; -- } -- - rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, - isTLS ? enc_pms.len + 2 : enc_pms.len); - if (rv != SECSuccess) { -@@ -6105,6 +6272,15 @@ - goto loser; /* err set by ssl3_AppendHandshake* */ - } - -+ rv = ssl3_InitPendingCipherSpec(ss, pms); -+ PK11_FreeSymKey(pms); -+ pms = NULL; -+ -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ - rv = SECSuccess; - - loser: -@@ -6174,14 +6350,6 @@ - SECKEY_DestroyPrivateKey(privKey); - privKey = NULL; - -- rv = ssl3_InitPendingCipherSpec(ss, pms); -- PK11_FreeSymKey(pms); pms = NULL; -- -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -- goto loser; -- } -- - rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, - pubKey->u.dh.publicValue.len + 2); - if (rv != SECSuccess) { -@@ -6197,8 +6365,16 @@ - goto loser; /* err set by ssl3_AppendHandshake* */ - } - -- rv = SECSuccess; -+ rv = ssl3_InitPendingCipherSpec(ss, pms); -+ PK11_FreeSymKey(pms); -+ pms = NULL; - -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ -+ rv = SECSuccess; - - loser: - -@@ -6240,9 +6416,9 @@ - isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); - /* enforce limits on kea key sizes. */ - if (ss->ssl3.hs.kea_def->is_limited) { -- int keyLen = SECKEY_PublicKeyStrength(serverKey); /* bytes */ -+ unsigned int keyLen = SECKEY_PublicKeyStrengthInBits(serverKey); - -- if (keyLen * BPB > ss->ssl3.hs.kea_def->key_size_limit) { -+ if (keyLen > ss->ssl3.hs.kea_def->key_size_limit) { - if (isTLS) - (void)SSL3_SendAlert(ss, alert_fatal, export_restriction); - else -@@ -6297,7 +6473,7 @@ - SSL3Hashes hashes; - KeyType keyType; - unsigned int len; -- SSL3SignatureAndHashAlgorithm sigAndHash; -+ SSLSignatureAndHashAlg sigAndHash; - - PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss)); - PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); -@@ -6362,11 +6538,11 @@ - } - if (isTLS12) { - rv = ssl3_TLSSignatureAlgorithmForKeyType(keyType, -- &sigAndHash.sigAlg); -+ &sigAndHash.sigAlg); - if (rv != SECSuccess) { - goto done; - } -- sigAndHash.hashAlg = hashes.hashAlg; -+ sigAndHash.hashAlg = hashes.hashAlg; - - rv = ssl3_AppendSignatureAndHashAlgorithm(ss, &sigAndHash); - if (rv != SECSuccess) { -@@ -6474,6 +6650,7 @@ - errCode = SSL_ERROR_UNSUPPORTED_VERSION; - goto alert_loser; - } -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; - isTLS = (ss->version > SSL_LIBRARY_VERSION_3_0); - - rv = ssl3_InitHandshakeHashes(ss); -@@ -6509,7 +6686,7 @@ - ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; - if (temp == suite->cipher_suite) { - SSLVersionRange vrange = {ss->version, ss->version}; -- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { -+ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { - /* config_match already checks whether the cipher suite is - * acceptable for the version, but the check is repeated here - * in order to give a more precise error code. */ -@@ -6533,6 +6710,7 @@ - } - ss->ssl3.hs.cipher_suite = (ssl3CipherSuite)temp; - ss->ssl3.hs.suite_def = ssl_LookupCipherSuiteDef((ssl3CipherSuite)temp); -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; - PORT_Assert(ss->ssl3.hs.suite_def); - if (!ss->ssl3.hs.suite_def) { - PORT_SetError(errCode = SEC_ERROR_LIBRARY_FAILURE); -@@ -6619,6 +6797,32 @@ - - SECItem wrappedMS; /* wrapped master secret. */ - -+ /* [draft-ietf-tls-session-hash-06; Section 5.3] -+ * -+ * o If the original session did not use the "extended_master_secret" -+ * extension but the new ServerHello contains the extension, the -+ * client MUST abort the handshake. -+ */ -+ if (!sid->u.ssl3.keys.extendedMasterSecretUsed && -+ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { -+ errCode = SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET; -+ goto alert_loser; -+ } -+ -+ /* -+ * o If the original session used an extended master secret but the new -+ * ServerHello does not contain the "extended_master_secret" -+ * extension, the client SHOULD abort the handshake. -+ * -+ * TODO(ekr@rtfm.com): Add option to refuse to resume when EMS is not -+ * used at all (bug 1176526). -+ */ -+ if (sid->u.ssl3.keys.extendedMasterSecretUsed && -+ !ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { -+ errCode = SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET; -+ goto alert_loser; -+ } -+ - ss->sec.authAlgorithm = sid->authAlgorithm; - ss->sec.authKeyBits = sid->authKeyBits; - ss->sec.keaType = sid->keaType; -@@ -6721,7 +6925,7 @@ - ssl3_CopyPeerCertsFromSID(ss, sid); - } - -- /* NULL value for PMS signifies re-use of the old MS */ -+ /* NULL value for PMS because we are reusing the old MS */ - rv = ssl3_InitPendingCipherSpec(ss, NULL); - if (rv != SECSuccess) { - goto alert_loser; /* err code was set */ -@@ -6750,6 +6954,9 @@ - sid->u.ssl3.sessionIDLength = sidBytes.len; - PORT_Memcpy(sid->u.ssl3.sessionID, sidBytes.data, sidBytes.len); - -+ sid->u.ssl3.keys.extendedMasterSecretUsed = -+ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); -+ - /* Copy Signed Certificate Timestamps, if any. */ - if (ss->xtnData.signedCertTimestamps.data) { - rv = SECITEM_CopyItem(NULL, &sid->u.ssl3.signedCertTimestamps, -@@ -6761,13 +6968,14 @@ - ss->ssl3.hs.isResuming = PR_FALSE; - if (ss->ssl3.hs.kea_def->signKeyType != sign_null) { - /* All current cipher suites other than those with sign_null (i.e., -- * DH_anon_* suites) require a certificate, so use that signal. */ -+ * (EC)DH_anon_* suites) require a certificate, so use that signal. */ - ss->ssl3.hs.ws = wait_server_cert; -- } else if (ss->ssl3.hs.kea_def->ephemeral) { -- /* Only ephemeral cipher suites use ServerKeyExchange. */ -- ss->ssl3.hs.ws = wait_server_key; - } else { -- ss->ssl3.hs.ws = wait_cert_request; -+ /* All the remaining cipher suites must be (EC)DH_anon_* and so -+ * must be ephemeral. Note, if we ever add PSK this might -+ * change. */ -+ PORT_Assert(ss->ssl3.hs.kea_def->ephemeral); -+ ss->ssl3.hs.ws = wait_server_key; - } - - winner: -@@ -6807,29 +7015,6 @@ - return SECFailure; - } - --/* ssl3_BigIntGreaterThanOne returns true iff |mpint|, taken as an unsigned, -- * big-endian integer is > 1 */ --static PRBool --ssl3_BigIntGreaterThanOne(const SECItem* mpint) { -- unsigned char firstNonZeroByte = 0; -- unsigned int i; -- -- for (i = 0; i < mpint->len; i++) { -- if (mpint->data[i]) { -- firstNonZeroByte = mpint->data[i]; -- break; -- } -- } -- -- if (firstNonZeroByte == 0) -- return PR_FALSE; -- if (firstNonZeroByte > 1) -- return PR_TRUE; -- -- /* firstNonZeroByte == 1, therefore mpint > 1 iff the first non-zero byte -- * is followed by another byte. */ -- return (i < mpint->len - 1); --} - - /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete - * ssl3 ServerKeyExchange message. -@@ -6846,9 +7031,9 @@ - SSL3AlertDescription desc = illegal_parameter; - SSL3Hashes hashes; - SECItem signature = {siBuffer, NULL, 0}; -- SSL3SignatureAndHashAlgorithm sigAndHash; -+ SSLSignatureAndHashAlg sigAndHash; - -- sigAndHash.hashAlg = SEC_OID_UNKNOWN; -+ sigAndHash.hashAlg = ssl_hash_none; - - SSL_TRC(3, ("%d: SSL3[%d]: handle server_key_exchange handshake", - SSL_GETPID(), ss->fd)); -@@ -6874,6 +7059,12 @@ - if (rv != SECSuccess) { - goto loser; /* malformed. */ - } -+ /* This exchange method is only used by export cipher suites. -+ * Those are broken and so this code will eventually be removed. */ -+ if (SECKEY_BigIntegerBitLength(&modulus) < 512) { -+ desc = isTLS ? insufficient_security : illegal_parameter; -+ goto alert_loser; -+ } - rv = ssl3_ConsumeHandshakeVariable(ss, &exponent, 2, &b, &length); - if (rv != SECSuccess) { - goto loser; /* malformed. */ -@@ -6884,7 +7075,7 @@ - if (rv != SECSuccess) { - goto loser; /* malformed or unsupported. */ - } -- rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( -+ rv = ssl3_CheckSignatureAndHashAlgorithmConsistency(ss, - &sigAndHash, ss->sec.peerCert); - if (rv != SECSuccess) { - goto loser; -@@ -6907,10 +7098,10 @@ - /* - * check to make sure the hash is signed by right guy - */ -- rv = ssl3_ComputeExportRSAKeyHash(sigAndHash.hashAlg, modulus, exponent, -- &ss->ssl3.hs.client_random, -- &ss->ssl3.hs.server_random, -- &hashes, ss->opt.bypassPKCS11); -+ rv = ssl3_ComputeExportRSAKeyHash(sigAndHash.hashAlg, modulus, exponent, -+ &ss->ssl3.hs.client_random, -+ &ss->ssl3.hs.server_random, -+ &hashes, ss->opt.bypassPKCS11); - if (rv != SECSuccess) { - errCode = - ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); -@@ -6936,7 +7127,6 @@ - - peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); - if (peerKey == NULL) { -- PORT_FreeArena(arena, PR_FALSE); - goto no_memory; - } - -@@ -6947,7 +7137,6 @@ - if (SECITEM_CopyItem(arena, &peerKey->u.rsa.modulus, &modulus) || - SECITEM_CopyItem(arena, &peerKey->u.rsa.publicExponent, &exponent)) - { -- PORT_FreeArena(arena, PR_FALSE); - goto no_memory; - } - ss->sec.peerKey = peerKey; -@@ -6959,13 +7148,22 @@ - SECItem dh_p = {siBuffer, NULL, 0}; - SECItem dh_g = {siBuffer, NULL, 0}; - SECItem dh_Ys = {siBuffer, NULL, 0}; -+ unsigned dh_p_bits; -+ unsigned dh_g_bits; -+ unsigned dh_Ys_bits; -+ PRInt32 minDH; - - rv = ssl3_ConsumeHandshakeVariable(ss, &dh_p, 2, &b, &length); - if (rv != SECSuccess) { - goto loser; /* malformed. */ - } -- if (dh_p.len < 1024/8 || -- (dh_p.len == 1024/8 && (dh_p.data[0] & 0x80) == 0)) { -+ -+ rv = NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &minDH); -+ if (rv != SECSuccess) { -+ minDH = SSL_DH_MIN_P_BITS; -+ } -+ dh_p_bits = SECKEY_BigIntegerBitLength(&dh_p); -+ if (dh_p_bits < minDH) { - errCode = SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY; - goto alert_loser; - } -@@ -6973,13 +7171,16 @@ - if (rv != SECSuccess) { - goto loser; /* malformed. */ - } -- if (dh_g.len > dh_p.len || !ssl3_BigIntGreaterThanOne(&dh_g)) -+ /* Abort if dh_g is 0, 1, or obviously too big. */ -+ dh_g_bits = SECKEY_BigIntegerBitLength(&dh_g); -+ if (dh_g_bits > dh_p_bits || dh_g_bits <= 1) - goto alert_loser; - rv = ssl3_ConsumeHandshakeVariable(ss, &dh_Ys, 2, &b, &length); - if (rv != SECSuccess) { - goto loser; /* malformed. */ - } -- if (dh_Ys.len > dh_p.len || !ssl3_BigIntGreaterThanOne(&dh_Ys)) -+ dh_Ys_bits = SECKEY_BigIntegerBitLength(&dh_Ys); -+ if (dh_Ys_bits > dh_p_bits || dh_Ys_bits <= 1) - goto alert_loser; - if (isTLS12) { - rv = ssl3_ConsumeSignatureAndHashAlgorithm(ss, &b, &length, -@@ -6987,7 +7188,7 @@ - if (rv != SECSuccess) { - goto loser; /* malformed or unsupported. */ - } -- rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( -+ rv = ssl3_CheckSignatureAndHashAlgorithmConsistency(ss, - &sigAndHash, ss->sec.peerCert); - if (rv != SECSuccess) { - goto loser; -@@ -7014,10 +7215,10 @@ - /* - * check to make sure the hash is signed by right guy - */ -- rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, dh_p, dh_g, dh_Ys, -- &ss->ssl3.hs.client_random, -- &ss->ssl3.hs.server_random, -- &hashes, ss->opt.bypassPKCS11); -+ rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, dh_p, dh_g, dh_Ys, -+ &ss->ssl3.hs.client_random, -+ &ss->ssl3.hs.server_random, -+ &hashes, ss->opt.bypassPKCS11); - if (rv != SECSuccess) { - errCode = - ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); -@@ -7041,7 +7242,7 @@ - goto no_memory; - } - -- ss->sec.peerKey = peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); -+ peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); - if (peerKey == NULL) { - goto no_memory; - } -@@ -7055,7 +7256,6 @@ - SECITEM_CopyItem(arena, &peerKey->u.dh.base, &dh_g) || - SECITEM_CopyItem(arena, &peerKey->u.dh.publicValue, &dh_Ys)) - { -- PORT_FreeArena(arena, PR_FALSE); - goto no_memory; - } - ss->sec.peerKey = peerKey; -@@ -7078,10 +7278,16 @@ - alert_loser: - (void)SSL3_SendAlert(ss, alert_fatal, desc); - loser: -+ if (arena) { -+ PORT_FreeArena(arena, PR_FALSE); -+ } - PORT_SetError( errCode ); - return SECFailure; - - no_memory: /* no-memory error has already been set. */ -+ if (arena) { -+ PORT_FreeArena(arena, PR_FALSE); -+ } - ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); - return SECFailure; - } -@@ -7092,7 +7298,7 @@ - */ - static SECStatus - ssl3_ExtractClientKeyInfo(sslSocket *ss, -- TLSSignatureAlgorithm *sigAlg, -+ SSLSignType *sigAlg, - PRBool *preferSha1) - { - SECStatus rv = SECSuccess; -@@ -7148,7 +7354,7 @@ - const SECItem *algorithms) - { - SECStatus rv; -- TLSSignatureAlgorithm sigAlg; -+ SSLSignType sigAlg; - PRBool preferSha1; - PRBool supportsSha1 = PR_FALSE; - PRBool supportsSha256 = PR_FALSE; -@@ -7173,9 +7379,9 @@ - /* Determine the server's hash support for that signature algorithm. */ - for (i = 0; i < algorithms->len; i += 2) { - if (algorithms->data[i+1] == sigAlg) { -- if (algorithms->data[i] == tls_hash_sha1) { -+ if (algorithms->data[i] == ssl_hash_sha1) { - supportsSha1 = PR_TRUE; -- } else if (algorithms->data[i] == tls_hash_sha256) { -+ } else if (algorithms->data[i] == ssl_hash_sha256) { - supportsSha256 = PR_TRUE; - } - } -@@ -7334,6 +7540,8 @@ - } else - #endif - if (ss->getClientAuthData != NULL) { -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); - /* XXX Should pass cert_types and algorithms in this call!! */ - rv = (SECStatus)(*ss->getClientAuthData)(ss->getClientAuthDataArg, - ss->fd, &ca_list, -@@ -7565,6 +7773,8 @@ - SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher", - SSL_GETPID(), ss->fd)); - } else { -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); - rv = (ss->canFalseStartCallback)(ss->fd, - ss->canFalseStartCallbackData, - &ss->ssl3.hs.canFalseStart); -@@ -7923,6 +8133,7 @@ - sid->u.ssl3.policy = SSL_ALLOWED; - sid->u.ssl3.clientWriteKey = NULL; - sid->u.ssl3.serverWriteKey = NULL; -+ sid->u.ssl3.keys.extendedMasterSecretUsed = PR_FALSE; - - if (is_server) { - SECStatus rv; -@@ -7975,7 +8186,7 @@ - - if (kea_def->is_limited && kea_def->exchKeyType == kt_rsa) { - /* see if we can legally use the key in the cert. */ -- int keyLen; /* bytes */ -+ unsigned int keyLen; /* bytes */ - - keyLen = PK11_GetPrivateModulusLen( - ss->serverCerts[kea_def->exchKeyType].SERVERKEY); -@@ -8022,6 +8233,22 @@ - /* An empty TLS Renegotiation Info (RI) extension */ - static const PRUint8 emptyRIext[5] = {0xff, 0x01, 0x00, 0x01, 0x00}; - -+static PRBool -+ssl3_KEAAllowsSessionTicket(SSL3KeyExchangeAlgorithm kea) -+{ -+ switch (kea) { -+ case kea_dhe_dss: -+ case kea_dhe_dss_export: -+ case kea_dh_dss_export: -+ case kea_dh_dss: -+ /* TODO: Fix session tickets for DSS. The server code rejects the -+ * session ticket received from the client. Bug 1174677 */ -+ return PR_FALSE; -+ default: -+ return PR_TRUE; -+ }; -+} -+ - /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete - * ssl3 Client Hello message. - * Caller must hold Handshake and RecvBuf locks. -@@ -8044,6 +8271,7 @@ - SECItem comps = {siBuffer, NULL, 0}; - PRBool haveSpecWriteLock = PR_FALSE; - PRBool haveXmitBufLock = PR_FALSE; -+ PRBool canOfferSessionTicket = PR_FALSE; - - SSL_TRC(3, ("%d: SSL3[%d]: handle client_hello handshake", - SSL_GETPID(), ss->fd)); -@@ -8051,6 +8279,7 @@ - PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); - PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss)); - PORT_Assert( ss->ssl3.initialized ); -+ ss->ssl3.hs.preliminaryInfo = 0; - - if (!ss->sec.isServer || - (ss->ssl3.hs.ws != wait_client_hello && -@@ -8116,6 +8345,7 @@ - errCode = SSL_ERROR_UNSUPPORTED_VERSION; - goto alert_loser; - } -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; - - rv = ssl3_InitHandshakeHashes(ss); - if (rv != SECSuccess) { -@@ -8283,8 +8513,7 @@ - * resuming.) - */ - if (ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn) && sid == NULL) { -- ssl3_RegisterServerHelloExtensionSender(ss, -- ssl_session_ticket_xtn, ssl3_SendSessionTicketXtn); -+ canOfferSessionTicket = PR_TRUE; - } - - if (sid != NULL) { -@@ -8367,7 +8596,7 @@ - * The product policy won't change during the process lifetime. - * Implemented ("isPresent") shouldn't change for servers. - */ -- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) -+ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) - break; - #else - if (!suite->enabled) -@@ -8380,6 +8609,7 @@ - ss->ssl3.hs.cipher_suite = suite->cipher_suite; - ss->ssl3.hs.suite_def = - ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; - - /* Use the cached compression method. */ - ss->ssl3.hs.compression = sid->u.ssl3.compression; -@@ -8416,7 +8646,7 @@ - for (j = 0; j < ssl_V3_SUITES_IMPLEMENTED; j++) { - ssl3CipherSuiteCfg *suite = &ss->cipherSuites[j]; - SSLVersionRange vrange = {ss->version, ss->version}; -- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { -+ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { - continue; - } - for (i = 0; i + 1 < suites.len; i += 2) { -@@ -8425,6 +8655,7 @@ - ss->ssl3.hs.cipher_suite = suite->cipher_suite; - ss->ssl3.hs.suite_def = - ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; - goto suite_found; - } - } -@@ -8433,6 +8664,15 @@ - goto alert_loser; - - suite_found: -+ if (canOfferSessionTicket) -+ canOfferSessionTicket = ssl3_KEAAllowsSessionTicket( -+ ss->ssl3.hs.suite_def->key_exchange_alg); -+ -+ if (canOfferSessionTicket) { -+ ssl3_RegisterServerHelloExtensionSender(ss, -+ ssl_session_ticket_xtn, ssl3_SendSessionTicketXtn); -+ } -+ - /* Select a compression algorithm. */ - for (i = 0; i < comps.len; i++) { - if (!compressionEnabled(ss, comps.data[i])) -@@ -8458,6 +8698,8 @@ - /* If there are any failures while processing the old sid, - * we don't consider them to be errors. Instead, We just behave - * as if the client had sent us no sid to begin with, and make a new one. -+ * The exception here is attempts to resume extended_master_secret -+ * sessions without the extension, which causes an alert. - */ - if (sid != NULL) do { - ssl3CipherSpec *pwSpec; -@@ -8469,6 +8711,30 @@ - break; /* not an error */ - } - -+ /* [draft-ietf-tls-session-hash-06; Section 5.3] -+ * o If the original session did not use the "extended_master_secret" -+ * extension but the new ClientHello contains the extension, then the -+ * server MUST NOT perform the abbreviated handshake. Instead, it -+ * SHOULD continue with a full handshake (as described in -+ * Section 5.2) to negotiate a new session. -+ * -+ * o If the original session used the "extended_master_secret" -+ * extension but the new ClientHello does not contain the extension, -+ * the server MUST abort the abbreviated handshake. -+ */ -+ if (ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)) { -+ if (!sid->u.ssl3.keys.extendedMasterSecretUsed) { -+ break; /* not an error */ -+ } -+ } else { -+ if (sid->u.ssl3.keys.extendedMasterSecretUsed) { -+ /* Note: we do not destroy the session */ -+ desc = handshake_failure; -+ errCode = SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET; -+ goto alert_loser; -+ } -+ } -+ - if (ss->sec.ci.sid) { - if (ss->sec.uncache) - ss->sec.uncache(ss->sec.ci.sid); -@@ -8610,7 +8876,7 @@ - haveSpecWriteLock = PR_FALSE; - } - -- /* NULL value for PMS signifies re-use of the old MS */ -+ /* NULL value for PMS because we are re-using the old MS */ - rv = ssl3_InitPendingCipherSpec(ss, NULL); - if (rv != SECSuccess) { - errCode = PORT_GetError(); -@@ -8654,6 +8920,9 @@ - if (ssl3_ExtensionNegotiated(ss, ssl_server_name_xtn)) { - int ret = 0; - if (ss->sniSocketConfig) do { /* not a loop */ -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); -+ - ret = SSL_SNI_SEND_ALERT; - /* If extension is negotiated, the len of names should > 0. */ - if (ss->xtnData.sniNameArrSize) { -@@ -8701,7 +8970,7 @@ - ret = SSL_SNI_SEND_ALERT; - break; - } -- } else if (ret < ss->xtnData.sniNameArrSize) { -+ } else if ((unsigned int)ret < ss->xtnData.sniNameArrSize) { - /* Application has configured new socket info. Lets check it - * and save the name. */ - SECStatus rv; -@@ -8752,7 +9021,7 @@ - ssl3_SendServerNameXtn); - } else { - /* Callback returned index outside of the boundary. */ -- PORT_Assert(ret < ss->xtnData.sniNameArrSize); -+ PORT_Assert((unsigned int)ret < ss->xtnData.sniNameArrSize); - errCode = SSL_ERROR_INTERNAL_ERROR_ALERT; - desc = internal_error; - ret = SSL_SNI_SEND_ALERT; -@@ -8798,13 +9067,16 @@ - } - ss->sec.ci.sid = sid; - -+ sid->u.ssl3.keys.extendedMasterSecretUsed = -+ ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn); - ss->ssl3.hs.isResuming = PR_FALSE; - ssl_GetXmitBufLock(ss); - rv = ssl3_SendServerHelloSequence(ss); - ssl_ReleaseXmitBufLock(ss); - if (rv != SECSuccess) { -- errCode = PORT_GetError(); -- goto loser; -+ errCode = PORT_GetError(); -+ desc = handshake_failure; -+ goto alert_loser; - } - - if (haveXmitBufLock) { -@@ -8896,6 +9168,7 @@ - errCode = SSL_ERROR_UNSUPPORTED_VERSION; - goto alert_loser; - } -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_version; - - rv = ssl3_InitHandshakeHashes(ss); - if (rv != SECSuccess) { -@@ -8951,7 +9224,7 @@ - for (j = 0; j < ssl_V3_SUITES_IMPLEMENTED; j++) { - ssl3CipherSuiteCfg *suite = &ss->cipherSuites[j]; - SSLVersionRange vrange = {ss->version, ss->version}; -- if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange)) { -+ if (!config_match(suite, ss->ssl3.policy, PR_TRUE, &vrange, ss)) { - continue; - } - for (i = 0; i+2 < suite_length; i += 3) { -@@ -8960,6 +9233,7 @@ - ss->ssl3.hs.cipher_suite = suite->cipher_suite; - ss->ssl3.hs.suite_def = - ssl_LookupCipherSuiteDef(ss->ssl3.hs.cipher_suite); -+ ss->ssl3.hs.preliminaryInfo |= ssl_preinfo_cipher_suite; - goto suite_found; - } - } -@@ -9150,6 +9424,154 @@ - return SECSuccess; - } - -+static SECStatus -+ssl3_PickSignatureHashAlgorithm(sslSocket *ss, -+ SSLSignatureAndHashAlg* out); -+ -+static SECStatus -+ssl3_SendDHServerKeyExchange(sslSocket *ss) -+{ -+ const ssl3KEADef * kea_def = ss->ssl3.hs.kea_def; -+ SECStatus rv = SECFailure; -+ int length; -+ PRBool isTLS; -+ SECItem signed_hash = {siBuffer, NULL, 0}; -+ SSL3Hashes hashes; -+ SSLSignatureAndHashAlg sigAndHash; -+ SECKEYDHParams dhParam; -+ -+ ssl3KeyPair *keyPair = NULL; -+ SECKEYPublicKey *pubKey = NULL; /* Ephemeral DH key */ -+ SECKEYPrivateKey *privKey = NULL; /* Ephemeral DH key */ -+ int certIndex = -1; -+ -+ if (kea_def->kea != kea_dhe_dss && kea_def->kea != kea_dhe_rsa) { -+ /* TODO: Support DH_anon. It might be sufficient to drop the signature. -+ See bug 1170510. */ -+ PORT_SetError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); -+ return SECFailure; -+ } -+ -+ dhParam.prime.data = ss->dheParams->prime.data; -+ dhParam.prime.len = ss->dheParams->prime.len; -+ dhParam.base.data = ss->dheParams->base.data; -+ dhParam.base.len = ss->dheParams->base.len; -+ -+ PRINT_BUF(60, (NULL, "Server DH p", dhParam.prime.data, -+ dhParam.prime.len)); -+ PRINT_BUF(60, (NULL, "Server DH g", dhParam.base.data, -+ dhParam.base.len)); -+ -+ /* Generate ephemeral DH keypair */ -+ privKey = SECKEY_CreateDHPrivateKey(&dhParam, &pubKey, NULL); -+ if (!privKey || !pubKey) { -+ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); -+ rv = SECFailure; -+ goto loser; -+ } -+ -+ keyPair = ssl3_NewKeyPair(privKey, pubKey); -+ if (!keyPair) { -+ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); -+ goto loser; -+ } -+ -+ PRINT_BUF(50, (ss, "DH public value:", -+ pubKey->u.dh.publicValue.data, -+ pubKey->u.dh.publicValue.len)); -+ -+ if (ssl3_PickSignatureHashAlgorithm(ss, &sigAndHash) != SECSuccess) { -+ ssl_MapLowLevelError(SEC_ERROR_KEYGEN_FAIL); -+ goto loser; -+ } -+ -+ rv = ssl3_ComputeDHKeyHash(sigAndHash.hashAlg, -+ pubKey->u.dh.prime, -+ pubKey->u.dh.base, -+ pubKey->u.dh.publicValue, -+ &ss->ssl3.hs.client_random, -+ &ss->ssl3.hs.server_random, -+ &hashes, ss->opt.bypassPKCS11); -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ -+ /* It has been suggested to test kea_def->signKeyType instead, and to use -+ * ssl_auth_* instead. Investigate what to do. See bug 102794. */ -+ if (kea_def->kea == kea_dhe_rsa) -+ certIndex = ssl_kea_rsa; -+ else -+ certIndex = ssl_kea_dh; -+ -+ isTLS = (PRBool)(ss->ssl3.pwSpec->version > SSL_LIBRARY_VERSION_3_0); -+ rv = ssl3_SignHashes(&hashes, ss->serverCerts[certIndex].SERVERKEY, -+ &signed_hash, isTLS); -+ if (rv != SECSuccess) { -+ goto loser; /* ssl3_SignHashes has set err. */ -+ } -+ if (signed_hash.data == NULL) { -+ PORT_SetError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ length = 2 + pubKey->u.dh.prime.len + -+ 2 + pubKey->u.dh.base.len + -+ 2 + pubKey->u.dh.publicValue.len + -+ 2 + signed_hash.len; -+ -+ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { -+ length += 2; -+ } -+ -+ rv = ssl3_AppendHandshakeHeader(ss, server_key_exchange, length); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ -+ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.prime.data, -+ pubKey->u.dh.prime.len, 2); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ -+ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.base.data, -+ pubKey->u.dh.base.len, 2); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ -+ rv = ssl3_AppendHandshakeVariable(ss, pubKey->u.dh.publicValue.data, -+ pubKey->u.dh.publicValue.len, 2); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ -+ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { -+ rv = ssl3_AppendSignatureAndHashAlgorithm(ss, &sigAndHash); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ } -+ -+ rv = ssl3_AppendHandshakeVariable(ss, signed_hash.data, -+ signed_hash.len, 2); -+ if (rv != SECSuccess) { -+ goto loser; /* err set by AppendHandshake. */ -+ } -+ PORT_Free(signed_hash.data); -+ ss->dheKeyPair = keyPair; -+ return SECSuccess; -+ -+loser: -+ if (signed_hash.data) -+ PORT_Free(signed_hash.data); -+ if (privKey) -+ SECKEY_DestroyPrivateKey(privKey); -+ if (pubKey) -+ SECKEY_DestroyPublicKey(pubKey); -+ return SECFailure; -+} -+ - /* ssl3_PickSignatureHashAlgorithm selects a hash algorithm to use when signing - * elements of the handshake. (The negotiated cipher suite determines the - * signature algorithm.) Prior to TLS 1.2, the MD5/SHA1 combination is always -@@ -9157,18 +9579,11 @@ - * hash combinations. */ - static SECStatus - ssl3_PickSignatureHashAlgorithm(sslSocket *ss, -- SSL3SignatureAndHashAlgorithm* out) -+ SSLSignatureAndHashAlg* out) - { -- TLSSignatureAlgorithm sigAlg; -+ SSLSignType sigAlg; -+ PRUint32 policy; - unsigned int i, j; -- /* hashPreference expresses our preferences for hash algorithms, most -- * preferable first. */ -- static const SECOidTag hashPreference[] = { -- SEC_OID_SHA256, -- SEC_OID_SHA384, -- SEC_OID_SHA512, -- SEC_OID_SHA1, -- }; - - switch (ss->ssl3.hs.kea_def->kea) { - case kea_rsa: -@@ -9181,48 +9596,63 @@ - case kea_rsa_fips: - case kea_ecdh_rsa: - case kea_ecdhe_rsa: -- sigAlg = tls_sig_rsa; -- break; -+ sigAlg = ssl_sign_rsa; -+ break; - case kea_dh_dss: - case kea_dh_dss_export: - case kea_dhe_dss: - case kea_dhe_dss_export: -- sigAlg = tls_sig_dsa; -- break; -+ sigAlg = ssl_sign_dsa; -+ break; - case kea_ecdh_ecdsa: - case kea_ecdhe_ecdsa: -- sigAlg = tls_sig_ecdsa; -- break; -+ sigAlg = ssl_sign_ecdsa; -+ break; - default: -- PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); -- return SECFailure; -+ PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); -+ return SECFailure; - } - out->sigAlg = sigAlg; - - if (ss->version <= SSL_LIBRARY_VERSION_TLS_1_1) { -- /* SEC_OID_UNKNOWN means the MD5/SHA1 combo hash used in TLS 1.1 and -- * prior. */ -- out->hashAlg = SEC_OID_UNKNOWN; -- return SECSuccess; -+ /* SEC_OID_UNKNOWN means the MD5/SHA1 combo hash used in TLS 1.1 and -+ * prior. */ -+ out->hashAlg = ssl_hash_none; -+ return SECSuccess; - } - - if (ss->ssl3.hs.numClientSigAndHash == 0) { -- /* If the client didn't provide any signature_algorithms extension then -- * we can assume that they support SHA-1: -- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ -- out->hashAlg = SEC_OID_SHA1; -- return SECSuccess; -+ /* If the client didn't provide any signature_algorithms extension then -+ * we can assume that they support SHA-1: -+ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ -+ out->hashAlg = ssl_hash_sha1; -+ return SECSuccess; - } - -- for (i = 0; i < PR_ARRAY_SIZE(hashPreference); i++) { -- for (j = 0; j < ss->ssl3.hs.numClientSigAndHash; j++) { -- const SSL3SignatureAndHashAlgorithm* sh = -- &ss->ssl3.hs.clientSigAndHash[j]; -- if (sh->sigAlg == sigAlg && sh->hashAlg == hashPreference[i]) { -- out->hashAlg = sh->hashAlg; -- return SECSuccess; -- } -+ /* Here we look for the first server preference that the client has -+ * indicated support for in their signature_algorithms extension. */ -+ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { -+ const SSLSignatureAndHashAlg *serverPref = -+ &ss->ssl3.signatureAlgorithms[i]; -+ SECOidTag hashOID; -+ if (serverPref->sigAlg != sigAlg) { -+ continue; -+ } -+ hashOID = ssl3_TLSHashAlgorithmToOID(serverPref->hashAlg); -+ if ((NSS_GetAlgorithmPolicy(hashOID, &policy) != SECSuccess) -+ || !(policy & NSS_USE_ALG_IN_SSL_KX)) { -+ /* we ignore hashes we don't support */ -+ continue; - } -+ for (j = 0; j < ss->ssl3.hs.numClientSigAndHash; j++) { -+ const SSLSignatureAndHashAlg *clientPref = -+ &ss->ssl3.hs.clientSigAndHash[j]; -+ if (clientPref->hashAlg == serverPref->hashAlg && -+ clientPref->sigAlg == sigAlg) { -+ out->hashAlg = serverPref->hashAlg; -+ return SECSuccess; -+ } -+ } - } - - PORT_SetError(SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM); -@@ -9240,7 +9670,7 @@ - SECItem signed_hash = {siBuffer, NULL, 0}; - SSL3Hashes hashes; - SECKEYPublicKey * sdPub; /* public key for step-down */ -- SSL3SignatureAndHashAlgorithm sigAndHash; -+ SSLSignatureAndHashAlg sigAndHash; - - SSL_TRC(3, ("%d: SSL3[%d]: send server_key_exchange handshake", - SSL_GETPID(), ss->fd)); -@@ -9287,6 +9717,10 @@ - 2 + sdPub->u.rsa.publicExponent.len + - 2 + signed_hash.len; - -+ if (ss->ssl3.pwSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2) { -+ length += 2; -+ } -+ - rv = ssl3_AppendHandshakeHeader(ss, server_key_exchange, length); - if (rv != SECSuccess) { - goto loser; /* err set by AppendHandshake. */ -@@ -9320,6 +9754,11 @@ - PORT_Free(signed_hash.data); - return SECSuccess; - -+ case ssl_kea_dh: { -+ rv = ssl3_SendDHServerKeyExchange(ss); -+ return rv; -+ } -+ - #ifndef NSS_DISABLE_ECC - case kt_ecdh: { - rv = ssl3_SendECDHServerKeyExchange(ss, &sigAndHash); -@@ -9327,7 +9766,6 @@ - } - #endif /* NSS_DISABLE_ECC */ - -- case kt_dh: - case kt_null: - default: - PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG); -@@ -9339,6 +9777,36 @@ - return SECFailure; - } - -+static SECStatus -+ssl3_EncodeCertificateRequestSigAlgs(sslSocket *ss, PRUint8 *buf, -+ unsigned maxLen, PRUint32 *len) -+{ -+ unsigned int i; -+ -+ PORT_Assert(maxLen >= ss->ssl3.signatureAlgorithmCount * 2); -+ if (maxLen < ss->ssl3.signatureAlgorithmCount * 2) { -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); -+ return SECFailure; -+ } -+ -+ *len = 0; -+ for (i = 0; i < ss->ssl3.signatureAlgorithmCount; ++i) { -+ const SSLSignatureAndHashAlg *alg = &ss->ssl3.signatureAlgorithms[i]; -+ /* Note that we don't support a handshake hash with anything other than -+ * SHA-256, so asking for a signature from clients for something else -+ * would be inviting disaster. */ -+ if (alg->hashAlg == ssl_hash_sha256) { -+ buf[(*len)++] = (PRUint8)alg->hashAlg; -+ buf[(*len)++] = (PRUint8)alg->sigAlg; -+ } -+ } -+ -+ if (*len == 0) { -+ PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM); -+ return SECFailure; -+ } -+ return SECSuccess; -+} - - static SECStatus - ssl3_SendCertificateRequest(sslSocket *ss) -@@ -9347,7 +9815,6 @@ - SECItem * name; - CERTDistNames *ca_list; - const PRUint8 *certTypes; -- const PRUint8 *sigAlgs; - SECItem * names = NULL; - SECStatus rv; - int length; -@@ -9355,7 +9822,8 @@ - int calen = 0; - int nnames = 0; - int certTypesLength; -- int sigAlgsLength; -+ PRUint8 sigAlgs[MAX_SIGNATURE_ALGORITHMS * 2]; -+ unsigned int sigAlgsLength = 0; - - SSL_TRC(3, ("%d: SSL3[%d]: send certificate_request handshake", - SSL_GETPID(), ss->fd)); -@@ -9382,12 +9850,15 @@ - - certTypes = certificate_types; - certTypesLength = sizeof certificate_types; -- sigAlgs = supported_signature_algorithms; -- sigAlgsLength = sizeof supported_signature_algorithms; - - length = 1 + certTypesLength + 2 + calen; - if (isTLS12) { -- length += 2 + sigAlgsLength; -+ rv = ssl3_EncodeCertificateRequestSigAlgs(ss, sigAlgs, sizeof(sigAlgs), -+ &sigAlgsLength); -+ if (rv != SECSuccess) { -+ return rv; -+ } -+ length += 2 + sigAlgsLength; - } - - rv = ssl3_AppendHandshakeHeader(ss, certificate_request, length); -@@ -9453,7 +9924,7 @@ - int errCode = SSL_ERROR_RX_MALFORMED_CERT_VERIFY; - SSL3AlertDescription desc = handshake_failure; - PRBool isTLS, isTLS12; -- SSL3SignatureAndHashAlgorithm sigAndHash; -+ SSLSignatureAndHashAlg sigAndHash; - - SSL_TRC(3, ("%d: SSL3[%d]: handle certificate_verify handshake", - SSL_GETPID(), ss->fd)); -@@ -9469,6 +9940,13 @@ - goto alert_loser; - } - -+ if (!hashes) { -+ PORT_Assert(0); -+ desc = internal_error; -+ errCode = SEC_ERROR_LIBRARY_FAILURE; -+ goto alert_loser; -+ } -+ - if (isTLS12) { - rv = ssl3_ConsumeSignatureAndHashAlgorithm(ss, &b, &length, - &sigAndHash); -@@ -9476,7 +9954,7 @@ - goto loser; /* malformed or unsupported. */ - } - rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( -- &sigAndHash, ss->sec.peerCert); -+ ss, &sigAndHash, ss->sec.peerCert); - if (rv != SECSuccess) { - errCode = PORT_GetError(); - desc = decrypt_error; -@@ -9485,7 +9963,7 @@ - - /* We only support CertificateVerify messages that use the handshake - * hash. */ -- if (sigAndHash.hashAlg != hashes->hashAlg) { -+ if (sigAndHash.hashAlg != hashes->hashAlg) { - errCode = SSL_ERROR_UNSUPPORTED_HASH_ALGORITHM; - desc = decrypt_error; - goto alert_loser; -@@ -9616,18 +10094,17 @@ - PRUint32 length, - SECKEYPrivateKey *serverKey) - { -- PK11SymKey * pms; - #ifndef NO_PKCS11_BYPASS - unsigned char * cr = (unsigned char *)&ss->ssl3.hs.client_random; - unsigned char * sr = (unsigned char *)&ss->ssl3.hs.server_random; - ssl3CipherSpec * pwSpec = ss->ssl3.pwSpec; - unsigned int outLen = 0; --#endif - PRBool isTLS = PR_FALSE; -+ SECItem pmsItem = {siBuffer, NULL, 0}; -+ unsigned char rsaPmsBuf[SSL3_RSA_PMS_LENGTH]; -+#endif - SECStatus rv; - SECItem enc_pms; -- unsigned char rsaPmsBuf[SSL3_RSA_PMS_LENGTH]; -- SECItem pmsItem = {siBuffer, NULL, 0}; - - PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); - PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); -@@ -9635,8 +10112,10 @@ - - enc_pms.data = b; - enc_pms.len = length; -+#ifndef NO_PKCS11_BYPASS - pmsItem.data = rsaPmsBuf; - pmsItem.len = sizeof rsaPmsBuf; -+#endif - - if (ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0) { /* isTLS */ - PRInt32 kLen; -@@ -9648,13 +10127,24 @@ - if ((unsigned)kLen < enc_pms.len) { - enc_pms.len = kLen; - } -+#ifndef NO_PKCS11_BYPASS - isTLS = PR_TRUE; -+#endif - } else { -+#ifndef NO_PKCS11_BYPASS - isTLS = (PRBool)(ss->ssl3.hs.kea_def->tls_keygen != 0); -+#endif - } - - #ifndef NO_PKCS11_BYPASS - if (ss->opt.bypassPKCS11) { -+ /* We have not implemented a tls_ExtendedMasterKeyDeriveBypass -+ * and will not negotiate this extension in bypass mode. This -+ * assert just double-checks that. -+ */ -+ PORT_Assert( -+ !ssl3_ExtensionNegotiated(ss, ssl_extended_master_secret_xtn)); -+ - /* TRIPLE BYPASS, get PMS directly from RSA decryption. - * Use PK11_PrivDecryptPKCS1 to decrypt the PMS to a buffer, - * then, check for version rollback attack, then -@@ -9682,8 +10172,8 @@ - } - } - /* have PMS, build MS without PKCS11 */ -- rv = ssl3_MasterKeyDeriveBypass(pwSpec, cr, sr, &pmsItem, isTLS, -- PR_TRUE); -+ rv = ssl3_MasterSecretDeriveBypass(pwSpec, cr, sr, &pmsItem, isTLS, -+ PR_TRUE); - if (rv != SECSuccess) { - pwSpec->msItem.data = pwSpec->raw_master_secret; - pwSpec->msItem.len = SSL3_MASTER_SECRET_LENGTH; -@@ -9693,49 +10183,163 @@ - } else - #endif - { -+ PK11SymKey *tmpPms[2] = {NULL, NULL}; -+ PK11SlotInfo *slot; -+ int useFauxPms = 0; -+#define currentPms tmpPms[!useFauxPms] -+#define unusedPms tmpPms[useFauxPms] -+#define realPms tmpPms[1] -+#define fauxPms tmpPms[0] -+ - #ifndef NO_PKCS11_BYPASS - double_bypass: - #endif -- /* -- * unwrap pms out of the incoming buffer -- * Note: CKM_SSL3_MASTER_KEY_DERIVE is NOT the mechanism used to do -- * the unwrap. Rather, it is the mechanism with which the -- * unwrapped pms will be used. -- */ -- pms = PK11_PubUnwrapSymKey(serverKey, &enc_pms, -- CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); -- if (pms != NULL) { -- PRINT_BUF(60, (ss, "decrypted premaster secret:", -- PK11_GetKeyData(pms)->data, -- PK11_GetKeyData(pms)->len)); -- } else { -- /* unwrap failed. Generate a bogus PMS and carry on. */ -- PK11SlotInfo * slot = PK11_GetSlotFromPrivateKey(serverKey); - -- ssl_GetSpecWriteLock(ss); -- pms = ssl3_GenerateRSAPMS(ss, ss->ssl3.prSpec, slot); -- ssl_ReleaseSpecWriteLock(ss); -- PK11_FreeSlot(slot); -- } -+ /* -+ * Get as close to algorithm 2 from RFC 5246; Section 7.4.7.1 -+ * as we can within the constraints of the PKCS#11 interface. -+ * -+ * 1. Unconditionally generate a bogus PMS (what RFC 5246 -+ * calls R). -+ * 2. Attempt the RSA decryption to recover the PMS (what -+ * RFC 5246 calls M). -+ * 3. Set PMS = (M == NULL) ? R : M -+ * 4. Use ssl3_ComputeMasterSecret(PMS) to attempt to derive -+ * the MS from PMS. This includes performing the version -+ * check and length check. -+ * 5. If either the initial RSA decryption failed or -+ * ssl3_ComputeMasterSecret(PMS) failed, then discard -+ * M and set PMS = R. Else, discard R and set PMS = M. -+ * -+ * We do two derivations here because we can't rely on having -+ * a function that only performs the PMS version and length -+ * check. The only redundant cost is that this runs the PRF, -+ * which isn't necessary here. -+ */ -+ -+ /* Generate the bogus PMS (R) */ -+ slot = PK11_GetSlotFromPrivateKey(serverKey); -+ if (!slot) { -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); -+ return SECFailure; -+ } - -- if (pms == NULL) { -- /* last gasp. */ -+ if (!PK11_DoesMechanism(slot, CKM_SSL3_MASTER_KEY_DERIVE)) { -+ PK11_FreeSlot(slot); -+ slot = PK11_GetBestSlot(CKM_SSL3_MASTER_KEY_DERIVE, NULL); -+ if (!slot) { -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); -+ return SECFailure; -+ } -+ } -+ -+ ssl_GetSpecWriteLock(ss); -+ fauxPms = ssl3_GenerateRSAPMS(ss, ss->ssl3.prSpec, slot); -+ ssl_ReleaseSpecWriteLock(ss); -+ PK11_FreeSlot(slot); -+ -+ if (fauxPms == NULL) { - ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); - return SECFailure; - } - -+ /* -+ * unwrap pms out of the incoming buffer -+ * Note: CKM_SSL3_MASTER_KEY_DERIVE is NOT the mechanism used to do -+ * the unwrap. Rather, it is the mechanism with which the -+ * unwrapped pms will be used. -+ */ -+ realPms = PK11_PubUnwrapSymKey(serverKey, &enc_pms, -+ CKM_SSL3_MASTER_KEY_DERIVE, CKA_DERIVE, 0); -+ /* Temporarily use the PMS if unwrapping the real PMS fails. */ -+ useFauxPms |= (realPms == NULL); -+ -+ /* Attempt to derive the MS from the PMS. This is the only way to -+ * check the version field in the RSA PMS. If this fails, we -+ * then use the faux PMS in place of the PMS. Note that this -+ * operation should never fail if we are using the faux PMS -+ * since it is correctly formatted. */ -+ rv = ssl3_ComputeMasterSecret(ss, currentPms, NULL); -+ -+ /* If we succeeded, then select the true PMS and discard the -+ * FPMS. Else, select the FPMS and select the true PMS */ -+ useFauxPms |= (rv != SECSuccess); -+ -+ if (unusedPms) { -+ PK11_FreeSymKey(unusedPms); -+ } -+ - /* This step will derive the MS from the PMS, among other things. */ -- rv = ssl3_InitPendingCipherSpec(ss, pms); -- PK11_FreeSymKey(pms); -+ rv = ssl3_InitPendingCipherSpec(ss, currentPms); -+ PK11_FreeSymKey(currentPms); - } - - if (rv != SECSuccess) { - SEND_ALERT - return SECFailure; /* error code set by ssl3_InitPendingCipherSpec */ - } -+ -+#undef currentPms -+#undef unusedPms -+#undef realPms -+#undef fauxPms -+ - return SECSuccess; - } - -+static SECStatus -+ssl3_HandleDHClientKeyExchange(sslSocket *ss, -+ SSL3Opaque *b, -+ PRUint32 length, -+ SECKEYPublicKey *srvrPubKey, -+ SECKEYPrivateKey *serverKey) -+{ -+ PK11SymKey *pms; -+ SECStatus rv; -+ SECKEYPublicKey clntPubKey; -+ CK_MECHANISM_TYPE target; -+ PRBool isTLS; -+ -+ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); -+ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); -+ PORT_Assert( srvrPubKey ); -+ -+ clntPubKey.keyType = dhKey; -+ clntPubKey.u.dh.prime.len = srvrPubKey->u.dh.prime.len; -+ clntPubKey.u.dh.prime.data = srvrPubKey->u.dh.prime.data; -+ clntPubKey.u.dh.base.len = srvrPubKey->u.dh.base.len; -+ clntPubKey.u.dh.base.data = srvrPubKey->u.dh.base.data; -+ -+ rv = ssl3_ConsumeHandshakeVariable(ss, &clntPubKey.u.dh.publicValue, -+ 2, &b, &length); -+ if (rv != SECSuccess) { -+ goto loser; -+ } -+ -+ isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); -+ -+ if (isTLS) target = CKM_TLS_MASTER_KEY_DERIVE_DH; -+ else target = CKM_SSL3_MASTER_KEY_DERIVE_DH; -+ -+ /* Determine the PMS */ -+ pms = PK11_PubDerive(serverKey, &clntPubKey, PR_FALSE, NULL, NULL, -+ CKM_DH_PKCS_DERIVE, target, CKA_DERIVE, 0, NULL); -+ if (pms == NULL) { -+ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ -+ rv = ssl3_InitPendingCipherSpec(ss, pms); -+ PK11_FreeSymKey(pms); pms = NULL; -+ -+loser: -+ if (ss->dheKeyPair) { -+ ssl3_FreeKeyPair(ss->dheKeyPair); -+ ss->dheKeyPair = NULL; -+ } -+ return rv; -+} -+ - - /* Called from ssl3_HandleHandshakeMessage() when it has deciphered a complete - * ssl3 ClientKeyExchange message from the remote client -@@ -9748,9 +10352,7 @@ - SECStatus rv; - const ssl3KEADef *kea_def; - ssl3KeyPair *serverKeyPair = NULL; --#ifndef NSS_DISABLE_ECC - SECKEYPublicKey *serverPubKey = NULL; --#endif /* NSS_DISABLE_ECC */ - - SSL_TRC(3, ("%d: SSL3[%d]: handle client_key_exchange handshake", - SSL_GETPID(), ss->fd)); -@@ -9780,6 +10382,16 @@ - ss->sec.keaKeyBits = EXPORT_RSA_KEY_LENGTH * BPB; - } else - skip: -+ if (kea_def->kea == kea_dhe_dss || -+ kea_def->kea == kea_dhe_rsa) { -+ if (ss->dheKeyPair) { -+ serverKeyPair = ss->dheKeyPair; -+ if (serverKeyPair->pubKey) { -+ ss->sec.keaKeyBits = -+ SECKEY_PublicKeyStrengthInBits(serverKeyPair->pubKey); -+ } -+ } -+ } else - #ifndef NSS_DISABLE_ECC - /* XXX Using SSLKEAType to index server certifiates - * does not work for (EC)DHE ciphers. Until we have -@@ -9825,6 +10437,21 @@ - } - break; - -+ case ssl_kea_dh: -+ if (ss->dheKeyPair && ss->dheKeyPair->pubKey) { -+ serverPubKey = ss->dheKeyPair->pubKey; -+ } -+ if (!serverPubKey) { -+ PORT_SetError(SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE); -+ return SECFailure; -+ } -+ rv = ssl3_HandleDHClientKeyExchange(ss, b, length, -+ serverPubKey, serverKey); -+ if (rv != SECSuccess) { -+ SSL3_SendAlert(ss, alert_fatal, handshake_failure); -+ return SECFailure; /* error code set */ -+ } -+ break; - - #ifndef NSS_DISABLE_ECC - case kt_ecdh: -@@ -10454,6 +11081,8 @@ - - ss->ssl3.hs.authCertificatePending = PR_FALSE; - -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); - /* - * Ask caller-supplied callback function to validate cert chain. - */ -@@ -10498,40 +11127,60 @@ - ss->sec.authAlgorithm = ss->ssl3.hs.kea_def->signKeyType; - ss->sec.keaType = ss->ssl3.hs.kea_def->exchKeyType; - if (pubKey) { -+ KeyType pubKeyType; -+ PRInt32 minKey; - ss->sec.keaKeyBits = ss->sec.authKeyBits = - SECKEY_PublicKeyStrengthInBits(pubKey); --#ifndef NSS_DISABLE_ECC -- if (ss->sec.keaType == kt_ecdh) { -- /* Get authKeyBits from signing key. -- * XXX The code below uses a quick approximation of -- * key size based on cert->signatureWrap.signature.data -- * (which contains the DER encoded signature). The field -- * cert->signatureWrap.signature.len contains the -- * length of the encoded signature in bits. -- */ -- if (ss->ssl3.hs.kea_def->kea == kea_ecdh_ecdsa) { -- ss->sec.authKeyBits = -- cert->signatureWrap.signature.data[3]*8; -- if (cert->signatureWrap.signature.data[4] == 0x00) -- ss->sec.authKeyBits -= 8; -- /* -- * XXX: if cert is not signed by ecdsa we should -- * destroy pubKey and goto bad_cert -- */ -- } else if (ss->ssl3.hs.kea_def->kea == kea_ecdh_rsa) { -- ss->sec.authKeyBits = cert->signatureWrap.signature.len; -- /* -- * XXX: if cert is not signed by rsa we should -- * destroy pubKey and goto bad_cert -- */ -+ pubKeyType = SECKEY_GetPublicKeyType(pubKey); -+ minKey = ss->sec.authKeyBits; -+ switch (pubKeyType) { -+ case rsaKey: -+ case rsaPssKey: -+ case rsaOaepKey: -+ rv = NSS_OptionGet(NSS_RSA_MIN_KEY_SIZE, &minKey); -+ if (rv != SECSuccess) { -+ minKey = SSL_RSA_MIN_MODULUS_BITS; - } -+ break; -+ case dsaKey: -+ rv = NSS_OptionGet(NSS_DSA_MIN_KEY_SIZE, &minKey); -+ if (rv != SECSuccess) { -+ minKey = SSL_DSA_MIN_P_BITS; -+ } -+ break; -+ case dhKey: -+ rv = NSS_OptionGet(NSS_DH_MIN_KEY_SIZE, &minKey); -+ if (rv != SECSuccess) { -+ minKey = SSL_DH_MIN_P_BITS; -+ } -+ break; -+ default: -+ break; - } --#endif /* NSS_DISABLE_ECC */ -+ -+ /* Too small: not good enough. Send a fatal alert. */ -+ /* We aren't checking EC here on the understanding that we only -+ * support curves we like, a decision that might need revisiting. */ -+ if ( ss->sec.authKeyBits < minKey) { -+ PORT_SetError(SSL_ERROR_WEAK_SERVER_CERT_KEY); -+ (void)SSL3_SendAlert(ss, alert_fatal, -+ ss->version >= SSL_LIBRARY_VERSION_TLS_1_0 -+ ? insufficient_security -+ : illegal_parameter); -+ SECKEY_DestroyPublicKey(pubKey); -+ return SECFailure; -+ } - SECKEY_DestroyPublicKey(pubKey); - pubKey = NULL; - } - -- if (ss->ssl3.hs.kea_def->ephemeral) { -+ /* Ephemeral suites require ServerKeyExchange. Export cipher suites -+ * with RSA key exchange also require ServerKeyExchange if the -+ * authentication key exceeds the key size limit. */ -+ if (ss->ssl3.hs.kea_def->ephemeral || -+ (ss->ssl3.hs.kea_def->is_limited && -+ ss->ssl3.hs.kea_def->exchKeyType == ssl_kea_rsa && -+ ss->sec.authKeyBits > ss->ssl3.hs.kea_def->key_size_limit)) { - ss->ssl3.hs.ws = wait_server_key; /* require server_key_exchange */ - } else { - ss->ssl3.hs.ws = wait_cert_request; /* disallow server_key_exchange */ -@@ -10643,16 +11292,42 @@ - const SSL3Hashes * hashes, - TLSFinished * tlsFinished) - { -- const char * label; -- unsigned int len; -- SECStatus rv; -+ SECStatus rv; -+ CK_TLS_MAC_PARAMS tls_mac_params; -+ SECItem param = {siBuffer, NULL, 0}; -+ PK11Context *prf_context; -+ unsigned int retLen; - -- label = isServer ? "server finished" : "client finished"; -- len = 15; -+ if (!spec->master_secret || spec->bypassCiphers) { -+ const char *label = isServer ? "server finished" : "client finished"; -+ unsigned int len = 15; - -- rv = ssl3_TLSPRFWithMasterSecret(spec, label, len, hashes->u.raw, -- hashes->len, tlsFinished->verify_data, -- sizeof tlsFinished->verify_data); -+ return ssl3_TLSPRFWithMasterSecret(spec, label, len, hashes->u.raw, -+ hashes->len, tlsFinished->verify_data, -+ sizeof tlsFinished->verify_data); -+ } -+ -+ if (spec->version < SSL_LIBRARY_VERSION_TLS_1_2) { -+ tls_mac_params.prfMechanism = CKM_TLS_PRF; -+ } else { -+ tls_mac_params.prfMechanism = CKM_SHA256; -+ } -+ tls_mac_params.ulMacLength = 12; -+ tls_mac_params.ulServerOrClient = isServer ? 1 : 2; -+ param.data = (unsigned char *)&tls_mac_params; -+ param.len = sizeof(tls_mac_params); -+ prf_context = PK11_CreateContextBySymKey(CKM_TLS_MAC, CKA_SIGN, -+ spec->master_secret, ¶m); -+ if (!prf_context) -+ return SECFailure; -+ -+ rv = PK11_DigestBegin(prf_context); -+ rv |= PK11_DigestOp(prf_context, hashes->u.raw, hashes->len); -+ rv |= PK11_DigestFinal(prf_context, tlsFinished->verify_data, &retLen, -+ sizeof tlsFinished->verify_data); -+ PORT_Assert(rv != SECSuccess || retLen == sizeof tlsFinished->verify_data); -+ -+ PK11_DestroyContext(prf_context, PR_TRUE); - - return rv; - } -@@ -11170,6 +11845,13 @@ - return SECFailure; - } - -+ if (!hashes) { -+ PORT_Assert(0); -+ SSL3_SendAlert(ss, alert_fatal, internal_error); -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); -+ return SECFailure; -+ } -+ - isTLS = (PRBool)(ss->ssl3.crSpec->version > SSL_LIBRARY_VERSION_3_0); - if (isTLS) { - TLSFinished tlsFinished; -@@ -11225,7 +11907,8 @@ - * ServerHello message.) - */ - if (isServer && !ss->ssl3.hs.isResuming && -- ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn)) { -+ ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn) && -+ ssl3_KEAAllowsSessionTicket(ss->ssl3.hs.suite_def->key_exchange_alg)) { - /* RFC 5077 Section 3.3: "In the case of a full handshake, the - * server MUST verify the client's Finished message before sending - * the ticket." Presumably, this also means that the client's -@@ -11278,7 +11961,8 @@ - return rv; - } - -- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) { -+ if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa || -+ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa) { - effectiveExchKeyType = kt_rsa; - } else { - effectiveExchKeyType = ss->ssl3.hs.kea_def->exchKeyType; -@@ -11398,6 +12082,7 @@ - SECStatus rv = SECSuccess; - SSL3HandshakeType type = ss->ssl3.hs.msg_type; - SSL3Hashes hashes; /* computed hashes are put here. */ -+ SSL3Hashes *hashesPtr = NULL; /* Set when hashes are computed */ - PRUint8 hdr[4]; - PRUint8 dtlsData[8]; - -@@ -11408,7 +12093,8 @@ - * current message. - */ - ssl_GetSpecReadLock(ss); /************************************/ -- if((type == finished) || (type == certificate_verify)) { -+ if(((type == finished) && (ss->ssl3.hs.ws == wait_finished)) || -+ ((type == certificate_verify) && (ss->ssl3.hs.ws == wait_cert_verify))) { - SSL3Sender sender = (SSL3Sender)0; - ssl3CipherSpec *rSpec = ss->ssl3.prSpec; - -@@ -11417,6 +12103,9 @@ - rSpec = ss->ssl3.crSpec; - } - rv = ssl3_ComputeHandshakeHashes(ss, rSpec, &hashes, sender); -+ if (rv == SECSuccess) { -+ hashesPtr = &hashes; -+ } - } - ssl_ReleaseSpecReadLock(ss); /************************************/ - if (rv != SECSuccess) { -@@ -11567,7 +12256,7 @@ - PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY); - return SECFailure; - } -- rv = ssl3_HandleCertificateVerify(ss, b, length, &hashes); -+ rv = ssl3_HandleCertificateVerify(ss, b, length, hashesPtr); - break; - case client_key_exchange: - if (!ss->sec.isServer) { -@@ -11586,7 +12275,7 @@ - rv = ssl3_HandleNewSessionTicket(ss, b, length); - break; - case finished: -- rv = ssl3_HandleFinished(ss, b, length, &hashes); -+ rv = ssl3_HandleFinished(ss, b, length, hashesPtr); - break; - default: - (void)SSL3_SendAlert(ss, alert_fatal, unexpected_message); -@@ -11641,7 +12330,7 @@ - #define MAX_HANDSHAKE_MSG_LEN 0x1ffff /* 128k - 1 */ - if (ss->ssl3.hs.msg_len > MAX_HANDSHAKE_MSG_LEN) { - (void)ssl3_DecodeError(ss); -- PORT_SetError(SSL_ERROR_RX_RECORD_TOO_LONG); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_HANDSHAKE); - return SECFailure; - } - #undef MAX_HANDSHAKE_MSG_LEN -@@ -11942,7 +12631,7 @@ - SSL3Opaque *givenHash; - sslBuffer *plaintext; - sslBuffer temp_buf; -- PRUint64 dtls_seq_num; -+ PRUint64 dtls_seq_num = 0; - unsigned int ivLen = 0; - unsigned int originalLen = 0; - unsigned int good; -@@ -12423,6 +13112,7 @@ - ss->ssl3.hs.sendingSCSV = PR_FALSE; - ssl3_InitCipherSpec(ss, ss->ssl3.crSpec); - ssl3_InitCipherSpec(ss, ss->ssl3.prSpec); -+ ss->ssl3.hs.preliminaryInfo = 0; - - ss->ssl3.hs.ws = (ss->sec.isServer) ? wait_client_hello : wait_server_hello; - #ifndef NSS_DISABLE_ECC -@@ -12496,8 +13186,6 @@ - } - } - -- -- - /* - * Creates the public and private RSA keys for SSL Step down. - * Called from SSL_ConfigSecureServer in sslsecur.c -@@ -12529,7 +13217,6 @@ - return rv; - } - -- - /* record the export policy for this cipher suite */ - SECStatus - ssl3_SetPolicy(ssl3CipherSuite which, int policy) -@@ -12631,6 +13318,79 @@ - } - - SECStatus -+SSL_SignaturePrefSet(PRFileDesc *fd, const SSLSignatureAndHashAlg *algorithms, -+ unsigned int count) -+{ -+ sslSocket *ss; -+ unsigned int i; -+ -+ ss = ssl_FindSocket(fd); -+ if (!ss) { -+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SignaturePrefSet", -+ SSL_GETPID(), fd)); -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ if (!count || count > MAX_SIGNATURE_ALGORITHMS) { -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ ss->ssl3.signatureAlgorithmCount = 0; -+ for (i = 0; i < count; ++i) { -+ if (!ssl3_IsSupportedSignatureAlgorithm(&algorithms[i])) { -+ SSL_DBG(("%d: SSL[%d]: invalid signature algorithm set %d/%d", -+ SSL_GETPID(), fd, algorithms[i].sigAlg, -+ algorithms[i].hashAlg)); -+ continue; -+ } -+ -+ ss->ssl3.signatureAlgorithms[ss->ssl3.signatureAlgorithmCount++] = -+ algorithms[i]; -+ } -+ -+ if (ss->ssl3.signatureAlgorithmCount == 0) { -+ PORT_SetError(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM); -+ return SECFailure; -+ } -+ return SECSuccess; -+} -+ -+SECStatus -+SSL_SignaturePrefGet(PRFileDesc *fd, SSLSignatureAndHashAlg *algorithms, -+ unsigned int *count, unsigned int maxCount) -+{ -+ sslSocket *ss; -+ unsigned int requiredSpace; -+ -+ ss = ssl_FindSocket(fd); -+ if (!ss) { -+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SignaturePrefGet", -+ SSL_GETPID(), fd)); -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ if (!algorithms || !count || -+ maxCount < ss->ssl3.signatureAlgorithmCount) { -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ requiredSpace = -+ ss->ssl3.signatureAlgorithmCount * sizeof(SSLSignatureAndHashAlg); -+ PORT_Memcpy(algorithms, ss->ssl3.signatureAlgorithms, requiredSpace); -+ *count = ss->ssl3.signatureAlgorithmCount; -+ return SECSuccess; -+} -+ -+unsigned int -+SSL_SignatureMaxCount() { -+ return MAX_SIGNATURE_ALGORITHMS; -+} -+ -+SECStatus - ssl3_CipherOrderSet(sslSocket *ss, const ssl3CipherSuite *ciphers, unsigned int len) - { - /* |i| iterates over |ciphers| while |done| and |j| iterate over -@@ -12675,6 +13435,9 @@ - ssl3_InitSocketPolicy(sslSocket *ss) - { - PORT_Memcpy(ss->cipherSuites, cipherSuites, sizeof cipherSuites); -+ PORT_Memcpy(ss->ssl3.signatureAlgorithms, defaultSignatureAlgorithms, -+ sizeof(defaultSignatureAlgorithms)); -+ ss->ssl3.signatureAlgorithmCount = PR_ARRAY_SIZE(defaultSignatureAlgorithms); - } - - SECStatus -@@ -12764,7 +13527,7 @@ - /* ssl3_config_match_init was called by the caller of this function. */ - for (i = 0; i < ssl_V3_SUITES_IMPLEMENTED; i++) { - ssl3CipherSuiteCfg *suite = &ss->cipherSuites[i]; -- if (config_match(suite, SSL_ALLOWED, PR_TRUE, &ss->vrange)) { -+ if (config_match(suite, SSL_ALLOWED, PR_TRUE, &ss->vrange, ss)) { - if (cs != NULL) { - *cs++ = 0x00; - *cs++ = (suite->cipher_suite >> 8) & 0xFF; -@@ -12898,6 +13661,10 @@ - } - } - -+ if (ss->ssl3.dheGroups) { -+ PORT_Free(ss->ssl3.dheGroups); -+ } -+ - ss->ssl3.initialized = PR_FALSE; - - SECITEM_FreeItem(&ss->ssl3.nextProto, PR_FALSE); -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ecc.c 2016-01-13 14:18:55.621954867 +0100 -@@ -214,7 +214,7 @@ - - /* Caller must set hiLevel error code. */ - static SECStatus --ssl3_ComputeECDHKeyHash(SECOidTag hashAlg, -+ssl3_ComputeECDHKeyHash(SSLHashType hashAlg, - SECItem ec_params, SECItem server_ecpoint, - SSL3Random *client_rand, SSL3Random *server_rand, - SSL3Hashes *hashes, PRBool bypassPKCS11) -@@ -303,7 +303,7 @@ - pubKey->u.ec.publicValue.len)); - - if (isTLS12) { -- target = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; -+ target = CKM_TLS12_MASTER_KEY_DERIVE_DH; - } else if (isTLS) { - target = CKM_TLS_MASTER_KEY_DERIVE_DH; - } else { -@@ -325,14 +325,6 @@ - SECKEY_DestroyPrivateKey(privKey); - privKey = NULL; - -- rv = ssl3_InitPendingCipherSpec(ss, pms); -- PK11_FreeSymKey(pms); pms = NULL; -- -- if (rv != SECSuccess) { -- ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -- goto loser; -- } -- - rv = ssl3_AppendHandshakeHeader(ss, client_key_exchange, - pubKey->u.ec.publicValue.len + 1); - if (rv != SECSuccess) { -@@ -349,6 +341,14 @@ - goto loser; /* err set by ssl3_AppendHandshake* */ - } - -+ rv = ssl3_InitPendingCipherSpec(ss, pms); -+ PK11_FreeSymKey(pms); pms = NULL; -+ -+ if (rv != SECSuccess) { -+ ssl_MapLowLevelError(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE); -+ goto loser; -+ } -+ - rv = SECSuccess; - - loser: -@@ -394,7 +394,7 @@ - isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); - - if (isTLS12) { -- target = CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256; -+ target = CKM_TLS12_MASTER_KEY_DERIVE_DH; - } else if (isTLS) { - target = CKM_TLS_MASTER_KEY_DERIVE_DH; - } else { -@@ -615,9 +615,9 @@ - SECItem ec_params = {siBuffer, NULL, 0}; - SECItem ec_point = {siBuffer, NULL, 0}; - unsigned char paramBuf[3]; /* only for curve_type == named_curve */ -- SSL3SignatureAndHashAlgorithm sigAndHash; -+ SSLSignatureAndHashAlg sigAndHash; - -- sigAndHash.hashAlg = SEC_OID_UNKNOWN; -+ sigAndHash.hashAlg = ssl_hash_none; - - isTLS = (PRBool)(ss->ssl3.prSpec->version > SSL_LIBRARY_VERSION_3_0); - isTLS12 = (PRBool)(ss->ssl3.prSpec->version >= SSL_LIBRARY_VERSION_TLS_1_2); -@@ -659,7 +659,7 @@ - goto loser; /* malformed or unsupported. */ - } - rv = ssl3_CheckSignatureAndHashAlgorithmConsistency( -- &sigAndHash, ss->sec.peerCert); -+ ss, &sigAndHash, ss->sec.peerCert); - if (rv != SECSuccess) { - goto loser; - } -@@ -710,7 +710,7 @@ - goto no_memory; - } - -- ss->sec.peerKey = peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); -+ peerKey = PORT_ArenaZNew(arena, SECKEYPublicKey); - if (peerKey == NULL) { - goto no_memory; - } -@@ -731,7 +731,6 @@ - /* copy publicValue in peerKey */ - if (SECITEM_CopyItem(arena, &peerKey->u.ec.publicValue, &ec_point)) - { -- PORT_FreeArena(arena, PR_FALSE); - goto no_memory; - } - peerKey->pkcs11Slot = NULL; -@@ -745,10 +744,16 @@ - alert_loser: - (void)SSL3_SendAlert(ss, alert_fatal, desc); - loser: -+ if (arena) { -+ PORT_FreeArena(arena, PR_FALSE); -+ } - PORT_SetError( errCode ); - return SECFailure; - - no_memory: /* no-memory error has already been set. */ -+ if (arena) { -+ PORT_FreeArena(arena, PR_FALSE); -+ } - ssl_MapLowLevelError(SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE); - return SECFailure; - } -@@ -756,7 +761,7 @@ - SECStatus - ssl3_SendECDHServerKeyExchange( - sslSocket *ss, -- const SSL3SignatureAndHashAlgorithm *sigAndHash) -+ const SSLSignatureAndHashAlg *sigAndHash) - { - const ssl3KEADef * kea_def = ss->ssl3.hs.kea_def; - SECStatus rv = SECFailure; -@@ -977,9 +982,7 @@ - if (!suite) - suite = ecSuites; - for (; *suite; ++suite) { -- SECStatus rv = ssl3_CipherPrefSet(ss, *suite, PR_FALSE); -- -- PORT_Assert(rv == SECSuccess); /* else is coding error */ -+ PORT_CheckSuccess(ssl3_CipherPrefSet(ss, *suite, PR_FALSE)); - } - return SECSuccess; - } -@@ -1142,7 +1145,10 @@ - ecList = tlsECList; - } - -- if (append && maxBytes >= ecListSize) { -+ if (maxBytes < (PRUint32)ecListSize) { -+ return 0; -+ } -+ if (append) { - SECStatus rv = ssl3_AppendHandshake(ss, ecList, ecListSize); - if (rv != SECSuccess) - return -1; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3ext.c 2016-01-13 14:18:55.623954879 +0100 -@@ -101,6 +101,12 @@ - PRUint32 maxBytes); - static SECStatus ssl3_ServerHandleDraftVersionXtn(sslSocket *ss, PRUint16 ex_type, - SECItem *data); -+static PRInt32 ssl3_SendExtendedMasterSecretXtn(sslSocket *ss, PRBool append, -+ PRUint32 maxBytes); -+static SECStatus ssl3_HandleExtendedMasterSecretXtn(sslSocket *ss, -+ PRUint16 ex_type, -+ SECItem *data); -+ - - /* - * Write bytes. Using this function means the SECItem structure -@@ -266,6 +272,7 @@ - { ssl_cert_status_xtn, &ssl3_ServerHandleStatusRequestXtn }, - { ssl_signature_algorithms_xtn, &ssl3_ServerHandleSigAlgsXtn }, - { ssl_tls13_draft_version_xtn, &ssl3_ServerHandleDraftVersionXtn }, -+ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, - { -1, NULL } - }; - -@@ -281,6 +288,7 @@ - { ssl_use_srtp_xtn, &ssl3_ClientHandleUseSRTPXtn }, - { ssl_channel_id_xtn, &ssl3_ClientHandleChannelIDXtn }, - { ssl_cert_status_xtn, &ssl3_ClientHandleStatusRequestXtn }, -+ { ssl_extended_master_secret_xtn, &ssl3_HandleExtendedMasterSecretXtn }, - { ssl_signed_certificate_timestamp_xtn, - &ssl3_ClientHandleSignedCertTimestampXtn }, - { -1, NULL } -@@ -319,6 +327,7 @@ - * extension. */ - { ssl_signature_algorithms_xtn, &ssl3_ClientSendSigAlgsXtn }, - { ssl_tls13_draft_version_xtn, &ssl3_ClientSendDraftVersionXtn }, -+ { ssl_extended_master_secret_xtn, &ssl3_SendExtendedMasterSecretXtn}, - /* any extra entries will appear as { 0, NULL } */ - }; - -@@ -331,7 +340,7 @@ - static PRBool - arrayContainsExtension(const PRUint16 *array, PRUint32 len, PRUint16 ex_type) - { -- int i; -+ unsigned int i; - for (i = 0; i < len; i++) { - if (ex_type == array[i]) - return PR_TRUE; -@@ -433,12 +442,12 @@ - } - /* length of server_name_list */ - listLenBytes = ssl3_ConsumeHandshakeNumber(ss, 2, &data->data, &data->len); -- if (listLenBytes < 0 || listLenBytes != data->len) { -- (void)ssl3_DecodeError(ss); -+ if (listLenBytes < 0) { - return SECFailure; - } -- if (listLenBytes == 0) { -- return SECSuccess; /* ignore an empty extension */ -+ if (listLenBytes == 0 || listLenBytes != data->len) { -+ (void)ssl3_DecodeError(ss); -+ return SECFailure; - } - ldata = *data; - /* Calculate the size of the array.*/ -@@ -463,15 +472,12 @@ - } - listCount += 1; - } -- if (!listCount) { -- return SECFailure; /* nothing we can act on */ -- } - names = PORT_ZNewArray(SECItem, listCount); - if (!names) { - return SECFailure; - } - for (i = 0;i < listCount;i++) { -- int j; -+ unsigned int j; - PRInt32 type; - SECStatus rv; - PRBool nametypePresent = PR_FALSE; -@@ -559,7 +565,11 @@ - } - } - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } -+ if (append) { - SECStatus rv; - /* extension_type */ - rv = ssl3_AppendHandshakeNumber(ss, ssl_session_ticket_xtn, 2); -@@ -582,9 +592,6 @@ - xtnData->advertised[xtnData->numAdvertised++] = - ssl_session_ticket_xtn; - } -- } else if (maxBytes < extension_length) { -- PORT_Assert(0); -- return 0; - } - return extension_length; - -@@ -645,12 +652,17 @@ - - rv = ssl3_ValidateNextProtoNego(data->data, data->len); - if (rv != SECSuccess) { -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - (void)SSL3_SendAlert(ss, alert_fatal, decode_error); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - return rv; - } - - PORT_Assert(ss->nextProtoCallback); -+ /* For ALPN, the cipher suite isn't selected yet. Note that extensions -+ * sometimes affect what cipher suite is selected, e.g., for ECC. */ -+ PORT_Assert((ss->ssl3.hs.preliminaryInfo & -+ ssl_preinfo_all & ~ssl_preinfo_cipher_suite) == -+ (ssl_preinfo_all & ~ssl_preinfo_cipher_suite)); - rv = ss->nextProtoCallback(ss->nextProtoArg, ss->fd, data->data, data->len, - result.data, &result.len, sizeof(resultBuffer)); - if (rv != SECSuccess) { -@@ -673,8 +685,8 @@ - ss->ssl3.nextProtoState != SSL_NEXT_PROTO_NEGOTIATED) { - /* The callback might say OK, but then it picks a default value - one - * that was not listed. That's OK for NPN, but not ALPN. */ -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL); - (void)SSL3_SendAlert(ss, alert_fatal, no_application_protocol); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_PROTOCOL); - return SECFailure; - } - -@@ -693,8 +705,8 @@ - * despite it being permitted by the spec. */ - if (ss->firstHsDone || data->len == 0) { - /* Clients MUST send a non-empty ALPN extension. */ -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - return SECFailure; - } - -@@ -721,8 +733,8 @@ - rv = ssl3_RegisterServerHelloExtensionSender( - ss, ex_type, ssl3_ServerSendAppProtoXtn); - if (rv != SECSuccess) { -- PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); - (void)SSL3_SendAlert(ss, alert_fatal, internal_error); -+ PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); - return rv; - } - } -@@ -742,8 +754,8 @@ - * we've negotiated NPN then we're required to send the NPN handshake - * message. Thus, these two extensions cannot both be negotiated on the - * same connection. */ -- PORT_SetError(SSL_ERROR_BAD_SERVER); - (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); -+ PORT_SetError(SSL_ERROR_BAD_SERVER); - return SECFailure; - } - -@@ -753,8 +765,8 @@ - * we sent the ClientHello and now. */ - if (!ss->nextProtoCallback) { - PORT_Assert(0); -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_CALLBACK); - (void)SSL3_SendAlert(ss, alert_fatal, internal_error); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_NO_CALLBACK); - return SECFailure; - } - -@@ -778,16 +790,16 @@ - * uint8 len; // where len >= 1 - * uint8 protocol_name[len]; */ - if (data->len < 4 || data->len > 2 + 1 + 255) { -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - (void)SSL3_SendAlert(ss, alert_fatal, decode_error); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - return SECFailure; - } - - list_len = ssl3_ConsumeHandshakeNumber(ss, 2, &data->data, &data->len); - /* The list has to be the entire extension. */ - if (list_len != data->len) { -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - (void)SSL3_SendAlert(ss, alert_fatal, decode_error); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - return SECFailure; - } - -@@ -795,8 +807,8 @@ - &data->data, &data->len); - /* The list must have exactly one value. */ - if (rv != SECSuccess || data->len != 0) { -- PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - (void)SSL3_SendAlert(ss, alert_fatal, decode_error); -+ PORT_SetError(SSL_ERROR_NEXT_PROTOCOL_DATA_INVALID); - return SECFailure; - } - -@@ -819,7 +831,10 @@ - - extension_length = 4; - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ return 0; -+ } -+ if (append) { - SECStatus rv; - rv = ssl3_AppendHandshakeNumber(ss, ssl_next_proto_nego_xtn, 2); - if (rv != SECSuccess) -@@ -829,8 +844,6 @@ - goto loser; - ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_next_proto_nego_xtn; -- } else if (maxBytes < extension_length) { -- return 0; - } - - return extension_length; -@@ -854,7 +867,10 @@ - 2 /* protocol name list length */ + - ss->opt.nextProtoNego.len; - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ return 0; -+ } -+ if (append) { - /* NPN requires that the client's fallback protocol is first in the - * list. However, ALPN sends protocols in preference order. So we - * allocate a buffer and move the first protocol to the end of the -@@ -894,8 +910,6 @@ - } - ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_app_layer_protocol_xtn; -- } else if (maxBytes < extension_length) { -- return 0; - } - - return extension_length; -@@ -923,7 +937,10 @@ - 2 /* protocol name list */ + 1 /* name length */ + - ss->ssl3.nextProto.len; - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ return 0; -+ } -+ if (append) { - SECStatus rv; - rv = ssl3_AppendHandshakeNumber(ss, ssl_app_layer_protocol_xtn, 2); - if (rv != SECSuccess) { -@@ -942,8 +959,6 @@ - if (rv != SECSuccess) { - return -1; - } -- } else if (maxBytes < extension_length) { -- return 0; - } - - return extension_length; -@@ -1045,7 +1060,10 @@ - return 0; - - extension_length = 2 + 2; -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ return 0; -+ } -+ if (append) { - /* extension_type */ - rv = ssl3_AppendHandshakeNumber(ss, ssl_cert_status_xtn, 2); - if (rv != SECSuccess) -@@ -1078,7 +1096,11 @@ - */ - extension_length = 9; - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } -+ if (append) { - SECStatus rv; - TLSExtensionData *xtnData; - -@@ -1106,9 +1128,6 @@ - - xtnData = &ss->xtnData; - xtnData->advertised[xtnData->numAdvertised++] = ssl_cert_status_xtn; -- } else if (maxBytes < extension_length) { -- PORT_Assert(0); -- return 0; - } - return extension_length; - } -@@ -1120,7 +1139,7 @@ - SECStatus - ssl3_SendNewSessionTicket(sslSocket *ss) - { -- int i; -+ PRUint32 i; - SECStatus rv; - NewSessionTicket ticket; - SECItem plaintext; -@@ -1152,7 +1171,7 @@ - CK_MECHANISM_TYPE cipherMech = CKM_AES_CBC; - PK11Context *aes_ctx_pkcs11; - CK_MECHANISM_TYPE macMech = CKM_SHA256_HMAC; -- PK11Context *hmac_ctx_pkcs11; -+ PK11Context *hmac_ctx_pkcs11 = NULL; - unsigned char computed_mac[TLS_EX_SESS_TICKET_MAC_LENGTH]; - unsigned int computed_mac_length; - unsigned char iv[AES_BLOCK_SIZE]; -@@ -1200,7 +1219,8 @@ - sslSessionID sid; - PORT_Memset(&sid, 0, sizeof(sslSessionID)); - -- if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) { -+ if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa || -+ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa) { - effectiveExchKeyType = kt_rsa; - } else { - effectiveExchKeyType = ss->ssl3.hs.kea_def->exchKeyType; -@@ -1243,6 +1263,7 @@ - + cert_length /* cert */ - + 1 /* server name type */ - + srvNameLen /* name len + length field */ -+ + 1 /* extendedMasterSecretUsed */ - + sizeof(ticket.ticket_lifetime_hint); - padding_length = AES_BLOCK_SIZE - - (ciphertext_length % AES_BLOCK_SIZE); -@@ -1341,6 +1362,11 @@ - if (rv != SECSuccess) goto loser; - } - -+ /* extendedMasterSecretUsed */ -+ rv = ssl3_AppendNumberToItem( -+ &plaintext, ss->sec.ci.sid->u.ssl3.keys.extendedMasterSecretUsed, 1); -+ if (rv != SECSuccess) goto loser; -+ - PORT_Assert(plaintext.len == padding_length); - for (i = 0; i < padding_length; i++) - plaintext.data[i] = (unsigned char)padding_length; -@@ -1410,14 +1436,18 @@ - goto loser; - - rv = PK11_DigestBegin(hmac_ctx_pkcs11); -+ if (rv != SECSuccess) goto loser; - rv = PK11_DigestOp(hmac_ctx_pkcs11, key_name, - SESS_TICKET_KEY_NAME_LEN); -+ if (rv != SECSuccess) goto loser; - rv = PK11_DigestOp(hmac_ctx_pkcs11, iv, sizeof(iv)); -+ if (rv != SECSuccess) goto loser; - rv = PK11_DigestOp(hmac_ctx_pkcs11, (unsigned char *)length_buf, 2); -+ if (rv != SECSuccess) goto loser; - rv = PK11_DigestOp(hmac_ctx_pkcs11, ciphertext.data, ciphertext.len); -+ if (rv != SECSuccess) goto loser; - rv = PK11_DigestFinal(hmac_ctx_pkcs11, computed_mac, - &computed_mac_length, sizeof(computed_mac)); -- PK11_DestroyContext(hmac_ctx_pkcs11, PR_TRUE); - if (rv != SECSuccess) goto loser; - } - -@@ -1446,6 +1476,8 @@ - if (rv != SECSuccess) goto loser; - - loser: -+ if (hmac_ctx_pkcs11) -+ PK11_DestroyContext(hmac_ctx_pkcs11, PR_TRUE); - if (plaintext_item.data) - SECITEM_FreeItem(&plaintext_item, PR_FALSE); - if (ciphertext.data) -@@ -1495,7 +1527,7 @@ - if (data->len == 0) { - ss->xtnData.emptySessionTicket = PR_TRUE; - } else { -- int i; -+ PRUint32 i; - SECItem extension_data; - EncryptedSessionTicket enc_session_ticket; - unsigned char computed_mac[TLS_EX_SESS_TICKET_MAC_LENGTH]; -@@ -1698,9 +1730,10 @@ - goto loser; - } - -- /* Read ticket_version (which is ignored for now.) */ -+ /* Read ticket_version and reject if the version is wrong */ - temp = ssl3_ConsumeHandshakeNumber(ss, 2, &buffer, &buffer_len); -- if (temp < 0) goto no_ticket; -+ if (temp != TLS_EX_SESS_TICKET_VERSION) goto no_ticket; -+ - parsed_session_ticket->ticket_version = (SSL3ProtocolVersion)temp; - - /* Read SSLVersion. */ -@@ -1801,6 +1834,13 @@ - parsed_session_ticket->srvName.type = nameType; - } - -+ /* Read extendedMasterSecretUsed */ -+ temp = ssl3_ConsumeHandshakeNumber(ss, 1, &buffer, &buffer_len); -+ if (temp < 0) -+ goto no_ticket; -+ PORT_Assert(temp == PR_TRUE || temp == PR_FALSE); -+ parsed_session_ticket->extendedMasterSecretUsed = (PRBool)temp; -+ - /* Done parsing. Check that all bytes have been consumed. */ - if (buffer_len != padding_length) - goto no_ticket; -@@ -1847,6 +1887,8 @@ - parsed_session_ticket->ms_is_wrapped; - sid->u.ssl3.masterValid = PR_TRUE; - sid->u.ssl3.keys.resumable = PR_TRUE; -+ sid->u.ssl3.keys.extendedMasterSecretUsed = parsed_session_ticket-> -+ extendedMasterSecretUsed; - - /* Copy over client cert from session ticket if there is one. */ - if (parsed_session_ticket->peer_cert.data != NULL) { -@@ -2085,7 +2127,10 @@ - (ss->sec.isServer ? ss->ssl3.hs.finishedBytes * 2 - : ss->ssl3.hs.finishedBytes); - needed = 5 + len; -- if (append && maxBytes >= needed) { -+ if (maxBytes < (PRUint32)needed) { -+ return 0; -+ } -+ if (append) { - SECStatus rv; - /* extension_type */ - rv = ssl3_AppendHandshakeNumber(ss, ssl_renegotiation_info_xtn, 2); -@@ -2138,8 +2183,8 @@ - } - if (len && NSS_SecureMemcmp(ss->ssl3.hs.finishedMsgs.data, - data->data + 1, len)) { -- PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE); - (void)SSL3_SendAlert(ss, alert_fatal, handshake_failure); -+ PORT_SetError(SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE); - return SECFailure; - } - /* remember that we got this extension and it was correct. */ -@@ -2263,8 +2308,8 @@ - } - - if (!found) { -- PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); - (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); - return SECFailure; - } - -@@ -2277,8 +2322,8 @@ - - /* We didn't offer an MKI, so this must be 0 length */ - if (litem.len != 0) { -- PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); - (void)SSL3_SendAlert(ss, alert_fatal, illegal_parameter); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_SERVER_HELLO); - return SECFailure; - } - -@@ -2374,7 +2419,7 @@ - SECStatus rv; - SECItem algorithms; - const unsigned char *b; -- unsigned int numAlgorithms, i, j; -+ unsigned int numAlgorithms, i; - - /* Ignore this extension if we aren't doing TLS 1.2 or greater. */ - if (ss->version < SSL_LIBRARY_VERSION_TLS_1_2) { -@@ -2388,8 +2433,8 @@ - } - /* Trailing data, empty value, or odd-length value is invalid. */ - if (data->len != 0 || algorithms.len == 0 || (algorithms.len & 1) != 0) { -- PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); - (void)SSL3_SendAlert(ss, alert_fatal, decode_error); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); - return SECFailure; - } - -@@ -2401,30 +2446,24 @@ - } - - ss->ssl3.hs.clientSigAndHash = -- PORT_NewArray(SSL3SignatureAndHashAlgorithm, numAlgorithms); -+ PORT_NewArray(SSLSignatureAndHashAlg, numAlgorithms); - if (!ss->ssl3.hs.clientSigAndHash) { -- PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); - (void)SSL3_SendAlert(ss, alert_fatal, internal_error); -+ PORT_SetError(SSL_ERROR_RX_MALFORMED_CLIENT_HELLO); - return SECFailure; - } - ss->ssl3.hs.numClientSigAndHash = 0; - - b = algorithms.data; -- for (i = j = 0; i < numAlgorithms; i++) { -- unsigned char tls_hash = *(b++); -- unsigned char tls_sig = *(b++); -- SECOidTag hash = ssl3_TLSHashAlgorithmToOID(tls_hash); -- -- if (hash == SEC_OID_UNKNOWN) { -- /* We ignore formats that we don't understand. */ -- continue; -- } -- /* tls_sig support will be checked later in -- * ssl3_PickSignatureHashAlgorithm. */ -- ss->ssl3.hs.clientSigAndHash[j].hashAlg = hash; -- ss->ssl3.hs.clientSigAndHash[j].sigAlg = tls_sig; -- ++j; -- ++ss->ssl3.hs.numClientSigAndHash; -+ ss->ssl3.hs.numClientSigAndHash = 0; -+ for (i = 0; i < numAlgorithms; i++) { -+ SSLSignatureAndHashAlg *sigAndHash = -+ &ss->ssl3.hs.clientSigAndHash[ss->ssl3.hs.numClientSigAndHash]; -+ sigAndHash->hashAlg = (SSLHashType)*(b++); -+ sigAndHash->sigAlg = (SSLSignType)*(b++); -+ if (ssl3_IsSupportedSignatureAlgorithm(sigAndHash)) { -+ ++ss->ssl3.hs.numClientSigAndHash; -+ } - } - - if (!ss->ssl3.hs.numClientSigAndHash) { -@@ -2442,60 +2481,60 @@ - /* ssl3_ClientSendSigAlgsXtn sends the signature_algorithm extension for TLS - * 1.2 ClientHellos. */ - static PRInt32 --ssl3_ClientSendSigAlgsXtn(sslSocket * ss, PRBool append, PRUint32 maxBytes) -+ssl3_ClientSendSigAlgsXtn(sslSocket *ss, PRBool append, PRUint32 maxBytes) - { -- static const unsigned char signatureAlgorithms[] = { -- /* This block is the contents of our signature_algorithms extension, in -- * wire format. See -- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ -- tls_hash_sha256, tls_sig_rsa, -- tls_hash_sha384, tls_sig_rsa, -- tls_hash_sha512, tls_sig_rsa, -- tls_hash_sha1, tls_sig_rsa, --#ifndef NSS_DISABLE_ECC -- tls_hash_sha256, tls_sig_ecdsa, -- tls_hash_sha384, tls_sig_ecdsa, -- tls_hash_sha512, tls_sig_ecdsa, -- tls_hash_sha1, tls_sig_ecdsa, --#endif -- tls_hash_sha256, tls_sig_dsa, -- tls_hash_sha1, tls_sig_dsa, -- }; - PRInt32 extension_length; -+ unsigned int i; -+ PRInt32 pos=0; -+ PRUint32 policy; -+ PRUint8 buf[MAX_SIGNATURE_ALGORITHMS * 2]; - - if (ss->version < SSL_LIBRARY_VERSION_TLS_1_2) { - return 0; - } - -+ for (i=0; i < ss->ssl3.signatureAlgorithmCount; i++) { -+ SECOidTag hashOID = ssl3_TLSHashAlgorithmToOID( -+ ss->ssl3.signatureAlgorithms[i].hashAlg); -+ if ((NSS_GetAlgorithmPolicy(hashOID, & policy) != SECSuccess) || -+ (policy & NSS_USE_ALG_IN_SSL_KX)) { -+ buf[pos++] = ss->ssl3.signatureAlgorithms[i].hashAlg; -+ buf[pos++] = ss->ssl3.signatureAlgorithms[i].sigAlg; -+ } -+ } -+ - extension_length = - 2 /* extension type */ + - 2 /* extension length */ + - 2 /* supported_signature_algorithms length */ + -- sizeof(signatureAlgorithms); -+ pos; -+ -+ if (maxBytes < extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } - -- if (append && maxBytes >= extension_length) { -+ if (append) { - SECStatus rv; - rv = ssl3_AppendHandshakeNumber(ss, ssl_signature_algorithms_xtn, 2); -- if (rv != SECSuccess) -- goto loser; -+ if (rv != SECSuccess) { -+ return -1; -+ } - rv = ssl3_AppendHandshakeNumber(ss, extension_length - 4, 2); -- if (rv != SECSuccess) -- goto loser; -- rv = ssl3_AppendHandshakeVariable(ss, signatureAlgorithms, -- sizeof(signatureAlgorithms), 2); -- if (rv != SECSuccess) -- goto loser; -+ if (rv != SECSuccess) { -+ return -1; -+ } -+ -+ rv = ssl3_AppendHandshakeVariable(ss, buf, extension_length - 6, 2); -+ if (rv != SECSuccess) { -+ return -1; -+ } -+ - ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_signature_algorithms_xtn; -- } else if (maxBytes < extension_length) { -- PORT_Assert(0); -- return 0; - } - - return extension_length; -- --loser: -- return -1; - } - - unsigned int -@@ -2565,7 +2604,11 @@ - } - - extension_length = 6; /* Type + length + number */ -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < (PRUint32)extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } -+ if (append) { - SECStatus rv; - rv = ssl3_AppendHandshakeNumber(ss, ssl_tls13_draft_version_xtn, 2); - if (rv != SECSuccess) -@@ -2578,9 +2621,6 @@ - goto loser; - ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_tls13_draft_version_xtn; -- } else if (maxBytes < extension_length) { -- PORT_Assert(0); -- return 0; - } - - return extension_length; -@@ -2633,6 +2673,51 @@ - return SECSuccess; - } - -+static PRInt32 -+ssl3_SendExtendedMasterSecretXtn(sslSocket * ss, PRBool append, -+ PRUint32 maxBytes) -+{ -+ PRInt32 extension_length; -+ -+ if (!ss->opt.enableExtendedMS) { -+ return 0; -+ } -+ -+#ifndef NO_PKCS11_BYPASS -+ /* Extended MS can only be used w/o bypass mode */ -+ if (ss->opt.bypassPKCS11) { -+ PORT_Assert(0); -+ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); -+ return -1; -+ } -+#endif -+ -+ /* Always send the extension in this function, since the -+ * client always sends it and this function is only called on -+ * the server if we negotiated the extension. */ -+ extension_length = 4; /* Type + length (0) */ -+ if (maxBytes < extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } -+ -+ if (append) { -+ SECStatus rv; -+ rv = ssl3_AppendHandshakeNumber(ss, ssl_extended_master_secret_xtn, 2); -+ if (rv != SECSuccess) -+ goto loser; -+ rv = ssl3_AppendHandshakeNumber(ss, 0, 2); -+ if (rv != SECSuccess) -+ goto loser; -+ ss->xtnData.advertised[ss->xtnData.numAdvertised++] = -+ ssl_extended_master_secret_xtn; -+ } -+ -+ return extension_length; -+loser: -+ return -1; -+} -+ - /* ssl3_ClientSendSignedCertTimestampXtn sends the signed_certificate_timestamp - * extension for TLS ClientHellos. */ - static PRInt32 -@@ -2646,7 +2731,12 @@ - if (!ss->opt.enableSignedCertTimestamps) - return 0; - -- if (append && maxBytes >= extension_length) { -+ if (maxBytes < extension_length) { -+ PORT_Assert(0); -+ return 0; -+ } -+ -+ if (append) { - SECStatus rv; - /* extension_type */ - rv = ssl3_AppendHandshakeNumber(ss, -@@ -2660,9 +2750,6 @@ - goto loser; - ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_signed_certificate_timestamp_xtn; -- } else if (maxBytes < extension_length) { -- PORT_Assert(0); -- return 0; - } - - return extension_length; -@@ -2671,6 +2758,46 @@ - } - - static SECStatus -+ssl3_HandleExtendedMasterSecretXtn(sslSocket * ss, PRUint16 ex_type, -+ SECItem *data) -+{ -+ if (ss->version < SSL_LIBRARY_VERSION_TLS_1_0) { -+ return SECSuccess; -+ } -+ -+ if (!ss->opt.enableExtendedMS) { -+ return SECSuccess; -+ } -+ -+#ifndef NO_PKCS11_BYPASS -+ /* Extended MS can only be used w/o bypass mode */ -+ if (ss->opt.bypassPKCS11) { -+ PORT_Assert(0); -+ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); -+ return SECFailure; -+ } -+#endif -+ -+ if (data->len != 0) { -+ SSL_TRC(30, ("%d: SSL3[%d]: Bogus extended master secret extension", -+ SSL_GETPID(), ss->fd)); -+ return SECFailure; -+ } -+ -+ SSL_DBG(("%d: SSL[%d]: Negotiated extended master secret extension.", -+ SSL_GETPID(), ss->fd)); -+ -+ /* Keep track of negotiated extensions. */ -+ ss->xtnData.negotiated[ss->xtnData.numNegotiated++] = ex_type; -+ -+ if (ss->sec.isServer) { -+ return ssl3_RegisterServerHelloExtensionSender( -+ ss, ex_type, ssl3_SendExtendedMasterSecretXtn); -+ } -+ return SECSuccess; -+} -+ -+static SECStatus - ssl3_ClientHandleSignedCertTimestampXtn(sslSocket *ss, PRUint16 ex_type, - SECItem *data) - { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3gthr.c 2016-01-13 14:18:55.623954879 +0100 -@@ -71,8 +71,8 @@ - break; - } - -- PORT_Assert( nb <= gs->remainder ); -- if (nb > gs->remainder) { -+ PORT_Assert( (unsigned int)nb <= gs->remainder ); -+ if ((unsigned int)nb > gs->remainder) { - /* ssl_DefRecv is misbehaving! this error is fatal to SSL. */ - gs->state = GS_INIT; /* so we don't crash next time */ - rv = SECFailure; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl3prot.h 2016-01-13 14:18:55.623954879 +0100 -@@ -218,32 +218,6 @@ - } u; - } SSL3ServerParams; - --/* This enum reflects HashAlgorithm enum from -- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 -- * -- * When updating, be sure to also update ssl3_TLSHashAlgorithmToOID. */ --enum { -- tls_hash_md5 = 1, -- tls_hash_sha1 = 2, -- tls_hash_sha224 = 3, -- tls_hash_sha256 = 4, -- tls_hash_sha384 = 5, -- tls_hash_sha512 = 6 --}; -- --/* This enum reflects SignatureAlgorithm enum from -- * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ --typedef enum { -- tls_sig_rsa = 1, -- tls_sig_dsa = 2, -- tls_sig_ecdsa = 3 --} TLSSignatureAlgorithm; -- --typedef struct { -- SECOidTag hashAlg; -- TLSSignatureAlgorithm sigAlg; --} SSL3SignatureAndHashAlgorithm; -- - /* SSL3HashesIndividually contains a combination MD5/SHA1 hash, as used in TLS - * prior to 1.2. */ - typedef struct { -@@ -252,11 +226,11 @@ - } SSL3HashesIndividually; - - /* SSL3Hashes contains an SSL hash value. The digest is contained in |u.raw| -- * which, if |hashAlg==SEC_OID_UNKNOWN| is also a SSL3HashesIndividually -+ * which, if |hashAlg==ssl_hash_none| is also a SSL3HashesIndividually - * struct. */ - typedef struct { - unsigned int len; -- SECOidTag hashAlg; -+ SSLHashType hashAlg; - union { - PRUint8 raw[64]; - SSL3HashesIndividually s; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslauth.c 2016-01-13 14:18:55.624954885 +0100 -@@ -304,8 +304,7 @@ - &certStatusArray->items[0], - ss->pkcs11PinArg) - != SECSuccess) { -- PRErrorCode error = PR_GetError(); -- PORT_Assert(error != 0); -+ PORT_Assert(PR_GetError() != 0); - } - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslcon.c 2016-01-13 14:18:55.625954891 +0100 -@@ -22,20 +22,6 @@ - - static PRBool policyWasSet; - --/* This ordered list is indexed by (SSL_CK_xx * 3) */ --/* Second and third bytes are MSB and LSB of master key length. */ --static const PRUint8 allCipherSuites[] = { -- 0, 0, 0, -- SSL_CK_RC4_128_WITH_MD5, 0x00, 0x80, -- SSL_CK_RC4_128_EXPORT40_WITH_MD5, 0x00, 0x80, -- SSL_CK_RC2_128_CBC_WITH_MD5, 0x00, 0x80, -- SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5, 0x00, 0x80, -- SSL_CK_IDEA_128_CBC_WITH_MD5, 0x00, 0x80, -- SSL_CK_DES_64_CBC_WITH_MD5, 0x00, 0x40, -- SSL_CK_DES_192_EDE3_CBC_WITH_MD5, 0x00, 0xC0, -- 0, 0, 0 --}; -- - #define ssl2_NUM_SUITES_IMPLEMENTED 6 - - /* This list is sent back to the client when the client-hello message -@@ -851,7 +837,7 @@ - { - PRUint8 * out; - int rv; -- int amount; -+ unsigned int amount; - int count = 0; - - PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); -@@ -927,7 +913,7 @@ - int amount; - PRUint8 macLen; - int nout; -- int buflen; -+ unsigned int buflen; - - PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); - -@@ -1031,7 +1017,7 @@ - int amount; /* of plaintext to go in record. */ - unsigned int padding; /* add this many padding byte. */ - int nout; /* ciphertext size after header. */ -- int buflen; /* size of generated record. */ -+ unsigned int buflen; /* size of generated record. */ - - PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); - -@@ -1555,7 +1541,7 @@ - unsigned int ddLen; /* length of RSA decrypted data in kbuf */ - unsigned int keySize; - unsigned int dkLen; /* decrypted key length in bytes */ -- int modulusLen; -+ int modulusLen; - SECStatus rv; - PRUint16 allowed; /* cipher kinds enabled and allowed by policy */ - PRUint8 mkbuf[SSL_MAX_MASTER_KEY_BYTES]; -@@ -1617,11 +1603,11 @@ - } - - modulusLen = PK11_GetPrivateModulusLen(sc->SERVERKEY); -- if (modulusLen == -1) { -+ if (modulusLen < 0) { - /* XXX If the key is bad, then PK11_PubDecryptRaw will fail below. */ - modulusLen = ekLen; - } -- if (ekLen > modulusLen || ekLen + ckLen < keySize) { -+ if (ekLen > (unsigned int)modulusLen || ekLen + ckLen < keySize) { - SSL_DBG(("%d: SSL[%d]: invalid encrypted key length, ekLen=%d (bytes)!", - SSL_GETPID(), ss->fd, ekLen)); - PORT_SetError(SSL_ERROR_BAD_CLIENT); -@@ -2495,7 +2481,6 @@ - PRUint8 * cid; - unsigned len, certType, certLen, responseLen; - int rv; -- int rv2; - - PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); - -@@ -2613,7 +2598,7 @@ - data + SSL_HL_CLIENT_CERTIFICATE_HBYTES + certLen, - responseLen); - if (rv) { -- rv2 = ssl2_SendErrorMessage(ss, SSL_PE_BAD_CERTIFICATE); -+ (void)ssl2_SendErrorMessage(ss, SSL_PE_BAD_CERTIFICATE); - SET_ERROR_CODE - goto loser; - } -@@ -2741,7 +2726,7 @@ - PRUint8 * cs; - PRUint8 * data; - SECStatus rv; -- int needed, sidHit, certLen, csLen, cidLen, certType, err; -+ unsigned int needed, sidHit, certLen, csLen, cidLen, certType, err; - - PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); - -@@ -3669,12 +3654,14 @@ - */ - - #include "nss.h" --extern const char __nss_ssl_rcsid[]; --extern const char __nss_ssl_sccsid[]; -+extern const char __nss_ssl_version[]; - - PRBool - NSSSSL_VersionCheck(const char *importedVersion) - { -+#define NSS_VERSION_VARIABLE __nss_ssl_version -+#include "verref.h" -+ - /* - * This is the secret handshake algorithm. - * -@@ -3684,9 +3671,6 @@ - * not compatible with future major, minor, or - * patch releases. - */ -- volatile char c; /* force a reference that won't get optimized away */ -- -- c = __nss_ssl_rcsid[0] + __nss_ssl_sccsid[0]; - return NSS_VersionCheck(importedVersion); - } - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslenum.c 2016-01-13 14:18:55.625954891 +0100 -@@ -70,14 +70,17 @@ - #endif /* NSS_DISABLE_ECC */ - - TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, -+ TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, - TLS_DHE_RSA_WITH_AES_128_CBC_SHA, - TLS_DHE_DSS_WITH_AES_128_CBC_SHA, - TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, -+ TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, - TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, - TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, - TLS_DHE_RSA_WITH_AES_256_CBC_SHA, - TLS_DHE_DSS_WITH_AES_256_CBC_SHA, - TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, -+ TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, - TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, - TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, - TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslerr.h 2016-01-13 14:18:55.626954897 +0100 -@@ -198,9 +198,19 @@ - - SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT = (SSL_ERROR_BASE + 131), - --SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 132), --SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 133), --SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 134), -+SSL_ERROR_WEAK_SERVER_CERT_KEY = (SSL_ERROR_BASE + 132), -+ -+SSL_ERROR_RX_SHORT_DTLS_READ = (SSL_ERROR_BASE + 133), -+ -+SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 134), -+SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM = (SSL_ERROR_BASE + 135), -+ -+SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 136), -+SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET = (SSL_ERROR_BASE + 137), -+ -+SSL_ERROR_BAD_CHANNEL_ID_DATA = (SSL_ERROR_BASE + 138), -+SSL_ERROR_INVALID_CHANNEL_ID_KEY = (SSL_ERROR_BASE + 139), -+SSL_ERROR_GET_CHANNEL_ID_FAILED = (SSL_ERROR_BASE + 140), - - SSL_ERROR_END_OF_LIST /* let the c compiler determine the value of this. */ - } SSLErrorCodes; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/SSLerrs.h 2016-01-13 14:18:55.613954821 +0100 -@@ -423,11 +423,29 @@ - "The server rejected the handshake because the client downgraded to a lower " - "TLS version than the server supports.") - --ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 132), -+ER3(SSL_ERROR_WEAK_SERVER_CERT_KEY, (SSL_ERROR_BASE + 132), -+"The server certificate included a public key that was too weak.") -+ -+ER3(SSL_ERROR_RX_SHORT_DTLS_READ, (SSL_ERROR_BASE + 133), -+"Not enough room in buffer for DTLS record.") -+ -+ER3(SSL_ERROR_NO_SUPPORTED_SIGNATURE_ALGORITHM, (SSL_ERROR_BASE + 134), -+"No supported TLS signature algorithm was configured.") -+ -+ER3(SSL_ERROR_UNSUPPORTED_SIGNATURE_ALGORITHM, (SSL_ERROR_BASE + 135), -+"The peer used an unsupported combination of signature and hash algorithm.") -+ -+ER3(SSL_ERROR_MISSING_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 136), -+"The peer tried to resume without a correct extended_master_secret extension") -+ -+ER3(SSL_ERROR_UNEXPECTED_EXTENDED_MASTER_SECRET, (SSL_ERROR_BASE + 137), -+"The peer tried to resume with an unexpected extended_master_secret extension") -+ -+ER3(SSL_ERROR_BAD_CHANNEL_ID_DATA, (SSL_ERROR_BASE + 138), - "SSL received a malformed TLS Channel ID extension.") - --ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 133), -+ER3(SSL_ERROR_INVALID_CHANNEL_ID_KEY, (SSL_ERROR_BASE + 139), - "The application provided an invalid TLS Channel ID key.") - --ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 134), -+ER3(SSL_ERROR_GET_CHANNEL_ID_FAILED, (SSL_ERROR_BASE + 140), - "The application could not get a TLS Channel ID.") -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/ssl.h 2016-01-13 14:18:55.614954827 +0100 -@@ -185,14 +185,26 @@ - /* SSL_REUSE_SERVER_ECDHE_KEY controls whether the ECDHE server key is - * reused for multiple handshakes or generated each time. - * SSL_REUSE_SERVER_ECDHE_KEY is currently enabled by default. -+ * This socket option is for ECDHE, only. It is unrelated to DHE. - */ - #define SSL_REUSE_SERVER_ECDHE_KEY 27 - - #define SSL_ENABLE_FALLBACK_SCSV 28 /* Send fallback SCSV in - * handshakes. */ - -+/* SSL_ENABLE_SERVER_DHE controls whether DHE is enabled for the server socket. -+ */ -+#define SSL_ENABLE_SERVER_DHE 29 -+ -+/* Use draft-ietf-tls-session-hash. Controls whether we offer the -+ * extended_master_secret extension which, when accepted, hashes -+ * the handshake transcript into the master secret. This option is -+ * disabled by default. -+ */ -+#define SSL_ENABLE_EXTENDED_MASTER_SECRET 30 -+ - /* Request Signed Certificate Timestamps via TLS extension (client) */ --#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 29 -+#define SSL_ENABLE_SIGNED_CERT_TIMESTAMPS 31 - - #ifdef SSL_DEPRECATED_FUNCTION - /* Old deprecated function names */ -@@ -295,6 +307,86 @@ - SSL_IMPORT SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); - SSL_IMPORT SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 *policy); - -+/* -+** Control for TLS signature algorithms for TLS 1.2 only. -+** -+** This governs what signature algorithms are sent by a client in the -+** signature_algorithms extension. A client will not accept a signature from a -+** server unless it uses an enabled algorithm. -+** -+** This also governs what the server sends in the supported_signature_algorithms -+** field of a CertificateRequest. It also changes what the server uses to sign -+** ServerKeyExchange: a server uses the first entry from this list that is -+** compatible with the client's advertised signature_algorithms extension and -+** the selected server certificate. -+** -+** Omitting SHA-256 from this list might be foolish. Support is mandatory in -+** TLS 1.2 and there might be interoperability issues. For a server, NSS only -+** supports SHA-256 for verifying a TLS 1.2 CertificateVerify. This list needs -+** to include SHA-256 if client authentication is requested or required, or -+** creating a CertificateRequest will fail. -+*/ -+SSL_IMPORT SECStatus SSL_SignaturePrefSet( -+ PRFileDesc *fd, const SSLSignatureAndHashAlg *algorithms, -+ unsigned int count); -+ -+/* -+** Get the currently configured signature algorithms. -+** -+** The algorithms are written to |algorithms| but not if there are more than -+** |maxCount| values configured. The number of algorithms that are in use are -+** written to |count|. This fails if |maxCount| is insufficiently large. -+*/ -+SSL_IMPORT SECStatus SSL_SignaturePrefGet( -+ PRFileDesc *fd, SSLSignatureAndHashAlg *algorithms, unsigned int *count, -+ unsigned int maxCount); -+ -+/* -+** Returns the maximum number of signature algorithms that are supported and -+** can be set or retrieved using SSL_SignaturePrefSet or SSL_SignaturePrefGet. -+*/ -+SSL_IMPORT unsigned int SSL_SignatureMaxCount(); -+ -+/* SSL_DHEGroupPrefSet is used to configure the set of allowed/enabled DHE group -+** parameters that can be used by NSS for the given server socket. -+** The first item in the array is used as the default group, if no other -+** selection criteria can be used by NSS. -+** The set is provided as an array of identifiers as defined by SSLDHEGroupType. -+** If more than one group identifier is provided, NSS will select the one to use. -+** For example, a TLS extension sent by the client might indicate a preference. -+*/ -+SSL_IMPORT SECStatus SSL_DHEGroupPrefSet(PRFileDesc *fd, -+ SSLDHEGroupType *groups, -+ PRUint16 num_groups); -+ -+/* Enable the use of a DHE group that's smaller than the library default, -+** for backwards compatibility reasons. The DH parameters will be created -+** at the time this function is called, which might take a very long time. -+** The function will block until generation is completed. -+** The intention is to enforce that fresh and safe parameters are generated -+** each time a process is started. -+** At the time this API was initially implemented, the API will enable the -+** use of 1024 bit DHE parameters. This value might get increased in future -+** versions of NSS. -+** -+** It is allowed to call this API will a NULL value for parameter fd, -+** which will prepare the global parameters that NSS will reuse for the remainder -+** of the process lifetime. This can be used early after startup of a process, -+** to avoid a delay when handling incoming client connections. -+** This preparation with a NULL for parameter fd will NOT enable the weak group -+** on sockets. The function needs to be called again for every socket that -+** should use the weak group. -+** -+** It is allowed to use this API in combination with the SSL_DHEGroupPrefSet API. -+** If both APIs have been called, the weakest group will be used, -+** unless it is certain that the client supports larger group parameters. -+** The weak group will be used as the default group, overriding the preference -+** for the first group potentially set with a call to SSL_DHEGroupPrefSet -+** (The first group set using SSL_DHEGroupPrefSet will still be enabled, but -+** it's no longer the default group.) -+*/ -+SSL_IMPORT SECStatus SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled); -+ - /* SSL_CipherOrderSet sets the cipher suite preference order from |ciphers|, - * which must be an array of cipher suite ids of length |len|. All the given - * cipher suite ids must appear in the array that is returned by -@@ -1012,10 +1104,27 @@ - SSL_IMPORT SSL3Statistics * SSL_GetStatistics(void); - - /* Report more information than SSL_SecurityStatus. --** Caller supplies the info struct. Function fills it in. --*/ -+ * Caller supplies the info struct. This function fills it in. -+ * The information here will be zeroed prior to details being confirmed. The -+ * details are confirmed either when a Finished message is received, or - for a -+ * client - when the second flight of messages have been sent. This function -+ * therefore produces unreliable results prior to receiving the -+ * SSLHandshakeCallback or the SSLCanFalseStartCallback. -+ */ - SSL_IMPORT SECStatus SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, - PRUintn len); -+/* Get preliminary information about a channel. -+ * This function can be called prior to handshake details being confirmed (see -+ * SSL_GetChannelInfo above for what that means). Thus, information provided by -+ * this function is available to SSLAuthCertificate, SSLGetClientAuthData, -+ * SSLSNISocketConfig, and other callbacks that might be called during the -+ * processing of the first flight of client of server handshake messages. -+ * Values are marked as being unavailable when renegotiation is initiated. -+ */ -+SSL_IMPORT SECStatus -+SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, -+ SSLPreliminaryChannelInfo *info, -+ PRUintn len); - SSL_IMPORT SECStatus SSL_GetCipherSuiteInfo(PRUint16 cipherSuite, - SSLCipherSuiteInfo *info, PRUintn len); - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslimpl.h 2016-01-13 14:18:55.627954902 +0100 -@@ -1,3 +1,4 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - /* - * This file is PRIVATE to SSL and should be the first thing included by - * any SSL implementation file. -@@ -181,6 +182,7 @@ - typedef struct ssl3BulkCipherDefStr ssl3BulkCipherDef; - typedef struct ssl3MACDefStr ssl3MACDef; - typedef struct ssl3KeyPairStr ssl3KeyPair; -+typedef struct ssl3DHParamsStr ssl3DHParams; - - struct ssl3CertNodeStr { - struct ssl3CertNodeStr *next; -@@ -300,13 +302,19 @@ - } ssl3CipherSuiteCfg; - - #ifndef NSS_DISABLE_ECC --#define ssl_V3_SUITES_IMPLEMENTED 63 -+#define ssl_V3_SUITES_IMPLEMENTED 66 - #else --#define ssl_V3_SUITES_IMPLEMENTED 37 -+#define ssl_V3_SUITES_IMPLEMENTED 40 - #endif /* NSS_DISABLE_ECC */ - - #define MAX_DTLS_SRTP_CIPHER_SUITES 4 - -+/* MAX_SIGNATURE_ALGORITHMS allows for a large number of combinations of -+ * SSLSignType and SSLHashType, but not all combinations (specifically, this -+ * doesn't allow space for combinations with MD5). */ -+#define MAX_SIGNATURE_ALGORITHMS 15 -+ -+ - typedef struct sslOptionsStr { - /* If SSL_SetNextProtoNego has been called, then this contains the - * list of supported protocols. */ -@@ -339,7 +347,9 @@ - unsigned int enableALPN : 1; /* 27 */ - unsigned int reuseServerECDHEKey : 1; /* 28 */ - unsigned int enableFallbackSCSV : 1; /* 29 */ -- unsigned int enableSignedCertTimestamps : 1; /* 30 */ -+ unsigned int enableServerDhe : 1; /* 30 */ -+ unsigned int enableExtendedMS : 1; /* 31 */ -+ unsigned int enableSignedCertTimestamps : 1; /* 32 */ - } sslOptions; - - typedef enum { sslHandshakingUndetermined = 0, -@@ -521,6 +531,7 @@ - PRUint16 wrapped_master_secret_len; - PRUint8 msIsWrapped; - PRUint8 resumable; -+ PRUint8 extendedMasterSecretUsed; - } ssl3SidKeys; /* 52 bytes */ - - typedef struct { -@@ -766,10 +777,10 @@ - * is_limited identifies a suite as having a limit on the key size. - * key_size_limit provides the corresponding limit. */ - PRBool is_limited; -- int key_size_limit; -+ unsigned int key_size_limit; - PRBool tls_keygen; -- /* True if the key exchange for the suite can be ephemeral. Or to be more -- * precise: true if the ServerKeyExchange message is required. */ -+ /* True if the key exchange for the suite is ephemeral. Or to be more -+ * precise: true if the ServerKeyExchange message is always required. */ - PRBool ephemeral; - } ssl3KEADef; - -@@ -955,12 +966,14 @@ - PRBool cacheSID; - - PRBool canFalseStart; /* Can/did we False Start */ -+ /* Which preliminaryinfo values have been set. */ -+ PRUint32 preliminaryInfo; - - /* clientSigAndHash contains the contents of the signature_algorithms - * extension (if any) from the client. This is only valid for TLS 1.2 - * or later. */ -- SSL3SignatureAndHashAlgorithm *clientSigAndHash; -- unsigned int numClientSigAndHash; -+ SSLSignatureAndHashAlg *clientSigAndHash; -+ unsigned int numClientSigAndHash; - - /* This group of values is used for DTLS */ - PRUint16 sendMessageSeq; /* The sending message sequence -@@ -1044,9 +1057,17 @@ - PRUint16 dtlsSRTPCipherCount; - PRUint16 dtlsSRTPCipherSuite; /* 0 if not selected */ - PRBool fatalAlertSent; -+ PRUint16 numDHEGroups; /* used by server */ -+ SSLDHEGroupType * dheGroups; /* used by server */ -+ PRBool dheWeakGroupEnabled; /* used by server */ -+ -+ /* TLS 1.2 introduces separate signature algorithm negotiation. -+ * This is our preference order. */ -+ SSLSignatureAndHashAlg signatureAlgorithms[MAX_SIGNATURE_ALGORITHMS]; -+ unsigned int signatureAlgorithmCount; - }; - --#define DTLS_MAX_MTU 1500 /* Ethernet MTU but without subtracting the -+#define DTLS_MAX_MTU 1500U /* Ethernet MTU but without subtracting the - * headers, so slightly larger than expected */ - #define IS_DTLS(ss) (ss->protocolVariant == ssl_variant_datagram) - -@@ -1063,6 +1084,11 @@ - PRInt32 refCount; /* use PR_Atomic calls for this. */ - }; - -+struct ssl3DHParamsStr { -+ SECItem prime; /* p */ -+ SECItem base; /* g */ -+}; -+ - typedef struct SSLWrappedSymWrappingKeyStr { - SSL3Opaque wrappedSymmetricWrappingkey[512]; - CK_MECHANISM_TYPE symWrapMechanism; -@@ -1093,6 +1119,7 @@ - CK_MECHANISM_TYPE msWrapMech; - PRUint16 ms_length; - SSL3Opaque master_secret[48]; -+ PRBool extendedMasterSecretUsed; - ClientIdentity client_identity; - SECItem peer_cert; - PRUint32 timestamp; -@@ -1275,6 +1302,9 @@ - - ssl3KeyPair * stepDownKeyPair; /* RSA step down keys */ - -+ const ssl3DHParams *dheParams; /* DHE param */ -+ ssl3KeyPair * dheKeyPair; /* DHE keys */ -+ - /* Callbacks */ - SSLAuthCertificate authCertificate; - void *authCertificateArg; -@@ -1634,7 +1664,7 @@ - extern SECStatus ssl3_KeyAndMacDeriveBypass(ssl3CipherSpec * pwSpec, - const unsigned char * cr, const unsigned char * sr, - PRBool isTLS, PRBool isExport); --extern SECStatus ssl3_MasterKeyDeriveBypass( ssl3CipherSpec * pwSpec, -+extern SECStatus ssl3_MasterSecretDeriveBypass( ssl3CipherSpec * pwSpec, - const unsigned char * cr, const unsigned char * sr, - const SECItem * pms, PRBool isTLS, PRBool isRSA); - -@@ -1688,6 +1718,8 @@ - */ - extern SECStatus ssl3_CreateRSAStepDownKeys(sslSocket *ss); - -+extern SECStatus ssl3_SelectDHParams(sslSocket *ss); -+ - #ifndef NSS_DISABLE_ECC - extern void ssl3_FilterECCipherSuitesByServerCerts(sslSocket *ss); - extern PRBool ssl3_IsECCEnabled(sslSocket *ss); -@@ -1790,11 +1822,11 @@ - SSL3Opaque *b, PRUint32 length, - SECKEYPublicKey *srvrPubKey, - SECKEYPrivateKey *srvrPrivKey); --extern SECStatus ssl3_SendECDHServerKeyExchange(sslSocket *ss, -- const SSL3SignatureAndHashAlgorithm *sigAndHash); -+extern SECStatus ssl3_SendECDHServerKeyExchange( -+ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash); - #endif - --extern SECStatus ssl3_ComputeCommonKeyHash(SECOidTag hashAlg, -+extern SECStatus ssl3_ComputeCommonKeyHash(SSLHashType hashAlg, - PRUint8 * hashBuf, - unsigned int bufLen, SSL3Hashes *hashes, - PRBool bypassPKCS11); -@@ -1808,21 +1840,22 @@ - PRInt32 lenSize); - extern SECStatus ssl3_AppendHandshakeVariable( sslSocket *ss, - const SSL3Opaque *src, PRInt32 bytes, PRInt32 lenSize); --extern SECStatus ssl3_AppendSignatureAndHashAlgorithm(sslSocket *ss, -- const SSL3SignatureAndHashAlgorithm* sigAndHash); -+extern SECStatus ssl3_AppendSignatureAndHashAlgorithm( -+ sslSocket *ss, const SSLSignatureAndHashAlg* sigAndHash); - extern SECStatus ssl3_ConsumeHandshake(sslSocket *ss, void *v, PRInt32 bytes, - SSL3Opaque **b, PRUint32 *length); - extern PRInt32 ssl3_ConsumeHandshakeNumber(sslSocket *ss, PRInt32 bytes, - SSL3Opaque **b, PRUint32 *length); - extern SECStatus ssl3_ConsumeHandshakeVariable(sslSocket *ss, SECItem *i, - PRInt32 bytes, SSL3Opaque **b, PRUint32 *length); --extern SECOidTag ssl3_TLSHashAlgorithmToOID(int hashFunc); -+extern PRBool ssl3_IsSupportedSignatureAlgorithm( -+ const SSLSignatureAndHashAlg *alg); - extern SECStatus ssl3_CheckSignatureAndHashAlgorithmConsistency( -- const SSL3SignatureAndHashAlgorithm *sigAndHash, -- CERTCertificate* cert); --extern SECStatus ssl3_ConsumeSignatureAndHashAlgorithm(sslSocket *ss, -- SSL3Opaque **b, PRUint32 *length, -- SSL3SignatureAndHashAlgorithm *out); -+ sslSocket *ss, const SSLSignatureAndHashAlg *sigAndHash, -+ CERTCertificate* cert); -+extern SECStatus ssl3_ConsumeSignatureAndHashAlgorithm( -+ sslSocket *ss, SSL3Opaque **b, PRUint32 *length, -+ SSLSignatureAndHashAlg *out); - extern SECStatus ssl3_SignHashes(SSL3Hashes *hash, SECKEYPrivateKey *key, - SECItem *buf, PRBool isTLS); - extern SECStatus ssl3_VerifySignedHashes(SSL3Hashes *hash, -@@ -1890,7 +1923,7 @@ - - /* Tell clients to consider tickets valid for this long. */ - #define TLS_EX_SESS_TICKET_LIFETIME_HINT (2 * 24 * 60 * 60) /* 2 days */ --#define TLS_EX_SESS_TICKET_VERSION (0x0100) -+#define TLS_EX_SESS_TICKET_VERSION (0x0101) - - extern SECStatus ssl3_ValidateNextProtoNego(const unsigned char* data, - unsigned int length); -@@ -2024,6 +2057,8 @@ - const char *label, unsigned int labelLen, - const unsigned char *val, unsigned int valLen, - unsigned char *out, unsigned int outLen); -+extern SECOidTag -+ssl3_TLSHashAlgorithmToOID(SSLHashType hashFunc); - - #ifdef TRACE - #define SSL_TRACE(msg) ssl_Trace msg -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslinfo.c 2016-01-13 14:18:55.628954908 +0100 -@@ -67,6 +67,8 @@ - inf.creationTime = sid->creationTime; - inf.lastAccessTime = sid->lastAccessTime; - inf.expirationTime = sid->expirationTime; -+ inf.extendedMasterSecretUsed = sid->u.ssl3.keys.extendedMasterSecretUsed; -+ - if (ss->version < SSL_LIBRARY_VERSION_3_0) { /* SSL2 */ - inf.sessionIDLength = SSL2_SESSIONID_BYTES; - memcpy(inf.sessionID, sid->u.ssl2.sessionID, -@@ -85,6 +87,42 @@ - return SECSuccess; - } - -+SECStatus -+SSL_GetPreliminaryChannelInfo(PRFileDesc *fd, -+ SSLPreliminaryChannelInfo *info, -+ PRUintn len) -+{ -+ sslSocket *ss; -+ SSLPreliminaryChannelInfo inf; -+ -+ if (!info || len < sizeof inf.length) { -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ ss = ssl_FindSocket(fd); -+ if (!ss) { -+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_GetPreliminaryChannelInfo", -+ SSL_GETPID(), fd)); -+ return SECFailure; -+ } -+ -+ if (ss->version < SSL_LIBRARY_VERSION_3_0) { -+ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_VERSION); -+ return SECFailure; -+ } -+ -+ memset(&inf, 0, sizeof(inf)); -+ inf.length = PR_MIN(sizeof(inf), len); -+ -+ inf.valuesSet = ss->ssl3.hs.preliminaryInfo; -+ inf.protocolVersion = ss->version; -+ inf.cipherSuite = ss->ssl3.hs.cipher_suite; -+ -+ memcpy(info, &inf, inf.length); -+ return SECSuccess; -+} -+ - - #define CS(x) x, #x - #define CK(x) x | 0xff00, #x -@@ -136,6 +174,7 @@ - {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_DHE, C_AES, B_256, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_DHE_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, - {0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA), S_DSA, K_DHE, C_AES, B_256, M_SHA, 1, 0, 0, }, -+{0,CS(TLS_DHE_DSS_WITH_AES_256_CBC_SHA256), S_DSA, K_DHE, C_AES, B_256, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_RSA_WITH_CAMELLIA_256_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_256, M_SHA, 0, 0, 0, }, - {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA256), S_RSA, K_RSA, C_AES, B_256, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_RSA_WITH_AES_256_CBC_SHA), S_RSA, K_RSA, C_AES, B_256, M_SHA, 1, 0, 0, }, -@@ -146,7 +185,9 @@ - {0,CS(TLS_DHE_RSA_WITH_AES_128_CBC_SHA256), S_RSA, K_DHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_DHE_RSA_WITH_AES_128_GCM_SHA256), S_RSA, K_DHE, C_AESGCM, B_128, M_AEAD_128, 1, 0, 0, }, - {0,CS(TLS_DHE_RSA_WITH_AES_128_CBC_SHA), S_RSA, K_DHE, C_AES, B_128, M_SHA, 1, 0, 0, }, -+{0,CS(TLS_DHE_DSS_WITH_AES_128_GCM_SHA256), S_DSA, K_DHE, C_AESGCM, B_128, M_AEAD_128, 1, 0, 0, }, - {0,CS(TLS_DHE_DSS_WITH_AES_128_CBC_SHA), S_DSA, K_DHE, C_AES, B_128, M_SHA, 1, 0, 0, }, -+{0,CS(TLS_DHE_DSS_WITH_AES_128_CBC_SHA256), S_DSA, K_DHE, C_AES, B_128, M_SHA256, 1, 0, 0, }, - {0,CS(TLS_RSA_WITH_SEED_CBC_SHA), S_RSA, K_RSA, C_SEED,B_128, M_SHA, 1, 0, 0, }, - {0,CS(TLS_RSA_WITH_CAMELLIA_128_CBC_SHA), S_RSA, K_RSA, C_CAMELLIA, B_128, M_SHA, 0, 0, 0, }, - {0,CS(TLS_RSA_WITH_RC4_128_SHA), S_RSA, K_RSA, C_RC4, B_128, M_SHA, 0, 0, 0, }, -@@ -247,12 +288,10 @@ - { - const SSLCipherSuiteInfo * pInfo = suiteInfo; - unsigned int i; -- SECStatus rv; - - for (i = 0; i < NUM_SUITEINFOS; ++i, ++pInfo) { - if (pInfo->isExportable) { -- rv = SSL_CipherPrefSetDefault(pInfo->cipherSuite, PR_FALSE); -- PORT_Assert(rv == SECSuccess); -+ PORT_CheckSuccess(SSL_CipherPrefSetDefault(pInfo->cipherSuite, PR_FALSE)); - } - } - return SECSuccess; -@@ -268,12 +307,10 @@ - { - const SSLCipherSuiteInfo * pInfo = suiteInfo; - unsigned int i; -- SECStatus rv; - - for (i = 0; i < NUM_SUITEINFOS; ++i, ++pInfo) { - if (pInfo->isExportable) { -- rv = SSL_CipherPrefSet(fd, pInfo->cipherSuite, PR_FALSE); -- PORT_Assert(rv == SECSuccess); -+ PORT_CheckSuccess(SSL_CipherPrefSet(fd, pInfo->cipherSuite, PR_FALSE)); - } - } - return SECSuccess; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.c 2016-01-13 14:18:55.628954908 +0100 -@@ -504,7 +504,7 @@ - return SECSuccess; - } - --#elif defined(XP_UNIX) -+#elif defined(XP_UNIX) && !defined(DARWIN) - - #include - #include "unix_err.h" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslmutex.h 2016-01-13 14:18:55.628954908 +0100 -@@ -67,7 +67,8 @@ - } sslMutex; - typedef pid_t sslPID; - --#elif defined(XP_UNIX) /* other types of Unix */ -+/* other types of unix, except OS X */ -+#elif defined(XP_UNIX) && !defined(DARWIN) - - #include /* for pid_t */ - #include /* for sem_t, and sem_* functions */ -@@ -83,7 +84,7 @@ - - typedef pid_t sslPID; - --#else -+#else /* no support for cross-process locking */ - - /* what platform is this ?? */ - -@@ -95,7 +96,11 @@ - } u; - } sslMutex; - -+#ifdef DARWIN -+typedef pid_t sslPID; -+#else - typedef int sslPID; -+#endif - - #endif - -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslproto.h 2016-01-13 14:18:55.629954914 +0100 -@@ -177,6 +177,7 @@ - #define TLS_RSA_WITH_AES_128_CBC_SHA256 0x003C - #define TLS_RSA_WITH_AES_256_CBC_SHA256 0x003D - -+#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 0x0040 - #define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0041 - #define TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x0042 - #define TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x0043 -@@ -191,6 +192,7 @@ - #define TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x0065 - #define TLS_DHE_DSS_WITH_RC4_128_SHA 0x0066 - #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067 -+#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 0x006A - #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006B - - #define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x0084 -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsecur.c 2016-01-13 14:18:55.629954914 +0100 -@@ -138,6 +138,9 @@ - ss->gs.readOffset = 0; - - if (ss->handshakeCallback) { -+ PORT_Assert(ss->version < SSL_LIBRARY_VERSION_3_0 || -+ (ss->ssl3.hs.preliminaryInfo & ssl_preinfo_all) == -+ ssl_preinfo_all); - (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); - } - } -@@ -654,6 +657,16 @@ - SSL_GETPID(), ss->fd, available)); - } - -+ if (IS_DTLS(ss) && (len < available)) { -+ /* DTLS does not allow you to do partial reads */ -+ SSL_TRC(30, ("%d: SSL[%d]: DTLS short read. len=%d available=%d", -+ SSL_GETPID(), ss->fd, len, available)); -+ ss->gs.readOffset += available; -+ PORT_SetError(SSL_ERROR_RX_SHORT_DTLS_READ); -+ rv = SECFailure; -+ goto done; -+ } -+ - /* Dole out clear data to reader */ - amount = PR_MIN(len, available); - PORT_Memcpy(out, ss->gs.buf.buf + ss->gs.readOffset, amount); -@@ -693,6 +706,7 @@ - case SEC_OID_PKCS1_RSA_ENCRYPTION: - keaType = kt_rsa; - break; -+ case SEC_OID_ANSIX9_DSA_SIGNATURE: /* hah, signature, not a key? */ - case SEC_OID_X942_DIFFIE_HELMAN_KEY: - keaType = kt_dh; - break; -@@ -789,6 +803,11 @@ - goto loser; - } - } -+ if (kea == ssl_kea_dh || kea == ssl_kea_rsa) { -+ if (ssl3_SelectDHParams(ss) != SECSuccess) { -+ goto loser; -+ } -+ } - return SECSuccess; - - loser: -@@ -1177,11 +1196,8 @@ - int - ssl_SecureRecv(sslSocket *ss, unsigned char *buf, int len, int flags) - { -- sslSecurityInfo *sec; - int rv = 0; - -- sec = &ss->sec; -- - if (ss->shutdownHow & ssl_SHUTDOWN_RCV) { - PORT_SetError(PR_SOCKET_SHUTDOWN_ERROR); - return PR_FAILURE; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsnce.c 2016-01-13 14:18:55.631954926 +0100 -@@ -120,14 +120,14 @@ - /* 2 */ ssl3CipherSuite cipherSuite; - /* 2 */ PRUint16 compression; /* SSLCompressionMethod */ - --/* 52 */ ssl3SidKeys keys; /* keys, wrapped as needed. */ -+/* 54 */ ssl3SidKeys keys; /* keys, wrapped as needed. */ - - /* 4 */ PRUint32 masterWrapMech; - /* 4 */ SSL3KEAType exchKeyType; - /* 4 */ PRInt32 certIndex; - /* 4 */ PRInt32 srvNameIndex; - /* 32 */ PRUint8 srvNameHash[SHA256_LENGTH]; /* SHA256 name hash */ --/*104 */} ssl3; -+/*108 */} ssl3; - /* force sizeof(sidCacheEntry) to be a multiple of cache line size */ - struct { - /*120 */ PRUint8 filler[120]; /* 72+120==192, a multiple of 16 */ -@@ -507,7 +507,6 @@ - to->sessionIDLength = from->u.ssl3.sessionIDLength; - to->u.ssl3.certIndex = -1; - to->u.ssl3.srvNameIndex = -1; -- - PORT_Memcpy(to->sessionID, from->u.ssl3.sessionID, - to->sessionIDLength); - -@@ -637,7 +636,7 @@ - to->authKeyBits = from->authKeyBits; - to->keaType = from->keaType; - to->keaKeyBits = from->keaKeyBits; -- -+ - return to; - - loser: -@@ -1228,20 +1227,32 @@ - /* Fix pointers in our private copy of cache descriptor to point to - ** spaces in shared memory - */ -- ptr = (ptrdiff_t)cache->cacheMem; -- *(ptrdiff_t *)(&cache->sidCacheLocks) += ptr; -- *(ptrdiff_t *)(&cache->keyCacheLock ) += ptr; -- *(ptrdiff_t *)(&cache->certCacheLock) += ptr; -- *(ptrdiff_t *)(&cache->srvNameCacheLock) += ptr; -- *(ptrdiff_t *)(&cache->sidCacheSets ) += ptr; -- *(ptrdiff_t *)(&cache->sidCacheData ) += ptr; -- *(ptrdiff_t *)(&cache->certCacheData) += ptr; -- *(ptrdiff_t *)(&cache->keyCacheData ) += ptr; -- *(ptrdiff_t *)(&cache->ticketKeyNameSuffix) += ptr; -- *(ptrdiff_t *)(&cache->ticketEncKey ) += ptr; -- *(ptrdiff_t *)(&cache->ticketMacKey ) += ptr; -- *(ptrdiff_t *)(&cache->ticketKeysValid) += ptr; -- *(ptrdiff_t *)(&cache->srvNameCacheData) += ptr; -+ cache->sidCacheLocks = (sidCacheLock *) -+ (cache->cacheMem + (ptrdiff_t)cache->sidCacheLocks); -+ cache->keyCacheLock = (sidCacheLock *) -+ (cache->cacheMem + (ptrdiff_t)cache->keyCacheLock); -+ cache->certCacheLock = (sidCacheLock *) -+ (cache->cacheMem + (ptrdiff_t)cache->certCacheLock); -+ cache->srvNameCacheLock = (sidCacheLock *) -+ (cache->cacheMem + (ptrdiff_t)cache->srvNameCacheLock); -+ cache->sidCacheSets = (sidCacheSet *) -+ (cache->cacheMem + (ptrdiff_t)cache->sidCacheSets); -+ cache->sidCacheData = (sidCacheEntry *) -+ (cache->cacheMem + (ptrdiff_t)cache->sidCacheData); -+ cache->certCacheData = (certCacheEntry *) -+ (cache->cacheMem + (ptrdiff_t)cache->certCacheData); -+ cache->keyCacheData = (SSLWrappedSymWrappingKey *) -+ (cache->cacheMem + (ptrdiff_t)cache->keyCacheData); -+ cache->ticketKeyNameSuffix = (PRUint8 *) -+ (cache->cacheMem + (ptrdiff_t)cache->ticketKeyNameSuffix); -+ cache->ticketEncKey = (encKeyCacheEntry *) -+ (cache->cacheMem + (ptrdiff_t)cache->ticketEncKey); -+ cache->ticketMacKey = (encKeyCacheEntry *) -+ (cache->cacheMem + (ptrdiff_t)cache->ticketMacKey); -+ cache->ticketKeysValid = (PRUint32 *) -+ (cache->cacheMem + (ptrdiff_t)cache->ticketKeysValid); -+ cache->srvNameCacheData = (srvNameCacheEntry *) -+ (cache->cacheMem + (ptrdiff_t)cache->srvNameCacheData); - - /* initialize the locks */ - init_time = ssl_Time(); -@@ -1484,7 +1495,6 @@ - char * fmString = NULL; - char * myEnvString = NULL; - unsigned int decoLen; -- ptrdiff_t ptr; - inheritance inherit; - cacheDesc my; - #ifdef WINNT -@@ -1580,20 +1590,32 @@ - /* Fix pointers in our private copy of cache descriptor to point to - ** spaces in shared memory, whose address is now in "my". - */ -- ptr = (ptrdiff_t)my.cacheMem; -- *(ptrdiff_t *)(&cache->sidCacheLocks) += ptr; -- *(ptrdiff_t *)(&cache->keyCacheLock ) += ptr; -- *(ptrdiff_t *)(&cache->certCacheLock) += ptr; -- *(ptrdiff_t *)(&cache->srvNameCacheLock) += ptr; -- *(ptrdiff_t *)(&cache->sidCacheSets ) += ptr; -- *(ptrdiff_t *)(&cache->sidCacheData ) += ptr; -- *(ptrdiff_t *)(&cache->certCacheData) += ptr; -- *(ptrdiff_t *)(&cache->keyCacheData ) += ptr; -- *(ptrdiff_t *)(&cache->ticketKeyNameSuffix) += ptr; -- *(ptrdiff_t *)(&cache->ticketEncKey ) += ptr; -- *(ptrdiff_t *)(&cache->ticketMacKey ) += ptr; -- *(ptrdiff_t *)(&cache->ticketKeysValid) += ptr; -- *(ptrdiff_t *)(&cache->srvNameCacheData) += ptr; -+ cache->sidCacheLocks = (sidCacheLock *) -+ (my.cacheMem + (ptrdiff_t)cache->sidCacheLocks); -+ cache->keyCacheLock = (sidCacheLock *) -+ (my.cacheMem + (ptrdiff_t)cache->keyCacheLock); -+ cache->certCacheLock = (sidCacheLock *) -+ (my.cacheMem + (ptrdiff_t)cache->certCacheLock); -+ cache->srvNameCacheLock = (sidCacheLock *) -+ (my.cacheMem + (ptrdiff_t)cache->srvNameCacheLock); -+ cache->sidCacheSets = (sidCacheSet *) -+ (my.cacheMem + (ptrdiff_t)cache->sidCacheSets); -+ cache->sidCacheData = (sidCacheEntry *) -+ (my.cacheMem + (ptrdiff_t)cache->sidCacheData); -+ cache->certCacheData = (certCacheEntry *) -+ (my.cacheMem + (ptrdiff_t)cache->certCacheData); -+ cache->keyCacheData = (SSLWrappedSymWrappingKey *) -+ (my.cacheMem + (ptrdiff_t)cache->keyCacheData); -+ cache->ticketKeyNameSuffix = (PRUint8 *) -+ (my.cacheMem + (ptrdiff_t)cache->ticketKeyNameSuffix); -+ cache->ticketEncKey = (encKeyCacheEntry *) -+ (my.cacheMem + (ptrdiff_t)cache->ticketEncKey); -+ cache->ticketMacKey = (encKeyCacheEntry *) -+ (my.cacheMem + (ptrdiff_t)cache->ticketMacKey); -+ cache->ticketKeysValid = (PRUint32 *) -+ (my.cacheMem + (ptrdiff_t)cache->ticketKeysValid); -+ cache->srvNameCacheData = (srvNameCacheEntry *) -+ (my.cacheMem + (ptrdiff_t)cache->srvNameCacheData); - - cache->cacheMemMap = my.cacheMemMap; - cache->cacheMem = my.cacheMem; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslsock.c 2016-01-13 14:18:55.632954931 +0100 -@@ -19,6 +19,7 @@ - #endif - #include "pk11pub.h" - #include "nss.h" -+#include "pk11pqg.h" - - /* This is a bodge to allow this code to be compiled against older NSS headers - * that don't contain the TLS 1.2 changes. */ -@@ -90,6 +91,8 @@ - PR_FALSE, /* enableALPN */ - PR_TRUE, /* reuseServerECDHEKey */ - PR_FALSE, /* enableFallbackSCSV */ -+ PR_TRUE, /* enableServerDhe */ -+ PR_FALSE, /* enableExtendedMS */ - PR_FALSE, /* enableSignedCertTimestamps */ - }; - -@@ -232,6 +235,24 @@ - PORT_Memcpy(ss->ssl3.dtlsSRTPCiphers, os->ssl3.dtlsSRTPCiphers, - sizeof(PRUint16) * os->ssl3.dtlsSRTPCipherCount); - ss->ssl3.dtlsSRTPCipherCount = os->ssl3.dtlsSRTPCipherCount; -+ PORT_Memcpy(ss->ssl3.signatureAlgorithms, os->ssl3.signatureAlgorithms, -+ sizeof(ss->ssl3.signatureAlgorithms[0]) * -+ os->ssl3.signatureAlgorithmCount); -+ ss->ssl3.signatureAlgorithmCount = os->ssl3.signatureAlgorithmCount; -+ -+ ss->ssl3.dheWeakGroupEnabled = os->ssl3.dheWeakGroupEnabled; -+ ss->ssl3.numDHEGroups = os->ssl3.numDHEGroups; -+ if (os->ssl3.dheGroups) { -+ ss->ssl3.dheGroups = PORT_NewArray(SSLDHEGroupType, -+ os->ssl3.numDHEGroups); -+ if (!ss->ssl3.dheGroups) { -+ goto loser; -+ } -+ PORT_Memcpy(ss->ssl3.dheGroups, os->ssl3.dheGroups, -+ sizeof(SSLDHEGroupType) * os->ssl3.numDHEGroups); -+ } else { -+ ss->ssl3.dheGroups = NULL; -+ } - - if (os->cipherSpecs) { - ss->cipherSpecs = (unsigned char*)PORT_Alloc(os->sizeCipherSpecs); -@@ -275,6 +296,10 @@ - ssl3_GetKeyPairRef(os->stepDownKeyPair); - ss->ephemeralECDHKeyPair = !os->ephemeralECDHKeyPair ? NULL : - ssl3_GetKeyPairRef(os->ephemeralECDHKeyPair); -+ ss->dheKeyPair = !os->dheKeyPair ? NULL : -+ ssl3_GetKeyPairRef(os->dheKeyPair); -+ ss->dheParams = os->dheParams; -+ - /* - * XXX the preceding CERT_ and SECKEY_ functions can fail and return NULL. - * XXX We should detect this, and not just march on with NULL pointers. -@@ -398,8 +423,11 @@ - ssl3_FreeKeyPair(ss->ephemeralECDHKeyPair); - ss->ephemeralECDHKeyPair = NULL; - } -+ if (ss->dheKeyPair) { -+ ssl3_FreeKeyPair(ss->dheKeyPair); -+ ss->dheKeyPair = NULL; -+ } - SECITEM_FreeItem(&ss->opt.nextProtoNego, PR_FALSE); -- PORT_Assert(!ss->xtnData.sniNameArr); - if (ss->xtnData.sniNameArr) { - PORT_Free(ss->xtnData.sniNameArr); - ss->xtnData.sniNameArr = NULL; -@@ -808,6 +836,14 @@ - ss->opt.enableFallbackSCSV = on; - break; - -+ case SSL_ENABLE_SERVER_DHE: -+ ss->opt.enableServerDhe = on; -+ break; -+ -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ ss->opt.enableExtendedMS = on; -+ break; -+ - case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - ss->opt.enableSignedCertTimestamps = on; - break; -@@ -887,6 +923,9 @@ - case SSL_REUSE_SERVER_ECDHE_KEY: - on = ss->opt.reuseServerECDHEKey; break; - case SSL_ENABLE_FALLBACK_SCSV: on = ss->opt.enableFallbackSCSV; break; -+ case SSL_ENABLE_SERVER_DHE: on = ss->opt.enableServerDhe; break; -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ on = ss->opt.enableExtendedMS; break; - case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - on = ss->opt.enableSignedCertTimestamps; - break; -@@ -959,6 +998,12 @@ - case SSL_ENABLE_FALLBACK_SCSV: - on = ssl_defaults.enableFallbackSCSV; - break; -+ case SSL_ENABLE_SERVER_DHE: -+ on = ssl_defaults.enableServerDhe; -+ break; -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ on = ssl_defaults.enableExtendedMS; -+ break; - case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - on = ssl_defaults.enableSignedCertTimestamps; - break; -@@ -1145,6 +1190,14 @@ - ssl_defaults.enableFallbackSCSV = on; - break; - -+ case SSL_ENABLE_SERVER_DHE: -+ ssl_defaults.enableServerDhe = on; -+ break; -+ -+ case SSL_ENABLE_EXTENDED_MASTER_SECRET: -+ ssl_defaults.enableExtendedMS = on; -+ break; -+ - case SSL_ENABLE_SIGNED_CERT_TIMESTAMPS: - ssl_defaults.enableSignedCertTimestamps = on; - break; -@@ -1381,6 +1434,148 @@ - } - - SECStatus -+SSL_DHEGroupPrefSet(PRFileDesc *fd, -+ SSLDHEGroupType *groups, -+ PRUint16 num_groups) -+{ -+ sslSocket *ss; -+ -+ if ((num_groups && !groups) || (!num_groups && groups)) { -+ PORT_SetError(SEC_ERROR_INVALID_ARGS); -+ return SECFailure; -+ } -+ -+ ss = ssl_FindSocket(fd); -+ if (!ss) { -+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_DHEGroupPrefSet", SSL_GETPID(), fd)); -+ return SECFailure; -+ } -+ -+ if (ss->ssl3.dheGroups) { -+ PORT_Free(ss->ssl3.dheGroups); -+ ss->ssl3.dheGroups = NULL; -+ ss->ssl3.numDHEGroups = 0; -+ } -+ -+ if (groups) { -+ ss->ssl3.dheGroups = PORT_NewArray(SSLDHEGroupType, num_groups); -+ if (!ss->ssl3.dheGroups) { -+ PORT_SetError(SEC_ERROR_NO_MEMORY); -+ return SECFailure; -+ } -+ PORT_Memcpy(ss->ssl3.dheGroups, groups, -+ sizeof(SSLDHEGroupType) * num_groups); -+ } -+ return SECSuccess; -+} -+ -+ -+PRCallOnceType gWeakDHParamsRegisterOnce; -+int gWeakDHParamsRegisterError; -+ -+PRCallOnceType gWeakDHParamsOnce; -+int gWeakDHParamsError; -+/* As our code allocates type PQGParams, we'll keep it around, -+ * even though we only make use of it's parameters through gWeakDHParam. */ -+static PQGParams *gWeakParamsPQG; -+static ssl3DHParams *gWeakDHParams; -+ -+static PRStatus -+ssl3_CreateWeakDHParams(void) -+{ -+ PQGVerify *vfy; -+ SECStatus rv, passed; -+ -+ PORT_Assert(!gWeakDHParams && !gWeakParamsPQG); -+ -+ rv = PK11_PQG_ParamGenV2(1024, 160, 64 /*maximum seed that will work*/, -+ &gWeakParamsPQG, &vfy); -+ if (rv != SECSuccess) { -+ gWeakDHParamsError = PORT_GetError(); -+ return PR_FAILURE; -+ } -+ -+ rv = PK11_PQG_VerifyParams(gWeakParamsPQG, vfy, &passed); -+ if (rv != SECSuccess || passed != SECSuccess) { -+ SSL_DBG(("%d: PK11_PQG_VerifyParams failed in ssl3_CreateWeakDHParams", -+ SSL_GETPID())); -+ gWeakDHParamsError = PORT_GetError(); -+ return PR_FAILURE; -+ } -+ -+ gWeakDHParams = PORT_ArenaNew(gWeakParamsPQG->arena, ssl3DHParams); -+ if (!gWeakDHParams) { -+ gWeakDHParamsError = PORT_GetError(); -+ return PR_FAILURE; -+ } -+ -+ gWeakDHParams->prime.data = gWeakParamsPQG->prime.data; -+ gWeakDHParams->prime.len = gWeakParamsPQG->prime.len; -+ gWeakDHParams->base.data = gWeakParamsPQG->base.data; -+ gWeakDHParams->base.len = gWeakParamsPQG->base.len; -+ -+ PK11_PQG_DestroyVerify(vfy); -+ return PR_SUCCESS; -+} -+ -+static SECStatus -+ssl3_WeakDHParamsShutdown(void *appData, void *nssData) -+{ -+ if (gWeakParamsPQG) { -+ PK11_PQG_DestroyParams(gWeakParamsPQG); -+ gWeakParamsPQG = NULL; -+ gWeakDHParams = NULL; -+ } -+ return SECSuccess; -+} -+ -+static PRStatus -+ssl3_WeakDHParamsRegisterShutdown(void) -+{ -+ SECStatus rv; -+ rv = NSS_RegisterShutdown(ssl3_WeakDHParamsShutdown, NULL); -+ if (rv != SECSuccess) { -+ gWeakDHParamsRegisterError = PORT_GetError(); -+ } -+ return (PRStatus)rv; -+} -+ -+/* global init strategy inspired by ssl3_CreateECDHEphemeralKeys */ -+SECStatus -+SSL_EnableWeakDHEPrimeGroup(PRFileDesc *fd, PRBool enabled) -+{ -+ sslSocket *ss; -+ PRStatus status; -+ -+ if (enabled) { -+ status = PR_CallOnce(&gWeakDHParamsRegisterOnce, -+ ssl3_WeakDHParamsRegisterShutdown); -+ if (status != PR_SUCCESS) { -+ PORT_SetError(gWeakDHParamsRegisterError); -+ return SECFailure; -+ } -+ -+ status = PR_CallOnce(&gWeakDHParamsOnce, ssl3_CreateWeakDHParams); -+ if (status != PR_SUCCESS) { -+ PORT_SetError(gWeakDHParamsError); -+ return SECFailure; -+ } -+ } -+ -+ if (!fd) -+ return SECSuccess; -+ -+ ss = ssl_FindSocket(fd); -+ if (!ss) { -+ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_DHEGroupPrefSet", SSL_GETPID(), fd)); -+ return SECFailure; -+ } -+ -+ ss->ssl3.dheWeakGroupEnabled = enabled; -+ return SECSuccess; -+} -+ -+SECStatus - SSL_GetChannelBinding(PRFileDesc *fd, - SSLChannelBindingType binding_type, - unsigned char *out, -@@ -1402,6 +1597,62 @@ - return ssl3_GetTLSUniqueChannelBinding(ss, out, outLen, outLenMax); - } - -+#include "dhe-param.c" -+ -+static const SSLDHEGroupType ssl_default_dhe_groups[] = { -+ ssl_ff_dhe_2048_group -+}; -+ -+/* Keep this array synchronized with the index definitions in SSLDHEGroupType */ -+static const ssl3DHParams *all_ssl3DHParams[] = { -+ NULL, /* ssl_dhe_group_none */ -+ &ff_dhe_2048, -+ &ff_dhe_3072, -+ &ff_dhe_4096, -+ &ff_dhe_6144, -+ &ff_dhe_8192, -+}; -+ -+static SSLDHEGroupType -+selectDHEGroup(sslSocket *ss, const SSLDHEGroupType *groups, PRUint16 num_groups) -+{ -+ if (!groups || !num_groups) -+ return ssl_dhe_group_none; -+ -+ /* We don't have automatic group parameter selection yet -+ * (potentially) based on socket parameters, e.g. key sizes. -+ * For now, we return the first available group from the allowed list. */ -+ return groups[0]; -+} -+ -+/* Ensure DH parameters have been selected */ -+SECStatus -+ssl3_SelectDHParams(sslSocket *ss) -+{ -+ SSLDHEGroupType selectedGroup = ssl_dhe_group_none; -+ -+ if (ss->ssl3.dheWeakGroupEnabled) { -+ ss->dheParams = gWeakDHParams; -+ } else { -+ if (ss->ssl3.dheGroups) { -+ selectedGroup = selectDHEGroup(ss, ss->ssl3.dheGroups, -+ ss->ssl3.numDHEGroups); -+ } else { -+ size_t number_of_default_groups = PR_ARRAY_SIZE(ssl_default_dhe_groups); -+ selectedGroup = selectDHEGroup(ss, ssl_default_dhe_groups, -+ number_of_default_groups); -+ } -+ -+ if (selectedGroup == ssl_dhe_group_none || -+ selectedGroup >= ssl_dhe_group_max) { -+ return SECFailure; -+ } -+ -+ ss->dheParams = all_ssl3DHParams[selectedGroup]; -+ } -+ -+ return SECSuccess; -+} - - /* LOCKS ??? XXX */ - static PRFileDesc * -@@ -1699,6 +1950,10 @@ - PORT_Memcpy(ss->ssl3.dtlsSRTPCiphers, sm->ssl3.dtlsSRTPCiphers, - sizeof(PRUint16) * sm->ssl3.dtlsSRTPCipherCount); - ss->ssl3.dtlsSRTPCipherCount = sm->ssl3.dtlsSRTPCipherCount; -+ PORT_Memcpy(ss->ssl3.signatureAlgorithms, sm->ssl3.signatureAlgorithms, -+ sizeof(ss->ssl3.signatureAlgorithms[0]) * -+ sm->ssl3.signatureAlgorithmCount); -+ ss->ssl3.signatureAlgorithmCount = sm->ssl3.signatureAlgorithmCount; - - if (!ss->opt.useSecurity) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); -@@ -3122,6 +3377,10 @@ - } - ss->requestedCertTypes = NULL; - ss->stepDownKeyPair = NULL; -+ -+ ss->dheParams = NULL; -+ ss->dheKeyPair = NULL; -+ - ss->dbHandle = CERT_GetDefaultCertDB(); - - /* Provide default implementation of hooks */ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslt.h 2016-01-13 14:18:55.633954937 +0100 -@@ -1,3 +1,4 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - /* - * This file contains prototypes for the public SSL functions. - * -@@ -68,13 +69,35 @@ - #define kt_ecdh ssl_kea_ecdh - #define kt_kea_size ssl_kea_size - -+ -+/* Values of this enum match the SignatureAlgorithm enum from -+ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ - typedef enum { -- ssl_sign_null = 0, -+ ssl_sign_null = 0, /* "anonymous" in TLS */ - ssl_sign_rsa = 1, - ssl_sign_dsa = 2, - ssl_sign_ecdsa = 3 - } SSLSignType; - -+/* Values of this enum match the HashAlgorithm enum from -+ * https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1 */ -+typedef enum { -+ /* ssl_hash_none is used internally to mean the pre-1.2 combination of MD5 -+ * and SHA1. The other values are only used in TLS 1.2. */ -+ ssl_hash_none = 0, -+ ssl_hash_md5 = 1, -+ ssl_hash_sha1 = 2, -+ ssl_hash_sha224 = 3, -+ ssl_hash_sha256 = 4, -+ ssl_hash_sha384 = 5, -+ ssl_hash_sha512 = 6 -+} SSLHashType; -+ -+typedef struct SSLSignatureAndHashAlgStr { -+ SSLHashType hashAlg; -+ SSLSignType sigAlg; -+} SSLSignatureAndHashAlg; -+ - typedef enum { - ssl_auth_null = 0, - ssl_auth_rsa = 1, -@@ -136,8 +159,31 @@ - /* compression method info */ - const char * compressionMethodName; - SSLCompressionMethod compressionMethod; -+ -+ /* The following fields are added in NSS 3.21. -+ * This field only has meaning in TLS < 1.3 and will be set to -+ * PR_FALSE in TLS 1.3. -+ */ -+ PRBool extendedMasterSecretUsed; - } SSLChannelInfo; - -+/* Preliminary channel info */ -+#define ssl_preinfo_version (1U << 0) -+#define ssl_preinfo_cipher_suite (1U << 1) -+#define ssl_preinfo_all (ssl_preinfo_version|ssl_preinfo_cipher_suite) -+ -+typedef struct SSLPreliminaryChannelInfoStr { -+ /* This is set to the length of the struct. */ -+ PRUint32 length; -+ /* A bitfield over SSLPreliminaryValueSet that describes which -+ * preliminary values are set (see ssl_preinfo_*). */ -+ PRUint32 valuesSet; -+ /* Protocol version: test (valuesSet & ssl_preinfo_version) */ -+ PRUint16 protocolVersion; -+ /* Cipher suite: test (valuesSet & ssl_preinfo_cipher_suite) */ -+ PRUint16 cipherSuite; -+} SSLPreliminaryChannelInfo; -+ - typedef struct SSLCipherSuiteInfoStr { - PRUint16 length; - PRUint16 cipherSuite; -@@ -204,6 +250,7 @@ - ssl_app_layer_protocol_xtn = 16, - ssl_signed_certificate_timestamp_xtn = 18, /* RFC 6962 */ - ssl_padding_xtn = 21, -+ ssl_extended_master_secret_xtn = 23, - ssl_session_ticket_xtn = 35, - ssl_next_proto_nego_xtn = 13172, - ssl_channel_id_xtn = 30032, -@@ -211,6 +258,16 @@ - ssl_tls13_draft_version_xtn = 0xff02 /* experimental number */ - } SSLExtensionType; - --#define SSL_MAX_EXTENSIONS 13 /* doesn't include ssl_padding_xtn. */ -+#define SSL_MAX_EXTENSIONS 14 /* doesn't include ssl_padding_xtn. */ -+ -+typedef enum { -+ ssl_dhe_group_none = 0, -+ ssl_ff_dhe_2048_group = 1, -+ ssl_ff_dhe_3072_group = 2, -+ ssl_ff_dhe_4096_group = 3, -+ ssl_ff_dhe_6144_group = 4, -+ ssl_ff_dhe_8192_group = 5, -+ ssl_dhe_group_max -+} SSLDHEGroupType; - - #endif /* __sslt_h_ */ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-nss321/src/3rdparty/chromium/net/third_party/nss/ssl/sslver.c 2016-01-13 14:18:55.633954937 +0100 -@@ -12,20 +12,7 @@ - #define _DEBUG_STRING "" - #endif - --#if defined(DONT_EMBED_BUILD_METADATA) && !defined(OFFICIAL_BUILD) --#define _DATE_AND_TIME "Sep 02 2008 08:00:00" --#else --#define _DATE_AND_TIME __DATE__ " " __TIME__ --#endif -- -- - /* -- * Version information for the 'ident' and 'what commands -- * -- * NOTE: the first component of the concatenated rcsid string -- * must not end in a '$' to prevent rcs keyword substitution. -+ * Version information - */ --const char __nss_ssl_rcsid[] = "$Header: NSS " NSS_VERSION _DEBUG_STRING -- " " _DATE_AND_TIME " $"; --const char __nss_ssl_sccsid[] = "@(#)NSS " NSS_VERSION _DEBUG_STRING -- " " _DATE_AND_TIME; -+const char __nss_ssl_version[] = "Version: NSS " NSS_VERSION _DEBUG_STRING; From 6d0400baa50a8529ee00a0be03cb6759c4b6352f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 00:17:04 +0100 Subject: [PATCH 030/437] Do not require SSE2 on i686 See https://bugzilla.redhat.com/show_bug.cgi?id=1244196#c22 for the history of the patch. Compared to the last revision there (v5): * I fixed WebGLImageConversion.cpp to not assume SSE2 on x86. Unfortunately, it would be really hard to make runtime detection work there, because it uses intrinsics in inline templates, and GCC only supports intrinsics when building the whole code for the vector instruction set. So I had to turn off that SSE2 code entirely when __SSE2__ is not defined at compile time. * I fixed webrtc to check for SSE2 at runtime (using the runtime checking code that webrtc already has and uses in several places) before attempting to use OpenMAX on x86. OpenMAX requires SSE2. So we just fall back to the Ooura implementation of FFTs when needed. TODO: build V8 shared and twice (once for x87, once for SSE2) --- qt5-qtwebengine.spec | 12 +- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 2232 +++++++++++++++++ 2 files changed, 2243 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2747598..2892718 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.13.beta%{?dist} +Release: 0.13.beta.nosse2.1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -64,6 +64,12 @@ Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch # fix the NSS/BoringSSL "chimera build" to call EnsureNSSHttpIOInit # backport of https://codereview.chromium.org/1385473003 Patch7: qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch +# do not require SSE2 on i686 +# cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts +# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along +# with some custom fixes and improvements +# TODO: build V8 shared and twice (once for x87, once for SSE2) +Patch8: qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -284,6 +290,7 @@ BuildArch: noarch %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf %patch7 -p1 -b .chimera-nss-init +%patch8 -p1 -b .no-sse2 %build export STRIP=strip @@ -353,6 +360,9 @@ popd %changelog +* Sat Jan 16 2016 Kevin Kofler - 5.6.0-0.13.beta.nosse2.1 +- Do not require SSE2 on i686 + * Thu Jan 14 2016 Kevin Kofler - 5.6.0-0.13.beta - Drop nss321 backport (and the related nss-headers patch), it did not help - Do an NSS/BoringSSL "chimera build" as will be the default in Chromium 47 diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch new file mode 100644 index 0000000..03369f4 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -0,0 +1,2232 @@ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-01-16 23:07:29.831545727 +0100 +@@ -82,6 +82,13 @@ + + # On Linux, we build with sse2 for Chromium builds. + 'disable_sse2%': 0, ++ ++ 'conditions': [ ++ ['target_arch=="ia32"', { ++ # Do not assume SSE2 by default (Fedora patch). ++ 'disable_sse2%': 1, ++ }], ++ ], + }, + + 'target_arch%': '<(target_arch)', +@@ -725,17 +732,13 @@ + 'conditions': [ + ['disable_sse2==0', { + 'cflags': [ +- '-march=pentium4', + '-msse2', + '-mfpmath=sse', + ], + }], + ], +- # -mmmx allows mmintrin.h to be used for mmx intrinsics. +- # video playback is mmx and sse2 optimized. + 'cflags': [ + '-m32', +- '-mmmx', + ], + 'ldflags': [ + '-m32', +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-16 23:07:29.866545917 +0100 +@@ -198,6 +198,11 @@ + 'mips_dsp_rev%': 0, + + 'conditions': [ ++ ['target_arch=="ia32"', { ++ # Do not assume SSE2 by default (Fedora patch). ++ 'disable_sse2%': 1, ++ }], ++ + ['branding == "Chrome"', { + 'branding_path_component%': 'google_chrome', + }], +@@ -3901,21 +3906,28 @@ + # value used during computation does not change depending on + # how the compiler optimized the code, since the value is + # always kept in its specified precision. +- # +- # Refer to http://crbug.com/348761 for rationale behind SSE2 +- # being a minimum requirement for 32-bit Linux builds and +- # http://crbug.com/313032 for an example where this has "bit" +- # us in the past. + 'cflags': [ +- '-msse2', +- '-mfpmath=sse', +- '-mmmx', # Allows mmintrin.h for MMX intrinsics. + '-m32', + ], + 'ldflags': [ + '-m32', + ], + 'conditions': [ ++ ['disable_sse2==0', { ++ 'cflags': [ ++ '-msse2', ++ '-mfpmath=sse', ++ '-mmmx', # Allows mmintrin.h for MMX intrinsics. ++ ], ++ }], ++ ['disable_sse2==1', { ++ # Refer to http://crbug.com/348761 for rationale and ++ # http://crbug.com/313032 for an example where the x87 ++ # floating-point precision issue has "bit" us in the past. ++ 'cflags': [ ++ '-ffloat-store', ++ ], ++ }], + # Use gold linker for Android ia32 target. + ['OS=="android"', { + # Use gold linker for Android ia32 target. +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-01-16 23:07:29.918546201 +0100 +@@ -502,13 +502,6 @@ + "trees/tree_synchronizer.h", + ] + +- if (target_cpu == "x86" || target_cpu == "x64") { +- sources += [ +- "raster/texture_compressor_etc1_sse.cc", +- "raster/texture_compressor_etc1_sse.h", +- ] +- } +- + public_deps = [ + "//cc/base", + "//skia", +@@ -516,6 +509,7 @@ + deps = [ + "//base", + "//base/third_party/dynamic_annotations", ++ "//cc:cc_opts", + "//cc/surfaces:surface_id", + "//gpu", + "//gpu/command_buffer/client:gles2_interface", +@@ -533,6 +527,36 @@ + } + } + ++source_set("cc_opts") { ++ public_deps = [ ++ "//cc:cc_opts_sse", ++ ] ++} ++ ++source_set("cc_opts_sse") { ++ if (target_cpu == "x86" || target_cpu == "x64") { ++ deps = [ ++ "//base", ++ ] ++ ++ defines = [ "CC_IMPLEMENTATION=1" ] ++ ++ if (!is_debug && (is_win || is_android)) { ++ configs -= [ "//build/config/compiler:optimize" ] ++ configs += [ "//build/config/compiler:optimize_max" ] ++ } ++ ++ sources = [ ++ "raster/texture_compressor.h", ++ "raster/texture_compressor_etc1.h", ++ "raster/texture_compressor_etc1_sse.cc", ++ "raster/texture_compressor_etc1_sse.h", ++ ] ++ ++ cflags = [ "-msse2" ] ++ } ++} ++ + source_set("test_support") { + testonly = true + sources = [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/cc.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-01-16 23:07:29.957546413 +0100 +@@ -21,6 +21,7 @@ + '<(DEPTH)/ui/events/events.gyp:events_base', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', ++ 'cc_opts', + ], + 'variables': { + 'optimize': 'max', +@@ -563,14 +564,6 @@ + 'includes': [ + '../build/android/increase_size_for_speed.gypi', + ], +- 'conditions': [ +- ['target_arch == "ia32" or target_arch == "x64"', { +- 'sources': [ +- 'raster/texture_compressor_etc1_sse.cc', +- 'raster/texture_compressor_etc1_sse.h', +- ], +- }], +- ], + }, + { + # GN version: //cc/surfaces +@@ -621,5 +614,41 @@ + '../build/android/increase_size_for_speed.gypi', + ], + }, ++ { ++ 'target_name': 'cc_opts', ++ 'type': 'static_library', ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'CC_IMPLEMENTATION=1', ++ ], ++ 'dependencies': [ ++ 'cc_opts_sse', ++ ] ++ }], ++ ], ++ }, ++ { ++ 'target_name': 'cc_opts_sse', ++ 'type': 'static_library', ++ 'dependencies': [ ++ '<(DEPTH)/base/base.gyp:base', ++ ], ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'CC_IMPLEMENTATION=1', ++ ], ++ 'sources': [ ++ # Conditional compilation for SSE2 code on x86 and x64 machines ++ 'raster/texture_compressor_etc1_sse.cc', ++ 'raster/texture_compressor_etc1_sse.h', ++ ], ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ ], ++ }, + ], + } +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-01-16 23:07:29.980546539 +0100 +@@ -270,13 +270,13 @@ + } + + if (current_cpu == "x86" || current_cpu == "x64") { +- sources += [ +- "simd/convert_rgb_to_yuv_sse2.cc", +- "simd/convert_rgb_to_yuv_ssse3.cc", +- "simd/convert_yuv_to_rgb_x86.cc", +- "simd/filter_yuv_sse2.cc", ++ sources += [ "simd/convert_yuv_to_rgb_x86.cc" ] ++ deps += [ ++ ":media_yasm", ++ ":media_mmx", ++ ":media_sse", ++ ":media_sse2", + ] +- deps += [ ":media_yasm" ] + } + + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] +@@ -462,10 +462,47 @@ + } + + if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("media_mmx") { ++ sources = [ "simd/filter_yuv_mmx.cc" ] ++ configs += [ "//media:media_config" ] ++ if (!is_win) { ++ cflags = [ "-mmmx" ] ++ } ++ } ++ ++ source_set("media_sse") { ++ sources = [ ++ "simd/sinc_resampler_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } ++ ++ source_set("media_sse2") { ++ sources = [ ++ "simd/convert_rgb_to_yuv_sse2.cc", ++ "simd/convert_rgb_to_yuv_ssse3.cc", ++ "simd/filter_yuv_sse2.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse2" ] ++ } ++ } ++ + import("//third_party/yasm/yasm_assemble.gni") + yasm_assemble("media_yasm") { + sources = [ + "simd/convert_rgb_to_yuv_ssse3.asm", ++ "simd/convert_yuv_to_rgb_mmx.asm", + "simd/convert_yuv_to_rgb_sse.asm", + "simd/convert_yuva_to_argb_mmx.asm", + "simd/empty_register_state_mmx.asm", +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/media.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-01-16 23:07:30.012546713 +0100 +@@ -9,6 +9,8 @@ + #include "base/path_service.h" + #include "base/synchronization/lock.h" + #include "build/build_config.h" ++#include "media/base/sinc_resampler.h" ++#include "media/base/vector_math.h" + #include "media/base/yuv_convert.h" + + #if !defined(MEDIA_DISABLE_FFMPEG) +@@ -24,6 +26,8 @@ + + MediaInitializer() { + // Perform initialization of libraries which require runtime CPU detection. ++ vector_math::Initialize(); ++ SincResampler::InitializeCPUSpecificFeatures(); + InitializeCPUSpecificYUVConversions(); + + #if !defined(MEDIA_DISABLE_FFMPEG) +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-01-16 23:07:30.032546822 +0100 +@@ -63,6 +63,17 @@ + int rgbstride, + YUVType yuv_type); + ++MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8* yplane, ++ const uint8* uplane, ++ const uint8* vplane, ++ uint8* rgbframe, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type); ++ + MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, +@@ -114,6 +125,13 @@ + // issue on at least Win64. The C-equivalent RowProc versions' prototypes + // include the same change to ptrdiff_t to reuse the typedefs. + ++MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane, ++ const uint8* uplane, ++ const uint8* vplane, ++ uint8* rgbframe, ++ ptrdiff_t width, ++ const int16* convert_table); ++ + MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, +@@ -129,6 +147,14 @@ + ptrdiff_t width, + const int16* convert_table); + ++MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf, ++ const uint8* u_buf, ++ const uint8* v_buf, ++ uint8* rgb_buf, ++ ptrdiff_t width, ++ ptrdiff_t source_dx, ++ const int16* convert_table); ++ + MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, + const uint8* u_buf, + const uint8* v_buf, +@@ -145,6 +171,14 @@ + ptrdiff_t source_dx, + const int16* convert_table); + ++MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8* y_buf, ++ const uint8* u_buf, ++ const uint8* v_buf, ++ uint8* rgb_buf, ++ ptrdiff_t width, ++ ptrdiff_t source_dx, ++ const int16* convert_table); ++ + MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf, + const uint8* u_buf, + const uint8* v_buf, +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-01-16 23:07:30.032546822 +0100 +@@ -0,0 +1,23 @@ ++; Copyright (c) 2011 The Chromium Authors. All rights reserved. ++; Use of this source code is governed by a BSD-style license that can be ++; found in the LICENSE file. ++ ++%include "third_party/x86inc/x86inc.asm" ++ ++; ++; This file uses MMX instructions. ++; ++ SECTION_TEXT ++ CPU MMX ++ ++; Use movq to save the output. ++%define MOVQ movq ++ ++; extern "C" void ConvertYUVToRGB32Row_MMX(const uint8* y_buf, ++; const uint8* u_buf, ++; const uint8* v_buf, ++; uint8* rgb_buf, ++; ptrdiff_t width, ++; const int16* convert_table); ++%define SYMBOL ConvertYUVToRGB32Row_MMX ++%include "convert_yuv_to_rgb_mmx.inc" +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-01-16 23:07:30.045546893 +0100 +@@ -13,6 +13,34 @@ + + namespace media { + ++void ConvertYUVToRGB32_MMX(const uint8* yplane, ++ const uint8* uplane, ++ const uint8* vplane, ++ uint8* rgbframe, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type) { ++ unsigned int y_shift = GetVerticalShift(yuv_type); ++ for (int y = 0; y < height; ++y) { ++ uint8* rgb_row = rgbframe + y * rgbstride; ++ const uint8* y_ptr = yplane + y * ystride; ++ const uint8* u_ptr = uplane + (y >> y_shift) * uvstride; ++ const uint8* v_ptr = vplane + (y >> y_shift) * uvstride; ++ ++ ConvertYUVToRGB32Row_MMX(y_ptr, ++ u_ptr, ++ v_ptr, ++ rgb_row, ++ width, ++ GetLookupTable(yuv_type)); ++ } ++ ++ EmptyRegisterState(); ++} ++ + void ConvertYUVAToARGB_MMX(const uint8* yplane, + const uint8* uplane, + const uint8* vplane, +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-01-16 23:07:30.049546915 +0100 +@@ -19,6 +19,12 @@ + int source_width, + uint8 source_y_fraction); + ++MEDIA_EXPORT void FilterYUVRows_MMX(uint8* ybuf, ++ const uint8* y0_ptr, ++ const uint8* y1_ptr, ++ int source_width, ++ uint8 source_y_fraction); ++ + MEDIA_EXPORT void FilterYUVRows_SSE2(uint8* ybuf, + const uint8* y0_ptr, + const uint8* y1_ptr, +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-01-16 23:07:30.050546920 +0100 +@@ -0,0 +1,79 @@ ++// Copyright (c) 2011 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if defined(_MSC_VER) ++#include ++#else ++#include ++#endif ++ ++#include "build/build_config.h" ++#include "media/base/simd/filter_yuv.h" ++ ++namespace media { ++ ++#if defined(COMPILER_MSVC) ++// Warning 4799 is about calling emms before the function exits. ++// We calls emms in a frame level so suppress this warning. ++#pragma warning(push) ++#pragma warning(disable: 4799) ++#endif ++ ++void FilterYUVRows_MMX(uint8* dest, ++ const uint8* src0, ++ const uint8* src1, ++ int width, ++ uint8 fraction) { ++ int pixel = 0; ++ ++ // Process the unaligned bytes first. ++ int unaligned_width = ++ (8 - (reinterpret_cast(dest) & 7)) & 7; ++ while (pixel < width && pixel < unaligned_width) { ++ dest[pixel] = (src0[pixel] * (256 - fraction) + ++ src1[pixel] * fraction) >> 8; ++ ++pixel; ++ } ++ ++ __m64 zero = _mm_setzero_si64(); ++ __m64 src1_fraction = _mm_set1_pi16(fraction); ++ __m64 src0_fraction = _mm_set1_pi16(256 - fraction); ++ const __m64* src0_64 = reinterpret_cast(src0 + pixel); ++ const __m64* src1_64 = reinterpret_cast(src1 + pixel); ++ __m64* dest64 = reinterpret_cast<__m64*>(dest + pixel); ++ __m64* end64 = reinterpret_cast<__m64*>( ++ reinterpret_cast(dest + width) & ~7); ++ ++ while (dest64 < end64) { ++ __m64 src0 = *src0_64++; ++ __m64 src1 = *src1_64++; ++ __m64 src2 = _mm_unpackhi_pi8(src0, zero); ++ __m64 src3 = _mm_unpackhi_pi8(src1, zero); ++ src0 = _mm_unpacklo_pi8(src0, zero); ++ src1 = _mm_unpacklo_pi8(src1, zero); ++ src0 = _mm_mullo_pi16(src0, src0_fraction); ++ src1 = _mm_mullo_pi16(src1, src1_fraction); ++ src2 = _mm_mullo_pi16(src2, src0_fraction); ++ src3 = _mm_mullo_pi16(src3, src1_fraction); ++ src0 = _mm_add_pi16(src0, src1); ++ src2 = _mm_add_pi16(src2, src3); ++ src0 = _mm_srli_pi16(src0, 8); ++ src2 = _mm_srli_pi16(src2, 8); ++ src0 = _mm_packs_pu16(src0, src2); ++ *dest64++ = src0; ++ pixel += 8; ++ } ++ ++ while (pixel < width) { ++ dest[pixel] = (src0[pixel] * (256 - fraction) + ++ src1[pixel] * fraction) >> 8; ++ ++pixel; ++ } ++} ++ ++#if defined(COMPILER_MSVC) ++#pragma warning(pop) ++#endif ++ ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-01-16 23:07:30.050546920 +0100 +@@ -0,0 +1,50 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/sinc_resampler.h" ++ ++#include ++ ++namespace media { ++ ++float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, ++ const float* k2, ++ double kernel_interpolation_factor) { ++ __m128 m_input; ++ __m128 m_sums1 = _mm_setzero_ps(); ++ __m128 m_sums2 = _mm_setzero_ps(); ++ ++ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling ++ // these loops hurt performance in local testing. ++ if (reinterpret_cast(input_ptr) & 0x0F) { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_loadu_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } else { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_load_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } ++ ++ // Linearly interpolate the two "convolutions". ++ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( ++ static_cast(1.0 - kernel_interpolation_factor))); ++ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( ++ static_cast(kernel_interpolation_factor))); ++ m_sums1 = _mm_add_ps(m_sums1, m_sums2); ++ ++ // Sum components together. ++ float result; ++ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); ++ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( ++ m_sums2, m_sums2, 1))); ++ ++ return result; ++} ++ ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-01-16 23:07:30.051546925 +0100 +@@ -0,0 +1,118 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/vector_math_testing.h" ++ ++#include ++ ++#include // NOLINT ++ ++namespace media { ++namespace vector_math { ++ ++void FMUL_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) ++ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] = src[i] * scale; ++} ++ ++void FMAC_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) { ++ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), ++ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); ++ } ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] += src[i] * scale; ++} ++ ++// Convenience macro to extract float 0 through 3 from the vector |a|. This is ++// needed because compilers other than clang don't support access via ++// operator[](). ++#define EXTRACT_FLOAT(a, i) \ ++ (i == 0 ? \ ++ _mm_cvtss_f32(a) : \ ++ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) ++ ++std::pair EWMAAndMaxPower_SSE( ++ float initial_value, const float src[], int len, float smoothing_factor) { ++ // When the recurrence is unrolled, we see that we can split it into 4 ++ // separate lanes of evaluation: ++ // ++ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) ++ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... ++ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ // ++ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... ++ // ++ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in ++ // each of the 4 lanes, and then combine them to give y[n]. ++ ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ ++ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); ++ const float weight_prev = 1.0f - smoothing_factor; ++ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); ++ const __m128 weight_prev_squared_x4 = ++ _mm_mul_ps(weight_prev_x4, weight_prev_x4); ++ const __m128 weight_prev_4th_x4 = ++ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); ++ ++ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and ++ // 0, respectively. ++ __m128 max_x4 = _mm_setzero_ps(); ++ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); ++ int i; ++ for (i = 0; i < last_index; i += 4) { ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); ++ const __m128 sample_x4 = _mm_load_ps(src + i); ++ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); ++ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); ++ // Note: The compiler optimizes this to a single multiply-and-accumulate ++ // instruction: ++ ewma_x4 = _mm_add_ps(ewma_x4, ++ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); ++ } ++ ++ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ float ewma = EXTRACT_FLOAT(ewma_x4, 3); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 2); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 1); ++ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 0); ++ ++ // Fold the maximums together to get the overall maximum. ++ max_x4 = _mm_max_ps(max_x4, ++ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); ++ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); ++ ++ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); ++ ++ // Handle remaining values at the end of |src|. ++ for (; i < len; ++i) { ++ result.first *= weight_prev; ++ const float sample = src[i]; ++ const float sample_squared = sample * sample; ++ result.first += sample_squared * smoothing_factor; ++ result.second = std::max(result.second, sample_squared); ++ } ++ ++ return result; ++} ++ ++} // namespace vector_math ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-01-16 23:07:30.073547045 +0100 +@@ -81,16 +81,11 @@ + #include + #include + ++#include "base/cpu.h" + #include "base/logging.h" + +-#if defined(ARCH_CPU_X86_FAMILY) +-#include +-#define CONVOLVE_FUNC Convolve_SSE +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include +-#define CONVOLVE_FUNC Convolve_NEON +-#else +-#define CONVOLVE_FUNC Convolve_C + #endif + + namespace media { +@@ -111,10 +106,41 @@ + return sinc_scale_factor; + } + ++#undef CONVOLVE_FUNC ++ + static int CalculateChunkSize(int block_size_, double io_ratio) { + return block_size_ / io_ratio; + } + ++// If we know the minimum architecture at compile time, avoid CPU detection. ++// Force NaCl code to use C routines since (at present) nothing there uses these ++// methods and plumbing the -msse built library is non-trivial. ++#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(__SSE__) ++#define CONVOLVE_FUNC Convolve_SSE ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// X86 CPU detection required. Functions will be set by ++// InitializeCPUSpecificFeatures(). ++#define CONVOLVE_FUNC g_convolve_proc_ ++ ++typedef float (*ConvolveProc)(const float*, const float*, const float*, double); ++static ConvolveProc g_convolve_proc_ = NULL; ++ ++void SincResampler::InitializeCPUSpecificFeatures() { ++ CHECK(!g_convolve_proc_); ++ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; ++} ++#endif ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define CONVOLVE_FUNC Convolve_NEON ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// Unknown architecture. ++#define CONVOLVE_FUNC Convolve_C ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#endif ++ + SincResampler::SincResampler(double io_sample_rate_ratio, + int request_frames, + const ReadCB& read_cb) +@@ -342,46 +368,7 @@ + kernel_interpolation_factor * sum2); + } + +-#if defined(ARCH_CPU_X86_FAMILY) +-float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, +- const float* k2, +- double kernel_interpolation_factor) { +- __m128 m_input; +- __m128 m_sums1 = _mm_setzero_ps(); +- __m128 m_sums2 = _mm_setzero_ps(); +- +- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling +- // these loops hurt performance in local testing. +- if (reinterpret_cast(input_ptr) & 0x0F) { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_loadu_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } else { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_load_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } +- +- // Linearly interpolate the two "convolutions". +- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( +- static_cast(1.0 - kernel_interpolation_factor))); +- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( +- static_cast(kernel_interpolation_factor))); +- m_sums1 = _mm_add_ps(m_sums1, m_sums2); +- +- // Sum components together. +- float result; +- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); +- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( +- m_sums2, m_sums2, 1))); +- +- return result; +-} +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, + const float* k2, + double kernel_interpolation_factor) { +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-01-16 23:07:30.092547149 +0100 +@@ -34,6 +34,10 @@ + kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), + }; + ++ // Selects runtime specific CPU features like SSE. Must be called before ++ // using SincResampler. ++ static void InitializeCPUSpecificFeatures(); ++ + // Callback type for providing more data into the resampler. Expects |frames| + // of data to be rendered into |destination|; zero padded if not enough frames + // are available to satisfy the request. +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-01-16 23:07:30.093547154 +0100 +@@ -4,6 +4,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/time/time.h" + #include "media/base/sinc_resampler.h" + #include "testing/gmock/include/gmock/gmock.h" +@@ -60,6 +61,9 @@ + &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); + + #if defined(CONVOLVE_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + RunConvolveBenchmark( + &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); + RunConvolveBenchmark( +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-01-16 23:07:30.095547165 +0100 +@@ -9,6 +9,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/strings/string_number_conversions.h" + #include "base/time/time.h" + #include "build/build_config.h" +@@ -163,6 +164,10 @@ + static const double kKernelInterpolationFactor = 0.5; + + TEST(SincResamplerTest, Convolve) { ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif ++ + // Initialize a dummy resampler. + MockSource mock_source; + SincResampler resampler( +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-01-16 23:07:30.097547176 +0100 +@@ -7,12 +7,17 @@ + + #include + ++#include "base/cpu.h" + #include "base/logging.h" + #include "build/build_config.h" + ++namespace media { ++namespace vector_math { ++ ++// If we know the minimum architecture at compile time, avoid CPU detection. + // NaCl does not allow intrinsics. + #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-#include ++#if defined(__SSE__) + // Don't use custom SSE versions where the auto-vectorized C version performs + // better, which is anywhere clang is used. + #if !defined(__clang__) +@@ -23,20 +28,52 @@ + #define FMUL_FUNC FMUL_C + #endif + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++void Initialize() {} ++#else ++// X86 CPU detection required. Functions will be set by Initialize(). ++#if !defined(__clang__) ++#define FMAC_FUNC g_fmac_proc_ ++#define FMUL_FUNC g_fmul_proc_ ++#else ++#define FMAC_FUNC FMAC_C ++#define FMUL_FUNC FMUL_C ++#endif ++#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ ++ ++#if !defined(__clang__) ++typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); ++static MathProc g_fmac_proc_ = NULL; ++static MathProc g_fmul_proc_ = NULL; ++#endif ++typedef std::pair (*EWMAAndMaxPowerProc)( ++ float initial_value, const float src[], int len, float smoothing_factor); ++static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; ++ ++void Initialize() { ++ CHECK(!g_fmac_proc_); ++ CHECK(!g_fmul_proc_); ++ CHECK(!g_ewma_power_proc_); ++ const bool kUseSSE = base::CPU().has_sse(); ++#if !defined(__clang__) ++ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; ++ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; ++#endif ++ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; ++} ++#endif + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include + #define FMAC_FUNC FMAC_NEON + #define FMUL_FUNC FMUL_NEON + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++void Initialize() {} + #else + #define FMAC_FUNC FMAC_C + #define FMUL_FUNC FMUL_C + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C ++void Initialize() {} + #endif + +-namespace media { +-namespace vector_math { +- + void FMAC(const float src[], float scale, int len, float dest[]) { + // Ensure |src| and |dest| are 16-byte aligned. + DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); +@@ -89,111 +126,6 @@ + return result; + } + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-void FMUL_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) +- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] = src[i] * scale; +-} +- +-void FMAC_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) { +- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), +- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); +- } +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] += src[i] * scale; +-} +- +-// Convenience macro to extract float 0 through 3 from the vector |a|. This is +-// needed because compilers other than clang don't support access via +-// operator[](). +-#define EXTRACT_FLOAT(a, i) \ +- (i == 0 ? \ +- _mm_cvtss_f32(a) : \ +- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) +- +-std::pair EWMAAndMaxPower_SSE( +- float initial_value, const float src[], int len, float smoothing_factor) { +- // When the recurrence is unrolled, we see that we can split it into 4 +- // separate lanes of evaluation: +- // +- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) +- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... +- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- // +- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... +- // +- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in +- // each of the 4 lanes, and then combine them to give y[n]. +- +- const int rem = len % 4; +- const int last_index = len - rem; +- +- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); +- const float weight_prev = 1.0f - smoothing_factor; +- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); +- const __m128 weight_prev_squared_x4 = +- _mm_mul_ps(weight_prev_x4, weight_prev_x4); +- const __m128 weight_prev_4th_x4 = +- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); +- +- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and +- // 0, respectively. +- __m128 max_x4 = _mm_setzero_ps(); +- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); +- int i; +- for (i = 0; i < last_index; i += 4) { +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); +- const __m128 sample_x4 = _mm_load_ps(src + i); +- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); +- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); +- // Note: The compiler optimizes this to a single multiply-and-accumulate +- // instruction: +- ewma_x4 = _mm_add_ps(ewma_x4, +- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); +- } +- +- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- float ewma = EXTRACT_FLOAT(ewma_x4, 3); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 2); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 1); +- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 0); +- +- // Fold the maximums together to get the overall maximum. +- max_x4 = _mm_max_ps(max_x4, +- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); +- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); +- +- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); +- +- // Handle remaining values at the end of |src|. +- for (; i < len; ++i) { +- result.first *= weight_prev; +- const float sample = src[i]; +- const float sample_squared = sample * sample; +- result.first += sample_squared * smoothing_factor; +- result.second = std::max(result.second, sample_squared); +- } +- +- return result; +-} +-#endif +- + #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + void FMAC_NEON(const float src[], float scale, int len, float dest[]) { + const int rem = len % 4; +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-01-16 23:07:30.109547241 +0100 +@@ -15,6 +15,11 @@ + // Required alignment for inputs and outputs to all vector math functions + enum { kRequiredAlignment = 16 }; + ++// Selects runtime specific optimizations such as SSE. Must be called prior to ++// calling FMAC() or FMUL(). Called during media library initialization; most ++// users should never have to call this. ++MEDIA_EXPORT void Initialize(); ++ + // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. + // |src| and |dest| must be aligned by kRequiredAlignment. + MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-01-16 23:07:30.125547329 +0100 +@@ -2,6 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/memory/scoped_ptr.h" + #include "base/time/time.h" +@@ -79,15 +80,11 @@ + DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); + }; + +-// Define platform dependent function names for SIMD optimized methods. ++// Define platform independent function name for FMAC* perf tests. + #if defined(ARCH_CPU_X86_FAMILY) + #define FMAC_FUNC FMAC_SSE +-#define FMUL_FUNC FMUL_SSE +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #define FMAC_FUNC FMAC_NEON +-#define FMUL_FUNC FMUL_NEON +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON + #endif + + // Benchmark for each optimized vector_math::FMAC() method. +@@ -96,6 +93,9 @@ + RunBenchmark( + vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); + #if defined(FMAC_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMAC_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -109,12 +109,24 @@ + #endif + } + ++#undef FMAC_FUNC ++ ++// Define platform independent function name for FMULBenchmark* tests. ++#if defined(ARCH_CPU_X86_FAMILY) ++#define FMUL_FUNC FMUL_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define FMUL_FUNC FMUL_NEON ++#endif ++ + // Benchmark for each optimized vector_math::FMUL() method. + TEST_F(VectorMathPerfTest, FMUL) { + // Benchmark FMUL_C(). + RunBenchmark( + vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); + #if defined(FMUL_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMUL_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -128,6 +140,14 @@ + #endif + } + ++#undef FMUL_FUNC ++ ++#if defined(ARCH_CPU_X86_FAMILY) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++#endif ++ + // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. + TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { + // Benchmark EWMAAndMaxPower_C(). +@@ -136,6 +156,9 @@ + "vector_math_ewma_and_max_power", + "unoptimized"); + #if defined(EWMAAndMaxPower_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -153,4 +176,6 @@ + #endif + } + ++#undef EWMAAndMaxPower_FUNC ++ + } // namespace media +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_testing.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-01-16 23:07:30.133547372 +0100 +@@ -19,7 +19,7 @@ + MEDIA_EXPORT std::pair EWMAAndMaxPower_C( + float initial_value, const float src[], int len, float smoothing_factor); + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(ARCH_CPU_X86_FAMILY) + MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, + float dest[]); + MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-01-16 23:07:30.146547443 +0100 +@@ -6,6 +6,7 @@ + #define _USE_MATH_DEFINES + #include + ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/memory/scoped_ptr.h" + #include "base/strings/string_number_conversions.h" +@@ -75,6 +76,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMAC_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMAC_SSE( +@@ -116,6 +118,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMUL_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMUL_SSE( +@@ -224,6 +227,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("EWMAAndMaxPower_SSE"); + const std::pair& result = vector_math::EWMAAndMaxPower_SSE( + initial_value_, data_.get(), data_len_, smoothing_factor_); +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-01-16 23:07:30.147547448 +0100 +@@ -29,7 +29,7 @@ + #include "media/base/simd/convert_yuv_to_rgb.h" + #include "media/base/simd/filter_yuv.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) && defined(__MMX__) + #if defined(COMPILER_MSVC) + #include + #else +@@ -133,7 +133,7 @@ + + // Empty SIMD registers state after using them. + void EmptyRegisterStateStub() {} +-#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) + void EmptyRegisterStateIntrinsic() { _mm_empty(); } + #endif + typedef void (*EmptyRegisterStateProc)(); +@@ -247,34 +247,46 @@ + // Assembly code confuses MemorySanitizer. Also not available in iOS builds. + #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ + !defined(OS_IOS) +- g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; ++ base::CPU cpu; ++ if (cpu.has_mmx()) { ++ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; ++ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; ++ g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; + + #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) +- g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; ++ g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; ++#endif ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) ++ g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; + #else +- g_empty_register_state_proc_ = EmptyRegisterState_MMX; ++ g_empty_register_state_proc_ = EmptyRegisterState_MMX; + #endif ++ } + +- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; +- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; ++ if (cpu.has_sse()) { ++ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; ++ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; ++ } + +- g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; +- g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; ++ if (cpu.has_sse2()) { ++ g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; ++ g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; + + #if defined(ARCH_CPU_X86_64) +- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; + +- // Technically this should be in the MMX section, but MSVC will optimize out +- // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit +- // tests, if that decision can be made at compile time. Since all X64 CPUs +- // have SSE2, we can hack around this by making the selection here. +- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; +-#else +- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; +- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; ++ // Technically this should be in the MMX section, but MSVC will optimize out ++ // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit ++ // tests, if that decision can be made at compile time. Since all X64 CPUs ++ // have SSE2, we can hack around this by making the selection here. ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; + #endif ++ } + +- base::CPU cpu; + if (cpu.has_ssse3()) { + g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-01-16 23:07:30.148547454 +0100 +@@ -64,6 +64,31 @@ + DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); + }; + ++TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ ConvertYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ } ++ } ++ double total_time_seconds = ++ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++ ++ media::EmptyRegisterState(); ++} ++ + TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -87,9 +112,33 @@ + media::EmptyRegisterState(); + } + +-// 64-bit release + component builds on Windows are too smart and optimizes +-// away the function being tested. +-#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) ++TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ const int kSourceDx = 80000; // This value means a scale down. ++ ++ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ ScaleYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ } ++ } ++ double total_time_seconds = ++ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++ media::EmptyRegisterState(); ++} ++ + TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -116,6 +165,33 @@ + media::EmptyRegisterState(); + } + ++TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ const int kSourceDx = 80000; // This value means a scale down. ++ ++ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ LinearScaleYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ } ++ } ++ double total_time_seconds = ++ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++ media::EmptyRegisterState(); ++} ++ + TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -141,7 +217,6 @@ + kPerfTestIterations / total_time_seconds, "runs/s", true); + media::EmptyRegisterState(); + } +-#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) + + #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-01-16 23:07:30.149547459 +0100 +@@ -658,6 +658,37 @@ + EXPECT_EQ(0, error); + } + ++TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ ConvertYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ ConvertYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -689,9 +720,40 @@ + kWidth * kBpp)); + } + +-// 64-bit release + component builds on Windows are too smart and optimizes +-// away the function being tested. +-#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) ++TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ const int kSourceDx = 80000; // This value means a scale down. ++ ScaleYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ ScaleYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -726,6 +788,40 @@ + kWidth * kBpp)); + } + ++TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ const int kSourceDx = 80000; // This value means a scale down. ++ LinearScaleYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -759,7 +855,6 @@ + rgb_bytes_converted.get(), + kWidth * kBpp)); + } +-#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) + + TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { + scoped_ptr src(new uint8[16]); +@@ -776,6 +871,30 @@ + } + } + ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr src(new uint8[16]); ++ scoped_ptr dst(new uint8[16]); ++ ++ memset(src.get(), 0xff, 16); ++ memset(dst.get(), 0, 16); ++ ++ media::FilterYUVRows_MMX(dst.get(), src.get(), src.get(), 1, 255); ++ media::EmptyRegisterState(); ++ ++ EXPECT_EQ(255u, dst[0]); ++ for (int i = 1; i < 16; ++i) { ++ EXPECT_EQ(0u, dst[i]); ++ } ++} ++#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++ + TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { + base::CPU cpu; + if (!cpu.has_sse2()) { +@@ -797,6 +916,38 @@ + } + } + ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ const int kSize = 32; ++ scoped_ptr src(new uint8[kSize]); ++ scoped_ptr dst_sample(new uint8[kSize]); ++ scoped_ptr dst(new uint8[kSize]); ++ ++ memset(dst_sample.get(), 0, kSize); ++ memset(dst.get(), 0, kSize); ++ for (int i = 0; i < kSize; ++i) ++ src[i] = 100 + i; ++ ++ media::FilterYUVRows_C(dst_sample.get(), ++ src.get(), src.get(), 17, 128); ++ ++ // Generate an unaligned output address. ++ uint8* dst_ptr = ++ reinterpret_cast( ++ (reinterpret_cast(dst.get() + 8) & ~7) + 1); ++ media::FilterYUVRows_MMX(dst_ptr, src.get(), src.get(), 17, 128); ++ media::EmptyRegisterState(); ++ ++ EXPECT_EQ(0, memcmp(dst_sample.get(), dst_ptr, 17)); ++} ++#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++ + TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { + base::CPU cpu; + if (!cpu.has_sse2()) { +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-01-16 23:07:30.180547628 +0100 +@@ -747,6 +747,26 @@ + deps = [ + "//base", + ] ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":shared_memory_support_sse", ++ ] ++ } ++} ++ ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("shared_memory_support_sse") { ++ sources = [ ++ "base/simd/vector_math_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } + } + + if (media_use_ffmpeg) { +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/media.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-01-16 23:07:30.218547835 +0100 +@@ -1053,12 +1053,12 @@ + ['target_arch=="ia32" or target_arch=="x64"', { + 'dependencies': [ + 'media_asm', ++ 'media_mmx', ++ 'media_sse', ++ 'media_sse2', + ], + 'sources': [ +- 'base/simd/convert_rgb_to_yuv_sse2.cc', +- 'base/simd/convert_rgb_to_yuv_ssse3.cc', + 'base/simd/convert_yuv_to_rgb_x86.cc', +- 'base/simd/filter_yuv_sse2.cc', + ], + }], + ['OS!="linux" and OS!="win"', { +@@ -1572,6 +1572,11 @@ + 'USE_NEON' + ], + }], ++ ['target_arch=="ia32" or target_arch=="x64"', { ++ 'dependencies': [ ++ 'shared_memory_support_sse' ++ ], ++ }], + ], + }, + ], +@@ -1583,6 +1588,7 @@ + 'type': 'static_library', + 'sources': [ + 'base/simd/convert_rgb_to_yuv_ssse3.asm', ++ 'base/simd/convert_yuv_to_rgb_mmx.asm', + 'base/simd/convert_yuv_to_rgb_sse.asm', + 'base/simd/convert_yuva_to_argb_mmx.asm', + 'base/simd/empty_register_state_mmx.asm', +@@ -1663,6 +1669,75 @@ + '../third_party/yasm/yasm_compile.gypi', + ], + }, ++ { ++ # GN version: //media/base:media_mmx ++ 'target_name': 'media_mmx', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-mmmx', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/filter_yuv_mmx.cc', ++ ], ++ }, ++ { ++ # GN version: //media/base:media_sse ++ 'target_name': 'media_sse', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/sinc_resampler_sse.cc', ++ ], ++ }, ++ { ++ # GN version: //media/base:media_sse2 ++ 'target_name': 'media_sse2', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse2', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/convert_rgb_to_yuv_sse2.cc', ++ 'base/simd/convert_rgb_to_yuv_ssse3.cc', ++ 'base/simd/filter_yuv_sse2.cc', ++ ], ++ }, ++ { ++ 'target_name': 'shared_memory_support_sse', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/vector_math_sse.cc', ++ ], ++ }, + ], # targets + }], + ['OS=="android"', { +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-01-16 23:07:30.230547901 +0100 +@@ -300,12 +300,6 @@ + "ext/skia_utils_win.cc", + ] + +- if (current_cpu == "x86" || current_cpu == "x64") { +- sources += [ "ext/convolver_SSE2.cc" ] +- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { +- sources += [ "ext/convolver_mips_dspr2.cc" ] +- } +- + # The skia gypi values are relative to the skia_dir, so we need to rebase. + sources += gypi_skia_core.sources + sources += gypi_skia_effects.sources +@@ -532,7 +526,15 @@ + ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- sources = gypi_skia_opts.sse2_sources ++ sources = gypi_skia_opts.sse2_sources + ++ [ ++ # Chrome-specific. ++ "ext/convolver_SSE2.cc", ++ "ext/convolver_SSE2.h", ++ ] ++ if (!is_win || is_clang) { ++ cflags += [ "-msse2" ] ++ } + deps += [ + ":skia_opts_sse3", + ":skia_opts_sse4", +@@ -562,6 +564,13 @@ + + if (mips_dsp_rev >= 1) { + sources = gypi_skia_opts.mips_dsp_sources ++ if (mips_dsp_rev >= 2) { ++ sources += [ ++ # Chrome-specific. ++ "ext/convolver_mips_dspr2.cc", ++ "ext/convolver_mips_dspr2.h", ++ ] ++ } + } else { + sources = gypi_skia_opts.none_sources + } +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-01-16 23:07:30.249548004 +0100 +@@ -362,10 +362,13 @@ + + void SetupSIMD(ConvolveProcs *procs) { + #ifdef SIMD_SSE2 +- procs->extra_horizontal_reads = 3; +- procs->convolve_vertically = &ConvolveVertically_SSE2; +- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; +- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ base::CPU cpu; ++ if (cpu.has_sse2()) { ++ procs->extra_horizontal_reads = 3; ++ procs->convolve_vertically = &ConvolveVertically_SSE2; ++ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; ++ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ } + #elif defined SIMD_MIPS_DSPR2 + procs->extra_horizontal_reads = 3; + procs->convolve_vertically = &ConvolveVertically_mips_dspr2; +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-01-16 23:07:30.256548042 +0100 +@@ -9,6 +9,7 @@ + #include + + #include "base/basictypes.h" ++#include "base/cpu.h" + #include "third_party/skia/include/core/SkSize.h" + #include "third_party/skia/include/core/SkTypes.h" + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_chrome.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-01-16 23:07:30.267548102 +0100 +@@ -9,6 +9,7 @@ + { + 'dependencies': [ + 'skia_library', ++ 'skia_chrome_opts', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + ], +@@ -60,22 +61,16 @@ + 'ext/skia_utils_base.cc', + ], + }], ++ ['OS == "ios"', { ++ 'dependencies!': [ ++ 'skia_chrome_opts', ++ ], ++ }], + [ 'OS != "android" and (OS != "linux" or use_cairo==1)', { + 'sources!': [ + 'ext/bitmap_platform_device_skia.cc', + ], + }], +- [ 'OS != "ios" and target_arch != "arm" and target_arch != "mipsel" and \ +- target_arch != "arm64" and target_arch != "mips64el"', { +- 'sources': [ +- 'ext/convolver_SSE2.cc', +- ], +- }], +- [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ +- 'sources': [ +- 'ext/convolver_mips_dspr2.cc', +- ], +- }], + ], + + 'target_conditions': [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-01-16 23:07:30.267548102 +0100 +@@ -91,6 +91,37 @@ + # targets that are not dependent upon the component type + 'targets': [ + { ++ 'target_name': 'skia_chrome_opts', ++ 'type': 'static_library', ++ 'include_dirs': [ ++ '..', ++ 'config', ++ '../third_party/skia/include/core', ++ ], ++ 'conditions': [ ++ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ ++ target_arch != "arm" and target_arch != "mipsel" and \ ++ target_arch != "arm64" and target_arch != "mips64el"', { ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ [ 'target_arch != "arm" and target_arch != "mipsel" and \ ++ target_arch != "arm64" and target_arch != "mips64el"', { ++ 'sources': [ ++ 'ext/convolver_SSE2.cc', ++ 'ext/convolver_SSE2.h', ++ ], ++ }], ++ [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ ++ 'sources': [ ++ 'ext/convolver_mips_dspr2.cc', ++ 'ext/convolver_mips_dspr2.h', ++ ], ++ }], ++ ], ++ }, ++ { + 'target_name': 'image_operations_bench', + 'type': 'executable', + 'dependencies': [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_library_opts.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-01-16 23:07:30.268548108 +0100 +@@ -18,10 +18,22 @@ + }, + + 'targets': [ +- # SSE files have to be built in a separate target, because gcc needs +- # different -msse flags for different SSE levels which enable use of SSE +- # intrinsics but also allow emission of SSE2 instructions for scalar code. +- # gyp does not allow per-file compiler flags. ++ # Due to an unfortunate intersection of lameness between gcc and gyp, ++ # we have to build the *_SSE2.cpp files in a separate target. The ++ # gcc lameness is that, in order to compile SSE2 intrinsics code, it ++ # must be passed the -msse2 flag. However, with this flag, it may ++ # emit SSE2 instructions even for scalar code, such as the CPUID ++ # test used to test for the presence of SSE2. So that, and all other ++ # code must be compiled *without* -msse2. The gyp lameness is that it ++ # does not allow file-specific CFLAGS, so we must create this extra ++ # target for those files to be compiled with -msse2. ++ # ++ # This is actually only a problem on 32-bit Linux (all Intel Macs have ++ # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit ++ # SSE2 from instrinsics, which generating plain ol' 386 for everything ++ # else). However, to keep the .gyp file simple and avoid platform-specific ++ # build breakage, we do this on all platforms. ++ + # For about the same reason, we need to compile the ARM opts files + # separately as well. + { +@@ -37,12 +49,13 @@ + ], + 'include_dirs': [ '<@(include_dirs)' ], + 'conditions': [ ++ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ ++ target_arch != "arm" and target_arch != "arm64" and \ ++ target_arch != "mipsel" and target_arch != "mips64el"', { ++ 'cflags': [ '-msse2' ], ++ }], + [ 'target_arch != "arm" and target_arch != "mipsel" and \ + target_arch != "arm64" and target_arch != "mips64el"', { +- # Chrome builds with -msse2 locally, so sse2_sources could in theory +- # be in the regular skia target. But we need skia_opts for arm +- # anyway, so putting sse2_sources here is simpler than making this +- # conditionally a type none target on x86. + 'sources': [ '<@(sse2_sources)' ], + 'dependencies': [ + 'skia_opts_ssse3', +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-01-16 23:07:30.275548146 +0100 +@@ -26,8 +26,8 @@ + public_configs = [ ":qcms_config" ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- defines = [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines = [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ "qcms_sse2" ] + } + + if (is_win) { +@@ -37,3 +37,15 @@ + ] + } + } ++ ++source_set("qcms_sse2") { ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] ++ public_configs = [ ":qcms_config" ] ++ ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ defines = [ "SSE2_ENABLE" ] ++ sources = [ "src/transform-sse2.c" ] ++ cflags = [ "-msse2" ] ++ } ++} +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-01-16 23:07:30.276548151 +0100 +@@ -33,10 +33,10 @@ + 'conditions': [ + ['target_arch=="ia32" or target_arch=="x64"', { + 'defines': [ +- 'SSE2_ENABLE', ++ 'SSE2_ENABLE', # runtime detection + ], +- 'sources': [ +- 'src/transform-sse2.c', ++ 'dependencies': [ ++ 'qcms_sse2', + ], + }], + ['OS == "win"', { +@@ -47,6 +47,29 @@ + }], + ], + }, ++ { ++ 'target_name': 'qcms_sse2', ++ 'type': 'static_library', ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'SSE2_ENABLE', ++ ], ++ 'sources': [ ++ # Conditional compilation for SSE2 code on x86 and x64 machines ++ 'src/transform-sse2.c', ++ ], ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ ], ++ 'direct_dependent_settings': { ++ 'include_dirs': [ ++ './src', ++ ], ++ }, ++ }, + ], + } + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-01-16 23:31:06.896257072 +0100 +@@ -5,7 +5,7 @@ + #ifndef WebGLImageConversionSSE_h + #define WebGLImageConversionSSE_h + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + + #include + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-01-16 23:31:18.793321790 +0100 +@@ -422,7 +422,7 @@ + const uint32_t* source32 = reinterpret_cast_ptr(source); + uint32_t* destination32 = reinterpret_cast_ptr(destination); + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); + #endif + for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -623,7 +623,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); + #endif + for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -731,7 +731,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); + #else + for (unsigned i = 0; i < pixelsPerRow; ++i) { +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-01-16 23:41:41.886711319 +0100 +@@ -14,6 +14,7 @@ + #include "webrtc/common_audio/real_fourier_ooura.h" + #include "webrtc/common_audio/real_fourier_openmax.h" + #include "webrtc/common_audio/signal_processing/include/spl_inl.h" ++#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h" + + namespace webrtc { + +@@ -23,6 +24,10 @@ + + rtc::scoped_ptr RealFourier::Create(int fft_order) { + #if defined(RTC_USE_OPENMAX_DL) ++#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) ++ // x86 CPU detection required. ++ if (WebRtc_GetCPUInfo(kSSE2)) ++#endif + return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); + #else + return rtc::scoped_ptr(new RealFourierOoura(fft_order)); +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 +@@ -94,6 +94,9 @@ + 'use_goma%': 0, + 'gomadir%': '', + 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'v8_target_arch%': 'x87', ++ }], + # Set default gomadir. + ['OS=="win"', { + 'gomadir': 'c:\\goma\\goma-win', +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 +@@ -93,6 +93,9 @@ + 'binutils_dir%': '', + + 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'v8_target_arch%': 'x87', ++ }], + ['OS=="linux" and host_arch=="x64"', { + 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', + }], +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 +@@ -1135,41 +1135,41 @@ + + if (v8_target_arch == "x86") { + sources += [ +- "src/ia32/assembler-ia32-inl.h", +- "src/ia32/assembler-ia32.cc", +- "src/ia32/assembler-ia32.h", +- "src/ia32/builtins-ia32.cc", +- "src/ia32/code-stubs-ia32.cc", +- "src/ia32/code-stubs-ia32.h", +- "src/ia32/codegen-ia32.cc", +- "src/ia32/codegen-ia32.h", +- "src/ia32/cpu-ia32.cc", +- "src/ia32/debug-ia32.cc", +- "src/ia32/deoptimizer-ia32.cc", +- "src/ia32/disasm-ia32.cc", +- "src/ia32/frames-ia32.cc", +- "src/ia32/frames-ia32.h", +- "src/ia32/full-codegen-ia32.cc", +- "src/ia32/interface-descriptors-ia32.cc", +- "src/ia32/lithium-codegen-ia32.cc", +- "src/ia32/lithium-codegen-ia32.h", +- "src/ia32/lithium-gap-resolver-ia32.cc", +- "src/ia32/lithium-gap-resolver-ia32.h", +- "src/ia32/lithium-ia32.cc", +- "src/ia32/lithium-ia32.h", +- "src/ia32/macro-assembler-ia32.cc", +- "src/ia32/macro-assembler-ia32.h", +- "src/ia32/regexp-macro-assembler-ia32.cc", +- "src/ia32/regexp-macro-assembler-ia32.h", +- "src/compiler/ia32/code-generator-ia32.cc", +- "src/compiler/ia32/instruction-codes-ia32.h", +- "src/compiler/ia32/instruction-selector-ia32.cc", +- "src/compiler/ia32/linkage-ia32.cc", +- "src/ic/ia32/access-compiler-ia32.cc", +- "src/ic/ia32/handler-compiler-ia32.cc", +- "src/ic/ia32/ic-ia32.cc", +- "src/ic/ia32/ic-compiler-ia32.cc", +- "src/ic/ia32/stub-cache-ia32.cc", ++ "src/x87/assembler-x87-inl.h", ++ "src/x87/assembler-x87.cc", ++ "src/x87/assembler-x87.h", ++ "src/x87/builtins-x87.cc", ++ "src/x87/code-stubs-x87.cc", ++ "src/x87/code-stubs-x87.h", ++ "src/x87/codegen-x87.cc", ++ "src/x87/codegen-x87.h", ++ "src/x87/cpu-x87.cc", ++ "src/x87/debug-x87.cc", ++ "src/x87/deoptimizer-x87.cc", ++ "src/x87/disasm-x87.cc", ++ "src/x87/frames-x87.cc", ++ "src/x87/frames-x87.h", ++ "src/x87/full-codegen-x87.cc", ++ "src/x87/interface-descriptors-x87.cc", ++ "src/x87/lithium-codegen-x87.cc", ++ "src/x87/lithium-codegen-x87.h", ++ "src/x87/lithium-gap-resolver-x87.cc", ++ "src/x87/lithium-gap-resolver-x87.h", ++ "src/x87/lithium-x87.cc", ++ "src/x87/lithium-x87.h", ++ "src/x87/macro-assembler-x87.cc", ++ "src/x87/macro-assembler-x87.h", ++ "src/x87/regexp-macro-assembler-x87.cc", ++ "src/x87/regexp-macro-assembler-x87.h", ++ "src/compiler/x87/code-generator-x87.cc", ++ "src/compiler/x87/instruction-codes-x87.h", ++ "src/compiler/x87/instruction-selector-x87.cc", ++ "src/compiler/x87/linkage-x87.cc", ++ "src/ic/x87/access-compiler-x87.cc", ++ "src/ic/x87/handler-compiler-x87.cc", ++ "src/ic/x87/ic-x87.cc", ++ "src/ic/x87/ic-compiler-x87.cc", ++ "src/ic/x87/stub-cache-x87.cc", + ] + } else if (v8_target_arch == "x64") { + sources += [ From 3bd7f659f736818b84dd073db790c087c24e6307 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 00:54:00 +0100 Subject: [PATCH 031/437] no-sse2.patch: Fix an FTBFS in the gyp changes --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 40 +++---------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 03369f4..af66488 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -35,20 +35,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/s '-m32', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-16 23:07:29.866545917 +0100 -@@ -198,6 +198,11 @@ - 'mips_dsp_rev%': 0, - - 'conditions': [ -+ ['target_arch=="ia32"', { -+ # Do not assume SSE2 by default (Fedora patch). -+ 'disable_sse2%': 1, -+ }], -+ - ['branding == "Chrome"', { - 'branding_path_component%': 'google_chrome', - }], -@@ -3901,21 +3906,28 @@ ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-17 00:35:41.821192830 +0100 +@@ -3901,16 +3901,12 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is # always kept in its specified precision. @@ -62,29 +50,13 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/comm - '-mfpmath=sse', - '-mmmx', # Allows mmintrin.h for MMX intrinsics. '-m32', ++ # Refer to http://crbug.com/348761 for rationale and ++ # http://crbug.com/313032 for an example where the x87 ++ # floating-point precision issue has "bit" us in the past. ++ '-ffloat-store', ], 'ldflags': [ '-m32', - ], - 'conditions': [ -+ ['disable_sse2==0', { -+ 'cflags': [ -+ '-msse2', -+ '-mfpmath=sse', -+ '-mmmx', # Allows mmintrin.h for MMX intrinsics. -+ ], -+ }], -+ ['disable_sse2==1', { -+ # Refer to http://crbug.com/348761 for rationale and -+ # http://crbug.com/313032 for an example where the x87 -+ # floating-point precision issue has "bit" us in the past. -+ 'cflags': [ -+ '-ffloat-store', -+ ], -+ }], - # Use gold linker for Android ia32 target. - ['OS=="android"', { - # Use gold linker for Android ia32 target. diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-01-16 23:07:29.918546201 +0100 From 42f26ca168c642debe366e83e737f57c6c66a336 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 02:34:08 +0100 Subject: [PATCH 032/437] no-sse2.patch: remove -ffloat-store, fix DirectConvolver FTBFS * Remove the -ffloat-store workaround: The media player issue that caused problems with x87 floating point (and ultimately made upstream require SSE2) should already be fixed / worked around by: https://crrev.com/d2c745b13c93ecff5108bed57d8e052126715492 So I will only readd -ffloat-store if people request it, and even then, only to specific parts of code and not everything. * Fix src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/ DirectConvolver.cpp to not require SSE2 on x86. (No runtime detection, sorry.) * Update the changelog date in the specfile. --- qt5-qtwebengine.spec | 2 +- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 39 +++++++++++++++---- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2892718..340b443 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -360,7 +360,7 @@ popd %changelog -* Sat Jan 16 2016 Kevin Kofler - 5.6.0-0.13.beta.nosse2.1 +* Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.13.beta.nosse2.1 - Do not require SSE2 on i686 * Thu Jan 14 2016 Kevin Kofler - 5.6.0-0.13.beta diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index af66488..885ffdd 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -35,8 +35,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/s '-m32', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-17 00:35:41.821192830 +0100 -@@ -3901,16 +3901,12 @@ ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-17 01:52:14.440801716 +0100 +@@ -3901,15 +3901,7 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is # always kept in its specified precision. @@ -50,13 +50,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/comm - '-mfpmath=sse', - '-mmmx', # Allows mmintrin.h for MMX intrinsics. '-m32', -+ # Refer to http://crbug.com/348761 for rationale and -+ # http://crbug.com/313032 for an example where the x87 -+ # floating-point precision issue has "bit" us in the past. -+ '-ffloat-store', ], 'ldflags': [ - '-m32', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-01-16 23:07:29.918546201 +0100 @@ -2032,6 +2027,36 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part ], } +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-01-17 01:49:46.706000332 +0100 +@@ -39,7 +39,7 @@ + #include "platform/audio/VectorMath.h" + #include "wtf/CPU.h" + +-#if (CPU(X86) || CPU(X86_64)) && !(OS(MACOSX) || USE(WEBAUDIO_IPP)) ++#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !(OS(MACOSX) || USE(WEBAUDIO_IPP)) + #include + #endif + +@@ -102,7 +102,7 @@ + #endif // CPU(X86) + #else + size_t i = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| + // are multiples of 4. If not, use the straightforward loop below. + +@@ -412,7 +412,7 @@ + } + destP[i++] = sum; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + #endif // OS(MACOSX) diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-01-16 23:31:06.896257072 +0100 From ab696c255066a08b363616683ad80ccb2bf10f9f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 04:30:41 +0100 Subject: [PATCH 033/437] no-sse2.patch: fix audio/VectorMath and audio/SincResampler FTBFS * Fix src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/ SincResampler.cpp and VectorMath.cpp to not require SSE2 on x86 (including runtime detection). * Also add runtime detection for DirectConvolver.cpp. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 605 ++++++++++++++---- 1 file changed, 495 insertions(+), 110 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 885ffdd..0e37e98 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2029,8 +2029,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-01-17 01:49:46.706000332 +0100 -@@ -39,7 +39,7 @@ ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-01-17 03:54:32.399198025 +0100 +@@ -30,6 +30,9 @@ + + #if ENABLE(WEB_AUDIO) + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/DirectConvolver.h" + + #if OS(MACOSX) +@@ -39,14 +42,20 @@ #include "platform/audio/VectorMath.h" #include "wtf/CPU.h" @@ -2039,7 +2049,47 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #include #endif -@@ -102,7 +102,7 @@ ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + namespace blink { + + using namespace VectorMath; + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + DirectConvolver::DirectConvolver(size_t inputBlockSize) + : m_inputBlockSize(inputBlockSize) + #if USE(WEBAUDIO_IPP) +@@ -54,10 +63,26 @@ + #endif // USE(WEBAUDIO_IPP) + , m_buffer(inputBlockSize * 2) + { ++#if CPU(X86) ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) ++#else + void DirectConvolver::process(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) ++#endif + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); ++ return; ++ } ++#endif + ASSERT(framesToProcess == m_inputBlockSize); + if (framesToProcess != m_inputBlockSize) + return; +@@ -102,7 +127,7 @@ #endif // CPU(X86) #else size_t i = 0; @@ -2048,7 +2098,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| // are multiples of 4. If not, use the straightforward loop below. -@@ -412,7 +412,7 @@ +@@ -412,7 +437,7 @@ } destP[i++] = sum; } @@ -2057,6 +2107,447 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part } #endif #endif // OS(MACOSX) +@@ -422,6 +447,8 @@ + #endif + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void DirectConvolver::reset() + { + m_buffer.zero(); +@@ -430,6 +457,8 @@ + #endif // USE(WEBAUDIO_IPP) + } + ++#endif ++ + } // namespace blink + + #endif // ENABLE(WEB_AUDIO) +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-01-17 03:53:25.671839139 +0100 +@@ -31,6 +31,7 @@ + + #include "platform/PlatformExport.h" + #include "platform/audio/AudioArray.h" ++#include "wtf/CPU.h" + + #if USE(WEBAUDIO_IPP) + #include +@@ -53,6 +54,11 @@ + AudioFloatArray m_overlayBuffer; + #endif // USE(WEBAUDIO_IPP) + AudioFloatArray m_buffer; ++ ++#if CPU(x86) ++ bool m_haveSSE2; ++ void m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-01-17 03:28:17.605768226 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "DirectConvolver.cpp" +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-01-17 04:19:56.670378699 +0100 +@@ -30,16 +30,23 @@ + + #if ENABLE(WEB_AUDIO) + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/SincResampler.h" + + #include "platform/audio/AudioBus.h" + #include "wtf/CPU.h" + #include "wtf/MathExtras.h" + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + // Input buffer layout, dividing the total buffer into regions (r0 - r5): + // + // |----------------|----------------------------------------------------------------|----------------| +@@ -69,6 +76,8 @@ + + namespace blink { + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + SincResampler::SincResampler(double scaleFactor, unsigned kernelSize, unsigned numberOfKernelOffsets) + : m_scaleFactor(scaleFactor) + , m_kernelSize(kernelSize) +@@ -82,6 +91,10 @@ + , m_sourceProvider(nullptr) + , m_isBufferPrimed(false) + { ++#if CPU(X86) ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif + initializeKernel(); + } + +@@ -198,8 +211,20 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) ++#else + void SincResampler::process(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) ++#endif + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_processSSE2(sourceProvider, destination, framesToProcess); ++ return; ++ } ++#endif + bool isGood = sourceProvider && m_blockSize > m_kernelSize && m_inputBuffer.size() >= m_blockSize + m_kernelSize && !(m_kernelSize % 2); + ASSERT(isGood); + if (!isGood) +@@ -261,7 +286,7 @@ + { + float input; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. + while ((reinterpret_cast(inputP) & 0x0F) && n) { + CONVOLVE_ONE_SAMPLE +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-01-17 04:14:30.364630520 +0100 +@@ -32,6 +32,7 @@ + #include "platform/PlatformExport.h" + #include "platform/audio/AudioArray.h" + #include "platform/audio/AudioSourceProvider.h" ++#include "wtf/CPU.h" + + namespace blink { + +@@ -80,6 +81,11 @@ + + // The buffer is primed once at the very beginning of processing. + bool m_isBufferPrimed; ++ ++#if CPU(x86) ++ bool m_haveSSE2; ++ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-01-17 04:10:47.846438382 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "SincResampler.cpp" +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-01-17 03:57:55.479290270 +0100 +@@ -26,6 +26,9 @@ + + #if ENABLE(WEB_AUDIO) + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/VectorMath.h" + #include "wtf/Assertions.h" + #include "wtf/CPU.h" +@@ -35,10 +38,14 @@ + #include + #endif + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + #if HAVE(ARM_NEON_INTRINSICS) + #include + #endif +@@ -121,11 +128,25 @@ + } + #else + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++namespace SSE2 { ++#endif ++ ++#if CPU(X86) && !defined(__SSE2__) ++static base::CPU cpu; ++#endif ++ + void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, destStride, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; + +@@ -196,9 +217,15 @@ + + void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; + +@@ -269,16 +296,22 @@ + sourceP += sourceStride; + destP += destStride; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + } + + void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(source1P) & 0x0F) && n) { +@@ -381,17 +414,23 @@ + source2P += sourceStride2; + destP += destStride; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + } + + void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); ++ return; ++ } ++#endif + + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(source1P) & 0x0F) && n) { +@@ -463,8 +502,14 @@ + + void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, imagDestP, framesToProcess); ++ return; ++ } ++#endif + unsigned i = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. + // Otherwise, fall through to the scalar code below. + if (!(reinterpret_cast(real1P) & 0x0F) +@@ -519,10 +564,16 @@ + + void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + float sum = 0; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(sourceP) & 0x0F) && n) { +@@ -584,10 +635,16 @@ + + void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess) + { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + float max = 0; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(sourceP) & 0x0F) && n) { +@@ -651,6 +708,8 @@ + *maxP = max; + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess) + { + int n = framesToProcess; +@@ -681,6 +740,12 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++} // namespace SSE2 ++#endif ++ + #endif // OS(MACOSX) + + } // namespace VectorMath +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-01-17 03:55:46.329595652 +0100 +@@ -26,6 +26,7 @@ + #define VectorMath_h + + #include "platform/PlatformExport.h" ++#include "wtf/CPU.h" + + // Defines the interface for several vector math functions whose implementation will ideally be optimized. + +@@ -53,6 +54,28 @@ + // Copies elements while clipping values to the threshold inputs. + PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); + ++#if CPU(x86) ++namespace SSE2 { ++// Vector scalar multiply and then add. ++PLATFORM_EXPORT void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess); ++ ++PLATFORM_EXPORT void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess); ++PLATFORM_EXPORT void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess); ++ ++// Finds the maximum magnitude of a float vector. ++PLATFORM_EXPORT void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess); ++ ++// Sums the squares of a float vector's elements. ++PLATFORM_EXPORT void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess); ++ ++// For an element-by-element multiply of two float vectors. ++PLATFORM_EXPORT void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess); ++ ++// Multiplies two complex vectors. ++PLATFORM_EXPORT void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess); ++} ++#endif ++ + } // namespace VectorMath + } // namespace blink + +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-01-17 03:28:28.044824318 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "VectorMath.cpp" +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 04:11:33.579683397 +0100 +@@ -419,6 +419,11 @@ + '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', + ], + }], ++ ['target_arch == "ia32"', { ++ 'dependencies': [ ++ 'blink_sse2', ++ ], ++ }], + ['target_arch=="arm"', { + 'dependencies': [ + 'blink_arm_neon', +@@ -434,6 +439,27 @@ + }], + ], + }, ++ { ++ 'target_name': 'blink_sse2', ++ 'conditions': [ ++ ['target_arch=="ia32", { ++ 'type': 'static_library', ++ 'dependencies': [ ++ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', ++ 'blink_common', ++ ], ++ 'hard_dependency': 1, ++ 'sources': [ ++ 'audio/DirectConvolverSSE2.cpp', ++ 'audio/SincResamplerSSE2.cpp', ++ 'audio/VectorMathSSE2.cpp', ++ ], ++ 'cflags': ['-msse2'], ++ },{ # target_arch != "ia32" ++ 'type': 'none', ++ }], ++ ], ++ }, + # The *NEON.cpp files fail to compile when -mthumb is passed. Force + # them to build in ARM mode. + # See https://bugs.webkit.org/show_bug.cgi?id=62916. diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-01-16 23:31:06.896257072 +0100 @@ -2121,109 +2612,3 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 -@@ -94,6 +94,9 @@ - 'use_goma%': 0, - 'gomadir%': '', - 'conditions': [ -+ ['target_arch=="ia32"', { -+ 'v8_target_arch%': 'x87', -+ }], - # Set default gomadir. - ['OS=="win"', { - 'gomadir': 'c:\\goma\\goma-win', -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 -@@ -93,6 +93,9 @@ - 'binutils_dir%': '', - - 'conditions': [ -+ ['target_arch=="ia32"', { -+ 'v8_target_arch%': 'x87', -+ }], - ['OS=="linux" and host_arch=="x64"', { - 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', - }], -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 -@@ -1135,41 +1135,41 @@ - - if (v8_target_arch == "x86") { - sources += [ -- "src/ia32/assembler-ia32-inl.h", -- "src/ia32/assembler-ia32.cc", -- "src/ia32/assembler-ia32.h", -- "src/ia32/builtins-ia32.cc", -- "src/ia32/code-stubs-ia32.cc", -- "src/ia32/code-stubs-ia32.h", -- "src/ia32/codegen-ia32.cc", -- "src/ia32/codegen-ia32.h", -- "src/ia32/cpu-ia32.cc", -- "src/ia32/debug-ia32.cc", -- "src/ia32/deoptimizer-ia32.cc", -- "src/ia32/disasm-ia32.cc", -- "src/ia32/frames-ia32.cc", -- "src/ia32/frames-ia32.h", -- "src/ia32/full-codegen-ia32.cc", -- "src/ia32/interface-descriptors-ia32.cc", -- "src/ia32/lithium-codegen-ia32.cc", -- "src/ia32/lithium-codegen-ia32.h", -- "src/ia32/lithium-gap-resolver-ia32.cc", -- "src/ia32/lithium-gap-resolver-ia32.h", -- "src/ia32/lithium-ia32.cc", -- "src/ia32/lithium-ia32.h", -- "src/ia32/macro-assembler-ia32.cc", -- "src/ia32/macro-assembler-ia32.h", -- "src/ia32/regexp-macro-assembler-ia32.cc", -- "src/ia32/regexp-macro-assembler-ia32.h", -- "src/compiler/ia32/code-generator-ia32.cc", -- "src/compiler/ia32/instruction-codes-ia32.h", -- "src/compiler/ia32/instruction-selector-ia32.cc", -- "src/compiler/ia32/linkage-ia32.cc", -- "src/ic/ia32/access-compiler-ia32.cc", -- "src/ic/ia32/handler-compiler-ia32.cc", -- "src/ic/ia32/ic-ia32.cc", -- "src/ic/ia32/ic-compiler-ia32.cc", -- "src/ic/ia32/stub-cache-ia32.cc", -+ "src/x87/assembler-x87-inl.h", -+ "src/x87/assembler-x87.cc", -+ "src/x87/assembler-x87.h", -+ "src/x87/builtins-x87.cc", -+ "src/x87/code-stubs-x87.cc", -+ "src/x87/code-stubs-x87.h", -+ "src/x87/codegen-x87.cc", -+ "src/x87/codegen-x87.h", -+ "src/x87/cpu-x87.cc", -+ "src/x87/debug-x87.cc", -+ "src/x87/deoptimizer-x87.cc", -+ "src/x87/disasm-x87.cc", -+ "src/x87/frames-x87.cc", -+ "src/x87/frames-x87.h", -+ "src/x87/full-codegen-x87.cc", -+ "src/x87/interface-descriptors-x87.cc", -+ "src/x87/lithium-codegen-x87.cc", -+ "src/x87/lithium-codegen-x87.h", -+ "src/x87/lithium-gap-resolver-x87.cc", -+ "src/x87/lithium-gap-resolver-x87.h", -+ "src/x87/lithium-x87.cc", -+ "src/x87/lithium-x87.h", -+ "src/x87/macro-assembler-x87.cc", -+ "src/x87/macro-assembler-x87.h", -+ "src/x87/regexp-macro-assembler-x87.cc", -+ "src/x87/regexp-macro-assembler-x87.h", -+ "src/compiler/x87/code-generator-x87.cc", -+ "src/compiler/x87/instruction-codes-x87.h", -+ "src/compiler/x87/instruction-selector-x87.cc", -+ "src/compiler/x87/linkage-x87.cc", -+ "src/ic/x87/access-compiler-x87.cc", -+ "src/ic/x87/handler-compiler-x87.cc", -+ "src/ic/x87/ic-x87.cc", -+ "src/ic/x87/ic-compiler-x87.cc", -+ "src/ic/x87/stub-cache-x87.cc", - ] - } else if (v8_target_arch == "x64") { - sources += [ From 799b5e111827d1036d3f1ab19552df530271e429 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 04:46:25 +0100 Subject: [PATCH 034/437] no-sse2.patch: Fix typos * Fix typo in blink_platform.gyp. * Restore the v8 parts that accidentally went missing. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 108 +++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 0e37e98..3f41ee4 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2527,7 +2527,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part + { + 'target_name': 'blink_sse2', + 'conditions': [ -+ ['target_arch=="ia32", { ++ ['target_arch=="ia32"', { + 'type': 'static_library', + 'dependencies': [ + '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', @@ -2612,3 +2612,109 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 +@@ -94,6 +94,9 @@ + 'use_goma%': 0, + 'gomadir%': '', + 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'v8_target_arch%': 'x87', ++ }], + # Set default gomadir. + ['OS=="win"', { + 'gomadir': 'c:\\goma\\goma-win', +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 +@@ -93,6 +93,9 @@ + 'binutils_dir%': '', + + 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'v8_target_arch%': 'x87', ++ }], + ['OS=="linux" and host_arch=="x64"', { + 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', + }], +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 +@@ -1135,41 +1135,41 @@ + + if (v8_target_arch == "x86") { + sources += [ +- "src/ia32/assembler-ia32-inl.h", +- "src/ia32/assembler-ia32.cc", +- "src/ia32/assembler-ia32.h", +- "src/ia32/builtins-ia32.cc", +- "src/ia32/code-stubs-ia32.cc", +- "src/ia32/code-stubs-ia32.h", +- "src/ia32/codegen-ia32.cc", +- "src/ia32/codegen-ia32.h", +- "src/ia32/cpu-ia32.cc", +- "src/ia32/debug-ia32.cc", +- "src/ia32/deoptimizer-ia32.cc", +- "src/ia32/disasm-ia32.cc", +- "src/ia32/frames-ia32.cc", +- "src/ia32/frames-ia32.h", +- "src/ia32/full-codegen-ia32.cc", +- "src/ia32/interface-descriptors-ia32.cc", +- "src/ia32/lithium-codegen-ia32.cc", +- "src/ia32/lithium-codegen-ia32.h", +- "src/ia32/lithium-gap-resolver-ia32.cc", +- "src/ia32/lithium-gap-resolver-ia32.h", +- "src/ia32/lithium-ia32.cc", +- "src/ia32/lithium-ia32.h", +- "src/ia32/macro-assembler-ia32.cc", +- "src/ia32/macro-assembler-ia32.h", +- "src/ia32/regexp-macro-assembler-ia32.cc", +- "src/ia32/regexp-macro-assembler-ia32.h", +- "src/compiler/ia32/code-generator-ia32.cc", +- "src/compiler/ia32/instruction-codes-ia32.h", +- "src/compiler/ia32/instruction-selector-ia32.cc", +- "src/compiler/ia32/linkage-ia32.cc", +- "src/ic/ia32/access-compiler-ia32.cc", +- "src/ic/ia32/handler-compiler-ia32.cc", +- "src/ic/ia32/ic-ia32.cc", +- "src/ic/ia32/ic-compiler-ia32.cc", +- "src/ic/ia32/stub-cache-ia32.cc", ++ "src/x87/assembler-x87-inl.h", ++ "src/x87/assembler-x87.cc", ++ "src/x87/assembler-x87.h", ++ "src/x87/builtins-x87.cc", ++ "src/x87/code-stubs-x87.cc", ++ "src/x87/code-stubs-x87.h", ++ "src/x87/codegen-x87.cc", ++ "src/x87/codegen-x87.h", ++ "src/x87/cpu-x87.cc", ++ "src/x87/debug-x87.cc", ++ "src/x87/deoptimizer-x87.cc", ++ "src/x87/disasm-x87.cc", ++ "src/x87/frames-x87.cc", ++ "src/x87/frames-x87.h", ++ "src/x87/full-codegen-x87.cc", ++ "src/x87/interface-descriptors-x87.cc", ++ "src/x87/lithium-codegen-x87.cc", ++ "src/x87/lithium-codegen-x87.h", ++ "src/x87/lithium-gap-resolver-x87.cc", ++ "src/x87/lithium-gap-resolver-x87.h", ++ "src/x87/lithium-x87.cc", ++ "src/x87/lithium-x87.h", ++ "src/x87/macro-assembler-x87.cc", ++ "src/x87/macro-assembler-x87.h", ++ "src/x87/regexp-macro-assembler-x87.cc", ++ "src/x87/regexp-macro-assembler-x87.h", ++ "src/compiler/x87/code-generator-x87.cc", ++ "src/compiler/x87/instruction-codes-x87.h", ++ "src/compiler/x87/instruction-selector-x87.cc", ++ "src/compiler/x87/linkage-x87.cc", ++ "src/ic/x87/access-compiler-x87.cc", ++ "src/ic/x87/handler-compiler-x87.cc", ++ "src/ic/x87/ic-x87.cc", ++ "src/ic/x87/ic-compiler-x87.cc", ++ "src/ic/x87/stub-cache-x87.cc", + ] + } else if (v8_target_arch == "x64") { + sources += [ From 1e170961f95ed479afe20b67b8cef679d65917b6 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 05:10:15 +0100 Subject: [PATCH 035/437] no-sse2.patch: Fix typos in the patched header files --- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 3f41ee4..76f2bbe 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2141,7 +2141,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #endif // USE(WEBAUDIO_IPP) AudioFloatArray m_buffer; + -+#if CPU(x86) ++#if CPU(X86) + bool m_haveSSE2; + void m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess); +#endif @@ -2248,7 +2248,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part // The buffer is primed once at the very beginning of processing. bool m_isBufferPrimed; + -+#if CPU(x86) ++#if CPU(X86) + bool m_haveSSE2; + void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); +#endif @@ -2474,7 +2474,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part // Copies elements while clipping values to the threshold inputs. PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); -+#if CPU(x86) ++#if CPU(X86) +namespace SSE2 { +// Vector scalar multiply and then add. +PLATFORM_EXPORT void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess); From faeb141b370582f84cb2bef34862f21682b3742f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 06:32:37 +0100 Subject: [PATCH 036/437] no-sse2.patch: Fix/simplify disable_sse2 logic in breakpad/src/build/common.gypi That file is not really used in QtWebEngine anyway, but simply defaulting disable_sse2 to 1 is the right thing. The variable is ignored on everything other than ia32 (i686) anyway, even on x64 (x86_64). And setting conditional defaults might not work as expected in gyp. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 76f2bbe..c08a258 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -1,21 +1,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-01-16 23:07:29.831545727 +0100 -@@ -82,6 +82,13 @@ - - # On Linux, we build with sse2 for Chromium builds. - 'disable_sse2%': 0, -+ -+ 'conditions': [ -+ ['target_arch=="ia32"', { -+ # Do not assume SSE2 by default (Fedora patch). -+ 'disable_sse2%': 1, -+ }], -+ ], ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-01-17 05:53:27.035467092 +0100 +@@ -80,8 +80,8 @@ + # The system root for cross-compiles. Default: none. + 'sysroot%': '', + +- # On Linux, we build with sse2 for Chromium builds. +- 'disable_sse2%': 0, ++ # Do not assume SSE2 by default (Fedora patch). ++ 'disable_sse2%': 1 }, 'target_arch%': '<(target_arch)', -@@ -725,17 +732,13 @@ +@@ -725,17 +725,13 @@ 'conditions': [ ['disable_sse2==0', { 'cflags': [ From 4c9d7b0aba3e1d803f3abafce93024fe3e27c7b3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 19:45:04 +0100 Subject: [PATCH 037/437] no-sse2.patch: try linking with ld.bfd instead of gold I am getting undefined references to symbols that should be defined by an archive linked with -Wl,--whole-archive from gold, which really should not happen. Also the unnecessary hard_dependency in blink_platform.gyp. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index c08a258..447b847 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2124,7 +2124,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #endif // ENABLE(WEB_AUDIO) diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-01-17 03:53:25.671839139 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-01-17 05:08:41.616999374 +0100 @@ -31,6 +31,7 @@ #include "platform/PlatformExport.h" @@ -2231,7 +2231,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part CONVOLVE_ONE_SAMPLE diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-01-17 04:14:30.364630520 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-01-17 05:08:50.305045709 +0100 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2260,7 +2260,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part +#include "SincResampler.cpp" diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-01-17 03:57:55.479290270 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-01-17 04:26:03.720343726 +0100 @@ -26,6 +26,9 @@ #if ENABLE(WEB_AUDIO) @@ -2458,7 +2458,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part } // namespace VectorMath diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-01-17 03:55:46.329595652 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-01-17 05:08:57.296082993 +0100 @@ -26,6 +26,7 @@ #define VectorMath_h @@ -2504,7 +2504,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part +#include "VectorMath.cpp" diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 04:11:33.579683397 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 18:07:04.508443123 +0100 @@ -419,6 +419,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], @@ -2517,7 +2517,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part ['target_arch=="arm"', { 'dependencies': [ 'blink_arm_neon', -@@ -434,6 +439,27 @@ +@@ -434,6 +439,26 @@ }], ], }, @@ -2530,7 +2530,6 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part + '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', + 'blink_common', + ], -+ 'hard_dependency': 1, + 'sources': [ + 'audio/DirectConvolverSSE2.cpp', + 'audio/SincResamplerSSE2.cpp', @@ -2610,8 +2609,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 @@ -94,6 +94,9 @@ 'use_goma%': 0, 'gomadir%': '', @@ -2623,8 +2622,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/s ['OS=="win"', { 'gomadir': 'c:\\goma\\goma-win', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 @@ -93,6 +93,9 @@ 'binutils_dir%': '', @@ -2636,8 +2635,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/t 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', }], diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 @@ -1135,41 +1135,41 @@ if (v8_target_arch == "x86") { @@ -2715,3 +2714,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g ] } else if (v8_target_arch == "x64") { sources += [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro 2016-01-17 19:19:39.093102893 +0100 +@@ -25,6 +25,8 @@ + QMAKE_LFLAGS += /OPT:REF + QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects + } else { ++ # Use ld.bfd instead of gold, which produces undefined references ++ CONFIG -= use_gold_linker + LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive + } + From e24db1777fb6d0db8d1b640943825fd84f89cd0f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jan 2016 22:45:33 +0100 Subject: [PATCH 038/437] no-sse2.patch: Switch back to gold, blink_platform.gyp fixes * Revert the change to force the BFD ld, that was not the issue. * Make some fixes to my blink_sse2 target in blink_platform.gyp: - add missing dependencies to get the needed feature_defines, - add missing target defines, - add -mfpmath=sse in addition to -msse2 because this is floating-point math and we should definitely not do x87 in the SSE2-optimized versions of the functions. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 447b847..c79de58 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2504,7 +2504,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part +#include "VectorMath.cpp" diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 18:07:04.508443123 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 22:38:21.451976078 +0100 @@ -419,6 +419,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], @@ -2517,7 +2517,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part ['target_arch=="arm"', { 'dependencies': [ 'blink_arm_neon', -@@ -434,6 +439,26 @@ +@@ -434,6 +439,37 @@ }], ], }, @@ -2528,14 +2528,25 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part + 'type': 'static_library', + 'dependencies': [ + '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', ++ '../config.gyp:config', ++ '../wtf/wtf.gyp:wtf', + 'blink_common', ++ 'blink_heap_asm_stubs', ++ 'blink_prerequisites', ++ ], ++ 'defines': [ ++ 'BLINK_PLATFORM_IMPLEMENTATION=1', ++ 'INSIDE_BLINK', + ], + 'sources': [ + 'audio/DirectConvolverSSE2.cpp', + 'audio/SincResamplerSSE2.cpp', + 'audio/VectorMathSSE2.cpp', + ], -+ 'cflags': ['-msse2'], ++ 'cflags': [ ++ '-msse2', ++ '-mfpmath=sse', ++ ], + },{ # target_arch != "ia32" + 'type': 'none', + }], @@ -2714,15 +2725,3 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g ] } else if (v8_target_arch == "x64") { sources += [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro 2016-01-17 19:19:39.093102893 +0100 -@@ -25,6 +25,8 @@ - QMAKE_LFLAGS += /OPT:REF - QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects - } else { -+ # Use ld.bfd instead of gold, which produces undefined references -+ CONFIG -= use_gold_linker - LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive - } - From 2684898152d7c0ef22c5d0989cfeea84ed19aee0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jan 2016 00:36:47 +0100 Subject: [PATCH 039/437] Bump Release now that the no-sse2 patch builds and looks good Swappable V8 is still TODO though. --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 340b443..d51faf0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.13.beta.nosse2.1%{?dist} +Release: 0.14.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -360,7 +360,7 @@ popd %changelog -* Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.13.beta.nosse2.1 +* Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.14.beta - Do not require SSE2 on i686 * Thu Jan 14 2016 Kevin Kofler - 5.6.0-0.13.beta From 90225e7e77b11106629ab464d8916e81b7a2c95b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jan 2016 01:10:42 +0100 Subject: [PATCH 040/437] no-sse2.patch: Build V8 as a shared library on i686 * Mon Jan 18 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.1 - Build V8 as a shared library on i686 to allow for swappable backends This is the first prerequisite step towards building both the x87 and SSE2 backends. --- qt5-qtwebengine.spec | 5 +- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 65 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d51faf0..266d4cd 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.14.beta%{?dist} +Release: 0.14.beta.nosse2.1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -360,6 +360,9 @@ popd %changelog +* Mon Jan 18 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.1 +- Build V8 as a shared library on i686 to allow for swappable backends + * Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.14.beta - Do not require SSE2 on i686 diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index c79de58..7fbe72a 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2725,3 +2725,68 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g ] } else if (v8_target_arch == "x64") { sources += [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-01-18 01:03:14.070441874 +0100 +@@ -34,6 +34,14 @@ + 'v8_extra_library_files%': [], + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', + 'remove_v8base_debug_symbols%': 0, ++ 'conditions': [ ++ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds ++ ['target_arch == "ia32"', { ++ 'v8_component%': 'shared_library', ++ }, { ++ 'v8_component%': '<(component)', ++ }], ++ ], + }, + 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], + 'targets': [ +@@ -47,8 +55,8 @@ + }, { + 'toolsets': ['target'], + }], +- ['component=="shared_library"', { +- 'type': '<(component)', ++ ['v8_component=="shared_library"', { ++ 'type': '<(v8_component)', + 'sources': [ + # Note: on non-Windows we still build this file so that gyp + # has some sources to link into the component. +@@ -159,7 +167,7 @@ + 'js2c', + ], + }], +- ['component=="shared_library"', { ++ ['v8_component=="shared_library"', { + 'defines': [ + 'V8_SHARED', + 'BUILDING_V8_SHARED', +@@ -237,7 +245,7 @@ + 'toolsets': ['target'], + 'dependencies': ['js2c'], + }], +- ['component=="shared_library"', { ++ ['v8_component=="shared_library"', { + 'defines': [ + 'BUILDING_V8_SHARED', + 'V8_SHARED', +@@ -265,7 +273,7 @@ + 'natives_blob', + ], + }], +- ['component=="shared_library"', { ++ ['v8_component=="shared_library"', { + 'defines': [ + 'V8_SHARED', + 'BUILDING_V8_SHARED', +@@ -1340,7 +1348,7 @@ + # See http://crbug.com/485155. + 'msvs_shard': 4, + }], +- ['component=="shared_library"', { ++ ['v8_component=="shared_library"', { + 'defines': [ + 'BUILDING_V8_SHARED', + 'V8_SHARED', From 5262f491f3db00760c318dbeb692844cc77732f0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jan 2016 03:06:07 +0100 Subject: [PATCH 041/437] no-sse2.patch: Add built .so files to the link line In the long run, we may end up doing this manually because we will need to handle V8 specially in the QMake stuff anyway (install it, ensure we only link the x87 version and let the SSE2 version magically act as a drop-in replacement, add an rpath), but try like this for now. --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 7fbe72a..56046ed 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2619,6 +2619,27 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-01-18 03:00:21.703867569 +0100 +@@ -1282,6 +1282,8 @@ + # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. + prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] + prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] ++ if len(solibs): ++ prefixed_solibs = ['$$PWD/' + so for so in toAbsPaths(solibs)] + + pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) + pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) +@@ -1290,6 +1292,8 @@ + pri_file.write("LIBS_PRIVATE += -Wl,--whole-archive %s -Wl,--no-whole-archive\n" % qmakeLiteral(' '.join(prefixed_archives))) + else: + pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) ++ if len(solibs): ++ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_solibs))) + # External libs have to come after objects/archives, the linker resolve them in order. + pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) + # Make sure that if ninja modifies one of the inputs, qmake/make will link again. diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 From e670d513af2f0de26b0f5ccf1a0afcfcc9b8bc3b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 03:32:24 +0100 Subject: [PATCH 042/437] no-sse2.patch: Build both the x87 version and the SSE2 version of V8 on i686 Note that almost all the patch size increase is from the v8_sse2.gyp file that is automatically generated from v8.gyp using a small script I wrote, which is also included in the patch. --- qt5-qtwebengine.spec | 5 +- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 2018 +++++++++++++++++ 2 files changed, 2021 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 266d4cd..9f8b7e3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.14.beta.nosse2.1%{?dist} +Release: 0.14.beta.nosse2.2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -360,8 +360,9 @@ popd %changelog -* Mon Jan 18 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.1 +* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.2 - Build V8 as a shared library on i686 to allow for swappable backends +- Build both the x87 version and the SSE2 version of V8 on i686 * Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.14.beta - Do not require SSE2 on i686 diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 56046ed..445ea18 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2746,6 +2746,53 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g ] } else if (v8_target_arch == "x64") { sources += [ +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 03:13:08.617522460 +0100 +@@ -0,0 +1,43 @@ ++#!/bin/sh ++# This script renames the v8 targets to _sse2 names so that they do not conflict ++# with the non-SSE2 versions. ++ ++# Copyright 2016 Kevin Kofler. All rights reserved. ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# * Redistributions in binary form must reproduce the above ++# copyright 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. ++ ++echo "# Generated from v8.gyp by make-v8-sse2-gyp.sh" >v8_sse2.gyp ++SUBTARGETS=`grep "'target_name': 'v8" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"`" mksnapshot" ++SEDS= ++for SUBTARGET in $SUBTARGETS ; do ++ SEDS=$SEDS\ -e\ "s/'$SUBTARGET'/'${SUBTARGET}_sse2'/g" ++done ++sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32'/g" \ ++ $SEDS \ ++ -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ ++ -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ ++ -e "s#^\( *\)\('target_name': 'v8_sse2'\)#\1\2\n\1'product_name': 'v8'\n\1'product_dir': '<(PRODUCT_DIR)/sse2'#g" \ ++ v8.gyp >>v8_sse2.gyp diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-01-18 01:03:14.070441874 +0100 @@ -2811,3 +2858,1974 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 03:13:12.572544083 +0100 +@@ -0,0 +1,1952 @@ ++# Generated from v8.gyp by make-v8-sse2-gyp.sh ++# Copyright 2012 the V8 project authors. All rights reserved. ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# * Redistributions in binary form must reproduce the above ++# copyright 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. ++ ++{ ++ 'variables': { ++ 'v8_target_arch': 'ia32' ++ 'icu_use_data_file_flag%': 0, ++ 'v8_code': 1, ++ 'v8_random_seed%': 314159265, ++ 'embed_script%': "", ++ 'v8_extra_library_files%': [], ++ 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_sse2<(EXECUTABLE_SUFFIX)', ++ 'remove_v8base_debug_symbols%': 0, ++ 'conditions': [ ++ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds ++ ['target_arch == "ia32"', { ++ 'v8_component%': 'shared_library', ++ }, { ++ 'v8_component%': '<(component)', ++ }], ++ ], ++ }, ++ 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], ++ 'targets': [ ++ { ++ 'target_name': 'v8_sse2' ++ 'product_name': 'v8' ++ 'product_dir': '<(PRODUCT_DIR)/sse2', ++ 'dependencies_traverse': 1, ++ 'dependencies': ['v8_maybe_snapshot_sse2'], ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ }, { ++ 'toolsets': ['target'], ++ }], ++ ['v8_component=="shared_library"', { ++ 'type': '<(v8_component)', ++ 'sources': [ ++ # Note: on non-Windows we still build this file so that gyp ++ # has some sources to link into the component. ++ '../../src/v8dll-main.cc', ++ ], ++ 'include_dirs': [ ++ '../..', ++ ], ++ 'defines': [ ++ 'V8_SHARED', ++ 'BUILDING_V8_SHARED', ++ ], ++ 'direct_dependent_settings': { ++ 'defines': [ ++ 'V8_SHARED', ++ 'USING_V8_SHARED', ++ ], ++ }, ++ 'target_conditions': [ ++ ['OS=="android" and _toolset=="target"', { ++ 'libraries': [ ++ '-llog', ++ ], ++ 'include_dirs': [ ++ 'src/common/android/include', ++ ], ++ }], ++ ], ++ 'conditions': [ ++ ['OS=="mac"', { ++ 'xcode_settings': { ++ 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load'] ++ }, ++ }], ++ ['soname_version!=""', { ++ 'product_extension': 'so.<(soname_version)', ++ }], ++ ], ++ }, ++ { ++ 'type': 'none', ++ }], ++ ], ++ 'direct_dependent_settings': { ++ 'include_dirs': [ ++ '../../include', ++ ], ++ }, ++ }, ++ { ++ # This rule delegates to either v8_snapshot, v8_nosnapshot, or ++ # v8_external_snapshot, depending on the current variables. ++ # The intention is to make the 'calling' rules a bit simpler. ++ 'target_name': 'v8_maybe_snapshot_sse2', ++ 'type': 'none', ++ 'conditions': [ ++ ['v8_use_snapshot!="true"', { ++ # The dependency on v8_base should come from a transitive ++ # dependency however the Android toolchain requires libv8_base.a ++ # to appear before libv8_snapshot.a so it's listed explicitly. ++ 'dependencies': ['v8_base_sse2', 'v8_nosnapshot_sse2'], ++ }], ++ ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', { ++ # The dependency on v8_base should come from a transitive ++ # dependency however the Android toolchain requires libv8_base.a ++ # to appear before libv8_snapshot.a so it's listed explicitly. ++ 'dependencies': ['v8_base_sse2', 'v8_snapshot_sse2'], ++ }], ++ ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', { ++ 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], ++ 'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ], ++ }], ++ ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', { ++ 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], ++ 'target_conditions': [ ++ ['_toolset=="host"', { ++ 'inputs': [ ++ '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ ], ++ }, { ++ 'inputs': [ ++ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ ], ++ }], ++ ], ++ }], ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ }, { ++ 'toolsets': ['target'], ++ }], ++ ] ++ }, ++ { ++ 'target_name': 'v8_snapshot_sse2', ++ 'type': 'static_library', ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ 'dependencies': [ ++ 'mksnapshot#host', ++ 'js2c#host', ++ ], ++ }, { ++ 'toolsets': ['target'], ++ 'dependencies': [ ++ 'mksnapshot_sse2', ++ 'js2c', ++ ], ++ }], ++ ['v8_component=="shared_library"', { ++ 'defines': [ ++ 'V8_SHARED', ++ 'BUILDING_V8_SHARED', ++ ], ++ 'direct_dependent_settings': { ++ 'defines': [ ++ 'V8_SHARED', ++ 'USING_V8_SHARED', ++ ], ++ }, ++ }], ++ ], ++ 'dependencies': [ ++ 'v8_base_sse2', ++ ], ++ 'include_dirs+': [ ++ '../..', ++ ], ++ 'sources': [ ++ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ ], ++ 'actions': [ ++ { ++ 'action_name': 'run_mksnapshot', ++ 'inputs': [ ++ '<(mksnapshot_exec)', ++ '<(embed_script)', ++ ], ++ 'outputs': [ ++ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ ], ++ 'variables': { ++ 'mksnapshot_flags': [ ++ '--log-snapshot-positions', ++ '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', ++ ], ++ 'conditions': [ ++ ['v8_random_seed!=0', { ++ 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], ++ }], ++ ], ++ }, ++ 'action': [ ++ '<(mksnapshot_exec)', ++ '<@(mksnapshot_flags)', ++ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '<(embed_script)', ++ ], ++ }, ++ ], ++ }, ++ { ++ 'target_name': 'v8_nosnapshot_sse2', ++ 'type': 'static_library', ++ 'dependencies': [ ++ 'v8_base_sse2', ++ ], ++ 'include_dirs+': [ ++ '../..', ++ ], ++ 'sources': [ ++ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '../../src/snapshot/snapshot-empty.cc', ++ ], ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ 'dependencies': ['js2c#host'], ++ }, { ++ 'toolsets': ['target'], ++ 'dependencies': ['js2c'], ++ }], ++ ['v8_component=="shared_library"', { ++ 'defines': [ ++ 'BUILDING_V8_SHARED', ++ 'V8_SHARED', ++ ], ++ }], ++ ] ++ }, ++ { ++ 'target_name': 'v8_external_snapshot_sse2', ++ 'type': 'static_library', ++ 'conditions': [ ++ [ 'v8_use_external_startup_data==1', { ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ 'dependencies': [ ++ 'mksnapshot#host', ++ 'js2c#host', ++ 'natives_blob', ++ ]}, { ++ 'toolsets': ['target'], ++ 'dependencies': [ ++ 'mksnapshot_sse2', ++ 'js2c', ++ 'natives_blob', ++ ], ++ }], ++ ['v8_component=="shared_library"', { ++ 'defines': [ ++ 'V8_SHARED', ++ 'BUILDING_V8_SHARED', ++ ], ++ 'direct_dependent_settings': { ++ 'defines': [ ++ 'V8_SHARED', ++ 'USING_V8_SHARED', ++ ], ++ }, ++ }], ++ ], ++ 'dependencies': [ ++ 'v8_base_sse2', ++ ], ++ 'include_dirs+': [ ++ '../..', ++ ], ++ 'sources': [ ++ '../../src/snapshot/natives-external.cc', ++ '../../src/snapshot/snapshot-external.cc', ++ ], ++ 'actions': [ ++ { ++ 'action_name': 'run_mksnapshot (external)', ++ 'inputs': [ ++ '<(mksnapshot_exec)', ++ ], ++ 'variables': { ++ 'mksnapshot_flags': [ ++ '--log-snapshot-positions', ++ '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', ++ ], ++ 'conditions': [ ++ ['v8_random_seed!=0', { ++ 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], ++ }], ++ ], ++ }, ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'target_conditions': [ ++ ['_toolset=="host"', { ++ 'outputs': [ ++ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ ], ++ 'action': [ ++ '<(mksnapshot_exec)', ++ '<@(mksnapshot_flags)', ++ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ '<(embed_script)', ++ ], ++ }, { ++ 'outputs': [ ++ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ ], ++ 'action': [ ++ '<(mksnapshot_exec)', ++ '<@(mksnapshot_flags)', ++ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '<(embed_script)', ++ ], ++ }], ++ ], ++ }, { ++ 'outputs': [ ++ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ ], ++ 'action': [ ++ '<(mksnapshot_exec)', ++ '<@(mksnapshot_flags)', ++ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '<(embed_script)', ++ ], ++ }], ++ ], ++ }, ++ ], ++ }], ++ ], ++ }, ++ { ++ 'target_name': 'v8_base_sse2', ++ 'type': 'static_library', ++ 'dependencies': [ ++ 'v8_libbase_sse2', ++ ], ++ 'variables': { ++ 'optimize': 'max', ++ }, ++ 'include_dirs+': [ ++ '../..', ++ ], ++ 'defines': [ ++ # TODO(jochen): Remove again after this is globally turned on. ++ 'V8_IMMINENT_DEPRECATION_WARNINGS', ++ ], ++ 'sources': [ ### gcmole(all) ### ++ '../../include/v8-debug.h', ++ '../../include/v8-platform.h', ++ '../../include/v8-profiler.h', ++ '../../include/v8-testing.h', ++ '../../include/v8-util.h', ++ '../../include/v8-version.h', ++ '../../include/v8.h', ++ '../../include/v8config.h', ++ '../../src/accessors.cc', ++ '../../src/accessors.h', ++ '../../src/allocation.cc', ++ '../../src/allocation.h', ++ '../../src/allocation-site-scopes.cc', ++ '../../src/allocation-site-scopes.h', ++ '../../src/allocation-tracker.cc', ++ '../../src/allocation-tracker.h', ++ '../../src/api.cc', ++ '../../src/api.h', ++ '../../src/api-natives.cc', ++ '../../src/api-natives.h', ++ '../../src/arguments.cc', ++ '../../src/arguments.h', ++ '../../src/assembler.cc', ++ '../../src/assembler.h', ++ '../../src/assert-scope.h', ++ '../../src/assert-scope.cc', ++ '../../src/ast-value-factory.cc', ++ '../../src/ast-value-factory.h', ++ '../../src/ast-literal-reindexer.cc', ++ '../../src/ast-literal-reindexer.h', ++ '../../src/ast-numbering.cc', ++ '../../src/ast-numbering.h', ++ '../../src/ast.cc', ++ '../../src/ast.h', ++ '../../src/background-parsing-task.cc', ++ '../../src/background-parsing-task.h', ++ '../../src/bailout-reason.cc', ++ '../../src/bailout-reason.h', ++ '../../src/basic-block-profiler.cc', ++ '../../src/basic-block-profiler.h', ++ '../../src/bignum-dtoa.cc', ++ '../../src/bignum-dtoa.h', ++ '../../src/bignum.cc', ++ '../../src/bignum.h', ++ '../../src/bit-vector.cc', ++ '../../src/bit-vector.h', ++ '../../src/bootstrapper.cc', ++ '../../src/bootstrapper.h', ++ '../../src/builtins.cc', ++ '../../src/builtins.h', ++ '../../src/bytecodes-irregexp.h', ++ '../../src/cached-powers.cc', ++ '../../src/cached-powers.h', ++ '../../src/char-predicates.cc', ++ '../../src/char-predicates-inl.h', ++ '../../src/char-predicates.h', ++ '../../src/checks.cc', ++ '../../src/checks.h', ++ '../../src/circular-queue-inl.h', ++ '../../src/circular-queue.h', ++ '../../src/code-factory.cc', ++ '../../src/code-factory.h', ++ '../../src/code-stubs.cc', ++ '../../src/code-stubs.h', ++ '../../src/code-stubs-hydrogen.cc', ++ '../../src/code.h', ++ '../../src/codegen.cc', ++ '../../src/codegen.h', ++ '../../src/compilation-cache.cc', ++ '../../src/compilation-cache.h', ++ '../../src/compilation-dependencies.cc', ++ '../../src/compilation-dependencies.h', ++ '../../src/compilation-statistics.cc', ++ '../../src/compilation-statistics.h', ++ '../../src/compiler/access-builder.cc', ++ '../../src/compiler/access-builder.h', ++ '../../src/compiler/all-nodes.cc', ++ '../../src/compiler/all-nodes.h', ++ '../../src/compiler/ast-graph-builder.cc', ++ '../../src/compiler/ast-graph-builder.h', ++ '../../src/compiler/ast-loop-assignment-analyzer.cc', ++ '../../src/compiler/ast-loop-assignment-analyzer.h', ++ '../../src/compiler/basic-block-instrumentor.cc', ++ '../../src/compiler/basic-block-instrumentor.h', ++ '../../src/compiler/change-lowering.cc', ++ '../../src/compiler/change-lowering.h', ++ '../../src/compiler/coalesced-live-ranges.cc', ++ '../../src/compiler/coalesced-live-ranges.h', ++ '../../src/compiler/code-generator-impl.h', ++ '../../src/compiler/code-generator.cc', ++ '../../src/compiler/code-generator.h', ++ '../../src/compiler/common-node-cache.cc', ++ '../../src/compiler/common-node-cache.h', ++ '../../src/compiler/common-operator-reducer.cc', ++ '../../src/compiler/common-operator-reducer.h', ++ '../../src/compiler/common-operator.cc', ++ '../../src/compiler/common-operator.h', ++ '../../src/compiler/control-builders.cc', ++ '../../src/compiler/control-builders.h', ++ '../../src/compiler/control-equivalence.cc', ++ '../../src/compiler/control-equivalence.h', ++ '../../src/compiler/control-flow-optimizer.cc', ++ '../../src/compiler/control-flow-optimizer.h', ++ '../../src/compiler/dead-code-elimination.cc', ++ '../../src/compiler/dead-code-elimination.h', ++ '../../src/compiler/diamond.h', ++ '../../src/compiler/frame.h', ++ '../../src/compiler/frame-elider.cc', ++ '../../src/compiler/frame-elider.h', ++ "../../src/compiler/frame-states.cc", ++ "../../src/compiler/frame-states.h", ++ '../../src/compiler/gap-resolver.cc', ++ '../../src/compiler/gap-resolver.h', ++ '../../src/compiler/graph-builder.h', ++ '../../src/compiler/graph-reducer.cc', ++ '../../src/compiler/graph-reducer.h', ++ '../../src/compiler/graph-replay.cc', ++ '../../src/compiler/graph-replay.h', ++ '../../src/compiler/graph-trimmer.cc', ++ '../../src/compiler/graph-trimmer.h', ++ '../../src/compiler/graph-visualizer.cc', ++ '../../src/compiler/graph-visualizer.h', ++ '../../src/compiler/graph.cc', ++ '../../src/compiler/graph.h', ++ '../../src/compiler/greedy-allocator.cc', ++ '../../src/compiler/greedy-allocator.h', ++ '../../src/compiler/instruction-codes.h', ++ '../../src/compiler/instruction-selector-impl.h', ++ '../../src/compiler/instruction-selector.cc', ++ '../../src/compiler/instruction-selector.h', ++ '../../src/compiler/instruction.cc', ++ '../../src/compiler/instruction.h', ++ '../../src/compiler/js-builtin-reducer.cc', ++ '../../src/compiler/js-builtin-reducer.h', ++ '../../src/compiler/js-context-specialization.cc', ++ '../../src/compiler/js-context-specialization.h', ++ '../../src/compiler/js-frame-specialization.cc', ++ '../../src/compiler/js-frame-specialization.h', ++ '../../src/compiler/js-generic-lowering.cc', ++ '../../src/compiler/js-generic-lowering.h', ++ '../../src/compiler/js-graph.cc', ++ '../../src/compiler/js-graph.h', ++ '../../src/compiler/js-inlining.cc', ++ '../../src/compiler/js-inlining.h', ++ '../../src/compiler/js-intrinsic-lowering.cc', ++ '../../src/compiler/js-intrinsic-lowering.h', ++ '../../src/compiler/js-operator.cc', ++ '../../src/compiler/js-operator.h', ++ '../../src/compiler/js-type-feedback.cc', ++ '../../src/compiler/js-type-feedback.h', ++ '../../src/compiler/js-typed-lowering.cc', ++ '../../src/compiler/js-typed-lowering.h', ++ '../../src/compiler/jump-threading.cc', ++ '../../src/compiler/jump-threading.h', ++ '../../src/compiler/linkage-impl.h', ++ '../../src/compiler/linkage.cc', ++ '../../src/compiler/linkage.h', ++ '../../src/compiler/liveness-analyzer.cc', ++ '../../src/compiler/liveness-analyzer.h', ++ '../../src/compiler/load-elimination.cc', ++ '../../src/compiler/load-elimination.h', ++ '../../src/compiler/loop-analysis.cc', ++ '../../src/compiler/loop-analysis.h', ++ '../../src/compiler/loop-peeling.cc', ++ '../../src/compiler/loop-peeling.h', ++ '../../src/compiler/machine-operator-reducer.cc', ++ '../../src/compiler/machine-operator-reducer.h', ++ '../../src/compiler/machine-operator.cc', ++ '../../src/compiler/machine-operator.h', ++ '../../src/compiler/machine-type.cc', ++ '../../src/compiler/machine-type.h', ++ '../../src/compiler/move-optimizer.cc', ++ '../../src/compiler/move-optimizer.h', ++ '../../src/compiler/node-aux-data.h', ++ '../../src/compiler/node-cache.cc', ++ '../../src/compiler/node-cache.h', ++ '../../src/compiler/node-marker.cc', ++ '../../src/compiler/node-marker.h', ++ '../../src/compiler/node-matchers.cc', ++ '../../src/compiler/node-matchers.h', ++ '../../src/compiler/node-properties.cc', ++ '../../src/compiler/node-properties.h', ++ '../../src/compiler/node.cc', ++ '../../src/compiler/node.h', ++ '../../src/compiler/opcodes.cc', ++ '../../src/compiler/opcodes.h', ++ '../../src/compiler/operator-properties.cc', ++ '../../src/compiler/operator-properties.h', ++ '../../src/compiler/operator.cc', ++ '../../src/compiler/operator.h', ++ '../../src/compiler/osr.cc', ++ '../../src/compiler/osr.h', ++ '../../src/compiler/pipeline.cc', ++ '../../src/compiler/pipeline.h', ++ '../../src/compiler/pipeline-statistics.cc', ++ '../../src/compiler/pipeline-statistics.h', ++ '../../src/compiler/raw-machine-assembler.cc', ++ '../../src/compiler/raw-machine-assembler.h', ++ '../../src/compiler/register-allocator.cc', ++ '../../src/compiler/register-allocator.h', ++ '../../src/compiler/register-allocator-verifier.cc', ++ '../../src/compiler/register-allocator-verifier.h', ++ '../../src/compiler/register-configuration.cc', ++ '../../src/compiler/register-configuration.h', ++ '../../src/compiler/representation-change.h', ++ '../../src/compiler/schedule.cc', ++ '../../src/compiler/schedule.h', ++ '../../src/compiler/scheduler.cc', ++ '../../src/compiler/scheduler.h', ++ '../../src/compiler/select-lowering.cc', ++ '../../src/compiler/select-lowering.h', ++ '../../src/compiler/simplified-lowering.cc', ++ '../../src/compiler/simplified-lowering.h', ++ '../../src/compiler/simplified-operator-reducer.cc', ++ '../../src/compiler/simplified-operator-reducer.h', ++ '../../src/compiler/simplified-operator.cc', ++ '../../src/compiler/simplified-operator.h', ++ '../../src/compiler/source-position.cc', ++ '../../src/compiler/source-position.h', ++ '../../src/compiler/state-values-utils.cc', ++ '../../src/compiler/state-values-utils.h', ++ '../../src/compiler/tail-call-optimization.cc', ++ '../../src/compiler/tail-call-optimization.h', ++ '../../src/compiler/typer.cc', ++ '../../src/compiler/typer.h', ++ '../../src/compiler/value-numbering-reducer.cc', ++ '../../src/compiler/value-numbering-reducer.h', ++ '../../src/compiler/verifier.cc', ++ '../../src/compiler/verifier.h', ++ '../../src/compiler/zone-pool.cc', ++ '../../src/compiler/zone-pool.h', ++ '../../src/compiler.cc', ++ '../../src/compiler.h', ++ '../../src/contexts.cc', ++ '../../src/contexts.h', ++ '../../src/conversions-inl.h', ++ '../../src/conversions.cc', ++ '../../src/conversions.h', ++ '../../src/counters.cc', ++ '../../src/counters.h', ++ '../../src/cpu-profiler-inl.h', ++ '../../src/cpu-profiler.cc', ++ '../../src/cpu-profiler.h', ++ '../../src/date.cc', ++ '../../src/date.h', ++ '../../src/dateparser-inl.h', ++ '../../src/dateparser.cc', ++ '../../src/dateparser.h', ++ '../../src/debug.cc', ++ '../../src/debug.h', ++ '../../src/deoptimizer.cc', ++ '../../src/deoptimizer.h', ++ '../../src/disasm.h', ++ '../../src/disassembler.cc', ++ '../../src/disassembler.h', ++ '../../src/diy-fp.cc', ++ '../../src/diy-fp.h', ++ '../../src/double.h', ++ '../../src/dtoa.cc', ++ '../../src/dtoa.h', ++ '../../src/effects.h', ++ '../../src/elements-kind.cc', ++ '../../src/elements-kind.h', ++ '../../src/elements.cc', ++ '../../src/elements.h', ++ '../../src/execution.cc', ++ '../../src/execution.h', ++ '../../src/expression-classifier.h', ++ '../../src/extensions/externalize-string-extension.cc', ++ '../../src/extensions/externalize-string-extension.h', ++ '../../src/extensions/free-buffer-extension.cc', ++ '../../src/extensions/free-buffer-extension.h', ++ '../../src/extensions/gc-extension.cc', ++ '../../src/extensions/gc-extension.h', ++ '../../src/extensions/statistics-extension.cc', ++ '../../src/extensions/statistics-extension.h', ++ '../../src/extensions/trigger-failure-extension.cc', ++ '../../src/extensions/trigger-failure-extension.h', ++ '../../src/factory.cc', ++ '../../src/factory.h', ++ '../../src/fast-dtoa.cc', ++ '../../src/fast-dtoa.h', ++ '../../src/field-index.h', ++ '../../src/field-index-inl.h', ++ '../../src/fixed-dtoa.cc', ++ '../../src/fixed-dtoa.h', ++ '../../src/flag-definitions.h', ++ '../../src/flags.cc', ++ '../../src/flags.h', ++ '../../src/frames-inl.h', ++ '../../src/frames.cc', ++ '../../src/frames.h', ++ '../../src/full-codegen.cc', ++ '../../src/full-codegen.h', ++ '../../src/func-name-inferrer.cc', ++ '../../src/func-name-inferrer.h', ++ '../../src/gdb-jit.cc', ++ '../../src/gdb-jit.h', ++ '../../src/global-handles.cc', ++ '../../src/global-handles.h', ++ '../../src/globals.h', ++ '../../src/handles-inl.h', ++ '../../src/handles.cc', ++ '../../src/handles.h', ++ '../../src/hashmap.h', ++ '../../src/heap-profiler.cc', ++ '../../src/heap-profiler.h', ++ '../../src/heap-snapshot-generator-inl.h', ++ '../../src/heap-snapshot-generator.cc', ++ '../../src/heap-snapshot-generator.h', ++ '../../src/heap/memory-reducer.cc', ++ '../../src/heap/memory-reducer.h', ++ '../../src/heap/gc-idle-time-handler.cc', ++ '../../src/heap/gc-idle-time-handler.h', ++ '../../src/heap/gc-tracer.cc', ++ '../../src/heap/gc-tracer.h', ++ '../../src/heap/heap-inl.h', ++ '../../src/heap/heap.cc', ++ '../../src/heap/heap.h', ++ '../../src/heap/identity-map.cc', ++ '../../src/heap/identity-map.h', ++ '../../src/heap/incremental-marking-inl.h', ++ '../../src/heap/incremental-marking.cc', ++ '../../src/heap/incremental-marking.h', ++ '../../src/heap/mark-compact-inl.h', ++ '../../src/heap/mark-compact.cc', ++ '../../src/heap/mark-compact.h', ++ '../../src/heap/objects-visiting-inl.h', ++ '../../src/heap/objects-visiting.cc', ++ '../../src/heap/objects-visiting.h', ++ '../../src/heap/spaces-inl.h', ++ '../../src/heap/spaces.cc', ++ '../../src/heap/spaces.h', ++ '../../src/heap/store-buffer-inl.h', ++ '../../src/heap/store-buffer.cc', ++ '../../src/heap/store-buffer.h', ++ '../../src/hydrogen-alias-analysis.h', ++ '../../src/hydrogen-bce.cc', ++ '../../src/hydrogen-bce.h', ++ '../../src/hydrogen-bch.cc', ++ '../../src/hydrogen-bch.h', ++ '../../src/hydrogen-canonicalize.cc', ++ '../../src/hydrogen-canonicalize.h', ++ '../../src/hydrogen-check-elimination.cc', ++ '../../src/hydrogen-check-elimination.h', ++ '../../src/hydrogen-dce.cc', ++ '../../src/hydrogen-dce.h', ++ '../../src/hydrogen-dehoist.cc', ++ '../../src/hydrogen-dehoist.h', ++ '../../src/hydrogen-environment-liveness.cc', ++ '../../src/hydrogen-environment-liveness.h', ++ '../../src/hydrogen-escape-analysis.cc', ++ '../../src/hydrogen-escape-analysis.h', ++ '../../src/hydrogen-flow-engine.h', ++ '../../src/hydrogen-instructions.cc', ++ '../../src/hydrogen-instructions.h', ++ '../../src/hydrogen.cc', ++ '../../src/hydrogen.h', ++ '../../src/hydrogen-gvn.cc', ++ '../../src/hydrogen-gvn.h', ++ '../../src/hydrogen-infer-representation.cc', ++ '../../src/hydrogen-infer-representation.h', ++ '../../src/hydrogen-infer-types.cc', ++ '../../src/hydrogen-infer-types.h', ++ '../../src/hydrogen-load-elimination.cc', ++ '../../src/hydrogen-load-elimination.h', ++ '../../src/hydrogen-mark-deoptimize.cc', ++ '../../src/hydrogen-mark-deoptimize.h', ++ '../../src/hydrogen-mark-unreachable.cc', ++ '../../src/hydrogen-mark-unreachable.h', ++ '../../src/hydrogen-osr.cc', ++ '../../src/hydrogen-osr.h', ++ '../../src/hydrogen-range-analysis.cc', ++ '../../src/hydrogen-range-analysis.h', ++ '../../src/hydrogen-redundant-phi.cc', ++ '../../src/hydrogen-redundant-phi.h', ++ '../../src/hydrogen-removable-simulates.cc', ++ '../../src/hydrogen-removable-simulates.h', ++ '../../src/hydrogen-representation-changes.cc', ++ '../../src/hydrogen-representation-changes.h', ++ '../../src/hydrogen-sce.cc', ++ '../../src/hydrogen-sce.h', ++ '../../src/hydrogen-store-elimination.cc', ++ '../../src/hydrogen-store-elimination.h', ++ '../../src/hydrogen-types.cc', ++ '../../src/hydrogen-types.h', ++ '../../src/hydrogen-uint32-analysis.cc', ++ '../../src/hydrogen-uint32-analysis.h', ++ '../../src/i18n.cc', ++ '../../src/i18n.h', ++ '../../src/icu_util.cc', ++ '../../src/icu_util.h', ++ '../../src/ic/access-compiler.cc', ++ '../../src/ic/access-compiler.h', ++ '../../src/ic/call-optimization.cc', ++ '../../src/ic/call-optimization.h', ++ '../../src/ic/handler-compiler.cc', ++ '../../src/ic/handler-compiler.h', ++ '../../src/ic/ic-inl.h', ++ '../../src/ic/ic-state.cc', ++ '../../src/ic/ic-state.h', ++ '../../src/ic/ic.cc', ++ '../../src/ic/ic.h', ++ '../../src/ic/ic-compiler.cc', ++ '../../src/ic/ic-compiler.h', ++ '../../src/interface-descriptors.cc', ++ '../../src/interface-descriptors.h', ++ '../../src/interpreter-irregexp.cc', ++ '../../src/interpreter-irregexp.h', ++ '../../src/isolate.cc', ++ '../../src/isolate.h', ++ '../../src/json-parser.h', ++ '../../src/json-stringifier.h', ++ '../../src/jsregexp-inl.h', ++ '../../src/jsregexp.cc', ++ '../../src/jsregexp.h', ++ '../../src/layout-descriptor-inl.h', ++ '../../src/layout-descriptor.cc', ++ '../../src/layout-descriptor.h', ++ '../../src/list-inl.h', ++ '../../src/list.h', ++ '../../src/lithium-allocator-inl.h', ++ '../../src/lithium-allocator.cc', ++ '../../src/lithium-allocator.h', ++ '../../src/lithium-codegen.cc', ++ '../../src/lithium-codegen.h', ++ '../../src/lithium.cc', ++ '../../src/lithium.h', ++ '../../src/lithium-inl.h', ++ '../../src/liveedit.cc', ++ '../../src/liveedit.h', ++ '../../src/log-inl.h', ++ '../../src/log-utils.cc', ++ '../../src/log-utils.h', ++ '../../src/log.cc', ++ '../../src/log.h', ++ '../../src/lookup-inl.h', ++ '../../src/lookup.cc', ++ '../../src/lookup.h', ++ '../../src/macro-assembler.h', ++ '../../src/messages.cc', ++ '../../src/messages.h', ++ '../../src/modules.cc', ++ '../../src/modules.h', ++ '../../src/msan.h', ++ '../../src/objects-debug.cc', ++ '../../src/objects-inl.h', ++ '../../src/objects-printer.cc', ++ '../../src/objects.cc', ++ '../../src/objects.h', ++ '../../src/optimizing-compile-dispatcher.cc', ++ '../../src/optimizing-compile-dispatcher.h', ++ '../../src/ostreams.cc', ++ '../../src/ostreams.h', ++ '../../src/pattern-rewriter.cc', ++ '../../src/parser.cc', ++ '../../src/parser.h', ++ '../../src/pending-compilation-error-handler.cc', ++ '../../src/pending-compilation-error-handler.h', ++ '../../src/preparse-data-format.h', ++ '../../src/preparse-data.cc', ++ '../../src/preparse-data.h', ++ '../../src/preparser.cc', ++ '../../src/preparser.h', ++ '../../src/prettyprinter.cc', ++ '../../src/prettyprinter.h', ++ '../../src/profile-generator-inl.h', ++ '../../src/profile-generator.cc', ++ '../../src/profile-generator.h', ++ '../../src/property-details.h', ++ '../../src/property.cc', ++ '../../src/property.h', ++ '../../src/prototype.h', ++ '../../src/regexp-macro-assembler-irregexp-inl.h', ++ '../../src/regexp-macro-assembler-irregexp.cc', ++ '../../src/regexp-macro-assembler-irregexp.h', ++ '../../src/regexp-macro-assembler-tracer.cc', ++ '../../src/regexp-macro-assembler-tracer.h', ++ '../../src/regexp-macro-assembler.cc', ++ '../../src/regexp-macro-assembler.h', ++ '../../src/regexp-stack.cc', ++ '../../src/regexp-stack.h', ++ '../../src/rewriter.cc', ++ '../../src/rewriter.h', ++ '../../src/runtime-profiler.cc', ++ '../../src/runtime-profiler.h', ++ '../../src/runtime/runtime-array.cc', ++ '../../src/runtime/runtime-atomics.cc', ++ '../../src/runtime/runtime-classes.cc', ++ '../../src/runtime/runtime-collections.cc', ++ '../../src/runtime/runtime-compiler.cc', ++ '../../src/runtime/runtime-date.cc', ++ '../../src/runtime/runtime-debug.cc', ++ '../../src/runtime/runtime-forin.cc', ++ '../../src/runtime/runtime-function.cc', ++ '../../src/runtime/runtime-generator.cc', ++ '../../src/runtime/runtime-i18n.cc', ++ '../../src/runtime/runtime-internal.cc', ++ '../../src/runtime/runtime-json.cc', ++ '../../src/runtime/runtime-literals.cc', ++ '../../src/runtime/runtime-liveedit.cc', ++ '../../src/runtime/runtime-maths.cc', ++ '../../src/runtime/runtime-numbers.cc', ++ '../../src/runtime/runtime-object.cc', ++ '../../src/runtime/runtime-observe.cc', ++ '../../src/runtime/runtime-proxy.cc', ++ '../../src/runtime/runtime-regexp.cc', ++ '../../src/runtime/runtime-scopes.cc', ++ '../../src/runtime/runtime-strings.cc', ++ '../../src/runtime/runtime-symbol.cc', ++ '../../src/runtime/runtime-test.cc', ++ '../../src/runtime/runtime-typedarray.cc', ++ '../../src/runtime/runtime-uri.cc', ++ '../../src/runtime/runtime-utils.h', ++ '../../src/runtime/runtime.cc', ++ '../../src/runtime/runtime.h', ++ '../../src/safepoint-table.cc', ++ '../../src/safepoint-table.h', ++ '../../src/sampler.cc', ++ '../../src/sampler.h', ++ '../../src/scanner-character-streams.cc', ++ '../../src/scanner-character-streams.h', ++ '../../src/scanner.cc', ++ '../../src/scanner.h', ++ '../../src/scopeinfo.cc', ++ '../../src/scopeinfo.h', ++ '../../src/scopes.cc', ++ '../../src/scopes.h', ++ '../../src/signature.h', ++ '../../src/simulator.h', ++ '../../src/small-pointer-list.h', ++ '../../src/smart-pointers.h', ++ '../../src/snapshot/natives.h', ++ '../../src/snapshot/serialize.cc', ++ '../../src/snapshot/serialize.h', ++ '../../src/snapshot/snapshot.h', ++ '../../src/snapshot/snapshot-common.cc', ++ '../../src/snapshot/snapshot-source-sink.cc', ++ '../../src/snapshot/snapshot-source-sink.h', ++ '../../src/splay-tree.h', ++ '../../src/splay-tree-inl.h', ++ '../../src/startup-data-util.cc', ++ '../../src/startup-data-util.h', ++ '../../src/string-builder.cc', ++ '../../src/string-builder.h', ++ '../../src/string-search.cc', ++ '../../src/string-search.h', ++ '../../src/string-stream.cc', ++ '../../src/string-stream.h', ++ '../../src/strings-storage.cc', ++ '../../src/strings-storage.h', ++ '../../src/strtod.cc', ++ '../../src/strtod.h', ++ '../../src/ic/stub-cache.cc', ++ '../../src/ic/stub-cache.h', ++ '../../src/token.cc', ++ '../../src/token.h', ++ '../../src/transitions-inl.h', ++ '../../src/transitions.cc', ++ '../../src/transitions.h', ++ '../../src/type-feedback-vector-inl.h', ++ '../../src/type-feedback-vector.cc', ++ '../../src/type-feedback-vector.h', ++ '../../src/type-info.cc', ++ '../../src/type-info.h', ++ '../../src/types-inl.h', ++ '../../src/types.cc', ++ '../../src/types.h', ++ '../../src/typing.cc', ++ '../../src/typing.h', ++ '../../src/unbound-queue-inl.h', ++ '../../src/unbound-queue.h', ++ '../../src/unicode-inl.h', ++ '../../src/unicode.cc', ++ '../../src/unicode.h', ++ '../../src/unicode-decoder.cc', ++ '../../src/unicode-decoder.h', ++ '../../src/unique.h', ++ '../../src/utils.cc', ++ '../../src/utils.h', ++ '../../src/v8.cc', ++ '../../src/v8.h', ++ '../../src/v8memory.h', ++ '../../src/v8threads.cc', ++ '../../src/v8threads.h', ++ '../../src/variables.cc', ++ '../../src/variables.h', ++ '../../src/vector.h', ++ '../../src/version.cc', ++ '../../src/version.h', ++ '../../src/vm-state-inl.h', ++ '../../src/vm-state.h', ++ '../../src/zone.cc', ++ '../../src/zone.h', ++ '../../src/zone-allocator.h', ++ '../../src/zone-containers.h', ++ '../../src/third_party/fdlibm/fdlibm.cc', ++ '../../src/third_party/fdlibm/fdlibm.h', ++ ], ++ 'conditions': [ ++ ['OS!="win" and remove_v8base_debug_symbols==1', { ++ 'cflags!': ['-g', '-gdwarf-4'], ++ }], ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ }, { ++ 'toolsets': ['target'], ++ }], ++ ['v8_target_arch=="arm"', { ++ 'sources': [ ### gcmole(arch:arm) ### ++ '../../src/arm/assembler-arm-inl.h', ++ '../../src/arm/assembler-arm.cc', ++ '../../src/arm/assembler-arm.h', ++ '../../src/arm/builtins-arm.cc', ++ '../../src/arm/code-stubs-arm.cc', ++ '../../src/arm/code-stubs-arm.h', ++ '../../src/arm/codegen-arm.cc', ++ '../../src/arm/codegen-arm.h', ++ '../../src/arm/constants-arm.h', ++ '../../src/arm/constants-arm.cc', ++ '../../src/arm/cpu-arm.cc', ++ '../../src/arm/debug-arm.cc', ++ '../../src/arm/deoptimizer-arm.cc', ++ '../../src/arm/disasm-arm.cc', ++ '../../src/arm/frames-arm.cc', ++ '../../src/arm/frames-arm.h', ++ '../../src/arm/full-codegen-arm.cc', ++ '../../src/arm/interface-descriptors-arm.cc', ++ '../../src/arm/interface-descriptors-arm.h', ++ '../../src/arm/lithium-arm.cc', ++ '../../src/arm/lithium-arm.h', ++ '../../src/arm/lithium-codegen-arm.cc', ++ '../../src/arm/lithium-codegen-arm.h', ++ '../../src/arm/lithium-gap-resolver-arm.cc', ++ '../../src/arm/lithium-gap-resolver-arm.h', ++ '../../src/arm/macro-assembler-arm.cc', ++ '../../src/arm/macro-assembler-arm.h', ++ '../../src/arm/regexp-macro-assembler-arm.cc', ++ '../../src/arm/regexp-macro-assembler-arm.h', ++ '../../src/arm/simulator-arm.cc', ++ '../../src/arm/simulator-arm.h', ++ '../../src/compiler/arm/code-generator-arm.cc', ++ '../../src/compiler/arm/instruction-codes-arm.h', ++ '../../src/compiler/arm/instruction-selector-arm.cc', ++ '../../src/compiler/arm/linkage-arm.cc', ++ '../../src/ic/arm/access-compiler-arm.cc', ++ '../../src/ic/arm/handler-compiler-arm.cc', ++ '../../src/ic/arm/ic-arm.cc', ++ '../../src/ic/arm/ic-compiler-arm.cc', ++ '../../src/ic/arm/stub-cache-arm.cc', ++ ], ++ }], ++ ['v8_target_arch=="arm64"', { ++ 'sources': [ ### gcmole(arch:arm64) ### ++ '../../src/arm64/assembler-arm64.cc', ++ '../../src/arm64/assembler-arm64.h', ++ '../../src/arm64/assembler-arm64-inl.h', ++ '../../src/arm64/builtins-arm64.cc', ++ '../../src/arm64/codegen-arm64.cc', ++ '../../src/arm64/codegen-arm64.h', ++ '../../src/arm64/code-stubs-arm64.cc', ++ '../../src/arm64/code-stubs-arm64.h', ++ '../../src/arm64/constants-arm64.h', ++ '../../src/arm64/cpu-arm64.cc', ++ '../../src/arm64/debug-arm64.cc', ++ '../../src/arm64/decoder-arm64.cc', ++ '../../src/arm64/decoder-arm64.h', ++ '../../src/arm64/decoder-arm64-inl.h', ++ '../../src/arm64/delayed-masm-arm64.cc', ++ '../../src/arm64/delayed-masm-arm64.h', ++ '../../src/arm64/delayed-masm-arm64-inl.h', ++ '../../src/arm64/deoptimizer-arm64.cc', ++ '../../src/arm64/disasm-arm64.cc', ++ '../../src/arm64/disasm-arm64.h', ++ '../../src/arm64/frames-arm64.cc', ++ '../../src/arm64/frames-arm64.h', ++ '../../src/arm64/full-codegen-arm64.cc', ++ '../../src/arm64/instructions-arm64.cc', ++ '../../src/arm64/instructions-arm64.h', ++ '../../src/arm64/instrument-arm64.cc', ++ '../../src/arm64/instrument-arm64.h', ++ '../../src/arm64/interface-descriptors-arm64.cc', ++ '../../src/arm64/interface-descriptors-arm64.h', ++ '../../src/arm64/lithium-arm64.cc', ++ '../../src/arm64/lithium-arm64.h', ++ '../../src/arm64/lithium-codegen-arm64.cc', ++ '../../src/arm64/lithium-codegen-arm64.h', ++ '../../src/arm64/lithium-gap-resolver-arm64.cc', ++ '../../src/arm64/lithium-gap-resolver-arm64.h', ++ '../../src/arm64/macro-assembler-arm64.cc', ++ '../../src/arm64/macro-assembler-arm64.h', ++ '../../src/arm64/macro-assembler-arm64-inl.h', ++ '../../src/arm64/regexp-macro-assembler-arm64.cc', ++ '../../src/arm64/regexp-macro-assembler-arm64.h', ++ '../../src/arm64/simulator-arm64.cc', ++ '../../src/arm64/simulator-arm64.h', ++ '../../src/arm64/utils-arm64.cc', ++ '../../src/arm64/utils-arm64.h', ++ '../../src/compiler/arm64/code-generator-arm64.cc', ++ '../../src/compiler/arm64/instruction-codes-arm64.h', ++ '../../src/compiler/arm64/instruction-selector-arm64.cc', ++ '../../src/compiler/arm64/linkage-arm64.cc', ++ '../../src/ic/arm64/access-compiler-arm64.cc', ++ '../../src/ic/arm64/handler-compiler-arm64.cc', ++ '../../src/ic/arm64/ic-arm64.cc', ++ '../../src/ic/arm64/ic-compiler-arm64.cc', ++ '../../src/ic/arm64/stub-cache-arm64.cc', ++ ], ++ }], ++ ['v8_target_arch=="ia32"', { ++ 'sources': [ ### gcmole(arch:ia32) ### ++ '../../src/ia32/assembler-ia32-inl.h', ++ '../../src/ia32/assembler-ia32.cc', ++ '../../src/ia32/assembler-ia32.h', ++ '../../src/ia32/builtins-ia32.cc', ++ '../../src/ia32/code-stubs-ia32.cc', ++ '../../src/ia32/code-stubs-ia32.h', ++ '../../src/ia32/codegen-ia32.cc', ++ '../../src/ia32/codegen-ia32.h', ++ '../../src/ia32/cpu-ia32.cc', ++ '../../src/ia32/debug-ia32.cc', ++ '../../src/ia32/deoptimizer-ia32.cc', ++ '../../src/ia32/disasm-ia32.cc', ++ '../../src/ia32/frames-ia32.cc', ++ '../../src/ia32/frames-ia32.h', ++ '../../src/ia32/full-codegen-ia32.cc', ++ '../../src/ia32/interface-descriptors-ia32.cc', ++ '../../src/ia32/lithium-codegen-ia32.cc', ++ '../../src/ia32/lithium-codegen-ia32.h', ++ '../../src/ia32/lithium-gap-resolver-ia32.cc', ++ '../../src/ia32/lithium-gap-resolver-ia32.h', ++ '../../src/ia32/lithium-ia32.cc', ++ '../../src/ia32/lithium-ia32.h', ++ '../../src/ia32/macro-assembler-ia32.cc', ++ '../../src/ia32/macro-assembler-ia32.h', ++ '../../src/ia32/regexp-macro-assembler-ia32.cc', ++ '../../src/ia32/regexp-macro-assembler-ia32.h', ++ '../../src/compiler/ia32/code-generator-ia32.cc', ++ '../../src/compiler/ia32/instruction-codes-ia32.h', ++ '../../src/compiler/ia32/instruction-selector-ia32.cc', ++ '../../src/compiler/ia32/linkage-ia32.cc', ++ '../../src/ic/ia32/access-compiler-ia32.cc', ++ '../../src/ic/ia32/handler-compiler-ia32.cc', ++ '../../src/ic/ia32/ic-ia32.cc', ++ '../../src/ic/ia32/ic-compiler-ia32.cc', ++ '../../src/ic/ia32/stub-cache-ia32.cc', ++ ], ++ }], ++ ['v8_target_arch=="x87"', { ++ 'sources': [ ### gcmole(arch:x87) ### ++ '../../src/x87/assembler-x87-inl.h', ++ '../../src/x87/assembler-x87.cc', ++ '../../src/x87/assembler-x87.h', ++ '../../src/x87/builtins-x87.cc', ++ '../../src/x87/code-stubs-x87.cc', ++ '../../src/x87/code-stubs-x87.h', ++ '../../src/x87/codegen-x87.cc', ++ '../../src/x87/codegen-x87.h', ++ '../../src/x87/cpu-x87.cc', ++ '../../src/x87/debug-x87.cc', ++ '../../src/x87/deoptimizer-x87.cc', ++ '../../src/x87/disasm-x87.cc', ++ '../../src/x87/frames-x87.cc', ++ '../../src/x87/frames-x87.h', ++ '../../src/x87/full-codegen-x87.cc', ++ '../../src/x87/interface-descriptors-x87.cc', ++ '../../src/x87/lithium-codegen-x87.cc', ++ '../../src/x87/lithium-codegen-x87.h', ++ '../../src/x87/lithium-gap-resolver-x87.cc', ++ '../../src/x87/lithium-gap-resolver-x87.h', ++ '../../src/x87/lithium-x87.cc', ++ '../../src/x87/lithium-x87.h', ++ '../../src/x87/macro-assembler-x87.cc', ++ '../../src/x87/macro-assembler-x87.h', ++ '../../src/x87/regexp-macro-assembler-x87.cc', ++ '../../src/x87/regexp-macro-assembler-x87.h', ++ '../../src/compiler/x87/code-generator-x87.cc', ++ '../../src/compiler/x87/instruction-codes-x87.h', ++ '../../src/compiler/x87/instruction-selector-x87.cc', ++ '../../src/compiler/x87/linkage-x87.cc', ++ '../../src/ic/x87/access-compiler-x87.cc', ++ '../../src/ic/x87/handler-compiler-x87.cc', ++ '../../src/ic/x87/ic-x87.cc', ++ '../../src/ic/x87/ic-compiler-x87.cc', ++ '../../src/ic/x87/stub-cache-x87.cc', ++ ], ++ }], ++ ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { ++ 'sources': [ ### gcmole(arch:mipsel) ### ++ '../../src/mips/assembler-mips.cc', ++ '../../src/mips/assembler-mips.h', ++ '../../src/mips/assembler-mips-inl.h', ++ '../../src/mips/builtins-mips.cc', ++ '../../src/mips/codegen-mips.cc', ++ '../../src/mips/codegen-mips.h', ++ '../../src/mips/code-stubs-mips.cc', ++ '../../src/mips/code-stubs-mips.h', ++ '../../src/mips/constants-mips.cc', ++ '../../src/mips/constants-mips.h', ++ '../../src/mips/cpu-mips.cc', ++ '../../src/mips/debug-mips.cc', ++ '../../src/mips/deoptimizer-mips.cc', ++ '../../src/mips/disasm-mips.cc', ++ '../../src/mips/frames-mips.cc', ++ '../../src/mips/frames-mips.h', ++ '../../src/mips/full-codegen-mips.cc', ++ '../../src/mips/interface-descriptors-mips.cc', ++ '../../src/mips/lithium-codegen-mips.cc', ++ '../../src/mips/lithium-codegen-mips.h', ++ '../../src/mips/lithium-gap-resolver-mips.cc', ++ '../../src/mips/lithium-gap-resolver-mips.h', ++ '../../src/mips/lithium-mips.cc', ++ '../../src/mips/lithium-mips.h', ++ '../../src/mips/macro-assembler-mips.cc', ++ '../../src/mips/macro-assembler-mips.h', ++ '../../src/mips/regexp-macro-assembler-mips.cc', ++ '../../src/mips/regexp-macro-assembler-mips.h', ++ '../../src/mips/simulator-mips.cc', ++ '../../src/mips/simulator-mips.h', ++ '../../src/compiler/mips/code-generator-mips.cc', ++ '../../src/compiler/mips/instruction-codes-mips.h', ++ '../../src/compiler/mips/instruction-selector-mips.cc', ++ '../../src/compiler/mips/linkage-mips.cc', ++ '../../src/ic/mips/access-compiler-mips.cc', ++ '../../src/ic/mips/handler-compiler-mips.cc', ++ '../../src/ic/mips/ic-mips.cc', ++ '../../src/ic/mips/ic-compiler-mips.cc', ++ '../../src/ic/mips/stub-cache-mips.cc', ++ ], ++ }], ++ ['v8_target_arch=="mips64el"', { ++ 'sources': [ ### gcmole(arch:mips64el) ### ++ '../../src/mips64/assembler-mips64.cc', ++ '../../src/mips64/assembler-mips64.h', ++ '../../src/mips64/assembler-mips64-inl.h', ++ '../../src/mips64/builtins-mips64.cc', ++ '../../src/mips64/codegen-mips64.cc', ++ '../../src/mips64/codegen-mips64.h', ++ '../../src/mips64/code-stubs-mips64.cc', ++ '../../src/mips64/code-stubs-mips64.h', ++ '../../src/mips64/constants-mips64.cc', ++ '../../src/mips64/constants-mips64.h', ++ '../../src/mips64/cpu-mips64.cc', ++ '../../src/mips64/debug-mips64.cc', ++ '../../src/mips64/deoptimizer-mips64.cc', ++ '../../src/mips64/disasm-mips64.cc', ++ '../../src/mips64/frames-mips64.cc', ++ '../../src/mips64/frames-mips64.h', ++ '../../src/mips64/full-codegen-mips64.cc', ++ '../../src/mips64/interface-descriptors-mips64.cc', ++ '../../src/mips64/lithium-codegen-mips64.cc', ++ '../../src/mips64/lithium-codegen-mips64.h', ++ '../../src/mips64/lithium-gap-resolver-mips64.cc', ++ '../../src/mips64/lithium-gap-resolver-mips64.h', ++ '../../src/mips64/lithium-mips64.cc', ++ '../../src/mips64/lithium-mips64.h', ++ '../../src/mips64/macro-assembler-mips64.cc', ++ '../../src/mips64/macro-assembler-mips64.h', ++ '../../src/mips64/regexp-macro-assembler-mips64.cc', ++ '../../src/mips64/regexp-macro-assembler-mips64.h', ++ '../../src/mips64/simulator-mips64.cc', ++ '../../src/mips64/simulator-mips64.h', ++ '../../src/compiler/mips64/code-generator-mips64.cc', ++ '../../src/compiler/mips64/instruction-codes-mips64.h', ++ '../../src/compiler/mips64/instruction-selector-mips64.cc', ++ '../../src/compiler/mips64/linkage-mips64.cc', ++ '../../src/ic/mips64/access-compiler-mips64.cc', ++ '../../src/ic/mips64/handler-compiler-mips64.cc', ++ '../../src/ic/mips64/ic-mips64.cc', ++ '../../src/ic/mips64/ic-compiler-mips64.cc', ++ '../../src/ic/mips64/stub-cache-mips64.cc', ++ ], ++ }], ++ ['v8_target_arch=="x64" or v8_target_arch=="x32"', { ++ 'sources': [ ### gcmole(arch:x64) ### ++ '../../src/x64/assembler-x64-inl.h', ++ '../../src/x64/assembler-x64.cc', ++ '../../src/x64/assembler-x64.h', ++ '../../src/x64/builtins-x64.cc', ++ '../../src/x64/code-stubs-x64.cc', ++ '../../src/x64/code-stubs-x64.h', ++ '../../src/x64/codegen-x64.cc', ++ '../../src/x64/codegen-x64.h', ++ '../../src/x64/cpu-x64.cc', ++ '../../src/x64/debug-x64.cc', ++ '../../src/x64/deoptimizer-x64.cc', ++ '../../src/x64/disasm-x64.cc', ++ '../../src/x64/frames-x64.cc', ++ '../../src/x64/frames-x64.h', ++ '../../src/x64/full-codegen-x64.cc', ++ '../../src/x64/interface-descriptors-x64.cc', ++ '../../src/x64/lithium-codegen-x64.cc', ++ '../../src/x64/lithium-codegen-x64.h', ++ '../../src/x64/lithium-gap-resolver-x64.cc', ++ '../../src/x64/lithium-gap-resolver-x64.h', ++ '../../src/x64/lithium-x64.cc', ++ '../../src/x64/lithium-x64.h', ++ '../../src/x64/macro-assembler-x64.cc', ++ '../../src/x64/macro-assembler-x64.h', ++ '../../src/x64/regexp-macro-assembler-x64.cc', ++ '../../src/x64/regexp-macro-assembler-x64.h', ++ '../../src/ic/x64/access-compiler-x64.cc', ++ '../../src/ic/x64/handler-compiler-x64.cc', ++ '../../src/ic/x64/ic-x64.cc', ++ '../../src/ic/x64/ic-compiler-x64.cc', ++ '../../src/ic/x64/stub-cache-x64.cc', ++ ], ++ }], ++ ['v8_target_arch=="x64"', { ++ 'sources': [ ++ '../../src/compiler/x64/code-generator-x64.cc', ++ '../../src/compiler/x64/instruction-codes-x64.h', ++ '../../src/compiler/x64/instruction-selector-x64.cc', ++ '../../src/compiler/x64/linkage-x64.cc', ++ ], ++ }], ++ ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { ++ 'sources': [ ### gcmole(arch:ppc) ### ++ '../../src/ppc/assembler-ppc-inl.h', ++ '../../src/ppc/assembler-ppc.cc', ++ '../../src/ppc/assembler-ppc.h', ++ '../../src/ppc/builtins-ppc.cc', ++ '../../src/ppc/code-stubs-ppc.cc', ++ '../../src/ppc/code-stubs-ppc.h', ++ '../../src/ppc/codegen-ppc.cc', ++ '../../src/ppc/codegen-ppc.h', ++ '../../src/ppc/constants-ppc.h', ++ '../../src/ppc/constants-ppc.cc', ++ '../../src/ppc/cpu-ppc.cc', ++ '../../src/ppc/debug-ppc.cc', ++ '../../src/ppc/deoptimizer-ppc.cc', ++ '../../src/ppc/disasm-ppc.cc', ++ '../../src/ppc/frames-ppc.cc', ++ '../../src/ppc/frames-ppc.h', ++ '../../src/ppc/full-codegen-ppc.cc', ++ '../../src/ppc/interface-descriptors-ppc.cc', ++ '../../src/ppc/interface-descriptors-ppc.h', ++ '../../src/ppc/lithium-ppc.cc', ++ '../../src/ppc/lithium-ppc.h', ++ '../../src/ppc/lithium-codegen-ppc.cc', ++ '../../src/ppc/lithium-codegen-ppc.h', ++ '../../src/ppc/lithium-gap-resolver-ppc.cc', ++ '../../src/ppc/lithium-gap-resolver-ppc.h', ++ '../../src/ppc/macro-assembler-ppc.cc', ++ '../../src/ppc/macro-assembler-ppc.h', ++ '../../src/ppc/regexp-macro-assembler-ppc.cc', ++ '../../src/ppc/regexp-macro-assembler-ppc.h', ++ '../../src/ppc/simulator-ppc.cc', ++ '../../src/ppc/simulator-ppc.h', ++ '../../src/compiler/ppc/code-generator-ppc.cc', ++ '../../src/compiler/ppc/instruction-codes-ppc.h', ++ '../../src/compiler/ppc/instruction-selector-ppc.cc', ++ '../../src/compiler/ppc/linkage-ppc.cc', ++ '../../src/ic/ppc/access-compiler-ppc.cc', ++ '../../src/ic/ppc/handler-compiler-ppc.cc', ++ '../../src/ic/ppc/ic-ppc.cc', ++ '../../src/ic/ppc/ic-compiler-ppc.cc', ++ '../../src/ic/ppc/stub-cache-ppc.cc', ++ ], ++ }], ++ ['OS=="win"', { ++ 'variables': { ++ 'gyp_generators': ' Date: Tue, 19 Jan 2016 03:52:05 +0100 Subject: [PATCH 043/437] no-sse2.patch: Fix invalid gyp syntax in v8_sse2.gyp (by fixing make-v8-sse2-gyp.sh) --- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 445ea18..35fd6ec 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2787,11 +2787,11 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g +for SUBTARGET in $SUBTARGETS ; do + SEDS=$SEDS\ -e\ "s/'$SUBTARGET'/'${SUBTARGET}_sse2'/g" +done -+sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32'/g" \ ++sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ + $SEDS \ + -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ + -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ -+ -e "s#^\( *\)\('target_name': 'v8_sse2'\)#\1\2\n\1'product_name': 'v8'\n\1'product_dir': '<(PRODUCT_DIR)/sse2'#g" \ ++ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/sse2',#g" \ + v8.gyp >>v8_sse2.gyp diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2015-12-10 18:17:21.000000000 +0100 @@ -2892,7 +2892,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + +{ + 'variables': { -+ 'v8_target_arch': 'ia32' ++ 'v8_target_arch': 'ia32', + 'icu_use_data_file_flag%': 0, + 'v8_code': 1, + 'v8_random_seed%': 314159265, @@ -2912,8 +2912,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], + 'targets': [ + { -+ 'target_name': 'v8_sse2' -+ 'product_name': 'v8' ++ 'target_name': 'v8_sse2', ++ 'product_name': 'v8', + 'product_dir': '<(PRODUCT_DIR)/sse2', + 'dependencies_traverse': 1, + 'dependencies': ['v8_maybe_snapshot_sse2'], From 09c4c1fc156ae58fc03f69b7c579c6e6f38cb18c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 04:11:36 +0100 Subject: [PATCH 044/437] no-sse2.patch: Fix another error in v8_sse2.gyp (by fixing make-v8-sse2-gyp.sh) --- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 35fd6ec..03a078d 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2785,7 +2785,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g +SUBTARGETS=`grep "'target_name': 'v8" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"`" mksnapshot" +SEDS= +for SUBTARGET in $SUBTARGETS ; do -+ SEDS=$SEDS\ -e\ "s/'$SUBTARGET'/'${SUBTARGET}_sse2'/g" ++ SEDS=$SEDS\ -e\ "s/'$SUBTARGET\(['#]\)/'${SUBTARGET}_sse2\1/g" +done +sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ + $SEDS \ @@ -3025,7 +3025,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ['want_separate_host_toolset==1', { + 'toolsets': ['host', 'target'], + 'dependencies': [ -+ 'mksnapshot#host', ++ 'mksnapshot_sse2#host', + 'js2c#host', + ], + }, { @@ -3130,7 +3130,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ['want_separate_host_toolset==1', { + 'toolsets': ['host', 'target'], + 'dependencies': [ -+ 'mksnapshot#host', ++ 'mksnapshot_sse2#host', + 'js2c#host', + 'natives_blob', + ]}, { From 46c0dc8c42e9b6a4efb9bffa33362ef6ce788dce Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 04:58:50 +0100 Subject: [PATCH 045/437] no-sse2.patch: More v8_sse2.gyp fixes, ensure everything is renamed (again, by fixing the make-v8-sse2-gyp.sh script) --- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 127 ++++++++++-------- 1 file changed, 70 insertions(+), 57 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 03a078d..b677448 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2748,8 +2748,8 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g sources += [ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 03:13:08.617522460 +0100 -@@ -0,0 +1,43 @@ ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 04:52:31.878947186 +0100 +@@ -0,0 +1,56 @@ +#!/bin/sh +# This script renames the v8 targets to _sse2 names so that they do not conflict +# with the non-SSE2 versions. @@ -2781,16 +2781,29 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ++# add comment noting that the file is generated +echo "# Generated from v8.gyp by make-v8-sse2-gyp.sh" >v8_sse2.gyp -+SUBTARGETS=`grep "'target_name': 'v8" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"`" mksnapshot" ++# rename all target names ++SUBTARGETS=`grep "'target_name': '" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"` +SEDS= +for SUBTARGET in $SUBTARGETS ; do + SEDS=$SEDS\ -e\ "s/'$SUBTARGET\(['#]\)/'${SUBTARGET}_sse2\1/g" +done ++# in addition: ++# * set v8_target_arch to "ia32" (instead of "x87") ++# * rename all actions ++# * fix mksnapshot_exec to match the renamed target ++# * rename the generated snapshot.cc (but not mksnapshot.cc) to snapshot_sse2.cc ++# * rename the generated *libraries.cc to *libraries_sse2.cc ++# * rename the generated *.bin to *_sse2.bin ++# * set product_name and product_dir for the v8_sse2 target +sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ ++ -e "s/\('action_name': '\)/\1v8_sse2_/g" \ + $SEDS \ + -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ + -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ ++ -e "s/libraries\.cc/libraries_sse2.cc/g" \ ++ -e "s/\.bin/_sse2.bin/g" \ + -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/sse2',#g" \ + v8.gyp >>v8_sse2.gyp diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp @@ -2860,7 +2873,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g 'V8_SHARED', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 03:13:12.572544083 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 04:52:40.811995458 +0100 @@ -0,0 +1,1952 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -2995,18 +3008,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + }], + ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', { + 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], -+ 'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ], ++ 'inputs': [ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', ], + }], + ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', { + 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], + 'target_conditions': [ + ['_toolset=="host"', { + 'inputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + ], + }, { + 'inputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + ], + }], + ], @@ -3026,13 +3039,13 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + 'toolsets': ['host', 'target'], + 'dependencies': [ + 'mksnapshot_sse2#host', -+ 'js2c#host', ++ 'js2c_sse2#host', + ], + }, { + 'toolsets': ['target'], + 'dependencies': [ + 'mksnapshot_sse2', -+ 'js2c', ++ 'js2c_sse2', + ], + }], + ['v8_component=="shared_library"', { @@ -3055,14 +3068,14 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + '../..', + ], + 'sources': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + ], + 'actions': [ + { -+ 'action_name': 'run_mksnapshot', ++ 'action_name': 'v8_sse2_run_mksnapshot', + 'inputs': [ + '<(mksnapshot_exec)', + '<(embed_script)', @@ -3100,18 +3113,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + '../..', + ], + 'sources': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + '../../src/snapshot/snapshot-empty.cc', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { + 'toolsets': ['host', 'target'], -+ 'dependencies': ['js2c#host'], ++ 'dependencies': ['js2c_sse2#host'], + }, { + 'toolsets': ['target'], -+ 'dependencies': ['js2c'], ++ 'dependencies': ['js2c_sse2'], + }], + ['v8_component=="shared_library"', { + 'defines': [ @@ -3131,14 +3144,14 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + 'toolsets': ['host', 'target'], + 'dependencies': [ + 'mksnapshot_sse2#host', -+ 'js2c#host', -+ 'natives_blob', ++ 'js2c_sse2#host', ++ 'natives_blob_sse2', + ]}, { + 'toolsets': ['target'], + 'dependencies': [ + 'mksnapshot_sse2', -+ 'js2c', -+ 'natives_blob', ++ 'js2c_sse2', ++ 'natives_blob_sse2', + ], + }], + ['v8_component=="shared_library"', { @@ -3166,7 +3179,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ], + 'actions': [ + { -+ 'action_name': 'run_mksnapshot (external)', ++ 'action_name': 'v8_sse2_run_mksnapshot (external)', + 'inputs': [ + '<(mksnapshot_exec)', + ], @@ -3187,25 +3200,25 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ['_toolset=="host"', { + 'outputs': [ + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', + '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host.bin', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + '<(embed_script)', + ], + }, { + 'outputs': [ + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', + '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', + ], + }], @@ -3213,13 +3226,13 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + }, { + 'outputs': [ + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', + '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin', ++ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', + ], + }], @@ -4549,50 +4562,50 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ], + }, + { -+ 'target_name': 'natives_blob', ++ 'target_name': 'natives_blob_sse2', + 'type': 'none', + 'conditions': [ + [ 'v8_use_external_startup_data==1', { + 'conditions': [ + ['want_separate_host_toolset==1', { -+ 'dependencies': ['js2c#host'], ++ 'dependencies': ['js2c_sse2#host'], + }, { -+ 'dependencies': ['js2c'], ++ 'dependencies': ['js2c_sse2'], + }], + ], + 'actions': [{ -+ 'action_name': 'concatenate_natives_blob', ++ 'action_name': 'v8_sse2_concatenate_natives_blob', + 'inputs': [ + '../../tools/concatenate-files.py', -+ '<(SHARED_INTERMEDIATE_DIR)/libraries.bin', -+ '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin', -+ '<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { + 'target_conditions': [ + ['_toolset=="host"', { + 'outputs': [ -+ '<(PRODUCT_DIR)/natives_blob_host.bin', ++ '<(PRODUCT_DIR)/natives_blob_host_sse2.bin', + ], + 'action': [ -+ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin' ++ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host_sse2.bin' + ], + }, { + 'outputs': [ -+ '<(PRODUCT_DIR)/natives_blob.bin', ++ '<(PRODUCT_DIR)/natives_blob_sse2.bin', + ], + 'action': [ -+ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin' ++ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_sse2.bin' + ], + }], + ], + }, { + 'outputs': [ -+ '<(PRODUCT_DIR)/natives_blob.bin', ++ '<(PRODUCT_DIR)/natives_blob_sse2.bin', + ], + 'action': [ -+ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin' ++ 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_sse2.bin' + ], + }], + ], @@ -4606,7 +4619,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ] + }, + { -+ 'target_name': 'js2c', ++ 'target_name': 'js2c_sse2', + 'type': 'none', + 'conditions': [ + ['want_separate_host_toolset==1', { @@ -4676,25 +4689,25 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + '../../src/harmony-object.js', + '../../src/harmony-sharedarraybuffer.js', + ], -+ 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin', -+ 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin', -+ 'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras.bin', ++ 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', ++ 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', ++ 'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', + }, + 'actions': [ + { -+ 'action_name': 'js2c', ++ 'action_name': 'v8_sse2_js2c', + 'inputs': [ + '../../tools/js2c.py', + '<@(library_files)', + '<@(i18n_library_files)' + ], + 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + ], + 'action': [ + 'python', + '../../tools/js2c.py', -+ '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + 'CORE', + '<@(library_files)', + '<@(i18n_library_files)' @@ -4709,18 +4722,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ], + }, + { -+ 'action_name': 'js2c_experimental', ++ 'action_name': 'v8_sse2_js2c_experimental', + 'inputs': [ + '../../tools/js2c.py', + '<@(experimental_library_files)', + ], + 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + ], + 'action': [ + 'python', + '../../tools/js2c.py', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + 'EXPERIMENTAL', + '<@(experimental_library_files)' + ], @@ -4734,18 +4747,18 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ], + }, + { -+ 'action_name': 'js2c_extras', ++ 'action_name': 'v8_sse2_js2c_extras', + 'inputs': [ + '../../tools/js2c.py', + '<@(v8_extra_library_files)', + ], + 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + ], + 'action': [ + 'python', + '../../tools/js2c.py', -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + 'EXTRAS', + '<@(v8_extra_library_files)', + ], @@ -4761,7 +4774,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + ], + }, + { -+ 'target_name': 'postmortem-metadata', ++ 'target_name': 'postmortem-metadata_sse2', + 'type': 'none', + 'variables': { + 'heapobject_files': [ @@ -4771,7 +4784,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + }, + 'actions': [ + { -+ 'action_name': 'gen-postmortem-metadata', ++ 'action_name': 'v8_sse2_gen-postmortem-metadata', + 'inputs': [ + '../../tools/gen-postmortem-metadata.py', + '<@(heapobject_files)', From b0fe95f4fe5eaff32037de9d3fee06c8dcf8334d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 05:54:16 +0100 Subject: [PATCH 046/437] no-sse2.patch: Fix the output path in v8_sse2.gyp (again, by fixing the make-v8-sse2-gyp.sh script) --- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index b677448..4bcbebd 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2748,7 +2748,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g sources += [ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 04:52:31.878947186 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 05:50:30.722730427 +0100 @@ -0,0 +1,56 @@ +#!/bin/sh +# This script renames the v8 targets to _sse2 names so that they do not conflict @@ -2804,7 +2804,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ + -e "s/libraries\.cc/libraries_sse2.cc/g" \ + -e "s/\.bin/_sse2.bin/g" \ -+ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/sse2',#g" \ ++ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ + v8.gyp >>v8_sse2.gyp diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2015-12-10 18:17:21.000000000 +0100 @@ -2873,7 +2873,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g 'V8_SHARED', diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 04:52:40.811995458 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 05:51:07.209927516 +0100 @@ -0,0 +1,1952 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -2927,7 +2927,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + { + 'target_name': 'v8_sse2', + 'product_name': 'v8', -+ 'product_dir': '<(PRODUCT_DIR)/sse2', ++ 'product_dir': '<(PRODUCT_DIR)/lib/sse2', + 'dependencies_traverse': 1, + 'dependencies': ['v8_maybe_snapshot_sse2'], + 'conditions': [ From 306e720cfb49cdc74038102f38154eb0acc51359 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 14:55:13 +0100 Subject: [PATCH 047/437] no-sse2.patch: Install the shared libraries, don't link the sse2 one --- qt5-qtwebengine.spec | 4 +- ...ne-opensource-src-5.6.0-beta-no-sse2.patch | 47 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9f8b7e3..7c0d632 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -24,7 +24,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.14.beta.nosse2.2%{?dist} +Release: 0.14.beta.nosse2.3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -360,7 +360,7 @@ popd %changelog -* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.2 +* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.3 - Build V8 as a shared library on i686 to allow for swappable backends - Build both the x87 version and the SSE2 version of V8 on i686 diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 4bcbebd..cad3c06 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -4827,6 +4827,53 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + }, + ], +} +diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro 2016-01-19 14:49:57.592655159 +0100 +@@ -9,6 +9,29 @@ + error("Could not find the linking information that gyp should have generated.") + } + ++# find the shared libraries in the link line ++# remove those in lib/sse2 that are only replacements for the normal ones ++# collect all shared libraries so they can be installed ++for(private_lib, LIBS_PRIVATE) { ++ contains(private_lib, .*\.so) { ++ contains(private_lib, .*/lib/sse2/.*) { ++ LIBS_PRIVATE -= $$private_lib ++ shlibs_sse2 += $$private_lib ++ } else { ++ shlibs += $$private_lib ++ } ++ } ++} ++ ++# set the shared libraries to be installed ++# add an rpath to their installation location ++shlib_install_path = $$[QT_INSTALL_LIBS]/qtwebengine ++!isEmpty(shlibs) { ++ shlibs.files += $$shlibs ++ shlibs_sse2.files += $$shlibs_sse2 ++ LIBS_PRIVATE += -Wl,--rpath,$$shlib_install_path ++} ++ + load(qt_module) + + api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() +@@ -73,7 +96,12 @@ + resources.path = $$[QT_INSTALL_DATA] + icu.CONFIG += no_check_exist + icu.path = $$[QT_INSTALL_DATA] +- INSTALLS += icu locales resources ++ # install the shared libraries ++ shlibs.CONFIG += no_check_exist ++ shlibs.path = $$shlib_install_path ++ shlibs_sse2.CONFIG += no_check_exist ++ shlibs_sse2.path = $$shlib_install_path/sse2 ++ INSTALLS += icu locales resources shlibs shlibs_sse2 + } + + !contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/qtwebengine.gypi --- qtwebengine-opensource-src-5.6.0-beta/src/core/qtwebengine.gypi 2015-12-14 16:27:24.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/qtwebengine.gypi 2016-01-19 02:13:13.757769179 +0100 From 24bef19c7721093ee3c405b9f67d03fd1a553d68 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 15:03:04 +0100 Subject: [PATCH 048/437] Add the private library directory to the file list on i686 --- qt5-qtwebengine.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7c0d632..db2cf8c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -336,6 +336,10 @@ popd %{_qt5_libdir}/libQt5*.so.* %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess +%ifarch %{ix86} +# shared V8 library and its SSE2 version +%{_qt5_libdir}/qtwebengine/ +%endif %{_qt5_translationdir}/* %{_qt5_datadir}/qtwebengine_resources.pak @@ -363,6 +367,7 @@ popd * Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.3 - Build V8 as a shared library on i686 to allow for swappable backends - Build both the x87 version and the SSE2 version of V8 on i686 +- Add the private library directory to the file list on i686 * Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.14.beta - Do not require SSE2 on i686 From fa42c4788929a7a650f930bea3a7a98b5614d189 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 17:37:35 +0100 Subject: [PATCH 049/437] Add Provides/Requires filtering for libv8.so (i686) and for plugins --- qt5-qtwebengine.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index db2cf8c..142f02e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -21,10 +21,16 @@ %global prerelease beta +# exclude plugins (all architectures) and libv8.so (i686, it's static everywhere +# else) +%global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ +# exclude libv8.so (i686, it's static everywhere else) +%global __requires_exclude ^libv8\\.so$ + Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.14.beta.nosse2.3%{?dist} +Release: 0.14.beta.nosse2.4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -364,10 +370,11 @@ popd %changelog -* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.3 +* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.4 - Build V8 as a shared library on i686 to allow for swappable backends - Build both the x87 version and the SSE2 version of V8 on i686 - Add the private library directory to the file list on i686 +- Add Provides/Requires filtering for libv8.so (i686) and for plugins * Sun Jan 17 2016 Kevin Kofler - 5.6.0-0.14.beta - Do not require SSE2 on i686 From 7c8a25cacbace3ee6e909f062f06e1a0cef8b598 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jan 2016 20:05:23 +0100 Subject: [PATCH 050/437] Bump Release for official Rawhide build --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 142f02e..4207b2e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.14.beta.nosse2.4%{?dist} +Release: 0.15.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,7 +370,7 @@ popd %changelog -* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.14.beta.nosse2.4 +* Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.15.beta - Build V8 as a shared library on i686 to allow for swappable backends - Build both the x87 version and the SSE2 version of V8 on i686 - Add the private library directory to the file list on i686 From a41ab0a6616475ed6d2a76034523206d47dc5e41 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 22 Jan 2016 02:14:50 +0100 Subject: [PATCH 051/437] Update comment on no-sse2.patch V8 is already built shared and twice on i686 now (no longer TODO). --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4207b2e..53150ff 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -74,7 +74,7 @@ Patch7: qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements -# TODO: build V8 shared and twice (once for x87, once for SSE2) +# also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch8: qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) From 1968dfff528b265837523d82c10946d66b3ce53e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 21:48:01 +0000 Subject: [PATCH 052/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 53150ff..900b21b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.15.beta%{?dist} +Release: 0.16.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,6 +370,9 @@ popd %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 5.6.0-0.16.beta +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Jan 19 2016 Kevin Kofler - 5.6.0-0.15.beta - Build V8 as a shared library on i686 to allow for swappable backends - Build both the x87 version and the SSE2 version of V8 on i686 From 9ac4c0c9921e6936e89ed1881d03f63f0d400683 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 23 Feb 2016 01:03:18 +0100 Subject: [PATCH 053/437] clean_ffmpeg.sh: Add missing aarch64 files. (Fixes #1310753.) * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta - Fix FTBFS on aarch64: Respin tarball with fixed clean_ffmpeg.sh (#1310753). --- clean_ffmpeg.sh | 2 ++ qt5-qtwebengine.spec | 5 ++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index b0d0ae7..c7ad617 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -36,6 +36,8 @@ header_files=" libavutil/x86/asm.h \ libavutil/x86/intmath.h \ libavutil/x86/intreadwrite.h \ libavutil/x86/timer.h \ + libavutil/aarch64/asm.S \ + libavutil/aarch64/bswap.h \ libavutil/arm/asm.S \ libavutil/arm/bswap.h \ libavutil/arm/cpu.h \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 900b21b..35599db 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.16.beta%{?dist} +Release: 0.17.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,6 +370,9 @@ popd %changelog +* Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta +- Fix FTBFS on aarch64: Respin tarball with fixed clean_ffmpeg.sh (#1310753). + * Thu Feb 04 2016 Fedora Release Engineering - 5.6.0-0.16.beta - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 4df1abc..0f2a69f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -caec41469f29a0a3781213d8dcde7b77 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +00a5efd0a2bff216271a54a37dbc98c7 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From 65fd4d09a1dba53ee1d3e7712c887ee7dd613977 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Tue, 23 Feb 2016 17:07:31 +0100 Subject: [PATCH 054/437] - Uploaded rc --- .gitignore | 1 + qt5-qtwebengine.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9438a84..be1bb36 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +/qtwebengine-opensource-src-5.6.0-rc.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 35599db..265360e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -19,7 +19,7 @@ %global use_system_libwebp 1 %endif -%global prerelease beta +%global prerelease rc # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.17.beta%{?dist} +Release: 0.1.%{prerelease}%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,6 +370,9 @@ popd %changelog +* Tue Feb 23 2016 Helio Chissini de Castro - 5.6.0-0.1.rc +- Update to final RC + * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta - Fix FTBFS on aarch64: Respin tarball with fixed clean_ffmpeg.sh (#1310753). diff --git a/sources b/sources index 0f2a69f..68189f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -00a5efd0a2bff216271a54a37dbc98c7 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +af563195bc61e878e8de45658a1bd745 qtwebengine-opensource-src-5.6.0-rc.tar.xz From 57c1fcecf290982a5be1b342cfc39c3b5255e329 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 24 Feb 2016 03:03:36 +0100 Subject: [PATCH 055/437] Revert "- Uploaded rc" This reverts commit 65fd4d09a1dba53ee1d3e7712c887ee7dd613977. The tarball is not redistributable, the EVR bump was done wrong (goes backwards), and the package does not even build (because the uploaded tarball does not have "-clean" in the file name), so there is absolutely nothing worth keeping in that commit. --- .gitignore | 1 - qt5-qtwebengine.spec | 7 ++----- sources | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index be1bb36..9438a84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz -/qtwebengine-opensource-src-5.6.0-rc.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 265360e..35599db 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -19,7 +19,7 @@ %global use_system_libwebp 1 %endif -%global prerelease rc +%global prerelease beta # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.1.%{prerelease}%{?dist} +Release: 0.17.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,9 +370,6 @@ popd %changelog -* Tue Feb 23 2016 Helio Chissini de Castro - 5.6.0-0.1.rc -- Update to final RC - * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta - Fix FTBFS on aarch64: Respin tarball with fixed clean_ffmpeg.sh (#1310753). diff --git a/sources b/sources index 68189f1..0f2a69f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -af563195bc61e878e8de45658a1bd745 qtwebengine-opensource-src-5.6.0-rc.tar.xz +00a5efd0a2bff216271a54a37dbc98c7 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz From 58b406a343ad6c08618111735020dc3bf4da5af8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 24 Feb 2016 04:50:18 +0100 Subject: [PATCH 056/437] no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.18.beta - no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 35599db..bfb6973 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.17.beta%{?dist} +Release: 0.18.beta%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -370,6 +370,9 @@ popd %changelog +* Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.18.beta +- no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 + * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta - Fix FTBFS on aarch64: Respin tarball with fixed clean_ffmpeg.sh (#1310753). diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index cad3c06..32e7aee 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2608,15 +2608,19 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part namespace webrtc { -@@ -23,6 +24,10 @@ +@@ -23,6 +24,14 @@ rtc::scoped_ptr RealFourier::Create(int fft_order) { #if defined(RTC_USE_OPENMAX_DL) +#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) + // x86 CPU detection required. + if (WebRtc_GetCPUInfo(kSSE2)) -+#endif ++ return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); ++ else ++ return rtc::scoped_ptr(new RealFourierOoura(fft_order)); ++#else return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); ++#endif #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py From fe70d18f1f961069accf99fdf1976e6948416798 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 24 Feb 2016 14:08:39 +0100 Subject: [PATCH 057/437] Fix no-sse2 patch. The patch tool insists on symmetric context for some reason. --- qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch index 32e7aee..4210d61 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch @@ -2608,7 +2608,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part namespace webrtc { -@@ -23,6 +24,14 @@ +@@ -23,7 +24,15 @@ rtc::scoped_ptr RealFourier::Create(int fft_order) { #if defined(RTC_USE_OPENMAX_DL) @@ -2623,6 +2623,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part +#endif #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); + #endif diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py --- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2015-12-10 18:17:21.000000000 +0100 +++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-01-18 03:00:21.703867569 +0100 From 26c2ef598c32d0f359b090ba63ba3f0712820fe9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 24 Feb 2016 16:15:14 +0100 Subject: [PATCH 058/437] Update to 5.6.0 RC * Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.19.rc - Update to 5.6.0 RC --- .gitignore | 1 + qt5-qtwebengine.spec | 15 +++++++++------ sources | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 9438a84..326d197 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +/qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bfb6973..a77617a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -19,7 +19,7 @@ %global use_system_libwebp 1 %endif -%global prerelease beta +%global prerelease rc # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.18.beta%{?dist} +Release: 0.19.rc%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -38,9 +38,9 @@ Release: 0.18.beta%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/development_releases/qt/5.6/5.6.0-beta/submodules/qtwebengine-opensource-src-5.6.0-beta.7z -# ./clean_qtwebengine.sh 5.6.0-beta -Source0: qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +# wget http://download.qt.io/development_releases/qt/5.6/5.6.0-rc/submodules/qtwebengine-opensource-src-5.6.0-rc.tar.xz +# ./clean_qtwebengine.sh 5.6.0-rc +Source0: qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh @@ -370,7 +370,10 @@ popd %changelog -* Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.18.beta +* Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.19.rc +- Update to 5.6.0 RC + +* Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.18.beta - no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 * Tue Feb 23 2016 Kevin Kofler - 5.6.0-0.17.beta diff --git a/sources b/sources index 0f2a69f..e9830d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -00a5efd0a2bff216271a54a37dbc98c7 qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +22fc5fb20c8db10514dc17919de75ac7 qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz From 7f40671ad87974303a9d6f0dc489edb4b19447a3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 24 Feb 2016 23:28:14 +0100 Subject: [PATCH 059/437] Rebase linux-pri patch, rm BR pkgconfig(flac), pkgconfig(speex) - Rebase linux-pri patch - Remove BuildRequires pkgconfig(flac), pkgconfig(speex), no longer needed --- qt5-qtwebengine.spec | 6 +++--- ...qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) rename qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch => qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch (79%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a77617a..9152d64 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -49,7 +49,7 @@ Source3: process_ffmpeg_gyp.py Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script, # do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment) -Patch1: qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +Patch1: qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the @@ -121,7 +121,6 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(minizip) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) @@ -142,7 +141,6 @@ BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) -BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(libsrtp) BuildRequires: perl BuildRequires: python @@ -372,6 +370,8 @@ popd %changelog * Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.19.rc - Update to 5.6.0 RC +- Rebase linux-pri patch +- Remove BuildRequires pkgconfig(flac), pkgconfig(speex), no longer needed * Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.18.beta - no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 diff --git a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch similarity index 79% rename from qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch rename to qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch index cf24289..5e55b34 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-linux-pri.patch +++ b/qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch @@ -1,7 +1,7 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri 2016-01-14 17:31:05.765975551 +0100 -@@ -18,7 +18,13 @@ +diff -ur qtwebengine-opensource-src-5.6.0-rc/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-rc-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.6.0-rc/src/core/config/linux.pri 2016-02-15 16:18:46.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-linux-pri/src/core/config/linux.pri 2016-02-24 23:24:01.533878478 +0100 +@@ -20,7 +20,13 @@ use_kerberos=0 \ use_pango=0 @@ -17,8 +17,8 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtweben use_openssl=1 \ use_openssl_certs=1 @@ -40,6 +46,28 @@ + use?(system_opus): GYP_CONFIG += use_system_opus=1 use?(system_snappy): GYP_CONFIG += use_system_snappy=1 - use?(system_speex): GYP_CONFIG += use_system_speex=1 use?(system_vpx): GYP_CONFIG += use_system_libvpx=1 -use?(system_icu): GYP_CONFIG += use_system_icu=1 +use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 From b6bc15418f9567a278d56830cfef8c4ba4efc285 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 25 Feb 2016 01:24:47 +0100 Subject: [PATCH 060/437] Rebase no-sse2 patch, fix file list - Rebase no-sse2 patch - Update file list for 5.6.0 RC (resources now in resources/ subdirectory) - Tag translations with correct %lang tags --- qt5-qtwebengine.spec | 68 +++- ...gine-opensource-src-5.6.0-rc-no-sse2.patch | 350 +++++++++--------- 2 files changed, 235 insertions(+), 183 deletions(-) rename qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch => qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch (86%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9152d64..188abc3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -75,7 +75,7 @@ Patch7: qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch8: qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +Patch8: qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -344,11 +344,61 @@ popd # shared V8 library and its SSE2 version %{_qt5_libdir}/qtwebengine/ %endif -%{_qt5_translationdir}/* - -%{_qt5_datadir}/qtwebengine_resources.pak -%{_qt5_datadir}/qtwebengine_resources_100p.pak -%{_qt5_datadir}/qtwebengine_resources_200p.pak +%{_qt5_datadir}/resources/ +%dir %{_qt5_translationdir}/qtwebengine_locales +%lang(am) %{_qt5_translationdir}/qtwebengine_locales/am.pak +%lang(ar) %{_qt5_translationdir}/qtwebengine_locales/ar.pak +%lang(bg) %{_qt5_translationdir}/qtwebengine_locales/bg.pak +%lang(bn) %{_qt5_translationdir}/qtwebengine_locales/bn.pak +%lang(ca) %{_qt5_translationdir}/qtwebengine_locales/ca.pak +%lang(cs) %{_qt5_translationdir}/qtwebengine_locales/cs.pak +%lang(da) %{_qt5_translationdir}/qtwebengine_locales/da.pak +%lang(de) %{_qt5_translationdir}/qtwebengine_locales/de.pak +%lang(el) %{_qt5_translationdir}/qtwebengine_locales/el.pak +%lang(en) %{_qt5_translationdir}/qtwebengine_locales/en-GB.pak +%lang(en) %{_qt5_translationdir}/qtwebengine_locales/en-US.pak +%lang(es) %{_qt5_translationdir}/qtwebengine_locales/es-419.pak +%lang(es) %{_qt5_translationdir}/qtwebengine_locales/es.pak +%lang(et) %{_qt5_translationdir}/qtwebengine_locales/et.pak +%lang(fa) %{_qt5_translationdir}/qtwebengine_locales/fa.pak +%lang(fi) %{_qt5_translationdir}/qtwebengine_locales/fi.pak +%lang(fil) %{_qt5_translationdir}/qtwebengine_locales/fil.pak +%lang(fr) %{_qt5_translationdir}/qtwebengine_locales/fr.pak +%lang(gu) %{_qt5_translationdir}/qtwebengine_locales/gu.pak +%lang(he) %{_qt5_translationdir}/qtwebengine_locales/he.pak +%lang(hi) %{_qt5_translationdir}/qtwebengine_locales/hi.pak +%lang(hr) %{_qt5_translationdir}/qtwebengine_locales/hr.pak +%lang(hu) %{_qt5_translationdir}/qtwebengine_locales/hu.pak +%lang(id) %{_qt5_translationdir}/qtwebengine_locales/id.pak +%lang(it) %{_qt5_translationdir}/qtwebengine_locales/it.pak +%lang(ja) %{_qt5_translationdir}/qtwebengine_locales/ja.pak +%lang(kn) %{_qt5_translationdir}/qtwebengine_locales/kn.pak +%lang(ko) %{_qt5_translationdir}/qtwebengine_locales/ko.pak +%lang(lt) %{_qt5_translationdir}/qtwebengine_locales/lt.pak +%lang(lv) %{_qt5_translationdir}/qtwebengine_locales/lv.pak +%lang(ml) %{_qt5_translationdir}/qtwebengine_locales/ml.pak +%lang(mr) %{_qt5_translationdir}/qtwebengine_locales/mr.pak +%lang(ms) %{_qt5_translationdir}/qtwebengine_locales/ms.pak +%lang(nb) %{_qt5_translationdir}/qtwebengine_locales/nb.pak +%lang(nl) %{_qt5_translationdir}/qtwebengine_locales/nl.pak +%lang(pl) %{_qt5_translationdir}/qtwebengine_locales/pl.pak +%lang(pt_BR) %{_qt5_translationdir}/qtwebengine_locales/pt-BR.pak +%lang(pt_PT) %{_qt5_translationdir}/qtwebengine_locales/pt-PT.pak +%lang(ro) %{_qt5_translationdir}/qtwebengine_locales/ro.pak +%lang(ru) %{_qt5_translationdir}/qtwebengine_locales/ru.pak +%lang(sk) %{_qt5_translationdir}/qtwebengine_locales/sk.pak +%lang(sl) %{_qt5_translationdir}/qtwebengine_locales/sl.pak +%lang(sr) %{_qt5_translationdir}/qtwebengine_locales/sr.pak +%lang(sv) %{_qt5_translationdir}/qtwebengine_locales/sv.pak +%lang(sw) %{_qt5_translationdir}/qtwebengine_locales/sw.pak +%lang(ta) %{_qt5_translationdir}/qtwebengine_locales/ta.pak +%lang(te) %{_qt5_translationdir}/qtwebengine_locales/te.pak +%lang(th) %{_qt5_translationdir}/qtwebengine_locales/th.pak +%lang(tr) %{_qt5_translationdir}/qtwebengine_locales/tr.pak +%lang(uk) %{_qt5_translationdir}/qtwebengine_locales/uk.pak +%lang(vi) %{_qt5_translationdir}/qtwebengine_locales/vi.pak +%lang(zh_CN) %{_qt5_translationdir}/qtwebengine_locales/zh-CN.pak +%lang(zh_TW) %{_qt5_translationdir}/qtwebengine_locales/zh-TW.pak %files devel %{_qt5_headerdir}/Qt*/ @@ -368,10 +418,12 @@ popd %changelog -* Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.19.rc +* Thu Feb 25 2016 Kevin Kofler - 5.6.0-0.19.rc - Update to 5.6.0 RC -- Rebase linux-pri patch +- Rebase linux-pri and no-sse2 patches - Remove BuildRequires pkgconfig(flac), pkgconfig(speex), no longer needed +- Update file list for 5.6.0 RC (resources now in resources/ subdirectory) +- Tag translations with correct %%lang tags * Wed Feb 24 2016 Kevin Kofler - 5.6.0-0.18.beta - no-sse2 patch: Fix FFT (RealFourier) in webrtc on non-SSE2 x86 diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch b/qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch similarity index 86% rename from qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch rename to qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch index 4210d61..a8f6267 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/src/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-01-17 05:53:27.035467092 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-25 00:47:14.856720934 +0100 @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -30,10 +30,10 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/breakpad/s ], 'ldflags': [ '-m32', -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-01-17 01:52:14.440801716 +0100 -@@ -3901,15 +3901,7 @@ +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-02-25 00:47:14.883721079 +0100 +@@ -3904,15 +3904,7 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is # always kept in its specified precision. @@ -49,9 +49,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/comm '-m32', ], 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-01-16 23:07:29.918546201 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-02-25 00:47:14.892721127 +0100 @@ -502,13 +502,6 @@ "trees/tree_synchronizer.h", ] @@ -111,9 +111,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/BUILD.g source_set("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/cc.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-01-16 23:07:29.957546413 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/cc.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-02-25 00:47:14.903721186 +0100 @@ -21,6 +21,7 @@ '<(DEPTH)/ui/events/events.gyp:events_base', '<(DEPTH)/ui/gfx/gfx.gyp:gfx', @@ -179,9 +179,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/cc/cc.gyp + }, ], } -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-01-16 23:07:29.980546539 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-25 00:47:14.941721390 +0100 @@ -270,13 +270,13 @@ } @@ -250,9 +250,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/media.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-01-16 23:07:30.012546713 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/media.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-02-25 00:47:14.954721460 +0100 @@ -9,6 +9,8 @@ #include "base/path_service.h" #include "base/synchronization/lock.h" @@ -271,9 +271,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-01-16 23:07:30.032546822 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-25 00:47:14.968721535 +0100 @@ -63,6 +63,17 @@ int rgbstride, YUVType yuv_type); @@ -336,9 +336,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf, const uint8* u_buf, const uint8* v_buf, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-01-16 23:07:30.032546822 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-02-25 00:47:14.968721535 +0100 @@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be @@ -363,9 +363,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-01-16 23:07:30.045546893 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-25 00:47:14.976721578 +0100 @@ -13,6 +13,34 @@ namespace media { @@ -401,9 +401,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base void ConvertYUVAToARGB_MMX(const uint8* yplane, const uint8* uplane, const uint8* vplane, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-01-16 23:07:30.049546915 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-25 00:47:14.977721583 +0100 @@ -19,6 +19,12 @@ int source_width, uint8 source_y_fraction); @@ -417,9 +417,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base MEDIA_EXPORT void FilterYUVRows_SSE2(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-01-16 23:07:30.050546920 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -500,9 +500,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-01-16 23:07:30.050546920 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -554,9 +554,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-01-16 23:07:30.051546925 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -676,9 +676,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-01-16 23:07:30.073547045 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-25 00:47:15.049721970 +0100 @@ -81,16 +81,11 @@ #include #include @@ -788,9 +788,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-01-16 23:07:30.092547149 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-25 00:47:15.055722002 +0100 @@ -34,6 +34,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -802,9 +802,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-01-16 23:07:30.093547154 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-25 00:47:15.057722012 +0100 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -823,9 +823,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-01-16 23:07:30.095547165 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-25 00:47:15.060722029 +0100 @@ -9,6 +9,7 @@ #include "base/bind.h" @@ -845,9 +845,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-01-16 23:07:30.097547176 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-25 00:47:15.063722045 +0100 @@ -7,12 +7,17 @@ #include @@ -1035,9 +1035,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-01-16 23:07:30.109547241 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-02-25 00:47:15.068722072 +0100 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1050,9 +1050,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-01-16 23:07:30.125547329 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-25 00:47:15.068722072 +0100 @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -1145,9 +1145,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_testing.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-01-16 23:07:30.133547372 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-25 00:47:15.076722114 +0100 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1157,9 +1157,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-01-16 23:07:30.146547443 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-25 00:47:15.084722157 +0100 @@ -6,6 +6,7 @@ #define _USE_MATH_DEFINES #include @@ -1192,9 +1192,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-01-16 23:07:30.147547448 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-25 00:47:15.088722179 +0100 @@ -29,7 +29,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1277,9 +1277,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-01-16 23:07:30.148547454 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-25 00:47:15.089722184 +0100 @@ -64,6 +64,31 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1391,9 +1391,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-01-16 23:07:30.149547459 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-25 00:47:15.090722190 +0100 @@ -658,6 +658,37 @@ EXPECT_EQ(0, error); } @@ -1595,9 +1595,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/base TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-01-16 23:07:30.180547628 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-02-25 00:47:15.118722340 +0100 @@ -747,6 +747,26 @@ deps = [ "//base", @@ -1625,9 +1625,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/BUIL } if (media_use_ffmpeg) { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/media.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-01-16 23:07:30.218547835 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/media.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-02-25 00:47:15.126722383 +0100 @@ -1053,12 +1053,12 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ @@ -1740,9 +1740,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/media/medi ], # targets }], ['OS=="android"', { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-01-16 23:07:30.230547901 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-02-25 00:47:15.128722393 +0100 @@ -300,12 +300,6 @@ "ext/skia_utils_win.cc", ] @@ -1787,9 +1787,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/BUILD } else { sources = gypi_skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-01-16 23:07:30.249548004 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-25 00:47:15.165722592 +0100 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1808,9 +1808,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/c #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/convolver.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-01-16 23:07:30.256548042 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-25 00:47:15.177722656 +0100 @@ -9,6 +9,7 @@ #include @@ -1819,9 +1819,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/ext/c #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_chrome.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-01-16 23:07:30.267548102 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-25 00:47:15.178722662 +0100 @@ -9,6 +9,7 @@ { 'dependencies': [ @@ -1858,9 +1858,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_ ], 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-01-16 23:07:30.267548102 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-02-25 00:47:15.178722662 +0100 @@ -91,6 +91,37 @@ # targets that are not dependent upon the component type 'targets': [ @@ -1899,9 +1899,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia. 'target_name': 'image_operations_bench', 'type': 'executable', 'dependencies': [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_library_opts.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-01-16 23:07:30.268548108 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-25 00:47:15.179722667 +0100 @@ -18,10 +18,22 @@ }, @@ -1947,9 +1947,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/skia/skia_ 'sources': [ '<@(sse2_sources)' ], 'dependencies': [ 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-01-16 23:07:30.275548146 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-25 00:47:15.202722790 +0100 @@ -26,8 +26,8 @@ public_configs = [ ":qcms_config" ] @@ -1977,9 +1977,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-01-16 23:07:30.276548151 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-25 00:47:15.202722790 +0100 @@ -33,10 +33,10 @@ 'conditions': [ ['target_arch=="ia32" or target_arch=="x64"', { @@ -2024,9 +2024,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part ], } -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-01-17 03:54:32.399198025 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-25 00:47:15.220722887 +0100 @@ -30,6 +30,9 @@ #if ENABLE(WEB_AUDIO) @@ -2122,9 +2122,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part } // namespace blink #endif // ENABLE(WEB_AUDIO) -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-01-17 05:08:41.616999374 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-25 00:47:15.221722892 +0100 @@ -31,6 +31,7 @@ #include "platform/PlatformExport.h" @@ -2145,15 +2145,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-01-17 03:28:17.605768226 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-02-25 00:47:15.221722892 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-01-17 04:19:56.670378699 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-25 00:47:15.230722941 +0100 @@ -30,16 +30,23 @@ #if ENABLE(WEB_AUDIO) @@ -2229,9 +2229,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. while ((reinterpret_cast(inputP) & 0x0F) && n) { CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-01-17 05:08:50.305045709 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-25 00:47:15.236722973 +0100 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2252,15 +2252,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-01-17 04:10:47.846438382 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-02-25 00:47:15.236722973 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-01-17 04:26:03.720343726 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-25 00:47:15.237722978 +0100 @@ -26,6 +26,9 @@ #if ENABLE(WEB_AUDIO) @@ -2456,9 +2456,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #endif // OS(MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-01-17 05:08:57.296082993 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-25 00:47:15.253723064 +0100 @@ -26,6 +26,7 @@ #define VectorMath_h @@ -2496,15 +2496,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-01-17 03:28:28.044824318 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-02-25 00:47:15.255723075 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-01-17 22:38:21.451976078 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-25 00:47:15.279723203 +0100 @@ -419,6 +419,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], @@ -2555,9 +2555,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part # The *NEON.cpp files fail to compile when -mthumb is passed. Force # them to build in ARM mode. # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-01-16 23:31:06.896257072 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-25 00:47:15.279723203 +0100 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2567,9 +2567,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #include -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-01-16 23:31:18.793321790 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-25 00:47:15.280723209 +0100 @@ -422,7 +422,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2597,9 +2597,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); #else for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-01-16 23:41:41.886711319 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-25 00:47:15.316723402 +0100 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2624,9 +2624,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/third_part #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-01-18 03:00:21.703867569 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-25 00:47:15.345723558 +0100 @@ -1282,6 +1282,8 @@ # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] @@ -2637,7 +2637,7 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/ pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) @@ -1290,6 +1292,8 @@ - pri_file.write("LIBS_PRIVATE += -Wl,--whole-archive %s -Wl,--no-whole-archive\n" % qmakeLiteral(' '.join(prefixed_archives))) + pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) else: pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) + if len(solibs): @@ -2645,9 +2645,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/tools/gyp/ # External libs have to come after objects/archives, the linker resolve them in order. pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/standalone.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-01-16 23:07:30.286548206 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-25 00:47:15.361723643 +0100 @@ -94,6 +94,9 @@ 'use_goma%': 0, 'gomadir%': '', @@ -2658,9 +2658,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/s # Set default gomadir. ['OS=="win"', { 'gomadir': 'c:\\goma\\goma-win', -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/toolchain.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-01-16 23:07:30.294548249 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-25 00:47:15.364723659 +0100 @@ -93,6 +93,9 @@ 'binutils_dir%': '', @@ -2671,9 +2671,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/build/t ['OS=="linux" and host_arch=="x64"', { 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', }], -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-01-16 23:07:30.323548407 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-02-25 00:47:15.377723729 +0100 @@ -1135,41 +1135,41 @@ if (v8_target_arch == "x86") { @@ -2751,9 +2751,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/BUILD.g ] } else if (v8_target_arch == "x64") { sources += [ -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-01-19 05:50:30.722730427 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-02-25 00:47:15.377723729 +0100 @@ -0,0 +1,56 @@ +#!/bin/sh +# This script renames the v8 targets to _sse2 names so that they do not conflict @@ -2811,9 +2811,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + -e "s/\.bin/_sse2.bin/g" \ + -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ + v8.gyp >>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-01-18 01:03:14.070441874 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-25 00:47:15.395723826 +0100 @@ -34,6 +34,14 @@ 'v8_extra_library_files%': [], 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', @@ -2876,9 +2876,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-01-19 05:51:07.209927516 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp +--- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-02-25 00:47:15.396723831 +0100 @@ -0,0 +1,1952 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -4832,9 +4832,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/v8/tools/g + }, + ], +} -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/core_module.pro 2016-01-19 14:49:57.592655159 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.6.0-rc/src/core/core_module.pro 2016-02-15 16:18:46.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/core_module.pro 2016-02-25 00:51:29.846113989 +0100 @@ -9,6 +9,29 @@ error("Could not find the linking information that gyp should have generated.") } @@ -4866,9 +4866,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtweben api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() @@ -73,7 +96,12 @@ - resources.path = $$[QT_INSTALL_DATA] + resources.path = $$[QT_INSTALL_DATA]/resources icu.CONFIG += no_check_exist - icu.path = $$[QT_INSTALL_DATA] + icu.path = $$[QT_INSTALL_DATA]/resources - INSTALLS += icu locales resources + # install the shared libraries + shlibs.CONFIG += no_check_exist @@ -4879,9 +4879,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/core_module.pro qtweben } !contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { -diff -Nur qtwebengine-opensource-src-5.6.0-beta/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/qtwebengine.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/core/qtwebengine.gypi 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-sse2/src/core/qtwebengine.gypi 2016-01-19 02:13:13.757769179 +0100 +diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/qtwebengine.gypi +--- qtwebengine-opensource-src-5.6.0-rc/src/core/qtwebengine.gypi 2016-02-15 16:18:46.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/qtwebengine.gypi 2016-02-25 00:47:15.416723938 +0100 @@ -58,6 +58,11 @@ }, }, From 4596e73fc6c4a765d7edf209a4d651bab8f32353 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 18 Mar 2016 00:41:34 +0100 Subject: [PATCH 061/437] Update to 5.6.0 (final) * Thu Mar 17 2016 Kevin Kofler - 5.6.0-1 - Update to 5.6.0 (final) - Drop system-icu54 patch, fixed upstream --- .gitignore | 1 + qt5-qtwebengine.spec | 17 +++++++++-------- ...opensource-src-5.6.0-beta-system-icu54.patch | 12 ------------ sources | 2 +- 4 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch diff --git a/.gitignore b/.gitignore index 326d197..baa151d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz /qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz +/qtwebengine-opensource-src-5.6.0-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 188abc3..7a94c7a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -19,7 +19,7 @@ %global use_system_libwebp 1 %endif -%global prerelease rc +#global prerelease rc # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 0.19.rc%{?dist} +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -38,9 +38,9 @@ Release: 0.19.rc%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/development_releases/qt/5.6/5.6.0-rc/submodules/qtwebengine-opensource-src-5.6.0-rc.tar.xz -# ./clean_qtwebengine.sh 5.6.0-rc -Source0: qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz +# wget http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtwebengine-opensource-src-5.6.0.tar.xz +# ./clean_qtwebengine.sh 5.6.0 +Source0: qtwebengine-opensource-src-5.6.0-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh @@ -50,8 +50,6 @@ Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script, # do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment) Patch1: qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch -# don't require the time zone detection API backported from ICU 55 (thanks spot) -Patch2: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch @@ -288,7 +286,6 @@ BuildArch: noarch %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri -%patch2 -p1 -b .system-icu54 %patch3 -p1 -b .fix-extractcflag %patch4 -p1 -b .no-neon %patch5 -p1 -b .system-nspr-prtime @@ -418,6 +415,10 @@ popd %changelog +* Thu Mar 17 2016 Kevin Kofler - 5.6.0-1 +- Update to 5.6.0 (final) +- Drop system-icu54 patch, fixed upstream + * Thu Feb 25 2016 Kevin Kofler - 5.6.0-0.19.rc - Update to 5.6.0 RC - Rebase linux-pri and no-sse2 patches diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch deleted file mode 100644 index 7366f6a..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2016-01-08 23:40:36.387525597 +0100 -@@ -22,7 +22,7 @@ - - void TimeZoneMonitor::NotifyRenderers() { - DCHECK_CURRENTLY_ON(BrowserThread::UI); --#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 54 -+#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 55 - // On CrOS and older ICU versions, ICU's default tz is already set to a new zone. - // No need to redetect it with detectHostTimeZone(). - scoped_ptr new_zone(icu::TimeZone::createDefault()); diff --git a/sources b/sources index e9830d7..c0b6fa4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -22fc5fb20c8db10514dc17919de75ac7 qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz +c0bc12bec2dde461ed1c67f834c28278 qtwebengine-opensource-src-5.6.0-clean.tar.xz From 4f844a7b2b6550e1d13c2ea973059eef0abcda99 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 18 Mar 2016 04:59:54 +0100 Subject: [PATCH 062/437] Avoid checking for the nonexistent icudtl.dat and silence the warnings --- qt5-qtwebengine.spec | 11 +++++++- ...e-opensource-src-5.6.0-no-icudtl-dat.patch | 28 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7a94c7a..9b705b9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -50,6 +50,11 @@ Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script, # do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment) Patch1: qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch +# quick hack to avoid checking for the nonexistent icudtl.dat and silence the +# resulting warnings - not upstreamable as is because it removes the fallback +# mechanism for the ICU data directory (which is not used in our builds because +# we use the system ICU, which embeds the data statically) completely +Patch2: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch @@ -286,6 +291,7 @@ BuildArch: noarch %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri +%patch2 -p1 -b .no-icudtl-dat %patch3 -p1 -b .fix-extractcflag %patch4 -p1 -b .no-neon %patch5 -p1 -b .system-nspr-prtime @@ -415,6 +421,9 @@ popd %changelog +* Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 +- Avoid checking for the nonexistent icudtl.dat and silence the warnings + * Thu Mar 17 2016 Kevin Kofler - 5.6.0-1 - Update to 5.6.0 (final) - Drop system-icu54 patch, fixed upstream diff --git a/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch b/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch new file mode 100644 index 0000000..00cbfc2 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch @@ -0,0 +1,28 @@ +diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp +--- qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp 2016-03-03 17:02:28.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp 2016-03-18 03:08:24.385444415 +0100 +@@ -207,24 +207,7 @@ + #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) + return getResourcesPath(frameworkBundle()); + #else +- static bool initialized = false; + static QString potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); +- if (!initialized) { +- initialized = true; +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { +- qWarning("Qt WebEngine ICU data not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath); +- } +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { +- qWarning("Qt WebEngine ICU data not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = QCoreApplication::applicationDirPath(); +- } +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { +- qWarning("Qt WebEngine ICU data not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath)); +- potentialResourcesPath = fallbackDir(); +- } +- } +- + return potentialResourcesPath; + #endif + } From c13613a7be08fac1247fc4f2066bb195ac3bc8c9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 19 Mar 2016 00:34:32 +0100 Subject: [PATCH 063/437] CONFIG+="webcore_debug v8base_debug", -fno-delete-null-pointer-checks * Fri Mar 18 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here --- qt5-qtwebengine.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9b705b9..20134a4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -303,11 +303,12 @@ BuildArch: noarch export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build +export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug" WEBENGINE_CONFIG+="use_system_icu" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -421,6 +422,10 @@ popd %changelog +* Fri Mar 18 2016 Kevin Kofler - 5.6.0-3 +- Build with CONFIG+="webcore_debug v8base_debug" +- Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here + * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From bd99caed44e87e7978a64ae908bbe8a74cb00988 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 19 Mar 2016 01:44:43 +0100 Subject: [PATCH 064/437] Also set CFLAGS so that -g gets picked up for C files too. --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 20134a4..8355b49 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -303,6 +303,7 @@ BuildArch: noarch export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build +export CFLAGS="%{optflags} -fno-delete-null-pointer-checks" export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} From ee59b253e9c3f83b731898de2df71c62d045ceb4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 20 Mar 2016 19:10:06 -0500 Subject: [PATCH 065/437] skip added debuginfo for now, hits rpm bugs --- qt5-qtwebengine.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8355b49..e6317a7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -309,7 +309,8 @@ export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug" WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} WEBENGINE_CONFIG+="use_system_icu" .. +# skip CONFIG+="webcore_debug v8base_debug" for now, hits rpm bugs # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -424,8 +425,7 @@ popd %changelog * Fri Mar 18 2016 Kevin Kofler - 5.6.0-3 -- Build with CONFIG+="webcore_debug v8base_debug" -- Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here +- Force -fno-delete-null-pointer-checks through CFLAGS/CXXFLAGS, Qt flags not used here * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 9673c10a272ecad4576417c070e7b41b54544896 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 02:10:41 +0100 Subject: [PATCH 066/437] Revert "skip added debuginfo for now, hits rpm bugs" This reverts commit ee59b253e9c3f83b731898de2df71c62d045ceb4. --- qt5-qtwebengine.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e6317a7..8355b49 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -309,8 +309,7 @@ export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} WEBENGINE_CONFIG+="use_system_icu" .. -# skip CONFIG+="webcore_debug v8base_debug" for now, hits rpm bugs +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug" WEBENGINE_CONFIG+="use_system_icu" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -425,7 +424,8 @@ popd %changelog * Fri Mar 18 2016 Kevin Kofler - 5.6.0-3 -- Force -fno-delete-null-pointer-checks through CFLAGS/CXXFLAGS, Qt flags not used here +- Build with CONFIG+="webcore_debug v8base_debug" +- Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 2b1c85b7d40f4cd274b716f6ea69a69dcb55f609 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 02:11:45 +0100 Subject: [PATCH 067/437] Revert "Also set CFLAGS so that -g gets picked up for C files too." This reverts commit bd99caed44e87e7978a64ae908bbe8a74cb00988. --- qt5-qtwebengine.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8355b49..20134a4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -303,7 +303,6 @@ BuildArch: noarch export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build -export CFLAGS="%{optflags} -fno-delete-null-pointer-checks" export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} From 1b4283ef9de2da566c70086691ebf36c1c2a7cf1 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 02:13:41 +0100 Subject: [PATCH 068/437] Build with CONFIG+=force_debug_info so that -g gets added for C files too. --- qt5-qtwebengine.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 20134a4..2bfa9a8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -308,7 +308,7 @@ export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug" WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -422,8 +422,8 @@ popd %changelog -* Fri Mar 18 2016 Kevin Kofler - 5.6.0-3 -- Build with CONFIG+="webcore_debug v8base_debug" +* Mon Mar 21 2016 Kevin Kofler - 5.6.0-3 +- Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 From a90ae4b2bb11adaa932be1cd2be8a91257eb2bec Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 02:16:42 +0100 Subject: [PATCH 069/437] Add debugging for debugedit failure (Yet another instance of the venerable old bug #304121.) --- qt5-qtwebengine.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2bfa9a8..bf838b5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -337,6 +337,9 @@ for prl_file in libQt5*.prl ; do done popd +# debug debugedit failure (#304121) +readelf -wl %{buildroot}%{_qt5_libdir}libQt5WebEngineCore.so.5.* + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig From 9a8e5f9ba26b992d8eb5b4adda60f6c1605c532c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 02:37:39 +0100 Subject: [PATCH 070/437] Fix readelf command for debugedit debugging --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bf838b5..f8e466a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -338,7 +338,7 @@ done popd # debug debugedit failure (#304121) -readelf -wl %{buildroot}%{_qt5_libdir}libQt5WebEngineCore.so.5.* +readelf -wl %{buildroot}%{_qt5_libdir}/libQt5WebEngineCore.so.5.* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig From 6fbf35079bdd8ed36bb99a635b0ad1a51e6b4131 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 06:19:01 +0100 Subject: [PATCH 071/437] Use CONFIG-=use_gold_linker because ld.gold keeps running out of memory Let's see whether the good old ld.bfd works any better. --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f8e466a..e116da7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -308,7 +308,7 @@ export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" CONFIG-=use_gold_linker WEBENGINE_CONFIG+="use_system_icu" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -428,6 +428,7 @@ readelf -wl %{buildroot}%{_qt5_libdir}/libQt5WebEngineCore.so.5.* * Mon Mar 21 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here +- Use CONFIG-=use_gold_linker because ld.gold keeps running out of memory * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 070252022a94ae591bfff58f7fbf6fcd5e37f6f4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 18:27:03 +0100 Subject: [PATCH 072/437] Revert "Use CONFIG-=use_gold_linker because ld.gold keeps running out of memory" This reverts commit 6fbf35079bdd8ed36bb99a635b0ad1a51e6b4131. --- qt5-qtwebengine.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e116da7..f8e466a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -308,7 +308,7 @@ export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" CONFIG-=use_gold_linker WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -428,7 +428,6 @@ readelf -wl %{buildroot}%{_qt5_libdir}/libQt5WebEngineCore.so.5.* * Mon Mar 21 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here -- Use CONFIG-=use_gold_linker because ld.gold keeps running out of memory * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 4fe7f8982cadb136ff0422445e372c70b1a15d89 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 21 Mar 2016 18:36:00 +0100 Subject: [PATCH 073/437] Use -g1 instead of -g on non-x86_64 to avoid memory exhaustion At least i686 runs out of memory otherwise, but ARM would probably crash too if it got that far, so be conservative. --- qt5-qtwebengine.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f8e466a..000b1a3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -299,11 +299,20 @@ BuildArch: noarch %patch7 -p1 -b .chimera-nss-init %patch8 -p1 -b .no-sse2 +%ifnarch x86_64 +# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 +sed -e 's/=-g$/=-g1/g' src/core/gyp_run.pro +%endif + %build export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" +%ifnarch x86_64 +# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 +export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` +%endif mkdir %{_target_platform} pushd %{_target_platform} @@ -428,6 +437,7 @@ readelf -wl %{buildroot}%{_qt5_libdir}/libQt5WebEngineCore.so.5.* * Mon Mar 21 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here +- Use -g1 instead of -g on non-x86_64 to avoid memory exhaustion * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From cea79e809547ae663ad0dcdc709ab9f9dffe68a8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 22 Mar 2016 19:12:29 +0100 Subject: [PATCH 074/437] Revert "Fix readelf command for debugedit debugging" This reverts commit 9a8e5f9ba26b992d8eb5b4adda60f6c1605c532c. --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 000b1a3..65eb40f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -347,7 +347,7 @@ done popd # debug debugedit failure (#304121) -readelf -wl %{buildroot}%{_qt5_libdir}/libQt5WebEngineCore.so.5.* +readelf -wl %{buildroot}%{_qt5_libdir}libQt5WebEngineCore.so.5.* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig From 29f484a3026cd60e680a6addd63b56d11985499a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 22 Mar 2016 19:12:41 +0100 Subject: [PATCH 075/437] Revert "Add debugging for debugedit failure" This reverts commit a90ae4b2bb11adaa932be1cd2be8a91257eb2bec. --- qt5-qtwebengine.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 65eb40f..346f0f3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -346,9 +346,6 @@ for prl_file in libQt5*.prl ; do done popd -# debug debugedit failure (#304121) -readelf -wl %{buildroot}%{_qt5_libdir}libQt5WebEngineCore.so.5.* - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig From 94d81308321e5bc28dae3551360c3a497ace118a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 22 Mar 2016 19:19:24 +0100 Subject: [PATCH 076/437] Work around debugedit failure by removing "./" from #line commands At least I hope that that's the problem. I don't know what other path would be the offender. There are no double slashes "//". --- qt5-qtwebengine.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 346f0f3..bcfc58f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -298,6 +298,10 @@ BuildArch: noarch %patch6 -p1 -b .system-icu-utf %patch7 -p1 -b .chimera-nss-init %patch8 -p1 -b .no-sse2 +# remove ./ from #line commands in ANGLE to avoid debugedit failure +sed -i -e 's!\./!!g' \ + src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ + src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp %ifnarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 @@ -431,10 +435,11 @@ popd %changelog -* Mon Mar 21 2016 Kevin Kofler - 5.6.0-3 +* Tue Mar 22 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here - Use -g1 instead of -g on non-x86_64 to avoid memory exhaustion +- Work around debugedit failure by removing "./" from #line commands * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 855dc1312cf658d9487801f5de50c21489dbe3fc Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 22 Mar 2016 19:34:11 +0100 Subject: [PATCH 077/437] Fix -g1 workaround I was missing the -i flag to sed. --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bcfc58f..52d13c5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -305,7 +305,7 @@ sed -i -e 's!\./!!g' \ %ifnarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 -sed -e 's/=-g$/=-g1/g' src/core/gyp_run.pro +sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro %endif %build From 9659c061c060c91a366d0cd537d8dbff01fa2900 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 24 Mar 2016 03:39:15 +0100 Subject: [PATCH 078/437] Fix // in #include in content/renderer/gpu to avoid debugedit failure This actually shows up as a trailing slash in the directory table. I hope this is the last offender. --- qt5-qtwebengine.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 52d13c5..384d321 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -298,7 +298,10 @@ BuildArch: noarch %patch6 -p1 -b .system-icu-utf %patch7 -p1 -b .chimera-nss-init %patch8 -p1 -b .no-sse2 -# remove ./ from #line commands in ANGLE to avoid debugedit failure +# fix // in #include in content/renderer/gpu to avoid debugedit failure +sed -i -e 's!gpu//!gpu/!g' \ + src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc +# remove ./ from #line commands in ANGLE to avoid debugedit failure (?) sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp @@ -435,11 +438,12 @@ popd %changelog -* Tue Mar 22 2016 Kevin Kofler - 5.6.0-3 +* Thu Mar 24 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here - Use -g1 instead of -g on non-x86_64 to avoid memory exhaustion -- Work around debugedit failure by removing "./" from #line commands +- Work around debugedit failure by removing "./" from #line commands and + changing "//" to "/" in an #include command * Fri Mar 18 2016 Kevin Kofler - 5.6.0-2 - Avoid checking for the nonexistent icudtl.dat and silence the warnings From 66e732407f4147d246d5e02fc6c1b51fba9af2d6 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 8 Apr 2016 18:52:37 +0200 Subject: [PATCH 079/437] drop ppc ppc64 ppc64le from ExclusiveArch, it's not supported yet --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 384d321..c6e735b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -86,7 +86,7 @@ Patch8: qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch # If you cannot get this package to build on your secondary architecure, please: # * remove your architecture from this list AND # * put #1298011 onto your ExcludeArch tracker. -ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc ppc64 ppc64le mips mipsel mips64el +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtdeclarative-devel >= %{version} @@ -438,6 +438,9 @@ popd %changelog +* Fri Apr 08 2016 Than Ngo - 5.6.0-4 +- drop ppc ppc64 ppc64le from ExclusiveArch, it's not supported yet + * Thu Mar 24 2016 Kevin Kofler - 5.6.0-3 - Build with CONFIG+="webcore_debug v8base_debug force_debug_info" - Force -fno-delete-null-pointer-checks through CXXFLAGS, Qt flags not used here From 6a3240cd13714b5e97a6bec48725f0bee32d0205 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 15 Apr 2016 20:15:22 +0200 Subject: [PATCH 080/437] rebuild for ICU 57.1 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c6e735b..70cb632 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -438,6 +438,9 @@ popd %changelog +* Fri Apr 15 2016 David Tardon - 5.6.0-5 +- rebuild for ICU 57.1 + * Fri Apr 08 2016 Than Ngo - 5.6.0-4 - drop ppc ppc64 ppc64le from ExclusiveArch, it's not supported yet From 1c39d15ba21fd31eb39cd49948bfc808fa69190e Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 18 May 2016 08:50:48 -0500 Subject: [PATCH 081/437] BR: git-core several places in build.log contain: sh: git: command not found so include it to be on the safe side. --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 70cb632..90cfc5f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -97,6 +97,7 @@ BuildRequires: qt5-qtwebchannel-devel >= %{version} BuildRequires: qt5-qttools-static >= %{version} BuildRequires: ninja-build BuildRequires: bison +BuildRequires: git-core BuildRequires: gperf BuildRequires: libicu-devel BuildRequires: libjpeg-devel @@ -438,6 +439,9 @@ popd %changelog +* Wed May 18 2016 Rex Dieter 5.6.0-6 +- BR: git-core + * Fri Apr 15 2016 David Tardon - 5.6.0-5 - rebuild for ICU 57.1 From 463136e0f9e96619add78833c01f19dac37b1ee9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 21 May 2016 10:43:20 -0500 Subject: [PATCH 082/437] rebuild (pciutuils) See also: https://bugzilla.redhat.com/show_bug.cgi?id=1337735#c5 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 90cfc5f..f0fb27b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -439,6 +439,9 @@ popd %changelog +* Sat May 21 2016 Rex Dieter - 5.6.0-7 +- rebuild (pciutuils) + * Wed May 18 2016 Rex Dieter 5.6.0-6 - BR: git-core From efad6cc70a9d07d6c78b53a5b764e1ba148fce8f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 6 Jun 2016 13:02:56 -0500 Subject: [PATCH 083/437] workaround stackmashing runtime errors in re2-related bundled headers (#1337585) --- qt5-qtwebengine.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f0fb27b..2bba724 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -307,6 +307,10 @@ sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +# http://bugzilla.redhat.com/1337585 +# can't just delete, but we'll overwrite with system headers to be on the safe side +cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/re2/ + %ifnarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro @@ -439,6 +443,9 @@ popd %changelog +* Mon Jun 06 2016 Rex Dieter - 5.6.0-8 +- workaround stackmashing runtime errors in re2-related bundled headers (#1337585) + * Sat May 21 2016 Rex Dieter - 5.6.0-7 - rebuild (pciutuils) From c95fe8489ccf08fcc561290b9ed963bd1a727cd9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 6 Jun 2016 13:03:15 -0500 Subject: [PATCH 084/437] Release++ --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2bba724..b89b518 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.0 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html From d8f3edfd1d69db871c41b4015b8f0df425ff6bac Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 11 Jun 2016 01:32:18 +0200 Subject: [PATCH 085/437] Update to 5.6.1 * Fri Jun 10 2016 Kevin Kofler - 5.6.1-1 - Update to 5.6.1 - Rebase linux-pri patch (drop the parts already fixed upstream) - Drop backported chimera-nss-init patch, already applied upstream - Rebase no-sse2 patch (the core_module.pro change) --- .gitignore | 1 + qt5-qtwebengine.spec | 29 +- ...urce-src-5.6.0-beta-chimera-nss-init.patch | 29 -- ...ne-opensource-src-5.6.0-rc-linux-pri.patch | 48 --- ...ngine-opensource-src-5.6.1-linux-pri.patch | 29 ++ ...bengine-opensource-src-5.6.1-no-sse2.patch | 356 +++++++++--------- sources | 2 +- 7 files changed, 224 insertions(+), 270 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch delete mode 100644 qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch create mode 100644 qtwebengine-opensource-src-5.6.1-linux-pri.patch rename qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch => qtwebengine-opensource-src-5.6.1-no-sse2.patch (86%) diff --git a/.gitignore b/.gitignore index baa151d..0707cef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz /qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz /qtwebengine-opensource-src-5.6.0-clean.tar.xz +/qtwebengine-opensource-src-5.6.1-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b89b518..e6f5069 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -29,8 +29,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.6.0 -Release: 8%{?dist} +Version: 5.6.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -38,18 +38,17 @@ Release: 8%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtwebengine-opensource-src-5.6.0.tar.xz -# ./clean_qtwebengine.sh 5.6.0 -Source0: qtwebengine-opensource-src-5.6.0-clean.tar.xz +# wget http://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/qtwebengine-opensource-src-5.6.1.tar.xz +# ./clean_qtwebengine.sh 5.6.1 +Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: process_ffmpeg_gyp.py # do not compile with -Wno-format, which also bypasses -Werror-format-security Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch -# some tweaks to linux.pri (system libs, link libpci, run unbundling script, -# do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment) -Patch1: qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch +# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +Patch1: qtwebengine-opensource-src-5.6.1-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -70,15 +69,12 @@ Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch -# fix the NSS/BoringSSL "chimera build" to call EnsureNSSHttpIOInit -# backport of https://codereview.chromium.org/1385473003 -Patch7: qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch8: qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch +Patch7: qtwebengine-opensource-src-5.6.1-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -297,8 +293,7 @@ BuildArch: noarch %patch4 -p1 -b .no-neon %patch5 -p1 -b .system-nspr-prtime %patch6 -p1 -b .system-icu-utf -%patch7 -p1 -b .chimera-nss-init -%patch8 -p1 -b .no-sse2 +%patch7 -p1 -b .no-sse2 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -443,6 +438,12 @@ popd %changelog +* Fri Jun 10 2016 Kevin Kofler - 5.6.1-1 +- Update to 5.6.1 +- Rebase linux-pri patch (drop the parts already fixed upstream) +- Drop backported chimera-nss-init patch, already applied upstream +- Rebase no-sse2 patch (the core_module.pro change) + * Mon Jun 06 2016 Rex Dieter - 5.6.0-8 - workaround stackmashing runtime errors in re2-related bundled headers (#1337585) diff --git a/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch b/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch deleted file mode 100644 index f6dbbdc..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc 2016-01-14 17:11:38.432633534 +0100 -@@ -57,6 +57,10 @@ - #include "net/ssl/ssl_platform_key.h" - #endif - -+#if defined(USE_NSS_CERTS) || defined(OS_IOS) -+#include "net/cert_net/nss_ocsp.h" -+#endif -+ - namespace net { - - namespace { -@@ -795,6 +799,14 @@ - DCHECK(!ssl_); - DCHECK(!transport_bio_); - -+#if defined(USE_NSS_CERTS) || defined(OS_IOS) -+ if (ssl_config_.cert_io_enabled) { -+ // TODO(davidben): Move this out of SSLClientSocket. See -+ // https://crbug.com/539520. -+ EnsureNSSHttpIOInit(); -+ } -+#endif -+ - SSLContext* context = SSLContext::GetInstance(); - crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); - diff --git a/qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch b/qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch deleted file mode 100644 index 5e55b34..0000000 --- a/qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-rc/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-rc-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.6.0-rc/src/core/config/linux.pri 2016-02-15 16:18:46.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-linux-pri/src/core/config/linux.pri 2016-02-24 23:24:01.533878478 +0100 -@@ -20,7 +20,13 @@ - use_kerberos=0 \ - use_pango=0 - --!use?(nss) { -+use?(nss) { -+# do a "chimera build" (BoringSSL code, NSS certs): This is the default in -+# Chromium 47+, and it is the only variant that works with NSS 3.21. -+ GYP_CONFIG += use_nss_certs=1 \ -+ use_openssl=1 \ -+ use_openssl_certs=0 -+} else { - GYP_CONFIG += use_nss_certs=0 \ - use_openssl=1 \ - use_openssl_certs=1 -@@ -40,6 +46,28 @@ - use?(system_opus): GYP_CONFIG += use_system_opus=1 - use?(system_snappy): GYP_CONFIG += use_system_snappy=1 - use?(system_vpx): GYP_CONFIG += use_system_libvpx=1 --use?(system_icu): GYP_CONFIG += use_system_icu=1 -+use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 - use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 - -+# some more system packages, that are not checked for for some reason -+GYP_CONFIG += \ -+ use_system_expat=1 \ -+ use_system_re2=1 \ -+ use_system_protobuf=1 -+ -+# yasm is only used on x86, and passing use_system_yasm makes the build fail on -+# other architectures (e.g., ARM), so make it conditional on the architecture -+contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+ GYP_CONFIG += use_system_yasm=1 -+} -+ -+# link libpci instead of dlopening it, our Qt packaging depends on it anyway -+GYP_CONFIG += linux_link_libpci=1 -+ -+# run the unbundling script Chromium provides -+CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" -+R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" -+R_G_F_PY_ARGS = -+for (config, GYP_CONFIG): R_G_F_PY_ARGS += "-D $$config" -+log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.6.1-linux-pri.patch b/qtwebengine-opensource-src-5.6.1-linux-pri.patch new file mode 100644 index 0000000..16f2767 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.1-linux-pri.patch @@ -0,0 +1,29 @@ +diff -ur qtwebengine-opensource-src-5.6.1/src/core/config/linux.pri qtwebengine-opensource-src-5.6.1-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.6.1/src/core/config/linux.pri 2016-05-26 20:01:25.000000000 +0200 ++++ qtwebengine-opensource-src-5.6.1-linux-pri/src/core/config/linux.pri 2016-06-11 01:17:26.494650774 +0200 +@@ -46,3 +46,25 @@ + use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 + use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 + ++# some more system packages, that are not checked for for some reason ++GYP_CONFIG += \ ++ use_system_expat=1 \ ++ use_system_re2=1 \ ++ use_system_protobuf=1 ++ ++# yasm is only used on x86, and passing use_system_yasm makes the build fail on ++# other architectures (e.g., ARM), so make it conditional on the architecture ++contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ GYP_CONFIG += use_system_yasm=1 ++} ++ ++# link libpci instead of dlopening it, our Qt packaging depends on it anyway ++GYP_CONFIG += linux_link_libpci=1 ++ ++# run the unbundling script Chromium provides ++CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" ++R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" ++R_G_F_PY_ARGS = ++for (config, GYP_CONFIG): R_G_F_PY_ARGS += "-D $$config" ++log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch b/qtwebengine-opensource-src-5.6.1-no-sse2.patch similarity index 86% rename from qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch rename to qtwebengine-opensource-src-5.6.1-no-sse2.patch index a8f6267..b6fed7e 100644 --- a/qtwebengine-opensource-src-5.6.0-rc-no-sse2.patch +++ b/qtwebengine-opensource-src-5.6.1-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-25 00:47:14.856720934 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-25 00:47:14.856720934 +0100 @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -30,9 +30,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/breakpad/src ], 'ldflags': [ '-m32', -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-02-25 00:47:14.883721079 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-02-25 00:47:14.883721079 +0100 @@ -3904,15 +3904,7 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is @@ -49,9 +49,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/build/common '-m32', ], 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-02-25 00:47:14.892721127 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-02-25 00:47:14.892721127 +0100 @@ -502,13 +502,6 @@ "trees/tree_synchronizer.h", ] @@ -111,9 +111,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/BUILD.gn source_set("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/cc.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-02-25 00:47:14.903721186 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-02-25 00:47:14.903721186 +0100 @@ -21,6 +21,7 @@ '<(DEPTH)/ui/events/events.gyp:events_base', '<(DEPTH)/ui/gfx/gfx.gyp:gfx', @@ -179,9 +179,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/cc/cc.gyp qt + }, ], } -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-25 00:47:14.941721390 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-25 00:47:14.941721390 +0100 @@ -270,13 +270,13 @@ } @@ -250,9 +250,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/B "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/media.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-02-25 00:47:14.954721460 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/media.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-02-25 00:47:14.954721460 +0100 @@ -9,6 +9,8 @@ #include "base/path_service.h" #include "base/synchronization/lock.h" @@ -271,9 +271,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/m InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-25 00:47:14.968721535 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-25 00:47:14.968721535 +0100 @@ -63,6 +63,17 @@ int rgbstride, YUVType yuv_type); @@ -336,9 +336,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf, const uint8* u_buf, const uint8* v_buf, -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-02-25 00:47:14.968721535 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-02-25 00:47:14.968721535 +0100 @@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be @@ -363,9 +363,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-25 00:47:14.976721578 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-25 00:47:14.976721578 +0100 @@ -13,6 +13,34 @@ namespace media { @@ -401,9 +401,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s void ConvertYUVAToARGB_MMX(const uint8* yplane, const uint8* uplane, const uint8* vplane, -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-25 00:47:14.977721583 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-25 00:47:14.977721583 +0100 @@ -19,6 +19,12 @@ int source_width, uint8 source_y_fraction); @@ -417,9 +417,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s MEDIA_EXPORT void FilterYUVRows_SSE2(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-02-25 00:47:14.978721589 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -500,9 +500,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-02-25 00:47:14.978721589 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -554,9 +554,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-02-25 00:47:14.978721589 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-02-25 00:47:14.978721589 +0100 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -676,9 +676,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-25 00:47:15.049721970 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-25 00:47:15.049721970 +0100 @@ -81,16 +81,11 @@ #include #include @@ -788,9 +788,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-25 00:47:15.055722002 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-25 00:47:15.055722002 +0100 @@ -34,6 +34,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -802,9 +802,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-25 00:47:15.057722012 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-25 00:47:15.057722012 +0100 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -823,9 +823,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-25 00:47:15.060722029 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-25 00:47:15.060722029 +0100 @@ -9,6 +9,7 @@ #include "base/bind.h" @@ -845,9 +845,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/s // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-25 00:47:15.063722045 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-25 00:47:15.063722045 +0100 @@ -7,12 +7,17 @@ #include @@ -1035,9 +1035,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/v #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-02-25 00:47:15.068722072 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-02-25 00:47:15.068722072 +0100 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1050,9 +1050,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/v // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-25 00:47:15.068722072 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-25 00:47:15.068722072 +0100 @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -1145,9 +1145,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/v +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-25 00:47:15.076722114 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-25 00:47:15.076722114 +0100 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1157,9 +1157,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/v MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-25 00:47:15.084722157 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-25 00:47:15.084722157 +0100 @@ -6,6 +6,7 @@ #define _USE_MATH_DEFINES #include @@ -1192,9 +1192,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/v SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-25 00:47:15.088722179 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-25 00:47:15.088722179 +0100 @@ -29,7 +29,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1277,9 +1277,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/y if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-25 00:47:15.089722184 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-25 00:47:15.089722184 +0100 @@ -64,6 +64,31 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1391,9 +1391,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/y #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-25 00:47:15.090722190 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-25 00:47:15.090722190 +0100 @@ -658,6 +658,37 @@ EXPECT_EQ(0, error); } @@ -1595,9 +1595,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/base/y TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-02-25 00:47:15.118722340 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-02-25 00:47:15.118722340 +0100 @@ -747,6 +747,26 @@ deps = [ "//base", @@ -1625,9 +1625,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/BUILD. } if (media_use_ffmpeg) { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/media.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-02-25 00:47:15.126722383 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-02-25 00:47:15.126722383 +0100 @@ -1053,12 +1053,12 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ @@ -1740,9 +1740,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/media/media. ], # targets }], ['OS=="android"', { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-02-25 00:47:15.128722393 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-02-25 00:47:15.128722393 +0100 @@ -300,12 +300,6 @@ "ext/skia_utils_win.cc", ] @@ -1787,9 +1787,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/BUILD.g } else { sources = gypi_skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-25 00:47:15.165722592 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-25 00:47:15.165722592 +0100 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1808,9 +1808,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/con #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-25 00:47:15.177722656 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-25 00:47:15.177722656 +0100 @@ -9,6 +9,7 @@ #include @@ -1819,9 +1819,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/ext/con #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-25 00:47:15.178722662 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-25 00:47:15.178722662 +0100 @@ -9,6 +9,7 @@ { 'dependencies': [ @@ -1858,9 +1858,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_ch ], 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-02-25 00:47:15.178722662 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-02-25 00:47:15.178722662 +0100 @@ -91,6 +91,37 @@ # targets that are not dependent upon the component type 'targets': [ @@ -1899,9 +1899,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia.gy 'target_name': 'image_operations_bench', 'type': 'executable', 'dependencies': [ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-25 00:47:15.179722667 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-25 00:47:15.179722667 +0100 @@ -18,10 +18,22 @@ }, @@ -1947,9 +1947,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/skia/skia_li 'sources': [ '<@(sse2_sources)' ], 'dependencies': [ 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-25 00:47:15.202722790 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-25 00:47:15.202722790 +0100 @@ -26,8 +26,8 @@ public_configs = [ ":qcms_config" ] @@ -1977,9 +1977,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-25 00:47:15.202722790 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-25 00:47:15.202722790 +0100 @@ -33,10 +33,10 @@ 'conditions': [ ['target_arch=="ia32" or target_arch=="x64"', { @@ -2024,9 +2024,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ ], } -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-25 00:47:15.220722887 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-25 00:47:15.220722887 +0100 @@ -30,6 +30,9 @@ #if ENABLE(WEB_AUDIO) @@ -2122,9 +2122,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ } // namespace blink #endif // ENABLE(WEB_AUDIO) -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-25 00:47:15.221722892 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-25 00:47:15.221722892 +0100 @@ -31,6 +31,7 @@ #include "platform/PlatformExport.h" @@ -2145,15 +2145,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-02-25 00:47:15.221722892 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-02-25 00:47:15.221722892 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-25 00:47:15.230722941 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-25 00:47:15.230722941 +0100 @@ -30,16 +30,23 @@ #if ENABLE(WEB_AUDIO) @@ -2229,9 +2229,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. while ((reinterpret_cast(inputP) & 0x0F) && n) { CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-25 00:47:15.236722973 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-25 00:47:15.236722973 +0100 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2252,15 +2252,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-02-25 00:47:15.236722973 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-02-25 00:47:15.236722973 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-25 00:47:15.237722978 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-25 00:47:15.237722978 +0100 @@ -26,6 +26,9 @@ #if ENABLE(WEB_AUDIO) @@ -2456,9 +2456,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ #endif // OS(MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-25 00:47:15.253723064 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-25 00:47:15.253723064 +0100 @@ -26,6 +26,7 @@ #define VectorMath_h @@ -2496,15 +2496,15 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-02-25 00:47:15.255723075 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-02-25 00:47:15.255723075 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-25 00:47:15.279723203 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-25 00:47:15.279723203 +0100 @@ -419,6 +419,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], @@ -2555,9 +2555,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ # The *NEON.cpp files fail to compile when -mthumb is passed. Force # them to build in ARM mode. # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-25 00:47:15.279723203 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-25 00:47:15.279723203 +0100 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2567,9 +2567,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ #include -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-25 00:47:15.280723209 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-25 00:47:15.280723209 +0100 @@ -422,7 +422,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2597,9 +2597,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); #else for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-25 00:47:15.316723402 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-25 00:47:15.316723402 +0100 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2624,9 +2624,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/third_party/ #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-25 00:47:15.345723558 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-25 00:47:15.345723558 +0100 @@ -1282,6 +1282,8 @@ # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] @@ -2645,9 +2645,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/tools/gyp/py # External libs have to come after objects/archives, the linker resolve them in order. pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-25 00:47:15.361723643 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-25 00:47:15.361723643 +0100 @@ -94,6 +94,9 @@ 'use_goma%': 0, 'gomadir%': '', @@ -2658,9 +2658,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/sta # Set default gomadir. ['OS=="win"', { 'gomadir': 'c:\\goma\\goma-win', -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-25 00:47:15.364723659 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/toolchain.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/toolchain.gypi 2016-02-25 00:47:15.364723659 +0100 @@ -93,6 +93,9 @@ 'binutils_dir%': '', @@ -2671,9 +2671,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/build/too ['OS=="linux" and host_arch=="x64"', { 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', }], -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-02-25 00:47:15.377723729 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2016-02-25 00:47:15.377723729 +0100 @@ -1135,41 +1135,41 @@ if (v8_target_arch == "x86") { @@ -2751,9 +2751,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/BUILD.gn ] } else if (v8_target_arch == "x64") { sources += [ -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-02-25 00:47:15.377723729 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/make-v8-sse2-gyp.sh 2016-02-25 00:47:15.377723729 +0100 @@ -0,0 +1,56 @@ +#!/bin/sh +# This script renames the v8 targets to _sse2 names so that they do not conflict @@ -2811,9 +2811,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp + -e "s/\.bin/_sse2.bin/g" \ + -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ + v8.gyp >>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-25 00:47:15.395723826 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-10 11:20:27.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-25 00:47:15.395723826 +0100 @@ -34,6 +34,14 @@ 'v8_extra_library_files%': [], 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', @@ -2876,9 +2876,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp ---- qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-02-25 00:47:15.396723831 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp +--- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-02-25 00:47:15.396723831 +0100 @@ -0,0 +1,1952 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -4832,9 +4832,9 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/3rdparty/chromium/v8/tools/gyp + }, + ], +} -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/core/core_module.pro qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.6.0-rc/src/core/core_module.pro 2016-02-15 16:18:46.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/core_module.pro 2016-02-25 00:51:29.846113989 +0100 +diff -Nur qtwebengine-opensource-src-5.6.1/src/core/core_module.pro qtwebengine-opensource-src-5.6.1-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.6.1/src/core/core_module.pro 2016-05-26 20:01:25.000000000 +0200 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/core/core_module.pro 2016-06-11 01:25:56.463419047 +0200 @@ -9,6 +9,29 @@ error("Could not find the linking information that gyp should have generated.") } @@ -4865,23 +4865,23 @@ diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/core/core_module.pro qtwebengi load(qt_module) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() -@@ -73,7 +96,12 @@ +@@ -71,7 +94,12 @@ + locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales + resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources - icu.CONFIG += no_check_exist - icu.path = $$[QT_INSTALL_DATA]/resources -- INSTALLS += icu locales resources +- INSTALLS += locales resources + # install the shared libraries + shlibs.CONFIG += no_check_exist + shlibs.path = $$shlib_install_path + shlibs_sse2.CONFIG += no_check_exist + shlibs_sse2.path = $$shlib_install_path/sse2 -+ INSTALLS += icu locales resources shlibs shlibs_sse2 - } ++ INSTALLS += locales resources shlibs shlibs_sse2 - !contains(QT_CONFIG, qt_framework): contains(QT_CONFIG, private_tests) { -diff -Nur qtwebengine-opensource-src-5.6.0-rc/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/qtwebengine.gypi ---- qtwebengine-opensource-src-5.6.0-rc/src/core/qtwebengine.gypi 2016-02-15 16:18:46.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-rc-no-sse2/src/core/qtwebengine.gypi 2016-02-25 00:47:15.416723938 +0100 + !use?(system_icu) { + icu.CONFIG += no_check_exist +diff -Nur qtwebengine-opensource-src-5.6.1/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/core/qtwebengine.gypi +--- qtwebengine-opensource-src-5.6.1/src/core/qtwebengine.gypi 2016-02-15 16:18:46.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.1-no-sse2/src/core/qtwebengine.gypi 2016-02-25 00:47:15.416723938 +0100 @@ -58,6 +58,11 @@ }, }, diff --git a/sources b/sources index c0b6fa4..fec4ca5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c0bc12bec2dde461ed1c67f834c28278 qtwebengine-opensource-src-5.6.0-clean.tar.xz +0d74f61291d3f79473801a2d73397164 qtwebengine-opensource-src-5.6.1-clean.tar.xz From 6d2db9a7a4c607801f90e7185d17f49c17a43ed7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 11 Jun 2016 03:40:44 +0200 Subject: [PATCH 086/437] Add the new designer/libqwebengineview.so plugin to the file list --- qt5-qtwebengine.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e6f5069..70dc3ec 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -364,6 +364,7 @@ popd # shared V8 library and its SSE2 version %{_qt5_libdir}/qtwebengine/ %endif +%{_qt5_plugindir}/designer/libqwebengineview.so %{_qt5_datadir}/resources/ %dir %{_qt5_translationdir}/qtwebengine_locales %lang(am) %{_qt5_translationdir}/qtwebengine_locales/am.pak @@ -438,11 +439,12 @@ popd %changelog -* Fri Jun 10 2016 Kevin Kofler - 5.6.1-1 +* Sat Jun 11 2016 Kevin Kofler - 5.6.1-1 - Update to 5.6.1 - Rebase linux-pri patch (drop the parts already fixed upstream) - Drop backported chimera-nss-init patch, already applied upstream - Rebase no-sse2 patch (the core_module.pro change) +- Add the new designer/libqwebengineview.so plugin to the file list * Mon Jun 06 2016 Rex Dieter - 5.6.0-8 - workaround stackmashing runtime errors in re2-related bundled headers (#1337585) From 3ae0724acb025b1ee508779938e32b59f471eb55 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 12 Jun 2016 08:24:03 -0500 Subject: [PATCH 087/437] add versioned qt5-qtbase runtime dep User reported after recent rawhide 5.6.1 update: Cannot mix incompatible Qt library (version 0x50600) with this library (version 0x50601) --- qt5-qtwebengine.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 70dc3ec..5413fba 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -85,6 +85,8 @@ Patch7: qtwebengine-opensource-src-5.6.1-no-sse2.patch ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el BuildRequires: qt5-qtbase-devel >= %{version} +BuildRequires: qt5-qtbase-private-devel +%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} BuildRequires: qt5-qtdeclarative-devel >= %{version} BuildRequires: qt5-qtxmlpatterns-devel >= %{version} BuildRequires: qt5-qtlocation-devel >= %{version} @@ -439,6 +441,9 @@ popd %changelog +* Sun Jun 12 2016 Rex Dieter - 5.6.1-2 +- add versioned qt5-qtbase runtime dep + * Sat Jun 11 2016 Kevin Kofler - 5.6.1-1 - Update to 5.6.1 - Rebase linux-pri patch (drop the parts already fixed upstream) From 87609ad33f0b1747592151d0e9a6e8855b1bf479 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 12 Jun 2016 08:25:23 -0500 Subject: [PATCH 088/437] add .spec comment to qtbase versioned dep --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5413fba..fbc6d55 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -86,6 +86,7 @@ ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtbase-private-devel +# TODO: check of = is really needed or if >= would be good enough -- rex %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} BuildRequires: qt5-qtdeclarative-devel >= %{version} BuildRequires: qt5-qtxmlpatterns-devel >= %{version} From 3eab3a62ce74bcf613314a3c584b886332e4d549 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 14 Jun 2016 08:44:28 -0500 Subject: [PATCH 089/437] rebuild (glibc) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fbc6d55..0fe761e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.6.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -442,6 +442,9 @@ popd %changelog +* Tue Jun 14 2016 Rex Dieter - 5.6.1-3 +- rebuild (glibc) + * Sun Jun 12 2016 Rex Dieter - 5.6.1-2 - add versioned qt5-qtbase runtime dep From 778be18d721177b73a3cf2ea2296d8999d45924e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 01:38:49 +0200 Subject: [PATCH 090/437] Update to 5.7.0 * Sat Jul 16 2016 Kevin Kofler - 5.7.0-1 - Update to 5.7.0 - Update version numbers of bundled stuff - Update system libvpx/libwebp version requirements (now F24+ only) TODO: rebase patches --- .gitignore | 1 + clean_ffmpeg.sh | 15 +++++-- clean_qtwebengine.sh | 6 +-- get_free_ffmpeg_source_files.py | 73 +++++++++++++++++++++++++++++++++ process_ffmpeg_gyp.py | 43 ------------------- qt5-qtwebengine.spec | 60 ++++++++++++++++----------- sources | 2 +- 7 files changed, 124 insertions(+), 76 deletions(-) create mode 100755 get_free_ffmpeg_source_files.py delete mode 100755 process_ffmpeg_gyp.py diff --git a/.gitignore b/.gitignore index 0707cef..fac2569 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz /qtwebengine-opensource-src-5.6.0-clean.tar.xz /qtwebengine-opensource-src-5.6.1-clean.tar.xz +/qtwebengine-opensource-src-5.7.0-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index c7ad617..eddd58e 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -22,12 +22,12 @@ where=`pwd` -generated_files=`./process_ffmpeg_gyp.py $1` +generated_files=`./get_free_ffmpeg_source_files.py $1 0` generated_files_headers="${generated_files//.c/.h}" generated_files_headers="${generated_files_headers//.S/.h}" generated_files_headers="${generated_files_headers//.asm/.h}" -cd $1 +cd $1/third_party/ffmpeg header_files=" libavutil/x86/asm.h \ libavutil/x86/bswap.h \ @@ -45,6 +45,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/arm/intmath.h \ libavutil/arm/intreadwrite.h \ libavutil/arm/timer.h \ + libavutil/atomic.h \ libavutil/atomic_gcc.h \ libavutil/attributes.h \ libavutil/audio_fifo.h \ @@ -66,6 +67,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/macros.h \ libavutil/old_pix_fmts.h \ libavutil/pixfmt.h \ + libavutil/qsort.h \ libavutil/replaygain.h \ libavutil/softfloat_tables.h \ libavutil/thread.h \ @@ -194,6 +196,7 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/hpel_template.c \ libavcodec/hpeldsp_template.c \ libavcodec/mdct_template.c \ + libavcodec/pel_template.c \ libavcodec/videodsp_template.c \ libavcodec/h264pred.c \ libavcodec/hpeldsp.c \ @@ -208,14 +211,18 @@ manual_files=" libavutil/x86/x86inc.asm \ chromium/ffmpeg_stub_headers.fragment \ chromium/ffmpegsumo.sigs" -other_files=" Changelog \ +other_files=" BUILD.gn \ + Changelog \ COPYING.GPLv2 \ COPYING.GPLv3 \ COPYING.LGPLv2.1 \ COPYING.LGPLv3 \ CREDITS \ - ffmpeg_generated.gypi \ + CREDITS.chromium \ ffmpeg.gyp \ + ffmpeg_generated.gypi \ + ffmpeg_generated.gni \ + ffmpeg_options.gni \ ffmpegsumo.ver \ INSTALL \ LICENSE \ diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index 0c97005..33eacab 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015 Kevin Kofler +# Copyright 2015-2016 Kevin Kofler # 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 @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.6.0" + echo "e.g.: ./clean_qtwebengine.sh 5.7.0" exit 1 fi @@ -55,7 +55,7 @@ else fi echo "running clean_ffmpeg.sh" -./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium/third_party/ffmpeg" || exit $? +./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium" || exit $? echo "repacking as $DIRNAME-clean.tar.xz" XZ_OPT="-9 -f" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? diff --git a/get_free_ffmpeg_source_files.py b/get_free_ffmpeg_source_files.py new file mode 100755 index 0000000..e659d63 --- /dev/null +++ b/get_free_ffmpeg_source_files.py @@ -0,0 +1,73 @@ +#!/usr/bin/python +# Copyright 2015 Tomas Popela +# 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. + +import sys +import re + +def append_sources (input_sources, output_sources): + + # Get the source files. + source_files = re.findall(r"\"(.*?)\"", input_sources) + output_sources += source_files + + +def parse_sources(input_sources, output_sources, arch_not_arm): + + # Get the type of sources in one group and sources itself in the other one. + blocks = re.findall(r"(ffmpeg[^\s]*).*?\[(.*?)]", input_sources, re.DOTALL) + for block in blocks: + if (arch_not_arm): + if not 'ffmpeg_gas_sources' in block[0]: + append_sources (block[1], output_sources) + else: + append_sources (block[1], output_sources) + + +def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): + + with open(gyni_path, "r") as input_file: + content = input_file.read().replace('\n', '') + + output_sources = [] + # Get all the sections. + sections = re.findall(r"if (.*?})", content, re.DOTALL) + for section in sections: + # Get all the conditions (first group) and sources (second group)for the + # current section. + blocks = re.findall(r"(\(.*?\))\s\{(.*?)\}", section, re.DOTALL) + for block in blocks: + conditions = re.findall(r"\(?\((.*?)\)", block[0]) + for condition in conditions: + limitations = ['is_linux', 'ffmpeg_branding == "Chromium"'] + if all(limitation in condition for limitation in limitations): + if (arch_not_arm): + if ('x64' in condition) or ('x86' in condition): + parse_sources (block[1], output_sources, arch_not_arm) + else: + parse_sources (block[1], output_sources, arch_not_arm) + + print ' '.join(output_sources) + + +if __name__ == "__main__": + + path = "%s/third_party/ffmpeg/ffmpeg_generated.gni" % sys.argv[1] + parse_ffmpeg_gyni_file (path, False if sys.argv[2] == "0" else True) diff --git a/process_ffmpeg_gyp.py b/process_ffmpeg_gyp.py deleted file mode 100755 index abbeedf..0000000 --- a/process_ffmpeg_gyp.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python -# Copyright 2013 Tomas Popela -# 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. - -import sys -import re - -if __name__ == "__main__": - path = "%s/ffmpeg_generated.gypi" % sys.argv[1] - with open(path, "r") as input_file: - content = input_file.read().replace('\n', '') - - brandings = ['ChromeOS', 'ChromiumOS', 'win', 'Chrome'] - output_duplicates = [] - sections = re.findall('\[([^\}]*)\]', content) - for section in sections: - condition = re.findall("'([^']*)'", section) - if not any(x in condition[0] for x in brandings): - for source_file in condition[1:]: - output_duplicates.append( - source_file.replace('<(shared_generated_dir)/', '')) - - output = list(set(output_duplicates)) - output.remove('c_sources') - output.remove('asm_sources') - print ' '.join(output) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0fe761e..5aef620 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,12 +10,12 @@ %global docs 1 %endif -%if 0%{?fedora} > 22 -# need libvpx >= 1.4.0 +%if 0%{?fedora} > 23 +# need libvpx >= 1.5.0 %global use_system_libvpx 1 %endif -%if 0%{?fedora} || 0%{?rhel} > 6 -# need libwebp >= 0.4.3 +%if 0%{?fedora} > 23 +# need libwebp >= 0.5.0 %global use_system_libwebp 1 %endif @@ -29,8 +29,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.6.1 -Release: 3%{?dist} +Version: 5.7.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -38,13 +38,13 @@ Release: 3%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.6/5.6.1/submodules/qtwebengine-opensource-src-5.6.1.tar.xz -# ./clean_qtwebengine.sh 5.6.1 +# wget http://download.qt.io/official_releases/qt/5.7/5.7.0/submodules/qtwebengine-opensource-src-5.7.0.tar.xz +# ./clean_qtwebengine.sh 5.7.0 Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh -Source3: process_ffmpeg_gyp.py +Source3: get_free_ffmpeg_source_files.py # do not compile with -Wno-format, which also bypasses -Werror-format-security Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script) @@ -115,7 +115,7 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) %if 0%{?use_system_libwebp} -BuildRequires: pkgconfig(libwebp) >= 0.4.3 +BuildRequires: pkgconfig(libwebp) >= 0.5.0 %endif BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(jsoncpp) @@ -148,7 +148,7 @@ BuildRequires: pkgconfig(libsrtp) BuildRequires: perl BuildRequires: python %if 0%{?use_system_libvpx} -BuildRequires: pkgconfig(vpx) >= 1.4.0 +BuildRequires: pkgconfig(vpx) >= 1.5.0 %endif # extra (non-upstream) functions needed, see @@ -169,8 +169,8 @@ BuildRequires: pkgconfig(vpx) >= 1.4.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. # Some security fixes are backported, see: -# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=45-based -Provides: bundled(chromium) = 45 +# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=49-based +Provides: bundled(chromium) = 49 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, @@ -182,28 +182,33 @@ Provides: bundled(angle) = 2422 # completely and produces only ERR_SSL_PROTOCOL_ERROR errors: # http://kaosx.us/phpBB3/viewtopic.php?t=1235 # https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1520568 -# So we have to do what Chromium 47 now defaults to: a "chimera build", i.e., -# use the BoringSSL code and the system NSS certificates. +# So we have to do what Chromium now defaults to (since 47): a "chimera build", +# i.e., use the BoringSSL code and the system NSS certificates. Provides: bundled(boringssl) Provides: bundled(brotli) # Don't get too excited. MPEG and other legally problematic stuff is stripped -# out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and process_ffmpeg_gyp.py. +# out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and +# get_free_ffmpeg_source_files.py. # see src/3rdparty/chromium/third_party/ffmpeg/Changelog for the version number -Provides: bundled(ffmpeg) = 2.7 +Provides: bundled(ffmpeg) = 2.8 Provides: bundled(iccjpeg) # bundled as "khronos", headers only Provides: bundled(khronos_headers) # bundled as "leveldatabase" -Provides: bundled(leveldb) = r80 -Provides: bundled(libjingle) = 9564 +Provides: bundled(leveldb) +Provides: bundled(libjingle) = 11250 %if !0%{?use_system_libvpx} -Provides: bundled(libvpx) = 1.4.0 +# bundled as "libvpx_new" +# the version in README.chromium is wrong, see +# src/3rdparty/chromium/third_party/libvpx_new/source/libvpx/CHANGELOG for the +# real version number +Provides: bundled(libvpx) = 1.5.0 %endif %if !0%{?use_system_libwebp} -Provides: bundled(libwebp) = 0.4.3 +Provides: bundled(libwebp) = 0.5.0 %endif Provides: bundled(libXNVCtrl) = 302.17 -Provides: bundled(libyuv) = 1444 +Provides: bundled(libyuv) = 1563 Provides: bundled(modp_b64) Provides: bundled(mojo) # headers only @@ -211,12 +216,12 @@ Provides: bundled(npapi) Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) Provides: bundled(qcms) = 4 -Provides: bundled(sfntly) = 0-0.1.svn111 +Provides: bundled(sfntly) Provides: bundled(skia) # bundled as "smhasher" Provides: bundled(SMHasher) = 0-0.1.svn147 Provides: bundled(sqlite) = 3.8.7.4 -Provides: bundled(usrsctp) = 0-0.1.svn9045 +Provides: bundled(usrsctp) Provides: bundled(webrtc) = 90 %ifarch %{ix86} x86_64 # header (for assembly) only @@ -250,7 +255,7 @@ Provides: bundled(nsURLParsers) # Bundled outside of third_party, apparently not considered as such by Chromium: # see src/3rdparty/chromium/v8/include/v8_version.h for the version number -Provides: bundled(v8) = 4.5.103.35 +Provides: bundled(v8) = 4.9.385.33 # bundled by v8 (src/3rdparty/chromium/v8/src/third_party/fdlibm) # see src/3rdparty/chromium/v8/src/third_party/fdlibm/README.v8 for the version Provides: bundled(fdlibm) = 5.3 @@ -442,6 +447,11 @@ popd %changelog +* Sat Jul 16 2016 Kevin Kofler - 5.7.0-1 +- Update to 5.7.0 +- Update version numbers of bundled stuff +- Update system libvpx/libwebp version requirements (now F24+ only) + * Tue Jun 14 2016 Rex Dieter - 5.6.1-3 - rebuild (glibc) diff --git a/sources b/sources index fec4ca5..1386ee0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0d74f61291d3f79473801a2d73397164 qtwebengine-opensource-src-5.6.1-clean.tar.xz +b346229a20b4e0ab615f179696ae58db qtwebengine-opensource-src-5.7.0-clean.tar.xz From c44c0d51a8c6d0e37c371c30198fa4311606b619 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 17:54:52 +0200 Subject: [PATCH 091/437] Rebase patches (TODO: no-sse2 patch) * Sun Jul 17 2016 Kevin Kofler - 5.7.0-1 - Drop no-format patch, fixed upstream (they stopped passing -Wno-format) - Rebase linux-pri patch (use_system_protobuf is now a qmake flag) - Rebase system-nspr-prtime and system-icu-utf patches --- qt5-qtwebengine.spec | 16 +- ...-opensource-src-5.6.0-beta-no-format.patch | 30 ---- ...ce-src-5.6.0-beta-system-nspr-prtime.patch | 49 ------ ...ngine-opensource-src-5.7.0-linux-pri.patch | 12 +- ...-opensource-src-5.7.0-system-icu-utf.patch | 147 ++++++++---------- ...nsource-src-5.7.0-system-nspr-prtime.patch | 48 ++++++ 6 files changed, 126 insertions(+), 176 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-no-format.patch delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch rename qtwebengine-opensource-src-5.6.1-linux-pri.patch => qtwebengine-opensource-src-5.7.0-linux-pri.patch (71%) rename qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch => qtwebengine-opensource-src-5.7.0-system-icu-utf.patch (59%) create mode 100644 qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5aef620..7acebd6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -45,10 +45,8 @@ Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py -# do not compile with -Wno-format, which also bypasses -Werror-format-security -Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch # some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch1: qtwebengine-opensource-src-5.6.1-linux-pri.patch +Patch1: qtwebengine-opensource-src-5.7.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -63,12 +61,12 @@ Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch +Patch5: qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch +Patch6: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along @@ -294,7 +292,6 @@ BuildArch: noarch %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} -%patch0 -p1 -b .no-format %patch1 -p1 -b .linux-pri %patch2 -p1 -b .no-icudtl-dat %patch3 -p1 -b .fix-extractcflag @@ -332,7 +329,7 @@ export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu use_system_protobuf" .. # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -447,10 +444,13 @@ popd %changelog -* Sat Jul 16 2016 Kevin Kofler - 5.7.0-1 +* Sun Jul 17 2016 Kevin Kofler - 5.7.0-1 - Update to 5.7.0 - Update version numbers of bundled stuff - Update system libvpx/libwebp version requirements (now F24+ only) +- Drop no-format patch, fixed upstream (they stopped passing -Wno-format) +- Rebase linux-pri patch (use_system_protobuf is now a qmake flag) +- Rebase system-nspr-prtime and system-icu-utf patches * Tue Jun 14 2016 Rex Dieter - 5.6.1-3 - rebuild (glibc) diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-format.patch b/qtwebengine-opensource-src-5.6.0-beta-no-format.patch deleted file mode 100644 index 650854f..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-no-format.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/common.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/common.gypi 2016-01-05 05:58:55.336938182 +0100 -@@ -3142,11 +3142,6 @@ - # Don't warn about hash_map in third-party code. - '-Wno-deprecated', - ], -- 'cflags': [ -- # Don't warn about printf format problems. -- # This is off by default in gcc but on in Ubuntu's gcc(!). -- '-Wno-format', -- ], - 'cflags_cc!': [ - # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). - '-Wsign-compare', -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/config/compiler/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-format/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2016-01-05 05:58:55.362938322 +0100 -@@ -1013,11 +1013,6 @@ - } - - if (is_linux || is_android) { -- cflags += [ -- # Don't warn about printf format problems. This is off by default in gcc -- # but on in Ubuntu's gcc(!). -- "-Wno-format", -- ] - cflags_cc += [ - # Don't warn about hash_map in third-party code. - "-Wno-deprecated", diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch deleted file mode 100644 index dffa81e..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/base.gypi 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 -@@ -623,8 +623,6 @@ - 'third_party/dmg_fp/g_fmt.cc', - 'third_party/icu/icu_utf.cc', - 'third_party/icu/icu_utf.h', -- 'third_party/nspr/prtime.cc', -- 'third_party/nspr/prtime.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'thread_task_runner_handle.cc', -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/BUILD.gn 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 -@@ -506,8 +506,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "thread_task_runner_handle.cc", - "thread_task_runner_handle.h", -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-01-12 03:01:20.876004555 +0100 -@@ -6,7 +6,7 @@ - #include - - #include "base/compiler_specific.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "testing/gtest/include/gtest/gtest.h" - -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/base/time/time.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2016-01-12 03:01:20.877004561 +0100 -@@ -13,7 +13,8 @@ - #include "base/lazy_instance.h" - #include "base/logging.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+ -+#include - - namespace base { - diff --git a/qtwebengine-opensource-src-5.6.1-linux-pri.patch b/qtwebengine-opensource-src-5.7.0-linux-pri.patch similarity index 71% rename from qtwebengine-opensource-src-5.6.1-linux-pri.patch rename to qtwebengine-opensource-src-5.7.0-linux-pri.patch index 16f2767..843f49f 100644 --- a/qtwebengine-opensource-src-5.6.1-linux-pri.patch +++ b/qtwebengine-opensource-src-5.7.0-linux-pri.patch @@ -1,15 +1,15 @@ -diff -ur qtwebengine-opensource-src-5.6.1/src/core/config/linux.pri qtwebengine-opensource-src-5.6.1-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.6.1/src/core/config/linux.pri 2016-05-26 20:01:25.000000000 +0200 -+++ qtwebengine-opensource-src-5.6.1-linux-pri/src/core/config/linux.pri 2016-06-11 01:17:26.494650774 +0200 +diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri 2016-06-07 06:20:06.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 16:21:35.259570229 +0200 @@ -46,3 +46,25 @@ use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 - + use?(system_protobuf): GYP_CONFIG += use_system_protobuf=1 ++ +# some more system packages, that are not checked for for some reason +GYP_CONFIG += \ + use_system_expat=1 \ -+ use_system_re2=1 \ -+ use_system_protobuf=1 ++ use_system_re2=1 + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on +# other architectures (e.g., ARM), so make it conditional on the architecture diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch b/qtwebengine-opensource-src-5.7.0-system-icu-utf.patch similarity index 59% rename from qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch rename to qtwebengine-opensource-src-5.7.0-system-icu-utf.patch index a522e8e..80b53a4 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch +++ b/qtwebengine-opensource-src-5.7.0-system-icu-utf.patch @@ -1,7 +1,7 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:01:20.875004550 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2016-01-12 03:04:12.789946122 +0100 -@@ -621,8 +621,6 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-07-17 16:52:03.641799106 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2016-07-17 17:20:50.666600419 +0200 +@@ -632,8 +632,6 @@ 'third_party/dmg_fp/dmg_fp.h', 'third_party/dmg_fp/dtoa_wrapper.cc', 'third_party/dmg_fp/g_fmt.cc', @@ -10,10 +10,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c 'third_party/superfasthash/superfasthash.c', 'third_party/xdg_mime/xdgmime.h', 'thread_task_runner_handle.cc', -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:03:08.040591492 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2016-01-12 03:04:27.209025094 +0100 -@@ -504,8 +504,6 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 16:52:03.642799111 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 17:20:50.667600425 +0200 +@@ -741,8 +741,6 @@ "third_party/dmg_fp/dmg_fp.h", "third_party/dmg_fp/dtoa_wrapper.cc", "third_party/dmg_fp/g_fmt.cc", @@ -22,10 +22,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c "third_party/superfasthash/superfasthash.c", "thread_task_runner_handle.cc", "thread_task_runner_handle.h", -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2016-01-12 03:09:08.430565334 +0100 -@@ -20,7 +20,7 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2016-07-17 17:20:50.668600430 +0200 +@@ -18,7 +18,7 @@ #if defined(OS_MACOSX) #include "base/mac/scoped_cftyperef.h" @@ -34,7 +34,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c #endif #if defined(OS_WIN) -@@ -1140,9 +1140,9 @@ +@@ -1138,9 +1138,9 @@ int* index) { int codepoint = 0; while (*index < length && codepoint == 0) { @@ -46,10 +46,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c DCHECK_GT(codepoint, 0); if (codepoint > 0) { // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2016-01-12 03:12:23.701634827 +0100 -@@ -14,7 +14,7 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2016-07-17 17:25:23.443128277 +0200 +@@ -15,7 +15,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" @@ -58,8 +58,8 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c #include "base/values.h" namespace base { -@@ -616,8 +616,8 @@ - int32 next_char = 0; +@@ -625,8 +625,8 @@ + int32_t next_char = 0; while (CanConsume(1)) { - pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. @@ -69,7 +69,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c if (next_char < 0 || !IsValidCharacter(next_char)) { ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); return false; -@@ -710,7 +710,7 @@ +@@ -719,7 +719,7 @@ return false; } } else if (next_char == '"') { @@ -78,7 +78,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c out->Swap(&string); return true; } else { -@@ -750,10 +750,10 @@ +@@ -759,10 +759,10 @@ // If this is a high surrogate, consume the next code unit to get the // low surrogate. @@ -91,7 +91,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c return false; // Make sure that the token has more characters to consume the -@@ -770,24 +770,24 @@ +@@ -779,24 +779,24 @@ NextNChars(3); @@ -100,10 +100,9 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c return false; } -- uint32 code_point = CBU16_GET_SUPPLEMENTARY(code_unit16_high, -- code_unit16_low); -+ uint32 code_point = U16_GET_SUPPLEMENTARY(code_unit16_high, -+ code_unit16_low); + uint32_t code_point = +- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); ++ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); if (!IsValidCharacter(code_point)) return false; @@ -122,7 +121,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c } dest_string->append(code_unit8); -@@ -804,9 +804,9 @@ +@@ -813,9 +813,9 @@ } else { char utf8_units[4] = { 0 }; int offset = 0; @@ -134,10 +133,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c // zero terminated at this point. |offset| contains the correct length. dest->AppendString(std::string(utf8_units, offset)); } -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2016-01-12 03:12:46.093757468 +0100 -@@ -10,7 +10,7 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2016-07-17 17:20:50.668600430 +0200 +@@ -14,7 +14,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" @@ -146,9 +145,9 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c namespace base { -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2016-01-12 03:14:17.884254687 +0100 +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2016-07-17 17:20:50.669600436 +0200 @@ -4,13 +4,13 @@ #include "base/strings/pattern.h" @@ -204,10 +203,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c *p += offset; return c; } -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2016-01-12 03:14:39.106365912 +0100 -@@ -6,7 +6,7 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2016-07-17 17:20:50.669600436 +0200 +@@ -8,7 +8,7 @@ #include "base/logging.h" #include "base/strings/string_util.h" @@ -216,28 +215,10 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c namespace base { -@@ -201,7 +201,7 @@ - void SplitString(const string16& str, - char16 c, - std::vector* result) { -- DCHECK(CBU16_IS_SINGLE(c)); -+ DCHECK(U16_IS_SINGLE(c)); - *result = SplitStringT( - str, c, TRIM_WHITESPACE, SPLIT_WANT_ALL); - -@@ -274,7 +274,7 @@ - void SplitStringDontTrim(StringPiece16 str, - char16 c, - std::vector* result) { -- DCHECK(CBU16_IS_SINGLE(c)); -+ DCHECK(U16_IS_SINGLE(c)); - *result = SplitStringT( - str, c, KEEP_WHITESPACE, SPLIT_WANT_ALL); - } -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2016-01-12 03:15:00.981480560 +0100 -@@ -24,7 +24,7 @@ +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2016-07-17 17:29:39.032552674 +0200 +@@ -26,7 +26,7 @@ #include "base/strings/string_split.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" @@ -245,15 +226,15 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c +#include #include "build/build_config.h" - // Remove when this entire file is in the base namespace. -@@ -274,19 +274,19 @@ - return; + namespace base { +@@ -358,19 +358,19 @@ } - DCHECK_LE(byte_size, static_cast(kint32max)); -- // Note: This cast is necessary because CBU8_NEXT uses int32s. -+ // Note: This cast is necessary because U8_NEXT uses int32s. - int32 truncation_length = static_cast(byte_size); - int32 char_index = truncation_length - 1; + DCHECK_LE(byte_size, + static_cast(std::numeric_limits::max())); +- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. ++ // Note: This cast is necessary because U8_NEXT uses int32_ts. + int32_t truncation_length = static_cast(byte_size); + int32_t char_index = truncation_length - 1; const char* data = input.data(); - // Using CBU8, we will move backwards from the truncation point @@ -262,7 +243,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c // character. Once a full UTF8 character is found, we will // truncate the string to the end of that character. while (char_index >= 0) { - int32 prev = char_index; + int32_t prev = char_index; - base_icu::UChar32 code_point = 0; - CBU8_NEXT(data, char_index, truncation_length, code_point); + UChar32 code_point = 0; @@ -270,18 +251,18 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { char_index = prev - 1; -@@ -447,7 +447,7 @@ +@@ -523,7 +523,7 @@ while (char_index < src_len) { - int32 code_point; + int32_t code_point; - CBU8_NEXT(src, char_index, src_len, code_point); + U8_NEXT(src, char_index, src_len, code_point); if (!IsValidCharacter(code_point)) return false; } -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-01-12 03:15:27.384618939 +0100 +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-07-17 17:31:29.363164013 +0200 @@ -4,7 +4,7 @@ #include "base/strings/utf_string_conversion_utils.h" @@ -294,16 +275,16 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c @@ -18,7 +18,7 @@ // use a signed type for code_point. But this function returns false // on error anyway, so code_point_out is unsigned. - int32 code_point; + int32_t code_point; - CBU8_NEXT(src, *char_index, src_len, code_point); + U8_NEXT(src, *char_index, src_len, code_point); - *code_point_out = static_cast(code_point); + *code_point_out = static_cast(code_point); // The ICU macro above moves to the next char, we want to point to the last @@ -33,16 +33,16 @@ - int32 src_len, - int32* char_index, - uint32* code_point) { + int32_t src_len, + int32_t* char_index, + uint32_t* code_point) { - if (CBU16_IS_SURROGATE(src[*char_index])) { - if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || + if (U16_IS_SURROGATE(src[*char_index])) { @@ -342,7 +323,7 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c return char_offset - original_char_offset; } - size_t WriteUnicodeCharacter(uint32 code_point, string16* output) { + size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { - if (CBU16_LENGTH(code_point) == 1) { + if (U16_LENGTH(code_point) == 1) { // Thie code point is in the Basic Multilingual Plane (BMP). @@ -360,9 +341,9 @@ diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/c } // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-01-12 03:15:51.205743785 +0100 +diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-07-17 17:20:50.687600537 +0200 @@ -5,13 +5,13 @@ #include "ui/gfx/utf16_indexing.h" diff --git a/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch new file mode 100644 index 0000000..04933fc --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch @@ -0,0 +1,48 @@ +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/base.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-07-17 16:52:03.641799106 +0200 +@@ -634,8 +634,6 @@ + 'third_party/dmg_fp/g_fmt.cc', + 'third_party/icu/icu_utf.cc', + 'third_party/icu/icu_utf.h', +- 'third_party/nspr/prtime.cc', +- 'third_party/nspr/prtime.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'thread_task_runner_handle.cc', +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 16:52:03.642799111 +0200 +@@ -743,8 +743,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "thread_task_runner_handle.cc", + "thread_task_runner_handle.h", +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-07-17 16:55:11.749868819 +0200 +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/time.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2016-07-17 16:55:54.895115802 +0200 +@@ -14,7 +14,7 @@ + #include "base/logging.h" + #include "base/macros.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "build/build_config.h" + + namespace base { From ed26f4f5e2945a2b8035134a76ed74b7deaabd34 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 21:06:36 +0200 Subject: [PATCH 092/437] Rebase the no-sse2 patch Now all patches should be rebased. --- qt5-qtwebengine.spec | 4 +- ...bengine-opensource-src-5.7.0-no-sse2.patch | 1785 +++++++++-------- 2 files changed, 991 insertions(+), 798 deletions(-) rename qtwebengine-opensource-src-5.6.1-no-sse2.patch => qtwebengine-opensource-src-5.7.0-no-sse2.patch (73%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7acebd6..31a283f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -72,7 +72,7 @@ Patch6: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch7: qtwebengine-opensource-src-5.6.1-no-sse2.patch +Patch7: qtwebengine-opensource-src-5.7.0-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -450,7 +450,7 @@ popd - Update system libvpx/libwebp version requirements (now F24+ only) - Drop no-format patch, fixed upstream (they stopped passing -Wno-format) - Rebase linux-pri patch (use_system_protobuf is now a qmake flag) -- Rebase system-nspr-prtime and system-icu-utf patches +- Rebase system-nspr-prtime, system-icu-utf and no-sse2 patches * Tue Jun 14 2016 Rex Dieter - 5.6.1-3 - rebuild (glibc) diff --git a/qtwebengine-opensource-src-5.6.1-no-sse2.patch b/qtwebengine-opensource-src-5.7.0-no-sse2.patch similarity index 73% rename from qtwebengine-opensource-src-5.6.1-no-sse2.patch rename to qtwebengine-opensource-src-5.7.0-no-sse2.patch index b6fed7e..f2edb62 100644 --- a/qtwebengine-opensource-src-5.6.1-no-sse2.patch +++ b/qtwebengine-opensource-src-5.7.0-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-02-25 00:47:14.856720934 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-07-17 18:06:28.022746102 +0200 @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -30,10 +30,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/breakpad/src/bu ], 'ldflags': [ '-m32', -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/build/common.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-02-25 00:47:14.883721079 +0100 -@@ -3904,15 +3904,7 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/build/common.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-07-17 18:06:28.025746118 +0200 +@@ -3898,15 +3898,7 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is # always kept in its specified precision. @@ -49,10 +49,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/build/common.gy '-m32', ], 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-02-25 00:47:14.892721127 +0100 -@@ -502,13 +502,6 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-07-17 19:24:47.069349645 +0200 +@@ -528,13 +528,6 @@ "trees/tree_synchronizer.h", ] @@ -63,18 +63,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn qtw - ] - } - + configs += [ "//build/config:precompiled_headers" ] + public_deps = [ - "//cc/base", - "//skia", -@@ -516,6 +509,7 @@ +@@ -544,6 +537,7 @@ deps = [ "//base", "//base/third_party/dynamic_annotations", + "//cc:cc_opts", + "//cc/proto", "//cc/surfaces:surface_id", "//gpu", - "//gpu/command_buffer/client:gles2_interface", -@@ -533,6 +527,36 @@ +@@ -563,6 +557,36 @@ } } @@ -111,18 +111,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/BUILD.gn qtw source_set("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-02-25 00:47:14.903721186 +0100 -@@ -21,6 +21,7 @@ - '<(DEPTH)/ui/events/events.gyp:events_base', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', -+ 'cc_opts', - ], - 'variables': { - 'optimize': 'max', -@@ -563,14 +564,6 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-07-17 19:23:10.962834059 +0200 +@@ -595,14 +595,6 @@ 'includes': [ '../build/android/increase_size_for_speed.gypi', ], @@ -136,8 +128,16 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp qtweb - ], }, { - # GN version: //cc/surfaces -@@ -621,5 +614,41 @@ + # GN version: "//cc/proto" +@@ -667,6 +659,7 @@ + '<(DEPTH)/ui/events/events.gyp:events_base', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', ++ 'cc_opts', + ], + 'defines': [ + 'CC_SURFACES_IMPLEMENTATION=1', +@@ -704,5 +697,41 @@ '../build/android/increase_size_for_speed.gypi', ], }, @@ -179,10 +179,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/cc/cc.gyp qtweb + }, ], } -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-02-25 00:47:14.941721390 +0100 -@@ -270,13 +270,13 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-07-17 18:06:36.080790050 +0200 +@@ -279,13 +279,13 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -202,7 +202,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUIL } configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] -@@ -462,10 +462,47 @@ +@@ -484,10 +484,47 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -250,38 +250,38 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/BUIL "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/media.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-02-25 00:47:14.954721460 +0100 -@@ -9,6 +9,8 @@ - #include "base/path_service.h" +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/media.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-07-17 18:06:36.080790050 +0200 +@@ -11,6 +11,8 @@ #include "base/synchronization/lock.h" + #include "base/trace_event/trace_event.h" #include "build/build_config.h" +#include "media/base/sinc_resampler.h" +#include "media/base/vector_math.h" #include "media/base/yuv_convert.h" #if !defined(MEDIA_DISABLE_FFMPEG) -@@ -24,6 +26,8 @@ +@@ -29,6 +31,8 @@ + TRACE_EVENT_WARMUP_CATEGORY("media"); - MediaInitializer() { // Perform initialization of libraries which require runtime CPU detection. + vector_math::Initialize(); + SincResampler::InitializeCPUSpecificFeatures(); InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-02-25 00:47:14.968721535 +0100 -@@ -63,6 +63,17 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-07-17 19:32:39.210872688 +0200 +@@ -65,6 +65,17 @@ int rgbstride, YUVType yuv_type); -+MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8* yplane, -+ const uint8* uplane, -+ const uint8* vplane, -+ uint8* rgbframe, ++MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, + int width, + int height, + int ystride, @@ -289,56 +289,56 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd + int rgbstride, + YUVType yuv_type); + - MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, -@@ -114,6 +125,13 @@ - // issue on at least Win64. The C-equivalent RowProc versions' prototypes - // include the same change to ptrdiff_t to reuse the typedefs. - -+MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane, -+ const uint8* uplane, -+ const uint8* vplane, -+ uint8* rgbframe, + MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +@@ -124,6 +135,13 @@ + ptrdiff_t width, + const int16_t* convert_table); + ++MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, + ptrdiff_t width, -+ const int16* convert_table); ++ const int16_t* convert_table); + - MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, -@@ -129,6 +147,14 @@ + MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +@@ -131,6 +149,14 @@ ptrdiff_t width, - const int16* convert_table); + const int16_t* convert_table); -+MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf, -+ const uint8* u_buf, -+ const uint8* v_buf, -+ uint8* rgb_buf, ++MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, ++ const uint8_t* u_buf, ++ const uint8_t* v_buf, ++ uint8_t* rgb_buf, + ptrdiff_t width, + ptrdiff_t source_dx, -+ const int16* convert_table); ++ const int16_t* convert_table); + - MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, -@@ -145,6 +171,14 @@ + MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -147,6 +173,14 @@ ptrdiff_t source_dx, - const int16* convert_table); + const int16_t* convert_table); -+MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8* y_buf, -+ const uint8* u_buf, -+ const uint8* v_buf, -+ uint8* rgb_buf, ++MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, ++ const uint8_t* u_buf, ++ const uint8_t* v_buf, ++ uint8_t* rgb_buf, + ptrdiff_t width, + ptrdiff_t source_dx, -+ const int16* convert_table); -+ - MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-02-25 00:47:14.968721535 +0100 ++ const int16_t* convert_table); ++ + MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-07-17 18:06:36.101790164 +0200 @@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be @@ -363,17 +363,17 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-02-25 00:47:14.976721578 +0100 -@@ -13,6 +13,34 @@ - - namespace media { +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-07-17 19:36:04.063964591 +0200 +@@ -47,6 +47,34 @@ + EmptyRegisterState(); + } -+void ConvertYUVToRGB32_MMX(const uint8* yplane, -+ const uint8* uplane, -+ const uint8* vplane, -+ uint8* rgbframe, ++void ConvertYUVToRGB32_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, + int width, + int height, + int ystride, @@ -382,10 +382,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd + YUVType yuv_type) { + unsigned int y_shift = GetVerticalShift(yuv_type); + for (int y = 0; y < height; ++y) { -+ uint8* rgb_row = rgbframe + y * rgbstride; -+ const uint8* y_ptr = yplane + y * ystride; -+ const uint8* u_ptr = uplane + (y >> y_shift) * uvstride; -+ const uint8* v_ptr = vplane + (y >> y_shift) * uvstride; ++ uint8_t* rgb_row = rgbframe + y * rgbstride; ++ const uint8_t* y_ptr = yplane + y * ystride; ++ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; ++ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; + + ConvertYUVToRGB32Row_MMX(y_ptr, + u_ptr, @@ -398,28 +398,28 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd + EmptyRegisterState(); +} + - void ConvertYUVAToARGB_MMX(const uint8* yplane, - const uint8* uplane, - const uint8* vplane, -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-02-25 00:47:14.977721583 +0100 -@@ -19,6 +19,12 @@ + void ConvertYUVToRGB32_SSE(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-07-17 19:37:17.605356580 +0200 +@@ -20,6 +20,12 @@ int source_width, - uint8 source_y_fraction); + uint8_t source_y_fraction); -+MEDIA_EXPORT void FilterYUVRows_MMX(uint8* ybuf, -+ const uint8* y0_ptr, -+ const uint8* y1_ptr, ++MEDIA_EXPORT void FilterYUVRows_MMX(uint8_t* ybuf, ++ const uint8_t* y0_ptr, ++ const uint8_t* y1_ptr, + int source_width, -+ uint8 source_y_fraction); -+ - MEDIA_EXPORT void FilterYUVRows_SSE2(uint8* ybuf, - const uint8* y0_ptr, - const uint8* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-02-25 00:47:14.978721589 +0100 ++ uint8_t source_y_fraction); ++ + MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, + const uint8_t* y0_ptr, + const uint8_t* y1_ptr, +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-07-17 19:37:56.249562560 +0200 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -443,11 +443,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd +#pragma warning(disable: 4799) +#endif + -+void FilterYUVRows_MMX(uint8* dest, -+ const uint8* src0, -+ const uint8* src1, ++void FilterYUVRows_MMX(uint8_t* dest, ++ const uint8_t* src0, ++ const uint8_t* src1, + int width, -+ uint8 fraction) { ++ uint8_t fraction) { + int pixel = 0; + + // Process the unaligned bytes first. @@ -500,9 +500,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-02-25 00:47:14.978721589 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-07-17 18:06:36.111790219 +0200 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -554,9 +554,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-02-25 00:47:14.978721589 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-07-17 18:06:36.112790224 +0200 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -676,15 +676,16 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/simd + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-02-25 00:47:15.049721970 +0100 -@@ -81,16 +81,11 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-07-17 19:40:18.772322232 +0200 +@@ -81,17 +81,12 @@ #include #include +#include "base/cpu.h" #include "base/logging.h" + #include "build/build_config.h" -#if defined(ARCH_CPU_X86_FAMILY) -#include @@ -698,7 +699,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc #endif namespace media { -@@ -111,10 +106,41 @@ +@@ -112,10 +107,41 @@ return sinc_scale_factor; } @@ -740,7 +741,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc SincResampler::SincResampler(double io_sample_rate_ratio, int request_frames, const ReadCB& read_cb) -@@ -342,46 +368,7 @@ +@@ -343,46 +369,7 @@ kernel_interpolation_factor * sum2); } @@ -788,10 +789,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-02-25 00:47:15.055722002 +0100 -@@ -34,6 +34,10 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-07-17 18:06:36.163790503 +0200 +@@ -35,6 +35,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -802,18 +803,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-02-25 00:47:15.057722012 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-07-17 18:06:36.171790546 +0200 @@ -4,6 +4,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/cpu.h" #include "base/time/time.h" + #include "build/build_config.h" #include "media/base/sinc_resampler.h" - #include "testing/gmock/include/gmock/gmock.h" -@@ -60,6 +61,9 @@ +@@ -61,6 +62,9 @@ &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); #if defined(CONVOLVE_FUNC) @@ -823,18 +824,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-02-25 00:47:15.060722029 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-07-17 19:41:45.620785149 +0200 @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/cpu.h" + #include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" - #include "build/build_config.h" -@@ -163,6 +164,10 @@ +@@ -164,6 +165,10 @@ static const double kKernelInterpolationFactor = 0.5; TEST(SincResamplerTest, Convolve) { @@ -845,9 +846,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/sinc // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-02-25 00:47:15.063722045 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-07-17 18:06:36.173790557 +0200 @@ -7,12 +7,17 @@ #include @@ -1035,9 +1036,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-02-25 00:47:15.068722072 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-07-17 18:06:36.174790563 +0200 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1050,18 +1051,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-02-25 00:47:15.068722072 +0100 -@@ -2,6 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-07-17 19:43:25.736318783 +0200 +@@ -3,6 +3,7 @@ // found in the LICENSE file. + #include "base/macros.h" +#include "base/cpu.h" #include "base/memory/aligned_memory.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" -@@ -79,15 +80,11 @@ +@@ -81,15 +82,11 @@ DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); }; @@ -1078,7 +1079,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect #endif // Benchmark for each optimized vector_math::FMAC() method. -@@ -96,6 +93,9 @@ +@@ -98,6 +95,9 @@ RunBenchmark( vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); #if defined(FMAC_FUNC) @@ -1088,7 +1089,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect // Benchmark FMAC_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -109,12 +109,24 @@ +@@ -111,12 +111,24 @@ #endif } @@ -1113,7 +1114,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect // Benchmark FMUL_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -128,6 +140,14 @@ +@@ -130,6 +142,14 @@ #endif } @@ -1128,7 +1129,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { // Benchmark EWMAAndMaxPower_C(). -@@ -136,6 +156,9 @@ +@@ -138,6 +158,9 @@ "vector_math_ewma_and_max_power", "unoptimized"); #if defined(EWMAAndMaxPower_FUNC) @@ -1138,16 +1139,16 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -153,4 +176,6 @@ +@@ -155,4 +178,6 @@ #endif } +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-02-25 00:47:15.076722114 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-07-17 18:06:36.193790666 +0200 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1157,18 +1158,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-02-25 00:47:15.084722157 +0100 -@@ -6,6 +6,7 @@ - #define _USE_MATH_DEFINES +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-07-17 19:44:10.094555220 +0200 +@@ -7,6 +7,7 @@ #include + #include "base/macros.h" +#include "base/cpu.h" #include "base/memory/aligned_memory.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" -@@ -75,6 +76,7 @@ +@@ -77,6 +78,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1176,7 +1177,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMAC_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMAC_SSE( -@@ -116,6 +118,7 @@ +@@ -118,6 +120,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1184,7 +1185,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMUL_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMUL_SSE( -@@ -224,6 +227,7 @@ +@@ -226,6 +229,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1192,10 +1193,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-02-25 00:47:15.088722179 +0100 -@@ -29,7 +29,7 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-07-17 18:06:36.196790682 +0200 +@@ -33,7 +33,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1204,7 +1205,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ #if defined(COMPILER_MSVC) #include #else -@@ -133,7 +133,7 @@ +@@ -134,7 +134,7 @@ // Empty SIMD registers state after using them. void EmptyRegisterStateStub() {} @@ -1213,7 +1214,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ void EmptyRegisterStateIntrinsic() { _mm_empty(); } #endif typedef void (*EmptyRegisterStateProc)(); -@@ -247,34 +247,46 @@ +@@ -248,34 +248,46 @@ // Assembly code confuses MemorySanitizer. Also not available in iOS builds. #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ !defined(OS_IOS) @@ -1277,17 +1278,17 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-02-25 00:47:15.089722184 +0100 -@@ -64,6 +64,31 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-07-17 19:48:57.702119844 +0200 +@@ -69,6 +69,29 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; +TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) { + ASSERT_TRUE(base::CPU().has_mmx()); + -+ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ base::TimeTicks start = base::TimeTicks::Now(); + for (int i = 0; i < kPerfTestIterations; ++i) { + for (int row = 0; row < kSourceHeight; ++row) { + int chroma_row = row / 2; @@ -1300,21 +1301,19 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ + GetLookupTable(YV12)); + } + } -+ double total_time_seconds = -+ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); + perf_test::PrintResult( + "yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX", + kPerfTestIterations / total_time_seconds, "runs/s", true); -+ -+ media::EmptyRegisterState(); +} + TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -87,9 +112,33 @@ - media::EmptyRegisterState(); +@@ -159,9 +182,32 @@ } + #endif -// 64-bit release + component builds on Windows are too smart and optimizes -// away the function being tested. @@ -1324,7 +1323,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ + + const int kSourceDx = 80000; // This value means a scale down. + -+ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ base::TimeTicks start = base::TimeTicks::Now(); + for (int i = 0; i < kPerfTestIterations; ++i) { + for (int row = 0; row < kSourceHeight; ++row) { + int chroma_row = row / 2; @@ -1338,19 +1337,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ + GetLookupTable(YV12)); + } + } -+ double total_time_seconds = -+ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); + perf_test::PrintResult( + "yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX", + kPerfTestIterations / total_time_seconds, "runs/s", true); -+ media::EmptyRegisterState(); +} + TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -116,6 +165,33 @@ - media::EmptyRegisterState(); +@@ -188,6 +234,32 @@ + kPerfTestIterations / total_time_seconds, "runs/s", true); } +TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) { @@ -1358,7 +1356,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ + + const int kSourceDx = 80000; // This value means a scale down. + -+ base::TimeTicks start = base::TimeTicks::HighResNow(); ++ base::TimeTicks start = base::TimeTicks::Now(); + for (int i = 0; i < kPerfTestIterations; ++i) { + for (int row = 0; row < kSourceHeight; ++row) { + int chroma_row = row / 2; @@ -1372,29 +1370,28 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ + GetLookupTable(YV12)); + } + } -+ double total_time_seconds = -+ (base::TimeTicks::HighResNow() - start).InSecondsF(); ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); + perf_test::PrintResult( + "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX", + kPerfTestIterations / total_time_seconds, "runs/s", true); -+ media::EmptyRegisterState(); +} + TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -141,7 +217,6 @@ +@@ -213,7 +285,6 @@ + "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", kPerfTestIterations / total_time_seconds, "runs/s", true); - media::EmptyRegisterState(); } -#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-02-25 00:47:15.090722190 +0100 -@@ -658,6 +658,37 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-07-17 18:06:36.201790710 +0200 +@@ -635,6 +635,37 @@ EXPECT_EQ(0, error); } @@ -1432,7 +1429,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -689,9 +720,40 @@ +@@ -666,9 +697,40 @@ kWidth * kBpp)); } @@ -1476,7 +1473,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -726,6 +788,40 @@ +@@ -703,6 +765,40 @@ kWidth * kBpp)); } @@ -1517,15 +1514,15 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -759,7 +855,6 @@ +@@ -736,7 +832,6 @@ rgb_bytes_converted.get(), kWidth * kBpp)); } -#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { - scoped_ptr src(new uint8[16]); -@@ -776,6 +871,30 @@ + scoped_ptr src(new uint8_t[16]); +@@ -753,6 +848,30 @@ } } @@ -1556,7 +1553,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { base::CPU cpu; if (!cpu.has_sse2()) { -@@ -797,6 +916,38 @@ +@@ -774,6 +893,38 @@ } } @@ -1595,12 +1592,12 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-02-25 00:47:15.118722340 +0100 -@@ -747,6 +747,26 @@ - deps = [ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-07-17 19:52:10.846175461 +0200 +@@ -907,6 +907,26 @@ "//base", + "//ui/gfx/geometry", ] + if (current_cpu == "x86" || current_cpu == "x64") { + deps += [ @@ -1624,11 +1621,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/BUILD.gn + } } - if (media_use_ffmpeg) { -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-02-25 00:47:15.126722383 +0100 -@@ -1053,12 +1053,12 @@ + # TODO(watk): Refactor tests that could be made to run on Android. See +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-07-17 18:06:36.231790873 +0200 +@@ -1138,12 +1138,12 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ 'media_asm', @@ -1644,7 +1641,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp ], }], ['OS!="linux" and OS!="win"', { -@@ -1572,6 +1572,11 @@ +@@ -1712,6 +1712,11 @@ 'USE_NEON' ], }], @@ -1656,7 +1653,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp ], }, ], -@@ -1583,6 +1588,7 @@ +@@ -1723,6 +1728,7 @@ 'type': 'static_library', 'sources': [ 'base/simd/convert_rgb_to_yuv_ssse3.asm', @@ -1664,7 +1661,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp 'base/simd/convert_yuv_to_rgb_sse.asm', 'base/simd/convert_yuva_to_argb_mmx.asm', 'base/simd/empty_register_state_mmx.asm', -@@ -1663,6 +1669,75 @@ +@@ -1803,6 +1809,75 @@ '../third_party/yasm/yasm_compile.gypi', ], }, @@ -1740,23 +1737,22 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/media/media.gyp ], # targets }], ['OS=="android"', { -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-02-25 00:47:15.128722393 +0100 -@@ -300,12 +300,6 @@ - "ext/skia_utils_win.cc", - ] - -- if (current_cpu == "x86" || current_cpu == "x64") { +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-07-17 19:56:57.665743057 +0200 +@@ -307,11 +307,6 @@ + if (!is_ios) { + sources += [ "ext/platform_canvas.cc" ] + } +- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { - sources += [ "ext/convolver_SSE2.cc" ] - } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { - sources += [ "ext/convolver_mips_dspr2.cc" ] - } -- + # The skia gypi values are relative to the skia_dir, so we need to rebase. sources += gypi_skia_core.sources - sources += gypi_skia_effects.sources -@@ -532,7 +526,15 @@ +@@ -597,7 +592,15 @@ ] if (current_cpu == "x86" || current_cpu == "x64") { @@ -1771,9 +1767,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn q + cflags += [ "-msse2" ] + } deps += [ - ":skia_opts_sse3", - ":skia_opts_sse4", -@@ -562,6 +564,13 @@ + ":skia_opts_avx", + ":skia_opts_avx2", +@@ -632,6 +635,13 @@ if (mips_dsp_rev >= 1) { sources = gypi_skia_opts.mips_dsp_sources @@ -1787,9 +1783,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/BUILD.gn q } else { sources = gypi_skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-02-25 00:47:15.165722592 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-07-17 18:06:40.213812591 +0200 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1808,20 +1804,20 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convol #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-02-25 00:47:15.177722656 +0100 -@@ -9,6 +9,7 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-07-17 20:01:19.498174087 +0200 +@@ -11,6 +11,7 @@ #include - #include "base/basictypes.h" + #include "build/build_config.h" +#include "base/cpu.h" #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-02-25 00:47:15.178722662 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-07-17 18:06:40.215812602 +0200 @@ -9,6 +9,7 @@ { 'dependencies': [ @@ -1830,7 +1826,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrom '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', ], -@@ -60,22 +61,16 @@ +@@ -66,22 +67,16 @@ 'ext/skia_utils_base.cc', ], }], @@ -1858,10 +1854,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_chrom ], 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-02-25 00:47:15.178722662 +0100 -@@ -91,6 +91,37 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-07-17 18:06:40.215812602 +0200 +@@ -128,6 +128,37 @@ # targets that are not dependent upon the component type 'targets': [ { @@ -1897,12 +1893,12 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia.gyp q + }, + { 'target_name': 'image_operations_bench', - 'type': 'executable', - 'dependencies': [ -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-02-25 00:47:15.179722667 +0100 -@@ -18,10 +18,22 @@ + # The optimize: 'max' scattered throughout are particularly + # important when compiled by MSVC 2013, which seems +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-07-17 18:06:40.216812607 +0200 +@@ -19,10 +19,22 @@ }, 'targets': [ @@ -1929,7 +1925,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_libra # For about the same reason, we need to compile the ARM opts files # separately as well. { -@@ -37,12 +49,13 @@ +@@ -45,12 +57,13 @@ ], 'include_dirs': [ '<@(include_dirs)' ], 'conditions': [ @@ -1947,22 +1943,22 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/skia/skia_libra 'sources': [ '<@(sse2_sources)' ], 'dependencies': [ 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-02-25 00:47:15.202722790 +0100 -@@ -26,8 +26,8 @@ - public_configs = [ ":qcms_config" ] +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-07-17 20:06:47.037962770 +0200 +@@ -27,8 +27,8 @@ + ] - if (current_cpu == "x86" || current_cpu == "x64") { -- defines = [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ "qcms_sse2" ] + if (current_cpu == "x86" || current_cpu == "x64") { +- defines = [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines = [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ "qcms_sse2" ] + } } - if (is_win) { -@@ -37,3 +37,15 @@ - ] +@@ -64,3 +64,15 @@ + public_configs = [ ":qcms_config" ] } } + @@ -1977,27 +1973,27 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcm + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-02-25 00:47:15.202722790 +0100 -@@ -33,10 +33,10 @@ - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'defines': [ -- 'SSE2_ENABLE', -+ 'SSE2_ENABLE', # runtime detection - ], -- 'sources': [ -- 'src/transform-sse2.c', -+ 'dependencies': [ -+ 'qcms_sse2', +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-07-17 20:08:22.446483691 +0200 +@@ -42,10 +42,10 @@ + 'conditions': [ + ['target_arch=="ia32" or target_arch=="x64"', { + 'defines': [ +- 'SSE2_ENABLE', ++ 'SSE2_ENABLE', # runtime detection + ], +- 'sources': [ +- 'src/transform-sse2.c', ++ 'dependencies': [ ++ 'qcms_sse2', + ], + }], ], - }], - ['OS == "win"', { -@@ -47,6 +47,29 @@ +@@ -85,6 +85,29 @@ }], ], - }, + }, + { + 'target_name': 'qcms_sse2', + 'type': 'static_library', @@ -2024,12 +2020,12 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/qcm ], } -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-02-25 00:47:15.220722887 +0100 -@@ -30,6 +30,9 @@ - - #if ENABLE(WEB_AUDIO) +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-07-17 18:06:40.274812924 +0200 +@@ -26,6 +26,9 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +// include this first to get it before the CPU() function-like macro +#include "base/cpu.h" @@ -2037,7 +2033,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web #include "platform/audio/DirectConvolver.h" #if OS(MACOSX) -@@ -39,14 +42,20 @@ +@@ -35,14 +38,20 @@ #include "platform/audio/VectorMath.h" #include "wtf/CPU.h" @@ -2059,7 +2055,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web DirectConvolver::DirectConvolver(size_t inputBlockSize) : m_inputBlockSize(inputBlockSize) #if USE(WEBAUDIO_IPP) -@@ -54,10 +63,26 @@ +@@ -50,10 +59,26 @@ #endif // USE(WEBAUDIO_IPP) , m_buffer(inputBlockSize * 2) { @@ -2086,7 +2082,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web ASSERT(framesToProcess == m_inputBlockSize); if (framesToProcess != m_inputBlockSize) return; -@@ -102,7 +127,7 @@ +@@ -98,7 +123,7 @@ #endif // CPU(X86) #else size_t i = 0; @@ -2095,7 +2091,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| // are multiples of 4. If not, use the straightforward loop below. -@@ -412,7 +437,7 @@ +@@ -408,7 +433,7 @@ } destP[i++] = sum; } @@ -2104,7 +2100,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web } #endif #endif // OS(MACOSX) -@@ -422,6 +447,8 @@ +@@ -418,6 +443,8 @@ #endif } @@ -2113,7 +2109,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web void DirectConvolver::reset() { m_buffer.zero(); -@@ -430,6 +457,8 @@ +@@ -426,5 +453,7 @@ #endif // USE(WEBAUDIO_IPP) } @@ -2121,19 +2117,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web + } // namespace blink - #endif // ENABLE(WEB_AUDIO) -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-02-25 00:47:15.221722892 +0100 -@@ -31,6 +31,7 @@ - +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-07-17 20:16:19.967090904 +0200 +@@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" + #include "wtf/Allocator.h" +#include "wtf/CPU.h" + #include "wtf/Noncopyable.h" #if USE(WEBAUDIO_IPP) - #include -@@ -53,6 +54,11 @@ +@@ -57,6 +58,11 @@ AudioFloatArray m_overlayBuffer; #endif // USE(WEBAUDIO_IPP) AudioFloatArray m_buffer; @@ -2145,24 +2140,23 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-02-25 00:47:15.221722892 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-07-17 18:06:40.274812924 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-02-25 00:47:15.230722941 +0100 -@@ -30,16 +30,23 @@ - - #if ENABLE(WEB_AUDIO) +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-07-17 20:18:38.755848676 +0200 +@@ -26,15 +26,22 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +// include this first to get it before the CPU() function-like macro +#include "base/cpu.h" + #include "platform/audio/SincResampler.h" - #include "platform/audio/AudioBus.h" #include "wtf/CPU.h" #include "wtf/MathExtras.h" @@ -2179,7 +2173,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web // Input buffer layout, dividing the total buffer into regions (r0 - r5): // // |----------------|----------------------------------------------------------------|----------------| -@@ -69,6 +76,8 @@ +@@ -64,6 +71,8 @@ namespace blink { @@ -2188,7 +2182,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web SincResampler::SincResampler(double scaleFactor, unsigned kernelSize, unsigned numberOfKernelOffsets) : m_scaleFactor(scaleFactor) , m_kernelSize(kernelSize) -@@ -82,6 +91,10 @@ +@@ -77,6 +86,10 @@ , m_sourceProvider(nullptr) , m_isBufferPrimed(false) { @@ -2199,7 +2193,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web initializeKernel(); } -@@ -198,8 +211,20 @@ +@@ -193,8 +206,20 @@ } } @@ -2220,7 +2214,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web bool isGood = sourceProvider && m_blockSize > m_kernelSize && m_inputBuffer.size() >= m_blockSize + m_kernelSize && !(m_kernelSize % 2); ASSERT(isGood); if (!isGood) -@@ -261,7 +286,7 @@ +@@ -256,7 +281,7 @@ { float input; @@ -2229,18 +2223,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. while ((reinterpret_cast(inputP) & 0x0F) && n) { CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-02-25 00:47:15.236722973 +0100 -@@ -32,6 +32,7 @@ - #include "platform/PlatformExport.h" +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-07-17 20:19:17.818061951 +0200 +@@ -33,6 +33,7 @@ #include "platform/audio/AudioArray.h" #include "platform/audio/AudioSourceProvider.h" + #include "wtf/Allocator.h" +#include "wtf/CPU.h" + #include "wtf/Noncopyable.h" namespace blink { - -@@ -80,6 +81,11 @@ +@@ -84,6 +85,11 @@ // The buffer is primed once at the very beginning of processing. bool m_isBufferPrimed; @@ -2252,18 +2246,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-02-25 00:47:15.236722973 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-07-17 18:06:40.282812967 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-02-25 00:47:15.237722978 +0100 -@@ -26,6 +26,9 @@ - - #if ENABLE(WEB_AUDIO) +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-07-17 18:06:40.282812967 +0200 +@@ -22,6 +22,9 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +// include this first to get it before the CPU() function-like macro +#include "base/cpu.h" @@ -2271,7 +2265,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web #include "platform/audio/VectorMath.h" #include "wtf/Assertions.h" #include "wtf/CPU.h" -@@ -35,10 +38,14 @@ +@@ -32,10 +35,14 @@ #include #endif @@ -2287,7 +2281,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web #if HAVE(ARM_NEON_INTRINSICS) #include #endif -@@ -121,11 +128,25 @@ +@@ -118,11 +125,25 @@ } #else @@ -2314,7 +2308,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if ((sourceStride == 1) && (destStride == 1)) { float k = *scale; -@@ -196,9 +217,15 @@ +@@ -193,9 +214,15 @@ void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) { @@ -2331,7 +2325,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if ((sourceStride == 1) && (destStride == 1)) { float k = *scale; -@@ -269,16 +296,22 @@ +@@ -266,16 +293,22 @@ sourceP += sourceStride; destP += destStride; } @@ -2356,7 +2350,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -381,17 +414,23 @@ +@@ -378,17 +411,23 @@ source2P += sourceStride2; destP += destStride; } @@ -2382,7 +2376,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -463,8 +502,14 @@ +@@ -460,8 +499,14 @@ void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) { @@ -2398,7 +2392,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. // Otherwise, fall through to the scalar code below. if (!(reinterpret_cast(real1P) & 0x0F) -@@ -519,10 +564,16 @@ +@@ -516,10 +561,16 @@ void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) { @@ -2416,7 +2410,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if (sourceStride == 1) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -584,10 +635,16 @@ +@@ -581,10 +632,16 @@ void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess) { @@ -2434,7 +2428,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web if (sourceStride == 1) { // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -651,6 +708,8 @@ +@@ -648,6 +705,8 @@ *maxP = max; } @@ -2443,7 +2437,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess) { int n = framesToProcess; -@@ -681,6 +740,12 @@ +@@ -678,6 +737,12 @@ } } @@ -2456,18 +2450,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web #endif // OS(MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-02-25 00:47:15.253723064 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-07-17 20:23:13.405325950 +0200 @@ -26,6 +26,7 @@ #define VectorMath_h #include "platform/PlatformExport.h" +#include "wtf/CPU.h" + #include "wtf/build_config.h" + #include - // Defines the interface for several vector math functions whose implementation will ideally be optimized. - -@@ -53,6 +54,28 @@ +@@ -55,6 +56,28 @@ // Copies elements while clipping values to the threshold inputs. PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); @@ -2496,16 +2490,16 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-02-25 00:47:15.255723075 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-07-17 18:06:40.283812973 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-02-25 00:47:15.279723203 +0100 -@@ -419,6 +419,11 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-07-17 18:06:40.283812973 +0200 +@@ -379,6 +379,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], }], @@ -2517,7 +2511,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web ['target_arch=="arm"', { 'dependencies': [ 'blink_arm_neon', -@@ -434,6 +439,37 @@ +@@ -394,6 +399,37 @@ }], ], }, @@ -2555,9 +2549,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web # The *NEON.cpp files fail to compile when -mthumb is passed. Force # them to build in ARM mode. # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-02-25 00:47:15.279723203 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-07-17 18:06:40.284812978 +0200 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2567,9 +2561,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web #include -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-02-25 00:47:15.280723209 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-07-17 18:06:40.285812984 +0200 @@ -422,7 +422,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2579,7 +2573,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -623,7 +623,7 @@ +@@ -629,7 +629,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2588,7 +2582,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -731,7 +731,7 @@ +@@ -740,7 +740,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2597,9 +2591,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); #else for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-02-25 00:47:15.316723402 +0100 +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-07-17 18:06:40.285812984 +0200 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2624,10 +2618,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/third_party/web #else return rtc::scoped_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-02-25 00:47:15.345723558 +0100 -@@ -1282,6 +1282,8 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-07-17 18:06:40.306813098 +0200 +@@ -1302,6 +1302,8 @@ # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] @@ -2636,7 +2630,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) -@@ -1290,6 +1292,8 @@ +@@ -1310,6 +1312,8 @@ pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) else: pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) @@ -2645,22 +2639,22 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/tools/gyp/pylib # External libs have to come after objects/archives, the linker resolve them in order. pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-02-25 00:47:15.361723643 +0100 -@@ -94,6 +94,9 @@ - 'use_goma%': 0, - 'gomadir%': '', - 'conditions': [ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/build/standalone.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-07-17 20:29:04.969207948 +0200 +@@ -117,6 +117,9 @@ + }, { + 'gomadir': '>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-10 11:20:27.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-02-25 00:47:15.395723826 +0100 -@@ -34,6 +34,14 @@ - 'v8_extra_library_files%': [], +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-07-17 18:06:40.366813425 +0200 +@@ -36,6 +36,14 @@ + 'v8_experimental_extra_library_files%': [], 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', 'remove_v8base_debug_symbols%': 0, + 'conditions': [ @@ -2829,7 +2823,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 }, 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], 'targets': [ -@@ -47,8 +55,8 @@ +@@ -49,8 +57,8 @@ }, { 'toolsets': ['target'], }], @@ -2840,7 +2834,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 'sources': [ # Note: on non-Windows we still build this file so that gyp # has some sources to link into the component. -@@ -159,7 +167,7 @@ +@@ -161,7 +169,7 @@ 'js2c', ], }], @@ -2849,7 +2843,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -237,7 +245,7 @@ +@@ -244,7 +252,7 @@ 'toolsets': ['target'], 'dependencies': ['js2c'], }], @@ -2858,7 +2852,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -@@ -265,7 +273,7 @@ +@@ -272,7 +280,7 @@ 'natives_blob', ], }], @@ -2867,7 +2861,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -1340,7 +1348,7 @@ +@@ -1481,7 +1489,7 @@ # See http://crbug.com/485155. 'msvs_shard': 4, }], @@ -2876,10 +2870,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp ---- qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-02-25 00:47:15.396723831 +0100 -@@ -0,0 +1,1952 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-07-17 20:34:22.753909119 +0200 +@@ -0,0 +1,2151 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. +# Redistribution and use in source and binary forms, with or without @@ -2914,8 +2908,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + 'icu_use_data_file_flag%': 0, + 'v8_code': 1, + 'v8_random_seed%': 314159265, ++ 'v8_vector_stores%': 0, + 'embed_script%': "", + 'v8_extra_library_files%': [], ++ 'v8_experimental_extra_library_files%': [], + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_sse2<(EXECUTABLE_SUFFIX)', + 'remove_v8base_debug_symbols%': 0, + 'conditions': [ @@ -3076,6 +3072,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + ], + 'actions': [ @@ -3097,12 +3094,15 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ['v8_random_seed!=0', { + 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], + }], ++ ['v8_vector_stores!=0', { ++ 'mksnapshot_flags': ['--vector-stores'], ++ }], + ], + }, + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', -+ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', ++ '--startup_src', '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '<(embed_script)', + ], + }, @@ -3121,6 +3121,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', + '../../src/snapshot/snapshot-empty.cc', + ], + 'conditions': [ @@ -3197,6 +3198,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ['v8_random_seed!=0', { + 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], + }], ++ ['v8_vector_stores!=0', { ++ 'mksnapshot_flags': ['--vector-stores'], ++ }], + ], + }, + 'conditions': [ @@ -3204,25 +3208,21 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + 'target_conditions': [ + ['_toolset=="host"', { + 'outputs': [ -+ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', -+ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + '<(embed_script)', + ], + }, { + 'outputs': [ -+ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', -+ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', + ], @@ -3230,13 +3230,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + }, { + 'outputs': [ -+ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + ], + 'action': [ + '<(mksnapshot_exec)', + '<@(mksnapshot_flags)', -+ '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', + ], @@ -3258,6 +3256,8 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + }, + 'include_dirs+': [ + '../..', ++ # To be able to find base/trace_event/common/trace_event_common.h ++ '../../..', + ], + 'defines': [ + # TODO(jochen): Remove again after this is globally turned on. @@ -3265,6 +3265,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + 'sources': [ ### gcmole(all) ### + '../../include/v8-debug.h', ++ '../../include/v8-experimental.h', + '../../include/v8-platform.h', + '../../include/v8-profiler.h', + '../../include/v8-testing.h', @@ -3274,12 +3275,14 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../include/v8config.h', + '../../src/accessors.cc', + '../../src/accessors.h', ++ '../../src/address-map.cc', ++ '../../src/address-map.h', + '../../src/allocation.cc', + '../../src/allocation.h', + '../../src/allocation-site-scopes.cc', + '../../src/allocation-site-scopes.h', -+ '../../src/allocation-tracker.cc', -+ '../../src/allocation-tracker.h', ++ '../../src/api-experimental.cc', ++ '../../src/api-experimental.h', + '../../src/api.cc', + '../../src/api.h', + '../../src/api-natives.cc', @@ -3290,14 +3293,29 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/assembler.h', + '../../src/assert-scope.h', + '../../src/assert-scope.cc', -+ '../../src/ast-value-factory.cc', -+ '../../src/ast-value-factory.h', -+ '../../src/ast-literal-reindexer.cc', -+ '../../src/ast-literal-reindexer.h', -+ '../../src/ast-numbering.cc', -+ '../../src/ast-numbering.h', -+ '../../src/ast.cc', -+ '../../src/ast.h', ++ '../../src/ast/ast-expression-rewriter.cc', ++ '../../src/ast/ast-expression-rewriter.h', ++ '../../src/ast/ast-expression-visitor.cc', ++ '../../src/ast/ast-expression-visitor.h', ++ '../../src/ast/ast-literal-reindexer.cc', ++ '../../src/ast/ast-literal-reindexer.h', ++ '../../src/ast/ast-numbering.cc', ++ '../../src/ast/ast-numbering.h', ++ '../../src/ast/ast-value-factory.cc', ++ '../../src/ast/ast-value-factory.h', ++ '../../src/ast/ast.cc', ++ '../../src/ast/ast.h', ++ '../../src/ast/modules.cc', ++ '../../src/ast/modules.h', ++ '../../src/ast/prettyprinter.cc', ++ '../../src/ast/prettyprinter.h', ++ '../../src/ast/scopeinfo.cc', ++ '../../src/ast/scopeinfo.h', ++ '../../src/ast/scopes.cc', ++ '../../src/ast/scopes.h', ++ '../../src/ast/variables.cc', ++ '../../src/ast/variables.h', ++ '../../src/atomic-utils.h', + '../../src/background-parsing-task.cc', + '../../src/background-parsing-task.h', + '../../src/bailout-reason.cc', @@ -3314,22 +3332,19 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/bootstrapper.h', + '../../src/builtins.cc', + '../../src/builtins.h', -+ '../../src/bytecodes-irregexp.h', + '../../src/cached-powers.cc', + '../../src/cached-powers.h', ++ '../../src/cancelable-task.cc', ++ '../../src/cancelable-task.h', + '../../src/char-predicates.cc', + '../../src/char-predicates-inl.h', + '../../src/char-predicates.h', -+ '../../src/checks.cc', + '../../src/checks.h', -+ '../../src/circular-queue-inl.h', -+ '../../src/circular-queue.h', + '../../src/code-factory.cc', + '../../src/code-factory.h', + '../../src/code-stubs.cc', + '../../src/code-stubs.h', + '../../src/code-stubs-hydrogen.cc', -+ '../../src/code.h', + '../../src/codegen.cc', + '../../src/codegen.h', + '../../src/compilation-cache.cc', @@ -3340,6 +3355,8 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compilation-statistics.h', + '../../src/compiler/access-builder.cc', + '../../src/compiler/access-builder.h', ++ '../../src/compiler/access-info.cc', ++ '../../src/compiler/access-info.h', + '../../src/compiler/all-nodes.cc', + '../../src/compiler/all-nodes.h', + '../../src/compiler/ast-graph-builder.cc', @@ -3348,13 +3365,22 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/ast-loop-assignment-analyzer.h', + '../../src/compiler/basic-block-instrumentor.cc', + '../../src/compiler/basic-block-instrumentor.h', ++ '../../src/compiler/branch-elimination.cc', ++ '../../src/compiler/branch-elimination.h', ++ '../../src/compiler/bytecode-branch-analysis.cc', ++ '../../src/compiler/bytecode-branch-analysis.h', ++ '../../src/compiler/bytecode-graph-builder.cc', ++ '../../src/compiler/bytecode-graph-builder.h', + '../../src/compiler/change-lowering.cc', + '../../src/compiler/change-lowering.h', ++ '../../src/compiler/c-linkage.cc', + '../../src/compiler/coalesced-live-ranges.cc', + '../../src/compiler/coalesced-live-ranges.h', + '../../src/compiler/code-generator-impl.h', + '../../src/compiler/code-generator.cc', + '../../src/compiler/code-generator.h', ++ '../../src/compiler/code-stub-assembler.cc', ++ '../../src/compiler/code-stub-assembler.h', + '../../src/compiler/common-node-cache.cc', + '../../src/compiler/common-node-cache.h', + '../../src/compiler/common-operator-reducer.cc', @@ -3370,6 +3396,13 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/dead-code-elimination.cc', + '../../src/compiler/dead-code-elimination.h', + '../../src/compiler/diamond.h', ++ '../../src/compiler/escape-analysis.cc', ++ '../../src/compiler/escape-analysis.h', ++ "../../src/compiler/escape-analysis-reducer.cc", ++ "../../src/compiler/escape-analysis-reducer.h", ++ '../../src/compiler/fast-accessor-assembler.cc', ++ '../../src/compiler/fast-accessor-assembler.h', ++ '../../src/compiler/frame.cc', + '../../src/compiler/frame.h', + '../../src/compiler/frame-elider.cc', + '../../src/compiler/frame-elider.h', @@ -3377,7 +3410,6 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + "../../src/compiler/frame-states.h", + '../../src/compiler/gap-resolver.cc', + '../../src/compiler/gap-resolver.h', -+ '../../src/compiler/graph-builder.h', + '../../src/compiler/graph-reducer.cc', + '../../src/compiler/graph-reducer.h', + '../../src/compiler/graph-replay.cc', @@ -3394,35 +3426,48 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/instruction-selector-impl.h', + '../../src/compiler/instruction-selector.cc', + '../../src/compiler/instruction-selector.h', ++ '../../src/compiler/instruction-scheduler.cc', ++ '../../src/compiler/instruction-scheduler.h', + '../../src/compiler/instruction.cc', + '../../src/compiler/instruction.h', ++ '../../src/compiler/interpreter-assembler.cc', ++ '../../src/compiler/interpreter-assembler.h', + '../../src/compiler/js-builtin-reducer.cc', + '../../src/compiler/js-builtin-reducer.h', ++ '../../src/compiler/js-call-reducer.cc', ++ '../../src/compiler/js-call-reducer.h', ++ '../../src/compiler/js-context-relaxation.cc', ++ '../../src/compiler/js-context-relaxation.h', + '../../src/compiler/js-context-specialization.cc', + '../../src/compiler/js-context-specialization.h', + '../../src/compiler/js-frame-specialization.cc', + '../../src/compiler/js-frame-specialization.h', + '../../src/compiler/js-generic-lowering.cc', + '../../src/compiler/js-generic-lowering.h', ++ '../../src/compiler/js-global-object-specialization.cc', ++ '../../src/compiler/js-global-object-specialization.h', + '../../src/compiler/js-graph.cc', + '../../src/compiler/js-graph.h', + '../../src/compiler/js-inlining.cc', + '../../src/compiler/js-inlining.h', ++ '../../src/compiler/js-inlining-heuristic.cc', ++ '../../src/compiler/js-inlining-heuristic.h', + '../../src/compiler/js-intrinsic-lowering.cc', + '../../src/compiler/js-intrinsic-lowering.h', ++ '../../src/compiler/js-native-context-specialization.cc', ++ '../../src/compiler/js-native-context-specialization.h', + '../../src/compiler/js-operator.cc', + '../../src/compiler/js-operator.h', -+ '../../src/compiler/js-type-feedback.cc', -+ '../../src/compiler/js-type-feedback.h', + '../../src/compiler/js-typed-lowering.cc', + '../../src/compiler/js-typed-lowering.h', + '../../src/compiler/jump-threading.cc', + '../../src/compiler/jump-threading.h', -+ '../../src/compiler/linkage-impl.h', + '../../src/compiler/linkage.cc', + '../../src/compiler/linkage.h', + '../../src/compiler/liveness-analyzer.cc', + '../../src/compiler/liveness-analyzer.h', ++ '../../src/compiler/live-range-separator.cc', ++ '../../src/compiler/live-range-separator.h', + '../../src/compiler/load-elimination.cc', + '../../src/compiler/load-elimination.h', + '../../src/compiler/loop-analysis.cc', @@ -3433,8 +3478,6 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/machine-operator-reducer.h', + '../../src/compiler/machine-operator.cc', + '../../src/compiler/machine-operator.h', -+ '../../src/compiler/machine-type.cc', -+ '../../src/compiler/machine-type.h', + '../../src/compiler/move-optimizer.cc', + '../../src/compiler/move-optimizer.h', + '../../src/compiler/node-aux-data.h', @@ -3466,8 +3509,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/register-allocator.h', + '../../src/compiler/register-allocator-verifier.cc', + '../../src/compiler/register-allocator-verifier.h', -+ '../../src/compiler/register-configuration.cc', -+ '../../src/compiler/register-configuration.h', ++ '../../src/compiler/representation-change.cc', + '../../src/compiler/representation-change.h', + '../../src/compiler/schedule.cc', + '../../src/compiler/schedule.h', @@ -3487,16 +3529,26 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/compiler/state-values-utils.h', + '../../src/compiler/tail-call-optimization.cc', + '../../src/compiler/tail-call-optimization.h', ++ '../../src/compiler/type-hint-analyzer.cc', ++ '../../src/compiler/type-hint-analyzer.h', ++ '../../src/compiler/type-hints.cc', ++ '../../src/compiler/type-hints.h', + '../../src/compiler/typer.cc', + '../../src/compiler/typer.h', + '../../src/compiler/value-numbering-reducer.cc', + '../../src/compiler/value-numbering-reducer.h', + '../../src/compiler/verifier.cc', + '../../src/compiler/verifier.h', ++ '../../src/compiler/wasm-compiler.cc', ++ '../../src/compiler/wasm-compiler.h', ++ '../../src/compiler/wasm-linkage.cc', + '../../src/compiler/zone-pool.cc', + '../../src/compiler/zone-pool.h', + '../../src/compiler.cc', + '../../src/compiler.h', ++ '../../src/context-measure.cc', ++ '../../src/context-measure.h', ++ '../../src/contexts-inl.h', + '../../src/contexts.cc', + '../../src/contexts.h', + '../../src/conversions-inl.h', @@ -3504,16 +3556,84 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/conversions.h', + '../../src/counters.cc', + '../../src/counters.h', -+ '../../src/cpu-profiler-inl.h', -+ '../../src/cpu-profiler.cc', -+ '../../src/cpu-profiler.h', ++ '../../src/crankshaft/hydrogen-alias-analysis.h', ++ '../../src/crankshaft/hydrogen-bce.cc', ++ '../../src/crankshaft/hydrogen-bce.h', ++ '../../src/crankshaft/hydrogen-bch.cc', ++ '../../src/crankshaft/hydrogen-bch.h', ++ '../../src/crankshaft/hydrogen-canonicalize.cc', ++ '../../src/crankshaft/hydrogen-canonicalize.h', ++ '../../src/crankshaft/hydrogen-check-elimination.cc', ++ '../../src/crankshaft/hydrogen-check-elimination.h', ++ '../../src/crankshaft/hydrogen-dce.cc', ++ '../../src/crankshaft/hydrogen-dce.h', ++ '../../src/crankshaft/hydrogen-dehoist.cc', ++ '../../src/crankshaft/hydrogen-dehoist.h', ++ '../../src/crankshaft/hydrogen-environment-liveness.cc', ++ '../../src/crankshaft/hydrogen-environment-liveness.h', ++ '../../src/crankshaft/hydrogen-escape-analysis.cc', ++ '../../src/crankshaft/hydrogen-escape-analysis.h', ++ '../../src/crankshaft/hydrogen-flow-engine.h', ++ '../../src/crankshaft/hydrogen-gvn.cc', ++ '../../src/crankshaft/hydrogen-gvn.h', ++ '../../src/crankshaft/hydrogen-infer-representation.cc', ++ '../../src/crankshaft/hydrogen-infer-representation.h', ++ '../../src/crankshaft/hydrogen-infer-types.cc', ++ '../../src/crankshaft/hydrogen-infer-types.h', ++ '../../src/crankshaft/hydrogen-instructions.cc', ++ '../../src/crankshaft/hydrogen-instructions.h', ++ '../../src/crankshaft/hydrogen-load-elimination.cc', ++ '../../src/crankshaft/hydrogen-load-elimination.h', ++ '../../src/crankshaft/hydrogen-mark-deoptimize.cc', ++ '../../src/crankshaft/hydrogen-mark-deoptimize.h', ++ '../../src/crankshaft/hydrogen-mark-unreachable.cc', ++ '../../src/crankshaft/hydrogen-mark-unreachable.h', ++ '../../src/crankshaft/hydrogen-osr.cc', ++ '../../src/crankshaft/hydrogen-osr.h', ++ '../../src/crankshaft/hydrogen-range-analysis.cc', ++ '../../src/crankshaft/hydrogen-range-analysis.h', ++ '../../src/crankshaft/hydrogen-redundant-phi.cc', ++ '../../src/crankshaft/hydrogen-redundant-phi.h', ++ '../../src/crankshaft/hydrogen-removable-simulates.cc', ++ '../../src/crankshaft/hydrogen-removable-simulates.h', ++ '../../src/crankshaft/hydrogen-representation-changes.cc', ++ '../../src/crankshaft/hydrogen-representation-changes.h', ++ '../../src/crankshaft/hydrogen-sce.cc', ++ '../../src/crankshaft/hydrogen-sce.h', ++ '../../src/crankshaft/hydrogen-store-elimination.cc', ++ '../../src/crankshaft/hydrogen-store-elimination.h', ++ '../../src/crankshaft/hydrogen-types.cc', ++ '../../src/crankshaft/hydrogen-types.h', ++ '../../src/crankshaft/hydrogen-uint32-analysis.cc', ++ '../../src/crankshaft/hydrogen-uint32-analysis.h', ++ '../../src/crankshaft/hydrogen.cc', ++ '../../src/crankshaft/hydrogen.h', ++ '../../src/crankshaft/lithium-allocator-inl.h', ++ '../../src/crankshaft/lithium-allocator.cc', ++ '../../src/crankshaft/lithium-allocator.h', ++ '../../src/crankshaft/lithium-codegen.cc', ++ '../../src/crankshaft/lithium-codegen.h', ++ '../../src/crankshaft/lithium.cc', ++ '../../src/crankshaft/lithium.h', ++ '../../src/crankshaft/lithium-inl.h', ++ '../../src/crankshaft/typing.cc', ++ '../../src/crankshaft/typing.h', ++ '../../src/crankshaft/unique.h', + '../../src/date.cc', + '../../src/date.h', + '../../src/dateparser-inl.h', + '../../src/dateparser.cc', + '../../src/dateparser.h', -+ '../../src/debug.cc', -+ '../../src/debug.h', ++ '../../src/debug/debug-evaluate.cc', ++ '../../src/debug/debug-evaluate.h', ++ '../../src/debug/debug-frames.cc', ++ '../../src/debug/debug-frames.h', ++ '../../src/debug/debug-scopes.cc', ++ '../../src/debug/debug-scopes.h', ++ '../../src/debug/debug.cc', ++ '../../src/debug/debug.h', ++ '../../src/debug/liveedit.cc', ++ '../../src/debug/liveedit.h', + '../../src/deoptimizer.cc', + '../../src/deoptimizer.h', + '../../src/disasm.h', @@ -3531,7 +3651,6 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/elements.h', + '../../src/execution.cc', + '../../src/execution.h', -+ '../../src/expression-classifier.h', + '../../src/extensions/externalize-string-extension.cc', + '../../src/extensions/externalize-string-extension.h', + '../../src/extensions/free-buffer-extension.cc', @@ -3556,10 +3675,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/frames-inl.h', + '../../src/frames.cc', + '../../src/frames.h', -+ '../../src/full-codegen.cc', -+ '../../src/full-codegen.h', -+ '../../src/func-name-inferrer.cc', -+ '../../src/func-name-inferrer.h', ++ '../../src/full-codegen/full-codegen.cc', ++ '../../src/full-codegen/full-codegen.h', ++ '../../src/futex-emulation.cc', ++ '../../src/futex-emulation.h', + '../../src/gdb-jit.cc', + '../../src/gdb-jit.h', + '../../src/global-handles.cc', @@ -3569,11 +3688,8 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/handles.cc', + '../../src/handles.h', + '../../src/hashmap.h', -+ '../../src/heap-profiler.cc', -+ '../../src/heap-profiler.h', -+ '../../src/heap-snapshot-generator-inl.h', -+ '../../src/heap-snapshot-generator.cc', -+ '../../src/heap-snapshot-generator.h', ++ '../../src/heap/array-buffer-tracker.cc', ++ '../../src/heap/array-buffer-tracker.h', + '../../src/heap/memory-reducer.cc', + '../../src/heap/memory-reducer.h', + '../../src/heap/gc-idle-time-handler.cc', @@ -3583,75 +3699,32 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/heap/heap-inl.h', + '../../src/heap/heap.cc', + '../../src/heap/heap.h', -+ '../../src/heap/identity-map.cc', -+ '../../src/heap/identity-map.h', + '../../src/heap/incremental-marking-inl.h', ++ '../../src/heap/incremental-marking-job.cc', ++ '../../src/heap/incremental-marking-job.h', + '../../src/heap/incremental-marking.cc', + '../../src/heap/incremental-marking.h', + '../../src/heap/mark-compact-inl.h', + '../../src/heap/mark-compact.cc', + '../../src/heap/mark-compact.h', ++ '../../src/heap/object-stats.cc', ++ '../../src/heap/object-stats.h', + '../../src/heap/objects-visiting-inl.h', + '../../src/heap/objects-visiting.cc', + '../../src/heap/objects-visiting.h', ++ '../../src/heap/scavenge-job.h', ++ '../../src/heap/scavenge-job.cc', ++ '../../src/heap/scavenger-inl.h', ++ '../../src/heap/scavenger.cc', ++ '../../src/heap/scavenger.h', ++ '../../src/heap/slots-buffer.cc', ++ '../../src/heap/slots-buffer.h', + '../../src/heap/spaces-inl.h', + '../../src/heap/spaces.cc', + '../../src/heap/spaces.h', + '../../src/heap/store-buffer-inl.h', + '../../src/heap/store-buffer.cc', + '../../src/heap/store-buffer.h', -+ '../../src/hydrogen-alias-analysis.h', -+ '../../src/hydrogen-bce.cc', -+ '../../src/hydrogen-bce.h', -+ '../../src/hydrogen-bch.cc', -+ '../../src/hydrogen-bch.h', -+ '../../src/hydrogen-canonicalize.cc', -+ '../../src/hydrogen-canonicalize.h', -+ '../../src/hydrogen-check-elimination.cc', -+ '../../src/hydrogen-check-elimination.h', -+ '../../src/hydrogen-dce.cc', -+ '../../src/hydrogen-dce.h', -+ '../../src/hydrogen-dehoist.cc', -+ '../../src/hydrogen-dehoist.h', -+ '../../src/hydrogen-environment-liveness.cc', -+ '../../src/hydrogen-environment-liveness.h', -+ '../../src/hydrogen-escape-analysis.cc', -+ '../../src/hydrogen-escape-analysis.h', -+ '../../src/hydrogen-flow-engine.h', -+ '../../src/hydrogen-instructions.cc', -+ '../../src/hydrogen-instructions.h', -+ '../../src/hydrogen.cc', -+ '../../src/hydrogen.h', -+ '../../src/hydrogen-gvn.cc', -+ '../../src/hydrogen-gvn.h', -+ '../../src/hydrogen-infer-representation.cc', -+ '../../src/hydrogen-infer-representation.h', -+ '../../src/hydrogen-infer-types.cc', -+ '../../src/hydrogen-infer-types.h', -+ '../../src/hydrogen-load-elimination.cc', -+ '../../src/hydrogen-load-elimination.h', -+ '../../src/hydrogen-mark-deoptimize.cc', -+ '../../src/hydrogen-mark-deoptimize.h', -+ '../../src/hydrogen-mark-unreachable.cc', -+ '../../src/hydrogen-mark-unreachable.h', -+ '../../src/hydrogen-osr.cc', -+ '../../src/hydrogen-osr.h', -+ '../../src/hydrogen-range-analysis.cc', -+ '../../src/hydrogen-range-analysis.h', -+ '../../src/hydrogen-redundant-phi.cc', -+ '../../src/hydrogen-redundant-phi.h', -+ '../../src/hydrogen-removable-simulates.cc', -+ '../../src/hydrogen-removable-simulates.h', -+ '../../src/hydrogen-representation-changes.cc', -+ '../../src/hydrogen-representation-changes.h', -+ '../../src/hydrogen-sce.cc', -+ '../../src/hydrogen-sce.h', -+ '../../src/hydrogen-store-elimination.cc', -+ '../../src/hydrogen-store-elimination.h', -+ '../../src/hydrogen-types.cc', -+ '../../src/hydrogen-types.h', -+ '../../src/hydrogen-uint32-analysis.cc', -+ '../../src/hydrogen-uint32-analysis.h', + '../../src/i18n.cc', + '../../src/i18n.h', + '../../src/icu_util.cc', @@ -3669,46 +3742,55 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/ic/ic.h', + '../../src/ic/ic-compiler.cc', + '../../src/ic/ic-compiler.h', ++ '../../src/identity-map.cc', ++ '../../src/identity-map.h', + '../../src/interface-descriptors.cc', + '../../src/interface-descriptors.h', -+ '../../src/interpreter-irregexp.cc', -+ '../../src/interpreter-irregexp.h', ++ '../../src/interpreter/bytecodes.cc', ++ '../../src/interpreter/bytecodes.h', ++ '../../src/interpreter/bytecode-array-builder.cc', ++ '../../src/interpreter/bytecode-array-builder.h', ++ '../../src/interpreter/bytecode-array-iterator.cc', ++ '../../src/interpreter/bytecode-array-iterator.h', ++ '../../src/interpreter/bytecode-register-allocator.cc', ++ '../../src/interpreter/bytecode-register-allocator.h', ++ '../../src/interpreter/bytecode-generator.cc', ++ '../../src/interpreter/bytecode-generator.h', ++ '../../src/interpreter/bytecode-traits.h', ++ '../../src/interpreter/constant-array-builder.cc', ++ '../../src/interpreter/constant-array-builder.h', ++ '../../src/interpreter/control-flow-builders.cc', ++ '../../src/interpreter/control-flow-builders.h', ++ '../../src/interpreter/interpreter.cc', ++ '../../src/interpreter/interpreter.h', ++ '../../src/isolate-inl.h', + '../../src/isolate.cc', + '../../src/isolate.h', -+ '../../src/json-parser.h', + '../../src/json-stringifier.h', -+ '../../src/jsregexp-inl.h', -+ '../../src/jsregexp.cc', -+ '../../src/jsregexp.h', ++ '../../src/key-accumulator.h', ++ '../../src/key-accumulator.cc', + '../../src/layout-descriptor-inl.h', + '../../src/layout-descriptor.cc', + '../../src/layout-descriptor.h', + '../../src/list-inl.h', + '../../src/list.h', -+ '../../src/lithium-allocator-inl.h', -+ '../../src/lithium-allocator.cc', -+ '../../src/lithium-allocator.h', -+ '../../src/lithium-codegen.cc', -+ '../../src/lithium-codegen.h', -+ '../../src/lithium.cc', -+ '../../src/lithium.h', -+ '../../src/lithium-inl.h', -+ '../../src/liveedit.cc', -+ '../../src/liveedit.h', ++ '../../src/locked-queue-inl.h', ++ '../../src/locked-queue.h', + '../../src/log-inl.h', + '../../src/log-utils.cc', + '../../src/log-utils.h', + '../../src/log.cc', + '../../src/log.h', -+ '../../src/lookup-inl.h', + '../../src/lookup.cc', + '../../src/lookup.h', + '../../src/macro-assembler.h', ++ '../../src/machine-type.cc', ++ '../../src/machine-type.h', + '../../src/messages.cc', + '../../src/messages.h', -+ '../../src/modules.cc', -+ '../../src/modules.h', + '../../src/msan.h', ++ '../../src/objects-body-descriptors-inl.h', ++ '../../src/objects-body-descriptors.h', + '../../src/objects-debug.cc', + '../../src/objects-inl.h', + '../../src/objects-printer.cc', @@ -3718,36 +3800,79 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/optimizing-compile-dispatcher.h', + '../../src/ostreams.cc', + '../../src/ostreams.h', -+ '../../src/pattern-rewriter.cc', -+ '../../src/parser.cc', -+ '../../src/parser.h', ++ '../../src/parsing/expression-classifier.h', ++ '../../src/parsing/func-name-inferrer.cc', ++ '../../src/parsing/func-name-inferrer.h', ++ '../../src/parsing/json-parser.h', ++ '../../src/parsing/parameter-initializer-rewriter.cc', ++ '../../src/parsing/parameter-initializer-rewriter.h', ++ '../../src/parsing/parser-base.h', ++ '../../src/parsing/parser.cc', ++ '../../src/parsing/parser.h', ++ '../../src/parsing/pattern-rewriter.cc', ++ '../../src/parsing/preparse-data-format.h', ++ '../../src/parsing/preparse-data.cc', ++ '../../src/parsing/preparse-data.h', ++ '../../src/parsing/preparser.cc', ++ '../../src/parsing/preparser.h', ++ '../../src/parsing/rewriter.cc', ++ '../../src/parsing/rewriter.h', ++ '../../src/parsing/scanner-character-streams.cc', ++ '../../src/parsing/scanner-character-streams.h', ++ '../../src/parsing/scanner.cc', ++ '../../src/parsing/scanner.h', ++ '../../src/parsing/token.cc', ++ '../../src/parsing/token.h', + '../../src/pending-compilation-error-handler.cc', + '../../src/pending-compilation-error-handler.h', -+ '../../src/preparse-data-format.h', -+ '../../src/preparse-data.cc', -+ '../../src/preparse-data.h', -+ '../../src/preparser.cc', -+ '../../src/preparser.h', -+ '../../src/prettyprinter.cc', -+ '../../src/prettyprinter.h', -+ '../../src/profile-generator-inl.h', -+ '../../src/profile-generator.cc', -+ '../../src/profile-generator.h', ++ '../../src/profiler/allocation-tracker.cc', ++ '../../src/profiler/allocation-tracker.h', ++ '../../src/profiler/circular-queue-inl.h', ++ '../../src/profiler/circular-queue.h', ++ '../../src/profiler/cpu-profiler-inl.h', ++ '../../src/profiler/cpu-profiler.cc', ++ '../../src/profiler/cpu-profiler.h', ++ '../../src/profiler/heap-profiler.cc', ++ '../../src/profiler/heap-profiler.h', ++ '../../src/profiler/heap-snapshot-generator-inl.h', ++ '../../src/profiler/heap-snapshot-generator.cc', ++ '../../src/profiler/heap-snapshot-generator.h', ++ '../../src/profiler/profile-generator-inl.h', ++ '../../src/profiler/profile-generator.cc', ++ '../../src/profiler/profile-generator.h', ++ '../../src/profiler/sampler.cc', ++ '../../src/profiler/sampler.h', ++ '../../src/profiler/strings-storage.cc', ++ '../../src/profiler/strings-storage.h', ++ '../../src/profiler/unbound-queue-inl.h', ++ '../../src/profiler/unbound-queue.h', ++ '../../src/property-descriptor.cc', ++ '../../src/property-descriptor.h', + '../../src/property-details.h', + '../../src/property.cc', + '../../src/property.h', + '../../src/prototype.h', -+ '../../src/regexp-macro-assembler-irregexp-inl.h', -+ '../../src/regexp-macro-assembler-irregexp.cc', -+ '../../src/regexp-macro-assembler-irregexp.h', -+ '../../src/regexp-macro-assembler-tracer.cc', -+ '../../src/regexp-macro-assembler-tracer.h', -+ '../../src/regexp-macro-assembler.cc', -+ '../../src/regexp-macro-assembler.h', -+ '../../src/regexp-stack.cc', -+ '../../src/regexp-stack.h', -+ '../../src/rewriter.cc', -+ '../../src/rewriter.h', ++ '../../src/regexp/bytecodes-irregexp.h', ++ '../../src/regexp/interpreter-irregexp.cc', ++ '../../src/regexp/interpreter-irregexp.h', ++ '../../src/regexp/jsregexp-inl.h', ++ '../../src/regexp/jsregexp.cc', ++ '../../src/regexp/jsregexp.h', ++ '../../src/regexp/regexp-ast.cc', ++ '../../src/regexp/regexp-ast.h', ++ '../../src/regexp/regexp-macro-assembler-irregexp-inl.h', ++ '../../src/regexp/regexp-macro-assembler-irregexp.cc', ++ '../../src/regexp/regexp-macro-assembler-irregexp.h', ++ '../../src/regexp/regexp-macro-assembler-tracer.cc', ++ '../../src/regexp/regexp-macro-assembler-tracer.h', ++ '../../src/regexp/regexp-macro-assembler.cc', ++ '../../src/regexp/regexp-macro-assembler.h', ++ '../../src/regexp/regexp-parser.cc', ++ '../../src/regexp/regexp-parser.h', ++ '../../src/regexp/regexp-stack.cc', ++ '../../src/regexp/regexp-stack.h', ++ '../../src/register-configuration.cc', ++ '../../src/register-configuration.h', + '../../src/runtime-profiler.cc', + '../../src/runtime-profiler.h', + '../../src/runtime/runtime-array.cc', @@ -3759,9 +3884,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/runtime/runtime-debug.cc', + '../../src/runtime/runtime-forin.cc', + '../../src/runtime/runtime-function.cc', ++ '../../src/runtime/runtime-futex.cc', + '../../src/runtime/runtime-generator.cc', + '../../src/runtime/runtime-i18n.cc', + '../../src/runtime/runtime-internal.cc', ++ '../../src/runtime/runtime-interpreter.cc', + '../../src/runtime/runtime-json.cc', + '../../src/runtime/runtime-literals.cc', + '../../src/runtime/runtime-liveedit.cc', @@ -3769,9 +3896,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/runtime/runtime-numbers.cc', + '../../src/runtime/runtime-object.cc', + '../../src/runtime/runtime-observe.cc', ++ '../../src/runtime/runtime-operators.cc', + '../../src/runtime/runtime-proxy.cc', + '../../src/runtime/runtime-regexp.cc', + '../../src/runtime/runtime-scopes.cc', ++ '../../src/runtime/runtime-simd.cc', + '../../src/runtime/runtime-strings.cc', + '../../src/runtime/runtime-symbol.cc', + '../../src/runtime/runtime-test.cc', @@ -3782,21 +3911,11 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/runtime/runtime.h', + '../../src/safepoint-table.cc', + '../../src/safepoint-table.h', -+ '../../src/sampler.cc', -+ '../../src/sampler.h', -+ '../../src/scanner-character-streams.cc', -+ '../../src/scanner-character-streams.h', -+ '../../src/scanner.cc', -+ '../../src/scanner.h', -+ '../../src/scopeinfo.cc', -+ '../../src/scopeinfo.h', -+ '../../src/scopes.cc', -+ '../../src/scopes.h', + '../../src/signature.h', + '../../src/simulator.h', + '../../src/small-pointer-list.h', -+ '../../src/smart-pointers.h', + '../../src/snapshot/natives.h', ++ '../../src/snapshot/natives-common.cc', + '../../src/snapshot/serialize.cc', + '../../src/snapshot/serialize.h', + '../../src/snapshot/snapshot.h', @@ -3809,21 +3928,20 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/startup-data-util.h', + '../../src/string-builder.cc', + '../../src/string-builder.h', -+ '../../src/string-search.cc', + '../../src/string-search.h', + '../../src/string-stream.cc', + '../../src/string-stream.h', -+ '../../src/strings-storage.cc', -+ '../../src/strings-storage.h', + '../../src/strtod.cc', + '../../src/strtod.h', + '../../src/ic/stub-cache.cc', + '../../src/ic/stub-cache.h', -+ '../../src/token.cc', -+ '../../src/token.h', ++ '../../src/tracing/trace-event.cc', ++ '../../src/tracing/trace-event.h', + '../../src/transitions-inl.h', + '../../src/transitions.cc', + '../../src/transitions.h', ++ '../../src/type-cache.cc', ++ '../../src/type-cache.h', + '../../src/type-feedback-vector-inl.h', + '../../src/type-feedback-vector.cc', + '../../src/type-feedback-vector.h', @@ -3832,16 +3950,17 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/types-inl.h', + '../../src/types.cc', + '../../src/types.h', -+ '../../src/typing.cc', -+ '../../src/typing.h', -+ '../../src/unbound-queue-inl.h', -+ '../../src/unbound-queue.h', ++ '../../src/typing-asm.cc', ++ '../../src/typing-asm.h', ++ '../../src/typing-reset.cc', ++ '../../src/typing-reset.h', + '../../src/unicode-inl.h', + '../../src/unicode.cc', + '../../src/unicode.h', ++ '../../src/unicode-cache-inl.h', ++ '../../src/unicode-cache.h', + '../../src/unicode-decoder.cc', + '../../src/unicode-decoder.h', -+ '../../src/unique.h', + '../../src/utils.cc', + '../../src/utils.h', + '../../src/v8.cc', @@ -3849,13 +3968,29 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/v8memory.h', + '../../src/v8threads.cc', + '../../src/v8threads.h', -+ '../../src/variables.cc', -+ '../../src/variables.h', + '../../src/vector.h', + '../../src/version.cc', + '../../src/version.h', + '../../src/vm-state-inl.h', + '../../src/vm-state.h', ++ '../../src/wasm/asm-wasm-builder.cc', ++ '../../src/wasm/asm-wasm-builder.h', ++ '../../src/wasm/ast-decoder.cc', ++ '../../src/wasm/ast-decoder.h', ++ '../../src/wasm/decoder.h', ++ '../../src/wasm/encoder.cc', ++ '../../src/wasm/encoder.h', ++ '../../src/wasm/module-decoder.cc', ++ '../../src/wasm/module-decoder.h', ++ '../../src/wasm/wasm-js.cc', ++ '../../src/wasm/wasm-js.h', ++ '../../src/wasm/wasm-macro-gen.h', ++ '../../src/wasm/wasm-module.cc', ++ '../../src/wasm/wasm-module.h', ++ '../../src/wasm/wasm-opcodes.cc', ++ '../../src/wasm/wasm-opcodes.h', ++ '../../src/wasm/wasm-result.cc', ++ '../../src/wasm/wasm-result.h', + '../../src/zone.cc', + '../../src/zone.h', + '../../src/zone-allocator.h', @@ -3885,35 +4020,35 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/arm/constants-arm.h', + '../../src/arm/constants-arm.cc', + '../../src/arm/cpu-arm.cc', -+ '../../src/arm/debug-arm.cc', + '../../src/arm/deoptimizer-arm.cc', + '../../src/arm/disasm-arm.cc', + '../../src/arm/frames-arm.cc', + '../../src/arm/frames-arm.h', -+ '../../src/arm/full-codegen-arm.cc', + '../../src/arm/interface-descriptors-arm.cc', + '../../src/arm/interface-descriptors-arm.h', -+ '../../src/arm/lithium-arm.cc', -+ '../../src/arm/lithium-arm.h', -+ '../../src/arm/lithium-codegen-arm.cc', -+ '../../src/arm/lithium-codegen-arm.h', -+ '../../src/arm/lithium-gap-resolver-arm.cc', -+ '../../src/arm/lithium-gap-resolver-arm.h', + '../../src/arm/macro-assembler-arm.cc', + '../../src/arm/macro-assembler-arm.h', -+ '../../src/arm/regexp-macro-assembler-arm.cc', -+ '../../src/arm/regexp-macro-assembler-arm.h', + '../../src/arm/simulator-arm.cc', + '../../src/arm/simulator-arm.h', + '../../src/compiler/arm/code-generator-arm.cc', + '../../src/compiler/arm/instruction-codes-arm.h', ++ '../../src/compiler/arm/instruction-scheduler-arm.cc', + '../../src/compiler/arm/instruction-selector-arm.cc', -+ '../../src/compiler/arm/linkage-arm.cc', ++ '../../src/crankshaft/arm/lithium-arm.cc', ++ '../../src/crankshaft/arm/lithium-arm.h', ++ '../../src/crankshaft/arm/lithium-codegen-arm.cc', ++ '../../src/crankshaft/arm/lithium-codegen-arm.h', ++ '../../src/crankshaft/arm/lithium-gap-resolver-arm.cc', ++ '../../src/crankshaft/arm/lithium-gap-resolver-arm.h', ++ '../../src/debug/arm/debug-arm.cc', ++ '../../src/full-codegen/arm/full-codegen-arm.cc', + '../../src/ic/arm/access-compiler-arm.cc', + '../../src/ic/arm/handler-compiler-arm.cc', + '../../src/ic/arm/ic-arm.cc', + '../../src/ic/arm/ic-compiler-arm.cc', + '../../src/ic/arm/stub-cache-arm.cc', ++ '../../src/regexp/arm/regexp-macro-assembler-arm.cc', ++ '../../src/regexp/arm/regexp-macro-assembler-arm.h', + ], + }], + ['v8_target_arch=="arm64"', { @@ -3928,49 +4063,49 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/arm64/code-stubs-arm64.h', + '../../src/arm64/constants-arm64.h', + '../../src/arm64/cpu-arm64.cc', -+ '../../src/arm64/debug-arm64.cc', + '../../src/arm64/decoder-arm64.cc', + '../../src/arm64/decoder-arm64.h', + '../../src/arm64/decoder-arm64-inl.h', -+ '../../src/arm64/delayed-masm-arm64.cc', -+ '../../src/arm64/delayed-masm-arm64.h', -+ '../../src/arm64/delayed-masm-arm64-inl.h', + '../../src/arm64/deoptimizer-arm64.cc', + '../../src/arm64/disasm-arm64.cc', + '../../src/arm64/disasm-arm64.h', + '../../src/arm64/frames-arm64.cc', + '../../src/arm64/frames-arm64.h', -+ '../../src/arm64/full-codegen-arm64.cc', + '../../src/arm64/instructions-arm64.cc', + '../../src/arm64/instructions-arm64.h', + '../../src/arm64/instrument-arm64.cc', + '../../src/arm64/instrument-arm64.h', + '../../src/arm64/interface-descriptors-arm64.cc', + '../../src/arm64/interface-descriptors-arm64.h', -+ '../../src/arm64/lithium-arm64.cc', -+ '../../src/arm64/lithium-arm64.h', -+ '../../src/arm64/lithium-codegen-arm64.cc', -+ '../../src/arm64/lithium-codegen-arm64.h', -+ '../../src/arm64/lithium-gap-resolver-arm64.cc', -+ '../../src/arm64/lithium-gap-resolver-arm64.h', + '../../src/arm64/macro-assembler-arm64.cc', + '../../src/arm64/macro-assembler-arm64.h', + '../../src/arm64/macro-assembler-arm64-inl.h', -+ '../../src/arm64/regexp-macro-assembler-arm64.cc', -+ '../../src/arm64/regexp-macro-assembler-arm64.h', + '../../src/arm64/simulator-arm64.cc', + '../../src/arm64/simulator-arm64.h', + '../../src/arm64/utils-arm64.cc', + '../../src/arm64/utils-arm64.h', + '../../src/compiler/arm64/code-generator-arm64.cc', + '../../src/compiler/arm64/instruction-codes-arm64.h', ++ '../../src/compiler/arm64/instruction-scheduler-arm64.cc', + '../../src/compiler/arm64/instruction-selector-arm64.cc', -+ '../../src/compiler/arm64/linkage-arm64.cc', ++ '../../src/crankshaft/arm64/delayed-masm-arm64.cc', ++ '../../src/crankshaft/arm64/delayed-masm-arm64.h', ++ '../../src/crankshaft/arm64/delayed-masm-arm64-inl.h', ++ '../../src/crankshaft/arm64/lithium-arm64.cc', ++ '../../src/crankshaft/arm64/lithium-arm64.h', ++ '../../src/crankshaft/arm64/lithium-codegen-arm64.cc', ++ '../../src/crankshaft/arm64/lithium-codegen-arm64.h', ++ '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.cc', ++ '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.h', ++ '../../src/debug/arm64/debug-arm64.cc', ++ '../../src/full-codegen/arm64/full-codegen-arm64.cc', + '../../src/ic/arm64/access-compiler-arm64.cc', + '../../src/ic/arm64/handler-compiler-arm64.cc', + '../../src/ic/arm64/ic-arm64.cc', + '../../src/ic/arm64/ic-compiler-arm64.cc', + '../../src/ic/arm64/stub-cache-arm64.cc', ++ '../../src/regexp/arm64/regexp-macro-assembler-arm64.cc', ++ '../../src/regexp/arm64/regexp-macro-assembler-arm64.h', + ], + }], + ['v8_target_arch=="ia32"', { @@ -3984,32 +4119,32 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/ia32/codegen-ia32.cc', + '../../src/ia32/codegen-ia32.h', + '../../src/ia32/cpu-ia32.cc', -+ '../../src/ia32/debug-ia32.cc', + '../../src/ia32/deoptimizer-ia32.cc', + '../../src/ia32/disasm-ia32.cc', + '../../src/ia32/frames-ia32.cc', + '../../src/ia32/frames-ia32.h', -+ '../../src/ia32/full-codegen-ia32.cc', + '../../src/ia32/interface-descriptors-ia32.cc', -+ '../../src/ia32/lithium-codegen-ia32.cc', -+ '../../src/ia32/lithium-codegen-ia32.h', -+ '../../src/ia32/lithium-gap-resolver-ia32.cc', -+ '../../src/ia32/lithium-gap-resolver-ia32.h', -+ '../../src/ia32/lithium-ia32.cc', -+ '../../src/ia32/lithium-ia32.h', + '../../src/ia32/macro-assembler-ia32.cc', + '../../src/ia32/macro-assembler-ia32.h', -+ '../../src/ia32/regexp-macro-assembler-ia32.cc', -+ '../../src/ia32/regexp-macro-assembler-ia32.h', + '../../src/compiler/ia32/code-generator-ia32.cc', + '../../src/compiler/ia32/instruction-codes-ia32.h', ++ '../../src/compiler/ia32/instruction-scheduler-ia32.cc', + '../../src/compiler/ia32/instruction-selector-ia32.cc', -+ '../../src/compiler/ia32/linkage-ia32.cc', ++ '../../src/crankshaft/ia32/lithium-codegen-ia32.cc', ++ '../../src/crankshaft/ia32/lithium-codegen-ia32.h', ++ '../../src/crankshaft/ia32/lithium-gap-resolver-ia32.cc', ++ '../../src/crankshaft/ia32/lithium-gap-resolver-ia32.h', ++ '../../src/crankshaft/ia32/lithium-ia32.cc', ++ '../../src/crankshaft/ia32/lithium-ia32.h', ++ '../../src/debug/ia32/debug-ia32.cc', ++ '../../src/full-codegen/ia32/full-codegen-ia32.cc', + '../../src/ic/ia32/access-compiler-ia32.cc', + '../../src/ic/ia32/handler-compiler-ia32.cc', + '../../src/ic/ia32/ic-ia32.cc', + '../../src/ic/ia32/ic-compiler-ia32.cc', + '../../src/ic/ia32/stub-cache-ia32.cc', ++ '../../src/regexp/ia32/regexp-macro-assembler-ia32.cc', ++ '../../src/regexp/ia32/regexp-macro-assembler-ia32.h', + ], + }], + ['v8_target_arch=="x87"', { @@ -4023,32 +4158,32 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/x87/codegen-x87.cc', + '../../src/x87/codegen-x87.h', + '../../src/x87/cpu-x87.cc', -+ '../../src/x87/debug-x87.cc', + '../../src/x87/deoptimizer-x87.cc', + '../../src/x87/disasm-x87.cc', + '../../src/x87/frames-x87.cc', + '../../src/x87/frames-x87.h', -+ '../../src/x87/full-codegen-x87.cc', + '../../src/x87/interface-descriptors-x87.cc', -+ '../../src/x87/lithium-codegen-x87.cc', -+ '../../src/x87/lithium-codegen-x87.h', -+ '../../src/x87/lithium-gap-resolver-x87.cc', -+ '../../src/x87/lithium-gap-resolver-x87.h', -+ '../../src/x87/lithium-x87.cc', -+ '../../src/x87/lithium-x87.h', + '../../src/x87/macro-assembler-x87.cc', + '../../src/x87/macro-assembler-x87.h', -+ '../../src/x87/regexp-macro-assembler-x87.cc', -+ '../../src/x87/regexp-macro-assembler-x87.h', + '../../src/compiler/x87/code-generator-x87.cc', + '../../src/compiler/x87/instruction-codes-x87.h', ++ '../../src/compiler/x87/instruction-scheduler-x87.cc', + '../../src/compiler/x87/instruction-selector-x87.cc', -+ '../../src/compiler/x87/linkage-x87.cc', ++ '../../src/crankshaft/x87/lithium-codegen-x87.cc', ++ '../../src/crankshaft/x87/lithium-codegen-x87.h', ++ '../../src/crankshaft/x87/lithium-gap-resolver-x87.cc', ++ '../../src/crankshaft/x87/lithium-gap-resolver-x87.h', ++ '../../src/crankshaft/x87/lithium-x87.cc', ++ '../../src/crankshaft/x87/lithium-x87.h', ++ '../../src/debug/x87/debug-x87.cc', ++ '../../src/full-codegen/x87/full-codegen-x87.cc', + '../../src/ic/x87/access-compiler-x87.cc', + '../../src/ic/x87/handler-compiler-x87.cc', + '../../src/ic/x87/ic-x87.cc', + '../../src/ic/x87/ic-compiler-x87.cc', + '../../src/ic/x87/stub-cache-x87.cc', ++ '../../src/regexp/x87/regexp-macro-assembler-x87.cc', ++ '../../src/regexp/x87/regexp-macro-assembler-x87.h', + ], + }], + ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { @@ -4064,37 +4199,37 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/mips/constants-mips.cc', + '../../src/mips/constants-mips.h', + '../../src/mips/cpu-mips.cc', -+ '../../src/mips/debug-mips.cc', + '../../src/mips/deoptimizer-mips.cc', + '../../src/mips/disasm-mips.cc', + '../../src/mips/frames-mips.cc', + '../../src/mips/frames-mips.h', -+ '../../src/mips/full-codegen-mips.cc', + '../../src/mips/interface-descriptors-mips.cc', -+ '../../src/mips/lithium-codegen-mips.cc', -+ '../../src/mips/lithium-codegen-mips.h', -+ '../../src/mips/lithium-gap-resolver-mips.cc', -+ '../../src/mips/lithium-gap-resolver-mips.h', -+ '../../src/mips/lithium-mips.cc', -+ '../../src/mips/lithium-mips.h', + '../../src/mips/macro-assembler-mips.cc', + '../../src/mips/macro-assembler-mips.h', -+ '../../src/mips/regexp-macro-assembler-mips.cc', -+ '../../src/mips/regexp-macro-assembler-mips.h', + '../../src/mips/simulator-mips.cc', + '../../src/mips/simulator-mips.h', + '../../src/compiler/mips/code-generator-mips.cc', + '../../src/compiler/mips/instruction-codes-mips.h', ++ '../../src/compiler/mips/instruction-scheduler-mips.cc', + '../../src/compiler/mips/instruction-selector-mips.cc', -+ '../../src/compiler/mips/linkage-mips.cc', ++ '../../src/crankshaft/mips/lithium-codegen-mips.cc', ++ '../../src/crankshaft/mips/lithium-codegen-mips.h', ++ '../../src/crankshaft/mips/lithium-gap-resolver-mips.cc', ++ '../../src/crankshaft/mips/lithium-gap-resolver-mips.h', ++ '../../src/crankshaft/mips/lithium-mips.cc', ++ '../../src/crankshaft/mips/lithium-mips.h', ++ '../../src/full-codegen/mips/full-codegen-mips.cc', ++ '../../src/debug/mips/debug-mips.cc', + '../../src/ic/mips/access-compiler-mips.cc', + '../../src/ic/mips/handler-compiler-mips.cc', + '../../src/ic/mips/ic-mips.cc', + '../../src/ic/mips/ic-compiler-mips.cc', + '../../src/ic/mips/stub-cache-mips.cc', ++ '../../src/regexp/mips/regexp-macro-assembler-mips.cc', ++ '../../src/regexp/mips/regexp-macro-assembler-mips.h', + ], + }], -+ ['v8_target_arch=="mips64el"', { ++ ['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { + 'sources': [ ### gcmole(arch:mips64el) ### + '../../src/mips64/assembler-mips64.cc', + '../../src/mips64/assembler-mips64.h', @@ -4107,38 +4242,44 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/mips64/constants-mips64.cc', + '../../src/mips64/constants-mips64.h', + '../../src/mips64/cpu-mips64.cc', -+ '../../src/mips64/debug-mips64.cc', + '../../src/mips64/deoptimizer-mips64.cc', + '../../src/mips64/disasm-mips64.cc', + '../../src/mips64/frames-mips64.cc', + '../../src/mips64/frames-mips64.h', -+ '../../src/mips64/full-codegen-mips64.cc', + '../../src/mips64/interface-descriptors-mips64.cc', -+ '../../src/mips64/lithium-codegen-mips64.cc', -+ '../../src/mips64/lithium-codegen-mips64.h', -+ '../../src/mips64/lithium-gap-resolver-mips64.cc', -+ '../../src/mips64/lithium-gap-resolver-mips64.h', -+ '../../src/mips64/lithium-mips64.cc', -+ '../../src/mips64/lithium-mips64.h', + '../../src/mips64/macro-assembler-mips64.cc', + '../../src/mips64/macro-assembler-mips64.h', -+ '../../src/mips64/regexp-macro-assembler-mips64.cc', -+ '../../src/mips64/regexp-macro-assembler-mips64.h', + '../../src/mips64/simulator-mips64.cc', + '../../src/mips64/simulator-mips64.h', + '../../src/compiler/mips64/code-generator-mips64.cc', + '../../src/compiler/mips64/instruction-codes-mips64.h', ++ '../../src/compiler/mips64/instruction-scheduler-mips64.cc', + '../../src/compiler/mips64/instruction-selector-mips64.cc', -+ '../../src/compiler/mips64/linkage-mips64.cc', ++ '../../src/crankshaft/mips64/lithium-codegen-mips64.cc', ++ '../../src/crankshaft/mips64/lithium-codegen-mips64.h', ++ '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.cc', ++ '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.h', ++ '../../src/crankshaft/mips64/lithium-mips64.cc', ++ '../../src/crankshaft/mips64/lithium-mips64.h', ++ '../../src/debug/mips64/debug-mips64.cc', ++ '../../src/full-codegen/mips64/full-codegen-mips64.cc', + '../../src/ic/mips64/access-compiler-mips64.cc', + '../../src/ic/mips64/handler-compiler-mips64.cc', + '../../src/ic/mips64/ic-mips64.cc', + '../../src/ic/mips64/ic-compiler-mips64.cc', + '../../src/ic/mips64/stub-cache-mips64.cc', ++ '../../src/regexp/mips64/regexp-macro-assembler-mips64.cc', ++ '../../src/regexp/mips64/regexp-macro-assembler-mips64.h', + ], + }], + ['v8_target_arch=="x64" or v8_target_arch=="x32"', { + 'sources': [ ### gcmole(arch:x64) ### ++ '../../src/crankshaft/x64/lithium-codegen-x64.cc', ++ '../../src/crankshaft/x64/lithium-codegen-x64.h', ++ '../../src/crankshaft/x64/lithium-gap-resolver-x64.cc', ++ '../../src/crankshaft/x64/lithium-gap-resolver-x64.h', ++ '../../src/crankshaft/x64/lithium-x64.cc', ++ '../../src/crankshaft/x64/lithium-x64.h', + '../../src/x64/assembler-x64-inl.h', + '../../src/x64/assembler-x64.cc', + '../../src/x64/assembler-x64.h', @@ -4148,40 +4289,51 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/x64/codegen-x64.cc', + '../../src/x64/codegen-x64.h', + '../../src/x64/cpu-x64.cc', -+ '../../src/x64/debug-x64.cc', + '../../src/x64/deoptimizer-x64.cc', + '../../src/x64/disasm-x64.cc', + '../../src/x64/frames-x64.cc', + '../../src/x64/frames-x64.h', -+ '../../src/x64/full-codegen-x64.cc', + '../../src/x64/interface-descriptors-x64.cc', -+ '../../src/x64/lithium-codegen-x64.cc', -+ '../../src/x64/lithium-codegen-x64.h', -+ '../../src/x64/lithium-gap-resolver-x64.cc', -+ '../../src/x64/lithium-gap-resolver-x64.h', -+ '../../src/x64/lithium-x64.cc', -+ '../../src/x64/lithium-x64.h', + '../../src/x64/macro-assembler-x64.cc', + '../../src/x64/macro-assembler-x64.h', -+ '../../src/x64/regexp-macro-assembler-x64.cc', -+ '../../src/x64/regexp-macro-assembler-x64.h', ++ '../../src/debug/x64/debug-x64.cc', ++ '../../src/full-codegen/x64/full-codegen-x64.cc', + '../../src/ic/x64/access-compiler-x64.cc', + '../../src/ic/x64/handler-compiler-x64.cc', + '../../src/ic/x64/ic-x64.cc', + '../../src/ic/x64/ic-compiler-x64.cc', + '../../src/ic/x64/stub-cache-x64.cc', ++ '../../src/regexp/x64/regexp-macro-assembler-x64.cc', ++ '../../src/regexp/x64/regexp-macro-assembler-x64.h', + ], + }], + ['v8_target_arch=="x64"', { + 'sources': [ + '../../src/compiler/x64/code-generator-x64.cc', + '../../src/compiler/x64/instruction-codes-x64.h', ++ '../../src/compiler/x64/instruction-scheduler-x64.cc', + '../../src/compiler/x64/instruction-selector-x64.cc', -+ '../../src/compiler/x64/linkage-x64.cc', + ], + }], + ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { + 'sources': [ ### gcmole(arch:ppc) ### ++ '../../src/compiler/ppc/code-generator-ppc.cc', ++ '../../src/compiler/ppc/instruction-codes-ppc.h', ++ '../../src/compiler/ppc/instruction-scheduler-ppc.cc', ++ '../../src/compiler/ppc/instruction-selector-ppc.cc', ++ '../../src/crankshaft/ppc/lithium-ppc.cc', ++ '../../src/crankshaft/ppc/lithium-ppc.h', ++ '../../src/crankshaft/ppc/lithium-codegen-ppc.cc', ++ '../../src/crankshaft/ppc/lithium-codegen-ppc.h', ++ '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.cc', ++ '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.h', ++ '../../src/debug/ppc/debug-ppc.cc', ++ '../../src/full-codegen/ppc/full-codegen-ppc.cc', ++ '../../src/ic/ppc/access-compiler-ppc.cc', ++ '../../src/ic/ppc/handler-compiler-ppc.cc', ++ '../../src/ic/ppc/ic-ppc.cc', ++ '../../src/ic/ppc/ic-compiler-ppc.cc', ++ '../../src/ic/ppc/stub-cache-ppc.cc', + '../../src/ppc/assembler-ppc-inl.h', + '../../src/ppc/assembler-ppc.cc', + '../../src/ppc/assembler-ppc.h', @@ -4193,35 +4345,18 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/ppc/constants-ppc.h', + '../../src/ppc/constants-ppc.cc', + '../../src/ppc/cpu-ppc.cc', -+ '../../src/ppc/debug-ppc.cc', + '../../src/ppc/deoptimizer-ppc.cc', + '../../src/ppc/disasm-ppc.cc', + '../../src/ppc/frames-ppc.cc', + '../../src/ppc/frames-ppc.h', -+ '../../src/ppc/full-codegen-ppc.cc', + '../../src/ppc/interface-descriptors-ppc.cc', + '../../src/ppc/interface-descriptors-ppc.h', -+ '../../src/ppc/lithium-ppc.cc', -+ '../../src/ppc/lithium-ppc.h', -+ '../../src/ppc/lithium-codegen-ppc.cc', -+ '../../src/ppc/lithium-codegen-ppc.h', -+ '../../src/ppc/lithium-gap-resolver-ppc.cc', -+ '../../src/ppc/lithium-gap-resolver-ppc.h', + '../../src/ppc/macro-assembler-ppc.cc', + '../../src/ppc/macro-assembler-ppc.h', -+ '../../src/ppc/regexp-macro-assembler-ppc.cc', -+ '../../src/ppc/regexp-macro-assembler-ppc.h', + '../../src/ppc/simulator-ppc.cc', + '../../src/ppc/simulator-ppc.h', -+ '../../src/compiler/ppc/code-generator-ppc.cc', -+ '../../src/compiler/ppc/instruction-codes-ppc.h', -+ '../../src/compiler/ppc/instruction-selector-ppc.cc', -+ '../../src/compiler/ppc/linkage-ppc.cc', -+ '../../src/ic/ppc/access-compiler-ppc.cc', -+ '../../src/ic/ppc/handler-compiler-ppc.cc', -+ '../../src/ic/ppc/ic-ppc.cc', -+ '../../src/ic/ppc/ic-compiler-ppc.cc', -+ '../../src/ic/ppc/stub-cache-ppc.cc', ++ '../../src/regexp/ppc/regexp-macro-assembler-ppc.cc', ++ '../../src/regexp/ppc/regexp-macro-assembler-ppc.h', + ], + }], + ['OS=="win"', { @@ -4330,6 +4465,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../src/base/safe_conversions_impl.h', + '../../src/base/safe_math.h', + '../../src/base/safe_math_impl.h', ++ '../../src/base/smart-pointers.h', + '../../src/base/sys-info.cc', + '../../src/base/sys-info.h', + '../../src/base/utils/random-number-generator.cc', @@ -4585,6 +4721,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', + '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', + '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras_sse2.bin', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { @@ -4635,7 +4772,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ['v8_enable_i18n_support==1', { + 'variables': { + 'i18n_library_files': [ -+ '../../src/i18n.js', ++ '../../src/js/i18n.js', + ], + }, + }, { @@ -4646,57 +4783,56 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + 'variables': { + 'library_files': [ -+ '../../src/macros.py', ++ '../../src/js/macros.py', + '../../src/messages.h', -+ '../../src/runtime.js', -+ '../../src/prologue.js', -+ '../../src/v8natives.js', -+ '../../src/symbol.js', -+ '../../src/array.js', -+ '../../src/string.js', -+ '../../src/uri.js', -+ '../../src/math.js', ++ '../../src/js/prologue.js', ++ '../../src/js/runtime.js', ++ '../../src/js/v8natives.js', ++ '../../src/js/symbol.js', ++ '../../src/js/array.js', ++ '../../src/js/string.js', ++ '../../src/js/uri.js', ++ '../../src/js/math.js', + '../../src/third_party/fdlibm/fdlibm.js', -+ '../../src/date.js', -+ '../../src/regexp.js', -+ '../../src/arraybuffer.js', -+ '../../src/typedarray.js', -+ '../../src/iterator-prototype.js', -+ '../../src/generator.js', -+ '../../src/object-observe.js', -+ '../../src/collection.js', -+ '../../src/weak-collection.js', -+ '../../src/collection-iterator.js', -+ '../../src/promise.js', -+ '../../src/messages.js', -+ '../../src/json.js', -+ '../../src/array-iterator.js', -+ '../../src/string-iterator.js', -+ '../../src/debug-debugger.js', -+ '../../src/mirror-debugger.js', -+ '../../src/liveedit-debugger.js', -+ '../../src/templates.js', -+ '../../src/harmony-array.js', -+ '../../src/harmony-typedarray.js', ++ '../../src/js/regexp.js', ++ '../../src/js/arraybuffer.js', ++ '../../src/js/typedarray.js', ++ '../../src/js/iterator-prototype.js', ++ '../../src/js/generator.js', ++ '../../src/js/object-observe.js', ++ '../../src/js/collection.js', ++ '../../src/js/weak-collection.js', ++ '../../src/js/collection-iterator.js', ++ '../../src/js/promise.js', ++ '../../src/js/messages.js', ++ '../../src/js/json.js', ++ '../../src/js/array-iterator.js', ++ '../../src/js/string-iterator.js', ++ '../../src/js/templates.js', ++ '../../src/js/spread.js', ++ '../../src/debug/mirrors.js', ++ '../../src/debug/debug.js', ++ '../../src/debug/liveedit.js', + ], + 'experimental_library_files': [ -+ '../../src/macros.py', ++ '../../src/js/macros.py', + '../../src/messages.h', -+ '../../src/proxy.js', -+ '../../src/generator.js', -+ '../../src/harmony-atomics.js', -+ '../../src/harmony-array-includes.js', -+ '../../src/harmony-concat-spreadable.js', -+ '../../src/harmony-tostring.js', -+ '../../src/harmony-regexp.js', -+ '../../src/harmony-reflect.js', -+ '../../src/harmony-spread.js', -+ '../../src/harmony-object.js', -+ '../../src/harmony-sharedarraybuffer.js', ++ '../../src/js/proxy.js', ++ '../../src/js/generator.js', ++ '../../src/js/harmony-atomics.js', ++ '../../src/js/harmony-regexp.js', ++ '../../src/js/harmony-reflect.js', ++ '../../src/js/harmony-object-observe.js', ++ '../../src/js/harmony-sharedarraybuffer.js', ++ '../../src/js/harmony-simd.js', ++ '../../src/js/harmony-species.js', ++ '../../src/js/harmony-unicode-regexps.js', ++ '../../src/js/promise-extra.js', + ], + 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', + 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', + 'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', ++ 'libraries_experimental_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras_sse2.bin', + }, + 'actions': [ + { @@ -4706,9 +4842,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(library_files)', + '<@(i18n_library_files)' + ], -+ 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', -+ ], ++ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc'], + 'action': [ + 'python', + '../../tools/js2c.py', @@ -4717,13 +4851,24 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(library_files)', + '<@(i18n_library_files)' + ], -+ 'conditions': [ -+ [ 'v8_use_external_startup_data==1', { -+ 'outputs': ['<@(libraries_bin_file)'], -+ 'action': [ -+ '--startup_blob', '<@(libraries_bin_file)', -+ ], -+ }], ++ }, ++ { ++ 'action_name': 'v8_sse2_js2c_bin', ++ 'inputs': [ ++ '../../tools/js2c.py', ++ '<@(library_files)', ++ '<@(i18n_library_files)' ++ ], ++ 'outputs': ['<@(libraries_bin_file)'], ++ 'action': [ ++ 'python', ++ '../../tools/js2c.py', ++ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', ++ 'CORE', ++ '<@(library_files)', ++ '<@(i18n_library_files)', ++ '--startup_blob', '<@(libraries_bin_file)', ++ '--nojs', + ], + }, + { @@ -4732,9 +4877,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../tools/js2c.py', + '<@(experimental_library_files)', + ], -+ 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', -+ ], ++ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc'], + 'action': [ + 'python', + '../../tools/js2c.py', @@ -4742,13 +4885,22 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + 'EXPERIMENTAL', + '<@(experimental_library_files)' + ], -+ 'conditions': [ -+ [ 'v8_use_external_startup_data==1', { -+ 'outputs': ['<@(libraries_experimental_bin_file)'], -+ 'action': [ -+ '--startup_blob', '<@(libraries_experimental_bin_file)' -+ ], -+ }], ++ }, ++ { ++ 'action_name': 'v8_sse2_js2c_experimental_bin', ++ 'inputs': [ ++ '../../tools/js2c.py', ++ '<@(experimental_library_files)', ++ ], ++ 'outputs': ['<@(libraries_experimental_bin_file)'], ++ 'action': [ ++ 'python', ++ '../../tools/js2c.py', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', ++ 'EXPERIMENTAL', ++ '<@(experimental_library_files)', ++ '--startup_blob', '<@(libraries_experimental_bin_file)', ++ '--nojs', + ], + }, + { @@ -4757,23 +4909,64 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + '../../tools/js2c.py', + '<@(v8_extra_library_files)', + ], -+ 'outputs': [ ++ 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc'], ++ 'action': [ ++ 'python', ++ '../../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', ++ 'EXTRAS', ++ '<@(v8_extra_library_files)', ++ ], ++ }, ++ { ++ 'action_name': 'v8_sse2_js2c_extras_bin', ++ 'inputs': [ ++ '../../tools/js2c.py', ++ '<@(v8_extra_library_files)', + ], ++ 'outputs': ['<@(libraries_extras_bin_file)'], + 'action': [ + 'python', + '../../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + 'EXTRAS', + '<@(v8_extra_library_files)', ++ '--startup_blob', '<@(libraries_extras_bin_file)', ++ '--nojs', + ], -+ 'conditions': [ -+ [ 'v8_use_external_startup_data==1', { -+ 'outputs': ['<@(libraries_extras_bin_file)'], -+ 'action': [ -+ '--startup_blob', '<@(libraries_extras_bin_file)', -+ ], -+ }], ++ }, ++ { ++ 'action_name': 'v8_sse2_js2c_experimental_extras', ++ 'inputs': [ ++ '../../tools/js2c.py', ++ '<@(v8_experimental_extra_library_files)', ++ ], ++ 'outputs': [ ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', ++ ], ++ 'action': [ ++ 'python', ++ '../../tools/js2c.py', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', ++ 'EXPERIMENTAL_EXTRAS', ++ '<@(v8_experimental_extra_library_files)', ++ ], ++ }, ++ { ++ 'action_name': 'v8_sse2_js2c_experimental_extras_bin', ++ 'inputs': [ ++ '../../tools/js2c.py', ++ '<@(v8_experimental_extra_library_files)', ++ ], ++ 'outputs': ['<@(libraries_experimental_extras_bin_file)'], ++ 'action': [ ++ 'python', ++ '../../tools/js2c.py', ++ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', ++ 'EXPERIMENTAL_EXTRAS', ++ '<@(v8_experimental_extra_library_files)', ++ '--startup_blob', '<@(libraries_experimental_extras_bin_file)', ++ '--nojs', + ], + }, + ], @@ -4832,9 +5025,9 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/3rdparty/chromium/v8/tools/gyp/v8 + }, + ], +} -diff -Nur qtwebengine-opensource-src-5.6.1/src/core/core_module.pro qtwebengine-opensource-src-5.6.1-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.6.1/src/core/core_module.pro 2016-05-26 20:01:25.000000000 +0200 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/core/core_module.pro 2016-06-11 01:25:56.463419047 +0200 +diff -Nur qtwebengine-opensource-src-5.7.0/src/core/core_module.pro qtwebengine-opensource-src-5.7.0-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.7.0/src/core/core_module.pro 2016-06-07 06:20:06.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/core/core_module.pro 2016-07-17 18:06:40.383813518 +0200 @@ -9,6 +9,29 @@ error("Could not find the linking information that gyp should have generated.") } @@ -4865,7 +5058,7 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/core/core_module.pro qtwebengine- load(qt_module) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() -@@ -71,7 +94,12 @@ +@@ -72,7 +95,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -4879,10 +5072,10 @@ diff -Nur qtwebengine-opensource-src-5.6.1/src/core/core_module.pro qtwebengine- !use?(system_icu) { icu.CONFIG += no_check_exist -diff -Nur qtwebengine-opensource-src-5.6.1/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.6.1-no-sse2/src/core/qtwebengine.gypi ---- qtwebengine-opensource-src-5.6.1/src/core/qtwebengine.gypi 2016-02-15 16:18:46.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.1-no-sse2/src/core/qtwebengine.gypi 2016-02-25 00:47:15.416723938 +0100 -@@ -58,6 +58,11 @@ +diff -Nur qtwebengine-opensource-src-5.7.0/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/core/qtwebengine.gypi +--- qtwebengine-opensource-src-5.7.0/src/core/qtwebengine.gypi 2016-06-07 06:20:06.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/core/qtwebengine.gypi 2016-07-17 18:06:40.391813562 +0200 +@@ -60,6 +60,11 @@ }, }, 'conditions': [ From bdefa5da4c046dfd3fb94344a02c1c8d6998a8b8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 21:08:02 +0200 Subject: [PATCH 093/437] Renumber the patches --- qt5-qtwebengine.spec | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 31a283f..6f8fcd4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,33 +46,33 @@ Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py # some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch1: qtwebengine-opensource-src-5.7.0-linux-pri.patch +Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because # we use the system ICU, which embeds the data statically) completely -Patch2: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch +Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch -Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch +Patch2: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch # disable NEON vector instructions on ARM for now, the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch +Patch3: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch5: qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch +Patch4: qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch6: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch +Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch7: qtwebengine-opensource-src-5.7.0-no-sse2.patch +Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -292,13 +292,13 @@ BuildArch: noarch %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} -%patch1 -p1 -b .linux-pri -%patch2 -p1 -b .no-icudtl-dat -%patch3 -p1 -b .fix-extractcflag -%patch4 -p1 -b .no-neon -%patch5 -p1 -b .system-nspr-prtime -%patch6 -p1 -b .system-icu-utf -%patch7 -p1 -b .no-sse2 +%patch0 -p1 -b .linux-pri +%patch1 -p1 -b .no-icudtl-dat +%patch2 -p1 -b .fix-extractcflag +%patch3 -p1 -b .no-neon +%patch4 -p1 -b .system-nspr-prtime +%patch5 -p1 -b .system-icu-utf +%patch6 -p1 -b .no-sse2 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc From 8ba2df50aaa17c9c1db7281130b0466c65abea0b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 21:22:13 +0200 Subject: [PATCH 094/437] Update re2 header hack The directory layout has changed. --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6f8fcd4..6b454c5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -309,7 +309,7 @@ sed -i -e 's!\./!!g' \ # http://bugzilla.redhat.com/1337585 # can't just delete, but we'll overwrite with system headers to be on the safe side -cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/re2/ +cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ %ifnarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 From b6d29f0b2a2fd0fb852064fb333c5ead8cc01592 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 17 Jul 2016 22:41:21 +0200 Subject: [PATCH 095/437] linux-pri.patch: call replace_gyp_files.py only with use_system_re2=1 The other stuff should be automatically unbundled already. Also stop passing use_system_expat=1 explicitly, it should be automatic. --- qtwebengine-opensource-src-5.7.0-linux-pri.patch | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.0-linux-pri.patch b/qtwebengine-opensource-src-5.7.0-linux-pri.patch index 843f49f..321a1d7 100644 --- a/qtwebengine-opensource-src-5.7.0-linux-pri.patch +++ b/qtwebengine-opensource-src-5.7.0-linux-pri.patch @@ -1,15 +1,13 @@ diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri --- qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri 2016-06-07 06:20:06.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 16:21:35.259570229 +0200 -@@ -46,3 +46,25 @@ ++++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 22:18:17.312471202 +0200 +@@ -46,3 +46,22 @@ use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 use?(system_protobuf): GYP_CONFIG += use_system_protobuf=1 + +# some more system packages, that are not checked for for some reason -+GYP_CONFIG += \ -+ use_system_expat=1 \ -+ use_system_re2=1 ++GYP_CONFIG += use_system_re2=1 + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on +# other architectures (e.g., ARM), so make it conditional on the architecture @@ -23,7 +21,6 @@ diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine- +# run the unbundling script Chromium provides +CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" +R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" -+R_G_F_PY_ARGS = -+for (config, GYP_CONFIG): R_G_F_PY_ARGS += "-D $$config" ++R_G_F_PY_ARGS = "-D use_system_re2=1" +log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") +!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") From 740ab66c14bd024594a5fd17bd3014866f0105b9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jul 2016 00:02:16 +0200 Subject: [PATCH 096/437] no-sse2 patch: Remove reference to the obsolete blink_prerequisites gyp target --- qtwebengine-opensource-src-5.7.0-no-sse2.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.0-no-sse2.patch b/qtwebengine-opensource-src-5.7.0-no-sse2.patch index f2edb62..4d23f70 100644 --- a/qtwebengine-opensource-src-5.7.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.7.0-no-sse2.patch @@ -2498,7 +2498,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web +#include "VectorMath.cpp" diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp --- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-07-17 18:06:40.283812973 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-07-17 23:45:35.669652872 +0200 @@ -379,6 +379,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], @@ -2511,7 +2511,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web ['target_arch=="arm"', { 'dependencies': [ 'blink_arm_neon', -@@ -394,6 +399,37 @@ +@@ -394,6 +399,36 @@ }], ], }, @@ -2526,7 +2526,6 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web + '../wtf/wtf.gyp:wtf', + 'blink_common', + 'blink_heap_asm_stubs', -+ 'blink_prerequisites', + ], + 'defines': [ + 'BLINK_PLATFORM_IMPLEMENTATION=1', From 34367513588cdb0399853246c6ca6b24e654e7b7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jul 2016 13:21:52 +0200 Subject: [PATCH 097/437] clean_ffmpeg.sh: Add libavutil/aes_internal.h and libavutil/mem_internal.h Respin the tarball with the previously missing files. --- clean_ffmpeg.sh | 2 ++ sources | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index eddd58e..ae01f26 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -45,6 +45,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/arm/intmath.h \ libavutil/arm/intreadwrite.h \ libavutil/arm/timer.h \ + libavutil/aes_internal.h \ libavutil/atomic.h \ libavutil/atomic_gcc.h \ libavutil/attributes.h \ @@ -65,6 +66,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/lls.h \ libavutil/lzo.h \ libavutil/macros.h \ + libavutil/mem_internal.h \ libavutil/old_pix_fmts.h \ libavutil/pixfmt.h \ libavutil/qsort.h \ diff --git a/sources b/sources index 1386ee0..589277e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b346229a20b4e0ab615f179696ae58db qtwebengine-opensource-src-5.7.0-clean.tar.xz +caea73d3540e2cf270223bfbf4a89931 qtwebengine-opensource-src-5.7.0-clean.tar.xz From 335f582cc6a7478a1c6b64ffd5cb51cb00c68f53 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jul 2016 14:35:21 +0200 Subject: [PATCH 098/437] Fix ARM NEON handling in webrtc gyp files (honor arm_neon=0) * Mon Jul 18 2016 Kevin Kofler - 5.7.0-1 - Fix ARM NEON handling in webrtc gyp files (honor arm_neon=0) --- qt5-qtwebengine.spec | 9 +++++++- ...ine-opensource-src-5.7.0-webrtc-neon.patch | 21 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.7.0-webrtc-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6b454c5..33cdee6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -73,6 +73,11 @@ Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch +# fix ARM NEON handling in webrtc gyp files +# For now, fix video_processing.gypi to only build NEON files when actually +# requested (i.e., not if arm_neon=0 arm_neon_optional=0). +# We still need to figure out why the flag tweaks from arm_neon.gypi don't work. +Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -299,6 +304,7 @@ BuildArch: noarch %patch4 -p1 -b .system-nspr-prtime %patch5 -p1 -b .system-icu-utf %patch6 -p1 -b .no-sse2 +%patch7 -p1 -b .webrtc-neon # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -444,13 +450,14 @@ popd %changelog -* Sun Jul 17 2016 Kevin Kofler - 5.7.0-1 +* Mon Jul 18 2016 Kevin Kofler - 5.7.0-1 - Update to 5.7.0 - Update version numbers of bundled stuff - Update system libvpx/libwebp version requirements (now F24+ only) - Drop no-format patch, fixed upstream (they stopped passing -Wno-format) - Rebase linux-pri patch (use_system_protobuf is now a qmake flag) - Rebase system-nspr-prtime, system-icu-utf and no-sse2 patches +- Fix ARM NEON handling in webrtc gyp files (honor arm_neon=0) * Tue Jun 14 2016 Rex Dieter - 5.6.1-3 - rebuild (glibc) diff --git a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch new file mode 100644 index 0000000..33e0df9 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch @@ -0,0 +1,21 @@ +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-07-18 14:29:24.841980563 +0200 +@@ -47,7 +47,7 @@ + ['target_arch=="ia32" or target_arch=="x64"', { + 'dependencies': [ 'video_processing_sse2', ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'dependencies': [ 'video_processing_neon', ], + }], + ], +@@ -77,7 +77,7 @@ + }, + ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'targets': [ + { + 'target_name': 'video_processing_neon', From 9fa9cff26a2c65a13d5c80c14e7ff56085e751b2 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jul 2016 19:28:55 +0200 Subject: [PATCH 099/437] no-sse2 patch: Fix/update the location of cpu_features_wrapper.h It moved from "webrtc/system_wrappers/interface/cpu_features_wrapper.h" to "webrtc/system_wrappers/include/cpu_features_wrapper.h". --- qtwebengine-opensource-src-5.7.0-no-sse2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.7.0-no-sse2.patch b/qtwebengine-opensource-src-5.7.0-no-sse2.patch index 4d23f70..0ee5e3b 100644 --- a/qtwebengine-opensource-src-5.7.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.7.0-no-sse2.patch @@ -2597,7 +2597,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/web #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" #include "webrtc/common_audio/signal_processing/include/spl_inl.h" -+#include "webrtc/system_wrappers/interface/cpu_features_wrapper.h" ++#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" namespace webrtc { From c3db32f0261239d3dee9ed3a63114f3b39808dac Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 18 Jul 2016 22:53:48 +0200 Subject: [PATCH 100/437] no-sse2 patch: Fix conditionals in 3 more sections of WebGLImageConversion.cpp --- ...bengine-opensource-src-5.7.0-no-sse2.patch | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.0-no-sse2.patch b/qtwebengine-opensource-src-5.7.0-no-sse2.patch index 0ee5e3b..860f5b5 100644 --- a/qtwebengine-opensource-src-5.7.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.7.0-no-sse2.patch @@ -2562,7 +2562,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp --- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-07-17 18:06:40.285812984 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-07-18 22:28:24.771187623 +0200 @@ -422,7 +422,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2572,6 +2572,24 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -441,7 +441,7 @@ + + template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) + { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(ARM_NEON_INTRINSICS) +@@ -463,7 +463,7 @@ + + template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) + { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(ARM_NEON_INTRINSICS) @@ -629,7 +629,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) @@ -2581,6 +2599,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -666,7 +666,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); + #endif + for (unsigned i = 0; i < pixelsPerRow; ++i) { @@ -740,7 +740,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) @@ -2592,7 +2619,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web for (unsigned i = 0; i < pixelsPerRow; ++i) { diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc --- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-07-17 18:06:40.285812984 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-07-18 19:27:29.285890664 +0200 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" From c2d8c4c1624a211f187d45962fae96aa079166da Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 19 Jul 2016 01:24:13 +0200 Subject: [PATCH 101/437] no-sse2 patch: Also fix AudioParamTimeline.cpp in Blink's webaudio src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp --- ...bengine-opensource-src-5.7.0-no-sse2.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/qtwebengine-opensource-src-5.7.0-no-sse2.patch b/qtwebengine-opensource-src-5.7.0-no-sse2.patch index 860f5b5..a49b6d7 100644 --- a/qtwebengine-opensource-src-5.7.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.7.0-no-sse2.patch @@ -2020,6 +2020,45 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcm ], } +diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2016-07-19 00:52:57.847430161 +0200 +@@ -32,7 +32,7 @@ + #include "wtf/MathExtras.h" + #include + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + +@@ -438,7 +438,7 @@ + // First handle linear and exponential ramps which require looking ahead to the next event. + if (nextEventType == ParamEvent::LinearRampToValue) { + const float valueDelta = value2 - value1; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Minimize in-loop operations. Calculate starting value and increment. Next step: value += inc. + // value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1); + // inc = 4 / sampleRate * k * (value2 - value1); +@@ -581,7 +581,7 @@ + for (; writeIndex < fillToFrame; ++writeIndex) + values[writeIndex] = target; + } else { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Resolve recursion by expanding constants to achieve a 4-step loop unrolling. + // v1 = v0 + (t - v0) * c + // v2 = v1 + (t - v1) * c +@@ -674,7 +674,7 @@ + // Render the stretched curve data using linear interpolation. Oversampled + // curve data can be provided if sharp discontinuities are desired. + unsigned k = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); + const __m128 vCurvePointsPerFrame = _mm_set_ps1(curvePointsPerFrame); + const __m128 vNumberOfCurvePointsM1 = _mm_set_ps1(numberOfCurvePoints - 1); diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp --- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-05-26 15:53:47.000000000 +0200 +++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-07-17 18:06:40.274812924 +0200 From 84af15c334a12427ebb171f3345afaa054f09ef5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 20 Jul 2016 23:10:42 +0200 Subject: [PATCH 102/437] clean_ffmpeg.sh: Whitelist libavutil/aarch64/timer.h (#1358428) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Wed Jul 20 2016 Kevin Kofler - 5.7.0-2 - clean_ffmpeg.sh: Whitelist libavutil/aarch64/timer.h (#1358428) … and rerun new-sources with the fixed tarball. --- clean_ffmpeg.sh | 1 + qt5-qtwebengine.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index ae01f26..cfb37e4 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -38,6 +38,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/x86/timer.h \ libavutil/aarch64/asm.S \ libavutil/aarch64/bswap.h \ + libavutil/aarch64/timer.h \ libavutil/arm/asm.S \ libavutil/arm/bswap.h \ libavutil/arm/cpu.h \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 33cdee6..4d82e86 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -450,6 +450,9 @@ popd %changelog +* Wed Jul 20 2016 Kevin Kofler - 5.7.0-2 +- clean_ffmpeg.sh: Whitelist libavutil/aarch64/timer.h (#1358428) + * Mon Jul 18 2016 Kevin Kofler - 5.7.0-1 - Update to 5.7.0 - Update version numbers of bundled stuff diff --git a/sources b/sources index 589277e..cee538d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -caea73d3540e2cf270223bfbf4a89931 qtwebengine-opensource-src-5.7.0-clean.tar.xz +790f64089a50b328a14e471844c8870b qtwebengine-opensource-src-5.7.0-clean.tar.xz From 5237d9ed674a16bf1915edf4ab079cbfb5496c46 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Sat, 23 Jul 2016 13:09:00 +0200 Subject: [PATCH 103/437] Rebuilt for libvpx.so.4 soname bump --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4d82e86..4a7da4d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -450,6 +450,9 @@ popd %changelog +* Sat Jul 23 2016 Christian Dersch - 5.7.0-3 +- Rebuilt for libvpx.so.4 soname bump + * Wed Jul 20 2016 Kevin Kofler - 5.7.0-2 - clean_ffmpeg.sh: Whitelist libavutil/aarch64/timer.h (#1358428) From e2d56e5e7b9bc037d14fa2f00b5916d9f97abcda Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Jul 2016 23:33:50 +0200 Subject: [PATCH 104/437] Restore system-icu54 patch, the fix was lost upstream * Tue Jul 26 2016 Kevin Kofler - 5.7.0-3 - Restore system-icu54 patch, the fix was lost upstream --- qt5-qtwebengine.spec | 8 +++++++- ...gine-opensource-src-5.6.0-beta-system-icu54.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4a7da4d..364d63d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -78,6 +78,8 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # requested (i.e., not if arm_neon=0 arm_neon_optional=0). # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch +# don't require the time zone detection API backported from ICU 55 (thanks spot) +Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -305,6 +307,7 @@ BuildArch: noarch %patch5 -p1 -b .system-icu-utf %patch6 -p1 -b .no-sse2 %patch7 -p1 -b .webrtc-neon +%patch8 -p1 -b .system-icu54 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -450,6 +453,9 @@ popd %changelog +* Tue Jul 26 2016 Kevin Kofler - 5.7.0-4 +- Restore system-icu54 patch, the fix was lost upstream + * Sat Jul 23 2016 Christian Dersch - 5.7.0-3 - Rebuilt for libvpx.so.4 soname bump diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch new file mode 100644 index 0000000..7366f6a --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc +--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2015-12-10 18:17:21.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2016-01-08 23:40:36.387525597 +0100 +@@ -22,7 +22,7 @@ + + void TimeZoneMonitor::NotifyRenderers() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +-#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 54 ++#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 55 + // On CrOS and older ICU versions, ICU's default tz is already set to a new zone. + // No need to redetect it with detectHostTimeZone(). + scoped_ptr new_zone(icu::TimeZone::createDefault()); From 2cc67747b9c5365c9e1aa7b1a45d7db84b0dd9d4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 31 Jul 2016 19:41:28 -0500 Subject: [PATCH 105/437] BR: cmake (for cmake autoprovides support mostly) --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 364d63d..c685b4d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -100,6 +100,7 @@ BuildRequires: qt5-qtsensors-devel >= %{version} BuildRequires: qt5-qtwebchannel-devel >= %{version} BuildRequires: qt5-qttools-static >= %{version} BuildRequires: ninja-build +BuildRequires: cmake BuildRequires: bison BuildRequires: git-core BuildRequires: gperf @@ -453,6 +454,9 @@ popd %changelog +* Sun Jul 31 2016 Rex Dieter - 5.7.0-5 +- BR: cmake (for cmake autoprovides support mostly) + * Tue Jul 26 2016 Kevin Kofler - 5.7.0-4 - Restore system-icu54 patch, the fix was lost upstream From 209618155be1d2bac66d0098dcb2d0ac8e3cc923 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 14 Aug 2016 00:36:23 +0200 Subject: [PATCH 106/437] Fix crash when building against glibc 2.24 (#1364781) (upstream patch) * Sat Aug 13 2016 Kevin Kofler - 5.7.0-6 - Fix crash when building against glibc 2.24 (#1364781) (upstream patch) --- qt5-qtwebengine.spec | 11 ++++++- ...engine-opensource-src-5.7.0-glibc224.patch | 33 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.7.0-glibc224.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c685b4d..e6a6388 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -81,6 +81,11 @@ Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +## UPSTREAM PATCHES: +# do not use MADV_FREE when building against glibc 2.24, it is not allowed by +# the sandbox (#1364781) (patch from qtwebengine-chromium 49-based branch) +Patch100: qtwebengine-opensource-src-5.7.0-glibc224.patch + # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary # architectures, e.g., to add to the Qt -> Chromium -> V8 arch translations. @@ -309,6 +314,7 @@ BuildArch: noarch %patch6 -p1 -b .no-sse2 %patch7 -p1 -b .webrtc-neon %patch8 -p1 -b .system-icu54 +%patch100 -p1 -b .glibc224 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -454,6 +460,9 @@ popd %changelog +* Sat Aug 13 2016 Kevin Kofler - 5.7.0-6 +- Fix crash when building against glibc 2.24 (#1364781) (upstream patch) + * Sun Jul 31 2016 Rex Dieter - 5.7.0-5 - BR: cmake (for cmake autoprovides support mostly) diff --git a/qtwebengine-opensource-src-5.7.0-glibc224.patch b/qtwebengine-opensource-src-5.7.0-glibc224.patch new file mode 100644 index 0000000..773781a --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-glibc224.patch @@ -0,0 +1,33 @@ +From b12ffcd411d4776f7120ccecb3be34344d930d2b Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Tue, 9 Aug 2016 16:21:29 +0200 +Subject: Do not depend on Linux 4.5 + +Avoid using MADV_FREE that was only recently added to Linux. It will fail when +run on older Linux kernels. + +Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0 +Reviewed-by: Peter Varga +--- + chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp +index 121b687..be7c3b9 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp +@@ -39,6 +39,11 @@ + + #include + ++#if OS(LINUX) && defined(MADV_FREE) ++// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime ++#undef MADV_FREE ++#endif ++ + #ifndef MADV_FREE + #define MADV_FREE MADV_DONTNEED + #endif +-- +cgit v1.0-4-g1e03 + From bda84512e3e9cd9227046c615de6273eefb8a98f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 9 Sep 2016 03:25:34 +0200 Subject: [PATCH 107/437] Apply the correct page margins from the QPageLayout to Chromium printing * Fri Sep 09 2016 Kevin Kofler - 5.7.0-7 - apply the correct page margins from the QPageLayout to Chromium printing --- qt5-qtwebengine.spec | 10 ++++- ...ne-opensource-src-5.7.0-page-margins.patch | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.7.0-page-margins.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e6a6388..b62c655 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -85,6 +85,10 @@ Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # do not use MADV_FREE when building against glibc 2.24, it is not allowed by # the sandbox (#1364781) (patch from qtwebengine-chromium 49-based branch) Patch100: qtwebengine-opensource-src-5.7.0-glibc224.patch +# apply the correct page margins from the QPageLayout to Chromium printing +# partial backport of af2535018b1553e351198f3d9c21538de1c328a1 (Michael Bruning) +# from the 5.8 branch +Patch101: qtwebengine-opensource-src-5.7.0-page-margins.patch # the architectures theoretically supported by the version of V8 used (#1298011) # You may need some minor patching to build on one of the secondary @@ -315,6 +319,7 @@ BuildArch: noarch %patch7 -p1 -b .webrtc-neon %patch8 -p1 -b .system-icu54 %patch100 -p1 -b .glibc224 +%patch101 -p1 -b .page-margins # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -460,6 +465,9 @@ popd %changelog +* Fri Sep 09 2016 Kevin Kofler - 5.7.0-7 +- apply the correct page margins from the QPageLayout to Chromium printing + * Sat Aug 13 2016 Kevin Kofler - 5.7.0-6 - Fix crash when building against glibc 2.24 (#1364781) (upstream patch) diff --git a/qtwebengine-opensource-src-5.7.0-page-margins.patch b/qtwebengine-opensource-src-5.7.0-page-margins.patch new file mode 100644 index 0000000..634e412 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-page-margins.patch @@ -0,0 +1,40 @@ +From e4305a681eb3b8e21f028627df8bed10d7071676 Mon Sep 17 00:00:00 2001 +From: Kevin Kofler +Date: Fri, 9 Sep 2016 03:20:17 +0200 +Subject: [PATCH] Apply the correct page margins from the QPageLayout to + Chromium printing + +If one passes a QPageLayout to printToPDF, surely one expects the margin +settings contained in it to actually get applied. + +This is a partial backport of the much larger 5.8 commit +af2535018b1553e351198f3d9c21538de1c328a1 (by Michael Bruning), limited +to only the margin fix. +--- + src/core/print_view_manager_qt.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp +index 4cb0e06..0db1df4 100644 +--- a/src/core/print_view_manager_qt.cpp ++++ b/src/core/print_view_manager_qt.cpp +@@ -115,6 +115,16 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout& pageLayout, + sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter); + print_settings.Set(printing::kSettingMediaSize, std::move(sizeDict)); + ++ // Apply page margins ++ QMargins pageMarginsInPoints = pageLayout.marginsPoints(); ++ scoped_ptr marginsDict(new base::DictionaryValue); ++ marginsDict->SetInteger(printing::kSettingMarginTop, pageMarginsInPoints.top()); ++ marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom()); ++ marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left()); ++ marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right()); ++ printSettings.Set(printing::kSettingMarginsCustom, std::move(marginsDict)); ++ printSettings.SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS); ++ + print_settings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape); + + // The following are standard settings that Chromium expects to be set. +-- +2.1.0 + From 28117fc6000ec134ec65447f2de733a43a4d8b1d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 9 Sep 2016 05:05:28 +0200 Subject: [PATCH 108/437] page-margins patch: Fix build (s/printSettings/print_settings/g) --- qtwebengine-opensource-src-5.7.0-page-margins.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.0-page-margins.patch b/qtwebengine-opensource-src-5.7.0-page-margins.patch index 634e412..17b05f1 100644 --- a/qtwebengine-opensource-src-5.7.0-page-margins.patch +++ b/qtwebengine-opensource-src-5.7.0-page-margins.patch @@ -1,4 +1,4 @@ -From e4305a681eb3b8e21f028627df8bed10d7071676 Mon Sep 17 00:00:00 2001 +From fbf32f1208e6d6556779ac955825ff7b6bf6a807 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 9 Sep 2016 03:20:17 +0200 Subject: [PATCH] Apply the correct page margins from the QPageLayout to @@ -15,7 +15,7 @@ to only the margin fix. 1 file changed, 10 insertions(+) diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp -index 4cb0e06..0db1df4 100644 +index 4cb0e06..b773c24 100644 --- a/src/core/print_view_manager_qt.cpp +++ b/src/core/print_view_manager_qt.cpp @@ -115,6 +115,16 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout& pageLayout, @@ -29,8 +29,8 @@ index 4cb0e06..0db1df4 100644 + marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom()); + marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left()); + marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right()); -+ printSettings.Set(printing::kSettingMarginsCustom, std::move(marginsDict)); -+ printSettings.SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS); ++ print_settings.Set(printing::kSettingMarginsCustom, std::move(marginsDict)); ++ print_settings.SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS); + print_settings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape); From 89d84b5a50195f3299b7ace1862add9f4a030fb0 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 14 Sep 2016 09:16:10 -0500 Subject: [PATCH 109/437] ExclusiveArch: %{qt5_qtwebengine_arches} (defined by qt5-srpm-macros) --- qt5-qtwebengine.spec | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b62c655..2f01564 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -90,13 +90,8 @@ Patch100: qtwebengine-opensource-src-5.7.0-glibc224.patch # from the 5.8 branch Patch101: qtwebengine-opensource-src-5.7.0-page-margins.patch -# the architectures theoretically supported by the version of V8 used (#1298011) -# You may need some minor patching to build on one of the secondary -# architectures, e.g., to add to the Qt -> Chromium -> V8 arch translations. -# If you cannot get this package to build on your secondary architecure, please: -# * remove your architecture from this list AND -# * put #1298011 onto your ExcludeArch tracker. -ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el +# handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches +ExclusiveArch: %{qt5_qtwebengine_arches} BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtbase-private-devel @@ -465,6 +460,9 @@ popd %changelog +* Wed Sep 14 2016 Rex Dieter - 5.7.0-8 +- ExclusiveArch: %%{qt5_qtwebengine_arches} (defined by qt5-srpm-macros) + * Fri Sep 09 2016 Kevin Kofler - 5.7.0-7 - apply the correct page margins from the QPageLayout to Chromium printing From f5dc1eeffe482e9fbe8851fe9bc36627be24d359 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sat, 19 Nov 2016 08:52:16 -0700 Subject: [PATCH 110/437] Rebuild for protobuf 3.1.0 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2f01564..d6c8765 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,7 +30,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.0 -Release: 8%{?dist} +Release: 9%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -460,6 +460,9 @@ popd %changelog +* Sat Nov 19 2016 Orion Poplawski - 5.7.0-9 +- Rebuild for protobuf 3.1.0 + * Wed Sep 14 2016 Rex Dieter - 5.7.0-8 - ExclusiveArch: %%{qt5_qtwebengine_arches} (defined by qt5-srpm-macros) From cb70d95284414ae58edbee6bcd8fd5cea45de134 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Fri, 2 Dec 2016 15:32:54 +0100 Subject: [PATCH 111/437] - Update for 5.7.1 tentative final packages --- .gitignore | 1 + qt5-qtwebengine.spec | 21 ++++++--------------- sources | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index fac2569..75650cf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /qtwebengine-opensource-src-5.6.0-clean.tar.xz /qtwebengine-opensource-src-5.6.1-clean.tar.xz /qtwebengine-opensource-src-5.7.0-clean.tar.xz +/qtwebengine-opensource-src-5.7.1-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d6c8765..5a85884 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -29,8 +29,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.7.0 -Release: 9%{?dist} +Version: 5.7.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -81,15 +81,6 @@ Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch -## UPSTREAM PATCHES: -# do not use MADV_FREE when building against glibc 2.24, it is not allowed by -# the sandbox (#1364781) (patch from qtwebengine-chromium 49-based branch) -Patch100: qtwebengine-opensource-src-5.7.0-glibc224.patch -# apply the correct page margins from the QPageLayout to Chromium printing -# partial backport of af2535018b1553e351198f3d9c21538de1c328a1 (Michael Bruning) -# from the 5.8 branch -Patch101: qtwebengine-opensource-src-5.7.0-page-margins.patch - # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -307,14 +298,14 @@ BuildArch: noarch %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat %patch2 -p1 -b .fix-extractcflag +%if 0%{?fedora} < 24 %patch3 -p1 -b .no-neon +%endif %patch4 -p1 -b .system-nspr-prtime %patch5 -p1 -b .system-icu-utf %patch6 -p1 -b .no-sse2 %patch7 -p1 -b .webrtc-neon %patch8 -p1 -b .system-icu54 -%patch100 -p1 -b .glibc224 -%patch101 -p1 -b .page-margins # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -460,8 +451,8 @@ popd %changelog -* Sat Nov 19 2016 Orion Poplawski - 5.7.0-9 -- Rebuild for protobuf 3.1.0 +* Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 +- New upstream version * Wed Sep 14 2016 Rex Dieter - 5.7.0-8 - ExclusiveArch: %%{qt5_qtwebengine_arches} (defined by qt5-srpm-macros) diff --git a/sources b/sources index cee538d..b88ded2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -790f64089a50b328a14e471844c8870b qtwebengine-opensource-src-5.7.0-clean.tar.xz +ea250ffe3ff56a845221f8c2517c0fbd qtwebengine-opensource-src-5.7.1-clean.tar.xz From 3a314c6b551316766ce69374befb1422e63ab56c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 3 Dec 2016 17:00:17 +0100 Subject: [PATCH 112/437] Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted * Sat Dec 03 2016 Kevin Kofler - 5.7.1-2 - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 --- qt5-qtwebengine.spec | 19 ++++++++++++++++--- ...ine-opensource-src-5.7.1-arm-fpu-fix.patch | 12 ++++++++++++ ...bengine-opensource-src-5.7.1-no-neon.patch | 14 +++++++------- 3 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch rename qtwebengine-opensource-src-5.6.0-beta-no-neon.patch => qtwebengine-opensource-src-5.7.1-no-neon.patch (54%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5a85884..1e333ec 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -19,6 +19,10 @@ %global use_system_libwebp 1 %endif +# NEON support on ARM (detected at runtime) - disable this if you are hitting +# FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 +%global arm_neon 1 + #global prerelease rc # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere @@ -55,9 +59,10 @@ Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch2: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch -# disable NEON vector instructions on ARM for now, the NEON code FTBFS due to +# disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -Patch3: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch +# otherwise, we use the arm-fpu-fix below instead (which this patch contains) +Patch3: qtwebengine-opensource-src-5.7.1-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. @@ -80,6 +85,8 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +# fix missing ARM -mfpu setting (see the comment in the no-neon patch above) +Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -298,7 +305,9 @@ BuildArch: noarch %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat %patch2 -p1 -b .fix-extractcflag -%if 0%{?fedora} < 24 +%if 0%{?arm_neon} +%patch9 -p1 -b .arm-fpu-fix +%else %patch3 -p1 -b .no-neon %endif %patch4 -p1 -b .system-nspr-prtime @@ -451,6 +460,10 @@ popd %changelog +* Sat Dec 03 2016 Kevin Kofler - 5.7.1-2 +- Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted +- Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 + * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch new file mode 100644 index 0000000..04ae6e2 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro qtwebengine-opensource-src-5.7.1-arm-fpu-fix/src/core/gyp_run.pro +--- qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro 2016-11-09 06:28:31.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-arm-fpu-fix/src/core/gyp_run.pro 2016-12-03 16:38:33.531711958 +0100 +@@ -80,7 +80,7 @@ + # we use arm_neon_optional for ARMv7 and newer and let chromium decide + # about the mfpu option. + contains(MFPU, ".*neon.*"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 +- else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1 ++ else:!lessThan(MARMV, 7): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=1 + else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0 + } else { + # Chromium defaults to arm_neon=1, Qt does not. diff --git a/qtwebengine-opensource-src-5.6.0-beta-no-neon.patch b/qtwebengine-opensource-src-5.7.1-no-neon.patch similarity index 54% rename from qtwebengine-opensource-src-5.6.0-beta-no-neon.patch rename to qtwebengine-opensource-src-5.7.1-no-neon.patch index af9bbf7..d520694 100644 --- a/qtwebengine-opensource-src-5.6.0-beta-no-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-no-neon.patch @@ -1,15 +1,15 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/gyp_run.pro qtwebengine-opensource-src-5.6.0-beta-no-neon/src/core/gyp_run.pro ---- qtwebengine-opensource-src-5.6.0-beta/src/core/gyp_run.pro 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-no-neon/src/core/gyp_run.pro 2016-01-10 17:48:45.689954050 +0100 -@@ -74,7 +74,10 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro qtwebengine-opensource-src-5.7.1-no-neon/src/core/gyp_run.pro +--- qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro 2016-11-09 06:28:31.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-no-neon/src/core/gyp_run.pro 2016-12-03 16:36:39.039443117 +0100 +@@ -80,7 +80,10 @@ # we use arm_neon_optional for ARMv7 and newer and let chromium decide # about the mfpu option. - contains(MFPU, "neon")|contains(MFPU, "neon-vfpv4"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 + contains(MFPU, ".*neon.*"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 - else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1 + # Disable NEON entirely for now, because it fails to build: + # https://bugzilla.redhat.com/show_bug.cgi?id=1282495 + # (This line was also missing the required arm_fpu flag, which I added.) + # else:!lessThan(MARMV, 7): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=1 else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0 - } - + } else { + # Chromium defaults to arm_neon=1, Qt does not. From 392efd00b727bf6f085fb5e288fe9d30f067deb4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 3 Dec 2016 20:25:56 +0100 Subject: [PATCH 113/437] clean_qtwebengine.sh: Rip out openh264 sources These are not actually being built, and we are not allowed to distribute OpenH264 source code in Fedora. Update sources with the reuploaded tarball. --- clean_qtwebengine.sh | 3 +++ sources | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index 33eacab..084a619 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -57,6 +57,9 @@ fi echo "running clean_ffmpeg.sh" ./clean_ffmpeg.sh "$DIRNAME/src/3rdparty/chromium" || exit $? +echo "ripping out openh264 sources" +rm -rf "$DIRNAME/src/3rdparty/chromium/third_party/openh264/src" || exit $? + echo "repacking as $DIRNAME-clean.tar.xz" XZ_OPT="-9 -f" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? diff --git a/sources b/sources index b88ded2..5853d7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea250ffe3ff56a845221f8c2517c0fbd qtwebengine-opensource-src-5.7.1-clean.tar.xz +06eece6ef299548641326447e3c7c356 qtwebengine-opensource-src-5.7.1-clean.tar.xz From db8ac7858a9a3d437ea145c88367e9e2f622d4cc Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 3 Dec 2016 22:55:17 +0100 Subject: [PATCH 114/437] Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) --- qt5-qtwebengine.spec | 5 + ...opensource-src-5.7.1-openmax-dl-neon.patch | 98 +++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1e333ec..43762cf 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -87,6 +87,8 @@ Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix missing ARM -mfpu setting (see the comment in the no-neon patch above) Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch +# remove Android depenencies from openmax_dl ARM NEON detection (detect.c) +Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -315,6 +317,7 @@ BuildArch: noarch %patch6 -p1 -b .no-sse2 %patch7 -p1 -b .webrtc-neon %patch8 -p1 -b .system-icu54 +%patch10 -p1 -b .openmax-dl-neon # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -461,8 +464,10 @@ popd %changelog * Sat Dec 03 2016 Kevin Kofler - 5.7.1-2 +- clean_qtwebengine.sh: Rip out openh264 sources - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 +- Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch new file mode 100644 index 0000000..08ff6e5 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch @@ -0,0 +1,98 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-12-03 22:50:19.369158276 +0100 +@@ -219,15 +219,6 @@ + 'conditions': [ + ['arm_neon_optional==1', { + # Run-time NEON detection. +- 'dependencies': [ +- '../../../build/android/ndk.gyp:cpu_features', +- ], +- 'link_settings' : { +- 'libraries': [ +- # To get the __android_log_print routine +- '-llog', +- ], +- }, + 'sources': [ + # Detection routine + 'sp/src/arm/detect.c', +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-12-03 22:48:13.745095083 +0100 +@@ -9,13 +9,57 @@ + * + */ + +-#include +- +-#include "android/log.h" + #include "dl/sp/api/omxSP.h" + ++// For ArmCpuCaps() ++#include ++#include ++ ++// based on libvpx arm_cpudetect.c ++static int ArmCpuCaps(const char* cpuinfo_name) { ++ char cpuinfo_line[512]; ++ FILE* f = fopen(cpuinfo_name, "r"); ++ if (!f) { ++ // Assume Neon if /proc/cpuinfo is unavailable. ++ // This will occur for Chrome sandbox for Pepper or Render process. ++ return 1; ++ } ++ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { ++ if (memcmp(cpuinfo_line, "Features", 8) == 0) { ++ char* p = strstr(cpuinfo_line, " neon"); ++ if (p && (p[5] == ' ' || p[5] == '\n')) { ++ fclose(f); ++ return 1; ++ } ++ // aarch64 uses asimd for Neon. ++ p = strstr(cpuinfo_line, " asimd"); ++ if (p && (p[6] == ' ' || p[6] == '\n')) { ++ fclose(f); ++ return 1; ++ } ++ } ++ } ++ fclose(f); ++ return 0; ++} ++ + int omxSP_HasArmNeon() { +- return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; ++#if defined(__arm__) || defined(__aarch64__) ++// gcc -mfpu=neon defines __ARM_NEON__ ++// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. ++// For Linux, /proc/cpuinfo can be tested but without that assume Neon. ++#if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) ++ return 1; ++// For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon ++// flag in it. ++// So for aarch64, neon enabling is hard coded here. ++#elif defined(__aarch64__) ++ return 1; ++#else ++ // Linux arm parse text file for neon detect. ++ return ArmCpuCaps("/proc/cpuinfo"); ++#endif ++#endif // __arm__ + } + + static void SetFFTRoutines() { +@@ -24,13 +68,9 @@ + * forward and inverse FFTs + */ + if (omxSP_HasArmNeon()) { +- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", +- "Using NEON FFT"); + omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs; + omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs; + } else { +- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", +- "Using non-NEON FFT"); + omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp; + omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp; + } From 3cf84c39fcce3194f47be3883be1079247ce9787 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 3 Dec 2016 23:35:45 +0100 Subject: [PATCH 115/437] webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it --- qt5-qtwebengine.spec | 10 +- ...ine-opensource-src-5.7.0-webrtc-neon.patch | 21 --- ...ine-opensource-src-5.7.1-webrtc-neon.patch | 135 ++++++++++++++++++ 3 files changed, 141 insertions(+), 25 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.7.0-webrtc-neon.patch create mode 100644 qtwebengine-opensource-src-5.7.1-webrtc-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 43762cf..6e7d0cb 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -34,7 +34,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -78,9 +78,10 @@ Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch -# fix ARM NEON handling in webrtc gyp files -# For now, fix video_processing.gypi to only build NEON files when actually -# requested (i.e., not if arm_neon=0 arm_neon_optional=0). +# fix ARM NEON handling in webrtc gyp files: +# * fix video_processing.gypi to only build NEON files when actually requested +# (i.e., not if arm_neon=0 arm_neon_optional=0). +# * inline arm_neon.gypi because gyp is not picking up flags from the include # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) @@ -468,6 +469,7 @@ popd - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) +- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch deleted file mode 100644 index 33e0df9..0000000 --- a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-07-18 14:29:24.841980563 +0200 -@@ -47,7 +47,7 @@ - ['target_arch=="ia32" or target_arch=="x64"', { - 'dependencies': [ 'video_processing_sse2', ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'dependencies': [ 'video_processing_neon', ], - }], - ], -@@ -77,7 +77,7 @@ - }, - ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'targets': [ - { - 'target_name': 'video_processing_neon', diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch new file mode 100644 index 0000000..094521a --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch @@ -0,0 +1,135 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 +@@ -217,7 +217,25 @@ + { + 'target_name': 'common_audio_neon', + 'type': 'static_library', +- 'includes': ['../build/arm_neon.gypi',], ++ 'cflags!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'conditions': [ ++ # "-mfpu=neon" is not required for arm64 in GCC. ++ ['target_arch!="arm64"', { ++ 'cflags': [ ++ '-mfpu=neon', ++ ], ++ }], ++ # Disable GCC LTO on NEON targets due to compiler bug. ++ # TODO(fdegans): Enable this. See crbug.com/408997. ++ ['clang==0 and use_lto==1', { ++ 'cflags!': [ ++ '-flto', ++ '-ffat-lto-objects', ++ ], ++ }], ++ ], + 'sources': [ + 'fir_filter_neon.cc', + 'resampler/sinc_resampler_neon.cc', +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-03 23:31:48.052742593 +0100 +@@ -128,7 +128,25 @@ + { + 'target_name': 'isac_neon', + 'type': 'static_library', +- 'includes': ['../../../../build/arm_neon.gypi',], ++ 'cflags!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'conditions': [ ++ # "-mfpu=neon" is not required for arm64 in GCC. ++ ['target_arch!="arm64"', { ++ 'cflags': [ ++ '-mfpu=neon', ++ ], ++ }], ++ # Disable GCC LTO on NEON targets due to compiler bug. ++ # TODO(fdegans): Enable this. See crbug.com/408997. ++ ['clang==0 and use_lto==1', { ++ 'cflags!': [ ++ '-flto', ++ '-ffat-lto-objects', ++ ], ++ }], ++ ], + 'dependencies': [ + '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', + ], +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-03 23:31:58.455581865 +0100 +@@ -260,7 +260,25 @@ + 'targets': [{ + 'target_name': 'audio_processing_neon', + 'type': 'static_library', +- 'includes': ['../../build/arm_neon.gypi',], ++ 'cflags!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'conditions': [ ++ # "-mfpu=neon" is not required for arm64 in GCC. ++ ['target_arch!="arm64"', { ++ 'cflags': [ ++ '-mfpu=neon', ++ ], ++ }], ++ # Disable GCC LTO on NEON targets due to compiler bug. ++ # TODO(fdegans): Enable this. See crbug.com/408997. ++ ['clang==0 and use_lto==1', { ++ 'cflags!': [ ++ '-flto', ++ '-ffat-lto-objects', ++ ], ++ }], ++ ], + 'dependencies': [ + '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', + ], +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-03 23:32:09.217415589 +0100 +@@ -47,7 +47,7 @@ + ['target_arch=="ia32" or target_arch=="x64"', { + 'dependencies': [ 'video_processing_sse2', ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'dependencies': [ 'video_processing_neon', ], + }], + ], +@@ -77,12 +77,30 @@ + }, + ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'targets': [ + { + 'target_name': 'video_processing_neon', + 'type': 'static_library', +- 'includes': [ '../../build/arm_neon.gypi', ], ++ 'cflags!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'conditions': [ ++ # "-mfpu=neon" is not required for arm64 in GCC. ++ ['target_arch!="arm64"', { ++ 'cflags': [ ++ '-mfpu=neon', ++ ], ++ }], ++ # Disable GCC LTO on NEON targets due to compiler bug. ++ # TODO(fdegans): Enable this. See crbug.com/408997. ++ ['clang==0 and use_lto==1', { ++ 'cflags!': [ ++ '-flto', ++ '-ffat-lto-objects', ++ ], ++ }], ++ ], + 'sources': [ + 'util/denoiser_filter_neon.cc', + 'util/denoiser_filter_neon.h', From 16832997c61f9b3a2ac86f5355f0df3c1ae4c128 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 3 Dec 2016 23:38:55 +0100 Subject: [PATCH 116/437] Fix/update patch name --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6e7d0cb..0e2fe66 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -83,7 +83,7 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # (i.e., not if arm_neon=0 arm_neon_optional=0). # * inline arm_neon.gypi because gyp is not picking up flags from the include # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. -Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch +Patch7: qtwebengine-opensource-src-5.7.1-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix missing ARM -mfpu setting (see the comment in the no-neon patch above) From 10eb6915ce84be78c76f42c733b9e9510f5bbfa0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 00:20:52 +0100 Subject: [PATCH 117/437] webrtc-neon patch: Try removing -mfpu=vfpv3-d16 twice since it appears twice. --- qtwebengine-opensource-src-5.7.1-webrtc-neon.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch index 094521a..58cf0f9 100644 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch @@ -1,13 +1,14 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 -@@ -217,7 +217,25 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-04 00:19:46.526045155 +0100 +@@ -217,7 +217,26 @@ { 'target_name': 'common_audio_neon', 'type': 'static_library', - 'includes': ['../build/arm_neon.gypi',], + 'cflags!': [ + '-mfpu=vfpv3-d16', ++ '-mfpu=vfpv3-d16', + ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. From 5e9406747d35f3c62e6a939114e80a299ba90922 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 00:46:19 +0100 Subject: [PATCH 118/437] Revert "webrtc-neon patch: Try removing -mfpu=vfpv3-d16 twice since it appears twice." This reverts commit 10eb6915ce84be78c76f42c733b9e9510f5bbfa0. That did not help. --- qtwebengine-opensource-src-5.7.1-webrtc-neon.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch index 58cf0f9..094521a 100644 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch @@ -1,14 +1,13 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-04 00:19:46.526045155 +0100 -@@ -217,7 +217,26 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 +@@ -217,7 +217,25 @@ { 'target_name': 'common_audio_neon', 'type': 'static_library', - 'includes': ['../build/arm_neon.gypi',], + 'cflags!': [ + '-mfpu=vfpv3-d16', -+ '-mfpu=vfpv3-d16', + ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. From 4621b92128c653cc6780f8598eff4251a082debe Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 01:09:20 +0100 Subject: [PATCH 119/437] webrtc: also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc for NEON targets --- qt5-qtwebengine.spec | 4 +- ...ine-opensource-src-5.7.1-webrtc-neon.patch | 40 +++++++++++++++---- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0e2fe66..01800d6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -82,6 +82,7 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # * fix video_processing.gypi to only build NEON files when actually requested # (i.e., not if arm_neon=0 arm_neon_optional=0). # * inline arm_neon.gypi because gyp is not picking up flags from the include +# * also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc for NEON targets # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. Patch7: qtwebengine-opensource-src-5.7.1-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) @@ -469,7 +470,8 @@ popd - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) -- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it +- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it, + also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc for NEON targets * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch index 094521a..d8494de 100644 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch @@ -1,7 +1,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 -@@ -217,7 +217,25 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-04 01:07:09.731128900 +0100 +@@ -217,7 +217,31 @@ { 'target_name': 'common_audio_neon', 'type': 'static_library', @@ -9,6 +9,12 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], ++ 'cflags_c!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'cflags_cc!': [ ++ '-mfpu=vfpv3-d16', ++ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -30,8 +36,8 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr 'resampler/sinc_resampler_neon.cc', diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-03 23:31:48.052742593 +0100 -@@ -128,7 +128,25 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-04 01:07:02.813235612 +0100 +@@ -128,7 +128,31 @@ { 'target_name': 'isac_neon', 'type': 'static_library', @@ -39,6 +45,12 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], ++ 'cflags_c!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'cflags_cc!': [ ++ '-mfpu=vfpv3-d16', ++ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -60,8 +72,8 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr ], diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-03 23:31:58.455581865 +0100 -@@ -260,7 +260,25 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-04 01:06:58.455302835 +0100 +@@ -260,7 +260,31 @@ 'targets': [{ 'target_name': 'audio_processing_neon', 'type': 'static_library', @@ -69,6 +81,12 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], ++ 'cflags_c!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'cflags_cc!': [ ++ '-mfpu=vfpv3-d16', ++ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -90,7 +108,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr ], diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-03 23:32:09.217415589 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-04 01:06:53.268382845 +0100 @@ -47,7 +47,7 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ 'video_processing_sse2', ], @@ -100,7 +118,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr 'dependencies': [ 'video_processing_neon', ], }], ], -@@ -77,12 +77,30 @@ +@@ -77,12 +77,36 @@ }, ], }], @@ -114,6 +132,12 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], ++ 'cflags_c!': [ ++ '-mfpu=vfpv3-d16', ++ ], ++ 'cflags_cc!': [ ++ '-mfpu=vfpv3-d16', ++ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { From 5a6a0f35cb4e89e19c5e4d05eb4a87267bbb95d4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 01:43:18 +0100 Subject: [PATCH 120/437] Revert "webrtc: also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc" This reverts commit 4621b92128c653cc6780f8598eff4251a082debe. That did not help either. --- qt5-qtwebengine.spec | 4 +- ...ine-opensource-src-5.7.1-webrtc-neon.patch | 40 ++++--------------- 2 files changed, 9 insertions(+), 35 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 01800d6..0e2fe66 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -82,7 +82,6 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # * fix video_processing.gypi to only build NEON files when actually requested # (i.e., not if arm_neon=0 arm_neon_optional=0). # * inline arm_neon.gypi because gyp is not picking up flags from the include -# * also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc for NEON targets # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. Patch7: qtwebengine-opensource-src-5.7.1-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) @@ -470,8 +469,7 @@ popd - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) -- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it, - also remove -mfpu=vfpv3-d16 from cflags_c and cflags_cc for NEON targets +- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch index d8494de..094521a 100644 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch @@ -1,7 +1,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-04 01:07:09.731128900 +0100 -@@ -217,7 +217,31 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 +@@ -217,7 +217,25 @@ { 'target_name': 'common_audio_neon', 'type': 'static_library', @@ -9,12 +9,6 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], -+ 'cflags_c!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'cflags_cc!': [ -+ '-mfpu=vfpv3-d16', -+ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -36,8 +30,8 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr 'resampler/sinc_resampler_neon.cc', diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-04 01:07:02.813235612 +0100 -@@ -128,7 +128,31 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-03 23:31:48.052742593 +0100 +@@ -128,7 +128,25 @@ { 'target_name': 'isac_neon', 'type': 'static_library', @@ -45,12 +39,6 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], -+ 'cflags_c!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'cflags_cc!': [ -+ '-mfpu=vfpv3-d16', -+ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -72,8 +60,8 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr ], diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-04 01:06:58.455302835 +0100 -@@ -260,7 +260,31 @@ ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-03 23:31:58.455581865 +0100 +@@ -260,7 +260,25 @@ 'targets': [{ 'target_name': 'audio_processing_neon', 'type': 'static_library', @@ -81,12 +69,6 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], -+ 'cflags_c!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'cflags_cc!': [ -+ '-mfpu=vfpv3-d16', -+ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { @@ -108,7 +90,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr ], diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi --- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-04 01:06:53.268382845 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-03 23:32:09.217415589 +0100 @@ -47,7 +47,7 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ 'video_processing_sse2', ], @@ -118,7 +100,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr 'dependencies': [ 'video_processing_neon', ], }], ], -@@ -77,12 +77,36 @@ +@@ -77,12 +77,30 @@ }, ], }], @@ -132,12 +114,6 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webr + 'cflags!': [ + '-mfpu=vfpv3-d16', + ], -+ 'cflags_c!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'cflags_cc!': [ -+ '-mfpu=vfpv3-d16', -+ ], + 'conditions': [ + # "-mfpu=neon" is not required for arm64 in GCC. + ['target_arch!="arm64"', { From 49294d050a1a7c952753460c926de79c9e4f1f7a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 01:45:39 +0100 Subject: [PATCH 121/437] Try unsetting CXXFLAGS between qmake and make --- qt5-qtwebengine.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0e2fe66..6be67be 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -351,6 +351,10 @@ pushd %{_target_platform} %{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu use_system_protobuf" .. +# if we keep this set here, gyp picks up duplicate flags +unset CXXFLAGS +export CXXFLAGS + # workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} @@ -470,6 +474,7 @@ popd - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) - webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it +- Try unsetting CXXFLAGS between qmake and make * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version From d477ef3e55f038fd88ea8246873b47496df9dfc8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 02:24:41 +0100 Subject: [PATCH 122/437] Revert "Fix/update patch name" This reverts commit 16832997c61f9b3a2ac86f5355f0df3c1ae4c128. It turns out this workaround is apparently not needed. --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6be67be..c2d4d30 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -83,7 +83,7 @@ Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # (i.e., not if arm_neon=0 arm_neon_optional=0). # * inline arm_neon.gypi because gyp is not picking up flags from the include # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. -Patch7: qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix missing ARM -mfpu setting (see the comment in the no-neon patch above) From ea36556d89bb97fc90884d8032f218e2ec3b783f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 02:29:16 +0100 Subject: [PATCH 123/437] Revert "webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it" This reverts commit 3cf84c39fcce3194f47be3883be1079247ce9787. It turns out this workaround is apparently not needed. --- qt5-qtwebengine.spec | 10 +- ...ine-opensource-src-5.7.0-webrtc-neon.patch | 21 +++ ...ine-opensource-src-5.7.1-webrtc-neon.patch | 135 ------------------ 3 files changed, 25 insertions(+), 141 deletions(-) create mode 100644 qtwebengine-opensource-src-5.7.0-webrtc-neon.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-webrtc-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c2d4d30..87a15c6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -34,7 +34,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 2%{?dist} +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -78,10 +78,9 @@ Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch -# fix ARM NEON handling in webrtc gyp files: -# * fix video_processing.gypi to only build NEON files when actually requested -# (i.e., not if arm_neon=0 arm_neon_optional=0). -# * inline arm_neon.gypi because gyp is not picking up flags from the include +# fix ARM NEON handling in webrtc gyp files +# For now, fix video_processing.gypi to only build NEON files when actually +# requested (i.e., not if arm_neon=0 arm_neon_optional=0). # We still need to figure out why the flag tweaks from arm_neon.gypi don't work. Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) @@ -473,7 +472,6 @@ popd - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) -- webrtc: Inline arm_neon.gypi because gyp is not picking up flags from it - Try unsetting CXXFLAGS between qmake and make * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 diff --git a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch new file mode 100644 index 0000000..33e0df9 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch @@ -0,0 +1,21 @@ +diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi +--- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-05-26 15:53:47.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-07-18 14:29:24.841980563 +0200 +@@ -47,7 +47,7 @@ + ['target_arch=="ia32" or target_arch=="x64"', { + 'dependencies': [ 'video_processing_sse2', ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'dependencies': [ 'video_processing_neon', ], + }], + ], +@@ -77,7 +77,7 @@ + }, + ], + }], +- ['target_arch=="arm" or target_arch == "arm64"', { ++ ['build_with_neon==1', { + 'targets': [ + { + 'target_name': 'video_processing_neon', diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch deleted file mode 100644 index 094521a..0000000 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/common_audio/common_audio.gyp 2016-12-03 23:31:30.509013652 +0100 -@@ -217,7 +217,25 @@ - { - 'target_name': 'common_audio_neon', - 'type': 'static_library', -- 'includes': ['../build/arm_neon.gypi',], -+ 'cflags!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'conditions': [ -+ # "-mfpu=neon" is not required for arm64 in GCC. -+ ['target_arch!="arm64"', { -+ 'cflags': [ -+ '-mfpu=neon', -+ ], -+ }], -+ # Disable GCC LTO on NEON targets due to compiler bug. -+ # TODO(fdegans): Enable this. See crbug.com/408997. -+ ['clang==0 and use_lto==1', { -+ 'cflags!': [ -+ '-flto', -+ '-ffat-lto-objects', -+ ], -+ }], -+ ], - 'sources': [ - 'fir_filter_neon.cc', - 'resampler/sinc_resampler_neon.cc', -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi 2016-12-03 23:31:48.052742593 +0100 -@@ -128,7 +128,25 @@ - { - 'target_name': 'isac_neon', - 'type': 'static_library', -- 'includes': ['../../../../build/arm_neon.gypi',], -+ 'cflags!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'conditions': [ -+ # "-mfpu=neon" is not required for arm64 in GCC. -+ ['target_arch!="arm64"', { -+ 'cflags': [ -+ '-mfpu=neon', -+ ], -+ }], -+ # Disable GCC LTO on NEON targets due to compiler bug. -+ # TODO(fdegans): Enable this. See crbug.com/408997. -+ ['clang==0 and use_lto==1', { -+ 'cflags!': [ -+ '-flto', -+ '-ffat-lto-objects', -+ ], -+ }], -+ ], - 'dependencies': [ - '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', - ], -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/audio_processing.gypi 2016-12-03 23:31:58.455581865 +0100 -@@ -260,7 +260,25 @@ - 'targets': [{ - 'target_name': 'audio_processing_neon', - 'type': 'static_library', -- 'includes': ['../../build/arm_neon.gypi',], -+ 'cflags!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'conditions': [ -+ # "-mfpu=neon" is not required for arm64 in GCC. -+ ['target_arch!="arm64"', { -+ 'cflags': [ -+ '-mfpu=neon', -+ ], -+ }], -+ # Disable GCC LTO on NEON targets due to compiler bug. -+ # TODO(fdegans): Enable this. See crbug.com/408997. -+ ['clang==0 and use_lto==1', { -+ 'cflags!': [ -+ '-flto', -+ '-ffat-lto-objects', -+ ], -+ }], -+ ], - 'dependencies': [ - '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', - ], -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-12-03 23:32:09.217415589 +0100 -@@ -47,7 +47,7 @@ - ['target_arch=="ia32" or target_arch=="x64"', { - 'dependencies': [ 'video_processing_sse2', ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'dependencies': [ 'video_processing_neon', ], - }], - ], -@@ -77,12 +77,30 @@ - }, - ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'targets': [ - { - 'target_name': 'video_processing_neon', - 'type': 'static_library', -- 'includes': [ '../../build/arm_neon.gypi', ], -+ 'cflags!': [ -+ '-mfpu=vfpv3-d16', -+ ], -+ 'conditions': [ -+ # "-mfpu=neon" is not required for arm64 in GCC. -+ ['target_arch!="arm64"', { -+ 'cflags': [ -+ '-mfpu=neon', -+ ], -+ }], -+ # Disable GCC LTO on NEON targets due to compiler bug. -+ # TODO(fdegans): Enable this. See crbug.com/408997. -+ ['clang==0 and use_lto==1', { -+ 'cflags!': [ -+ '-flto', -+ '-ffat-lto-objects', -+ ], -+ }], -+ ], - 'sources': [ - 'util/denoiser_filter_neon.cc', - 'util/denoiser_filter_neon.h', From 14b292e6b26ee9ac83ebf98f3e864f12cb63a088 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 02:31:47 +0100 Subject: [PATCH 124/437] Bump Release, changelog date, update webrtc-neon patch comment --- qt5-qtwebengine.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 87a15c6..a16dd88 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -34,7 +34,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -79,9 +79,8 @@ Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch # fix ARM NEON handling in webrtc gyp files -# For now, fix video_processing.gypi to only build NEON files when actually -# requested (i.e., not if arm_neon=0 arm_neon_optional=0). -# We still need to figure out why the flag tweaks from arm_neon.gypi don't work. +# Fix video_processing.gypi to only build NEON files when actually requested +# (i.e., not if arm_neon=0 arm_neon_optional=0). Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch # don't require the time zone detection API backported from ICU 55 (thanks spot) Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch @@ -467,7 +466,7 @@ popd %changelog -* Sat Dec 03 2016 Kevin Kofler - 5.7.1-2 +* Sun Dec 04 2016 Kevin Kofler - 5.7.1-2 - clean_qtwebengine.sh: Rip out openh264 sources - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 From 4d98042d03c85251e42d994f2fb2314cf5dba707 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 02:33:27 +0100 Subject: [PATCH 125/437] Also set and unset CFLAGS --- qt5-qtwebengine.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a16dd88..5d3fe7c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -338,6 +338,11 @@ sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build +export CFLAGS="%{optflags}" +%ifnarch x86_64 +# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 +export CFLAGS=`echo "$CFLAGS" | sed -e 's/ -g / -g1 /g'` +%endif export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" %ifnarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 @@ -349,7 +354,9 @@ pushd %{_target_platform} %{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu use_system_protobuf" .. -# if we keep this set here, gyp picks up duplicate flags +# if we keep these set here, gyp picks up duplicate flags +unset CFLAGS +export CFLAGS unset CXXFLAGS export CXXFLAGS @@ -471,7 +478,7 @@ popd - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) -- Try unsetting CXXFLAGS between qmake and make +- Set CFLAGS, unset both CFLAGS and CXXFLAGS between qmake and make * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version From 6f435b9ab64a5910af66496c599e13809dfd4fcb Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 15:17:22 +0100 Subject: [PATCH 126/437] Fix FTBFS due to missing ARM CPU feature detection routines - chromium-skia: build SkUtilsArm.cpp also on non-Android ARM - webrtc: backport CPU feature detection for ARM Linux, enable it for Chromium --- qt5-qtwebengine.spec | 9 + ...ngine-opensource-src-5.7.1-skia-neon.patch | 15 ++ ...nsource-src-5.7.1-webrtc-neon-detect.patch | 159 ++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 qtwebengine-opensource-src-5.7.1-skia-neon.patch create mode 100644 qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5d3fe7c..5167cd8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -88,6 +88,11 @@ Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch # remove Android depenencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch +# chromium-skia: build SkUtilsArm.cpp also on non-Android ARM +Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch +# webrtc: backport https://codereview.webrtc.org/1820133002/ "Implement CPU +# feature detection for ARM Linux." and enable the detection also for Chromium +Patch12: qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -317,6 +322,8 @@ BuildArch: noarch %patch7 -p1 -b .webrtc-neon %patch8 -p1 -b .system-icu54 %patch10 -p1 -b .openmax-dl-neon +%patch11 -p1 -b .skia-neon +%patch12 -p1 -b .webrtc-neon-detect # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -479,6 +486,8 @@ popd - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 - Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) - Set CFLAGS, unset both CFLAGS and CXXFLAGS between qmake and make +- chromium-skia: build SkUtilsArm.cpp also on non-Android ARM +- webrtc: backport CPU feature detection for ARM Linux, enable it for Chromium * Thu Nov 10 2016 Helio Chissini de Castro - 5.7.1-1 - New upstream version diff --git a/qtwebengine-opensource-src-5.7.1-skia-neon.patch b/qtwebengine-opensource-src-5.7.1-skia-neon.patch new file mode 100644 index 0000000..c9b385b --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-skia-neon.patch @@ -0,0 +1,15 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi 2016-12-04 14:34:12.531877529 +0100 +@@ -159,6 +159,11 @@ + '../build/android/ndk.gyp:cpu_features', + ], + }], ++ [ 'OS != "android" and target_arch == "arm"', { ++ 'sources': [ ++ '../third_party/skia/src/core/SkUtilsArm.cpp', ++ ], ++ }], + [ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', { + 'dependencies': [ + '../build/linux/system.gyp:fontconfig', diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch new file mode 100644 index 0000000..325b869 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch @@ -0,0 +1,159 @@ +diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-12-04 15:06:23.886224907 +0100 +@@ -133,6 +133,8 @@ + #"WEBRTC_CLOCK_TYPE_REALTIME", + ] + ++ deps += [ ":cpu_features_linux" ] ++ + libs += [ "rt" ] + } + +@@ -206,3 +208,14 @@ + ] + } + } ++ ++if (is_linux) { ++ source_set("cpu_features_linux") { ++ sources = [ ++ "source/cpu_features_linux.c", ++ ] ++ ++ configs += [ "..:common_config" ] ++ public_configs = [ "..:common_inherited_config" ] ++ } ++} +diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-12-04 15:05:24.150142787 +0100 +@@ -7,6 +7,7 @@ + # be found in the AUTHORS file in the root of the source tree. + + { ++ 'includes': [ '../build/common.gypi', ], + 'conditions': [ + ['OS=="android"', { + 'targets': [ +@@ -21,6 +22,20 @@ + ], + }, + ], ++ }], ++ ['OS=="linux"', { ++ 'targets': [ ++ { ++ 'target_name': 'cpu_features_linux', ++ 'type': 'static_library', ++ 'sources': [ ++ 'source/cpu_features_linux.c', ++ ], ++ 'dependencies': [ ++ '<(webrtc_root)/common.gyp:webrtc_common', ++ ], ++ }, ++ ], + }], + ], # conditions + } +diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 2016-12-04 15:05:24.150142787 +0100 +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. ++ * ++ * Use of this source code is governed by a BSD-style license ++ * that can be found in the LICENSE file in the root of the source ++ * tree. An additional intellectual property rights grant can be found ++ * in the file PATENTS. All contributing project authors may ++ * be found in the AUTHORS file in the root of the source tree. ++ */ ++ ++#include ++#include ++#include ++#if __GLIBC_PREREQ(2, 16) ++#include ++#else ++#include ++#include ++#include ++#include ++#endif ++#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" ++ ++#if defined(WEBRTC_ARCH_ARM_FAMILY) ++#include ++ ++uint64_t WebRtc_GetCPUFeaturesARM(void) { ++ uint64_t result = 0; ++ int architecture = 0; ++ unsigned long hwcap = 0; ++ const char* platform = NULL; ++#if __GLIBC_PREREQ(2, 16) ++ hwcap = getauxval(AT_HWCAP); ++ platform = (const char*)getauxval(AT_PLATFORM); ++#else ++ ElfW(auxv_t) auxv; ++ int fd = open("/proc/self/auxv", O_RDONLY); ++ if (fd >= 0) { ++ while (hwcap == 0 || platform == NULL) { ++ if (read(fd, &auxv, sizeof(auxv)) < (ssize_t)sizeof(auxv)) { ++ if (errno == EINTR) ++ continue; ++ break; ++ } ++ switch (auxv.a_type) { ++ case AT_HWCAP: ++ hwcap = auxv.a_un.a_val; ++ break; ++ case AT_PLATFORM: ++ platform = (const char*)auxv.a_un.a_val; ++ break; ++ } ++ } ++ close(fd); ++ } ++#endif // __GLIBC_PREREQ(2,16) ++#if defined(__aarch64__) ++ architecture = 8; ++ if ((hwcap & HWCAP_FP) != 0) ++ result |= kCPUFeatureVFPv3; ++ if ((hwcap & HWCAP_ASIMD) != 0) ++ result |= kCPUFeatureNEON; ++#else ++ if (platform != NULL) { ++ /* expect a string in the form "v6l" or "v7l", etc. ++ */ ++ if (platform[0] == 'v' && '0' <= platform[1] && platform[1] <= '9' && ++ (platform[2] == 'l' || platform[2] == 'b')) { ++ architecture = platform[1] - '0'; ++ } ++ } ++ if ((hwcap & HWCAP_VFPv3) != 0) ++ result |= kCPUFeatureVFPv3; ++ if ((hwcap & HWCAP_NEON) != 0) ++ result |= kCPUFeatureNEON; ++#endif ++ if (architecture >= 7) ++ result |= kCPUFeatureARMv7; ++ if (architecture >= 6) ++ result |= kCPUFeatureLDREXSTREX; ++ return result; ++} ++#endif // WEBRTC_ARCH_ARM_FAMILY +diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-12-04 15:09:09.323684522 +0100 +@@ -143,6 +143,9 @@ + # Define this if the Linux system does not support CLOCK_MONOTONIC. + #'WEBRTC_CLOCK_TYPE_REALTIME', + ], ++ 'dependencies': [ ++ 'cpu_features_webrtc.gyp:cpu_features_linux', ++ ], + 'link_settings': { + 'libraries': [ '-lrt', ], + }, From 4dfda4a3a4f99a492eeafa80f4d5ee7ee377abf3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 4 Dec 2016 22:37:02 +0100 Subject: [PATCH 127/437] Ship the license files * Sun Dec 04 2016 Kevin Kofler - 5.7.1-3 - Ship the license files --- qt5-qtwebengine.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5167cd8..5f477c6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -34,7 +34,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -341,6 +341,9 @@ cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro %endif +# copy the Chromium license so it is installed with the appropriate name +cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium + %build export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" @@ -398,6 +401,7 @@ popd %postun -p /sbin/ldconfig %files +%license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess @@ -480,6 +484,9 @@ popd %changelog +* Sun Dec 04 2016 Kevin Kofler - 5.7.1-3 +- Ship the license files + * Sun Dec 04 2016 Kevin Kofler - 5.7.1-2 - clean_qtwebengine.sh: Rip out openh264 sources - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted From 42f1d9c8a11e4753f6c8362cc7173d72e1c51971 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 8 Dec 2016 17:25:25 +0100 Subject: [PATCH 128/437] Remove dropped (upstreamed) patches Note: the page-margins patch is NOT actually upstream in the snapshot that is currently imported. It is in the latest one though. I am respinning the package with the fixed tarball. --- ...engine-opensource-src-5.7.0-glibc224.patch | 33 --------------- ...ne-opensource-src-5.7.0-page-margins.patch | 40 ------------------- 2 files changed, 73 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.7.0-glibc224.patch delete mode 100644 qtwebengine-opensource-src-5.7.0-page-margins.patch diff --git a/qtwebengine-opensource-src-5.7.0-glibc224.patch b/qtwebengine-opensource-src-5.7.0-glibc224.patch deleted file mode 100644 index 773781a..0000000 --- a/qtwebengine-opensource-src-5.7.0-glibc224.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b12ffcd411d4776f7120ccecb3be34344d930d2b Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Tue, 9 Aug 2016 16:21:29 +0200 -Subject: Do not depend on Linux 4.5 - -Avoid using MADV_FREE that was only recently added to Linux. It will fail when -run on older Linux kernels. - -Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0 -Reviewed-by: Peter Varga ---- - chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp -index 121b687..be7c3b9 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp -@@ -39,6 +39,11 @@ - - #include - -+#if OS(LINUX) && defined(MADV_FREE) -+// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime -+#undef MADV_FREE -+#endif -+ - #ifndef MADV_FREE - #define MADV_FREE MADV_DONTNEED - #endif --- -cgit v1.0-4-g1e03 - diff --git a/qtwebengine-opensource-src-5.7.0-page-margins.patch b/qtwebengine-opensource-src-5.7.0-page-margins.patch deleted file mode 100644 index 17b05f1..0000000 --- a/qtwebengine-opensource-src-5.7.0-page-margins.patch +++ /dev/null @@ -1,40 +0,0 @@ -From fbf32f1208e6d6556779ac955825ff7b6bf6a807 Mon Sep 17 00:00:00 2001 -From: Kevin Kofler -Date: Fri, 9 Sep 2016 03:20:17 +0200 -Subject: [PATCH] Apply the correct page margins from the QPageLayout to - Chromium printing - -If one passes a QPageLayout to printToPDF, surely one expects the margin -settings contained in it to actually get applied. - -This is a partial backport of the much larger 5.8 commit -af2535018b1553e351198f3d9c21538de1c328a1 (by Michael Bruning), limited -to only the margin fix. ---- - src/core/print_view_manager_qt.cpp | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/core/print_view_manager_qt.cpp b/src/core/print_view_manager_qt.cpp -index 4cb0e06..b773c24 100644 ---- a/src/core/print_view_manager_qt.cpp -+++ b/src/core/print_view_manager_qt.cpp -@@ -115,6 +115,16 @@ static void applyQPageLayoutSettingsToDictionary(const QPageLayout& pageLayout, - sizeDict->SetInteger(printing::kSettingMediaSizeHeightMicrons, pageSizeInMilimeter.height() * kMicronsToMillimeter); - print_settings.Set(printing::kSettingMediaSize, std::move(sizeDict)); - -+ // Apply page margins -+ QMargins pageMarginsInPoints = pageLayout.marginsPoints(); -+ scoped_ptr marginsDict(new base::DictionaryValue); -+ marginsDict->SetInteger(printing::kSettingMarginTop, pageMarginsInPoints.top()); -+ marginsDict->SetInteger(printing::kSettingMarginBottom, pageMarginsInPoints.bottom()); -+ marginsDict->SetInteger(printing::kSettingMarginLeft, pageMarginsInPoints.left()); -+ marginsDict->SetInteger(printing::kSettingMarginRight, pageMarginsInPoints.right()); -+ print_settings.Set(printing::kSettingMarginsCustom, std::move(marginsDict)); -+ print_settings.SetInteger(printing::kSettingMarginsType, printing::CUSTOM_MARGINS); -+ - print_settings.SetBoolean(printing::kSettingLandscape, pageLayout.orientation() == QPageLayout::Landscape); - - // The following are standard settings that Chromium expects to be set. --- -2.1.0 - From 80fa434918709db914e3e80e6b827b0cfe241669 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 8 Dec 2016 18:14:20 +0100 Subject: [PATCH 129/437] Respun tarball, change qt5-qtbase dependency from >= to = * Thu Dec 08 2016 Kevin Kofler - 5.7.1-4 - Respun tarball (now really includes the page margin fix) - Change qt5-qtbase dependency from >= to = --- qt5-qtwebengine.spec | 12 ++++++++---- sources | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5f477c6..279f113 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -34,7 +34,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -86,7 +86,7 @@ Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix missing ARM -mfpu setting (see the comment in the no-neon patch above) Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch -# remove Android depenencies from openmax_dl ARM NEON detection (detect.c) +# remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch # chromium-skia: build SkUtilsArm.cpp also on non-Android ARM Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch @@ -274,7 +274,7 @@ Provides: bundled(v8) = 4.9.385.33 # see src/3rdparty/chromium/v8/src/third_party/fdlibm/README.v8 for the version Provides: bundled(fdlibm) = 5.3 -%{?_qt5_version:Requires: qt5-qtbase%{?_isa} >= %{_qt5_version}} +%{?_qt5_version:Requires: qt5-qtbase%{?_isa} = %{_qt5_version}} %description @@ -484,6 +484,10 @@ popd %changelog +* Thu Dec 08 2016 Kevin Kofler - 5.7.1-4 +- Respun tarball (now really includes the page margin fix) +- Change qt5-qtbase dependency from >= to = + * Sun Dec 04 2016 Kevin Kofler - 5.7.1-3 - Ship the license files @@ -491,7 +495,7 @@ popd - clean_qtwebengine.sh: Rip out openh264 sources - Rebase no-neon patch, add new arm-fpu-fix patch where no-neon not wanted - Try enabling arm_neon unconditionally, #1282495 should be fixed even in F23 -- Remove Android depenencies from openmax_dl ARM NEON detection (detect.c) +- Remove Android dependencies from openmax_dl ARM NEON detection (detect.c) - Set CFLAGS, unset both CFLAGS and CXXFLAGS between qmake and make - chromium-skia: build SkUtilsArm.cpp also on non-Android ARM - webrtc: backport CPU feature detection for ARM Linux, enable it for Chromium diff --git a/sources b/sources index 5853d7b..7782518 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -06eece6ef299548641326447e3c7c356 qtwebengine-opensource-src-5.7.1-clean.tar.xz +323e546bcefd533a973bc07c94793bb8 qtwebengine-opensource-src-5.7.1-clean.tar.xz From 75f724aa7ec8e3b6aeb1a79a112c562459f9fa6d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 2 Jan 2017 08:42:30 -0600 Subject: [PATCH 130/437] filter (designer) plugin provides --- qt5-qtwebengine.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 279f113..3ec6fa8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -30,11 +30,13 @@ %global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ # exclude libv8.so (i686, it's static everywhere else) %global __requires_exclude ^libv8\\.so$ +# and designer plugins +%global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -484,6 +486,9 @@ popd %changelog +* Mon Jan 02 2017 Rex Dieter - 5.7.1-5 +- filter (designer) plugin provides + * Thu Dec 08 2016 Kevin Kofler - 5.7.1-4 - Respun tarball (now really includes the page margin fix) - Change qt5-qtbase dependency from >= to = From 533a8425b8f8809b4e12a8a9cd19597c5f324588 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 26 Jan 2017 11:06:30 -0700 Subject: [PATCH 131/437] Rebuild for protobuf 3.2.0 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3ec6fa8..104017b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -486,6 +486,9 @@ popd %changelog +* Thu Jan 26 2017 Orion Poplawski - 5.7.1-6 +- Rebuild for protobuf 3.2.0 + * Mon Jan 02 2017 Rex Dieter - 5.7.1-5 - filter (designer) plugin provides From 3adf37e4ac5a4a8b542a434ee4d8c5560a461fd8 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 1 Feb 2017 19:30:29 +0100 Subject: [PATCH 132/437] Rebuild (libwebp) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 104017b..7fb15da 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -486,6 +486,9 @@ popd %changelog +* Wed Feb 01 2017 Sandro Mani - 5.7.1-7 +- Rebuild (libwebp) + * Thu Jan 26 2017 Orion Poplawski - 5.7.1-6 - Rebuild for protobuf 3.2.0 From 61c97e991402a58841982f60e0493a6409cff1f5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 11:22:48 +0000 Subject: [PATCH 133/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7fb15da..29bc598 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.7.1 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -486,6 +486,9 @@ popd %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 5.7.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Feb 01 2017 Sandro Mani - 5.7.1-7 - Rebuild (libwebp) From 944ce122ee2926089f8a2ec17e39b75e3b0d1ff8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 26 Mar 2017 21:48:05 +0200 Subject: [PATCH 134/437] Update to 5.8.0 - Fix FTBFS in the WTF part of Blink/WebKit with GCC 7 --- .gitignore | 1 + clean_ffmpeg.sh | 18 +- qt5-qtwebengine.spec | 100 +- ...ensource-src-5.6.0-beta-system-icu54.patch | 12 - ...nsource-src-5.7.0-system-nspr-prtime.patch | 48 - ...nsource-src-5.7.1-webrtc-neon-detect.patch | 159 - ...bengine-opensource-src-5.8.0-no-sse2.patch | 3323 +++++++++-------- ...ine-opensource-src-5.8.0-pdfium-gcc7.patch | 600 +++ ...-opensource-src-5.8.0-system-icu-utf.patch | 92 +- ...nsource-src-5.8.0-system-nspr-prtime.patch | 48 + ...bengine-opensource-src-5.8.0-v8-gcc7.patch | 71 + ...nsource-src-5.8.0-webrtc-neon-detect.patch | 32 + ...engine-opensource-src-5.8.0-wtf-gcc7.patch | 12 + sources | 2 +- 14 files changed, 2645 insertions(+), 1873 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch delete mode 100644 qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch rename qtwebengine-opensource-src-5.7.0-no-sse2.patch => qtwebengine-opensource-src-5.8.0-no-sse2.patch (60%) create mode 100644 qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch rename qtwebengine-opensource-src-5.7.0-system-icu-utf.patch => qtwebengine-opensource-src-5.8.0-system-icu-utf.patch (72%) create mode 100644 qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch create mode 100644 qtwebengine-opensource-src-5.8.0-v8-gcc7.patch create mode 100644 qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch create mode 100644 qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch diff --git a/.gitignore b/.gitignore index 75650cf..0983a72 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /qtwebengine-opensource-src-5.6.1-clean.tar.xz /qtwebengine-opensource-src-5.7.0-clean.tar.xz /qtwebengine-opensource-src-5.7.1-clean.tar.xz +/qtwebengine-opensource-src-5.8.0-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index cfb37e4..af4c3ef 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright 2013 Tomas Popela -# Copyright 2016 Kevin Kofler +# Copyright 2016-2017 Kevin Kofler # 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 @@ -174,10 +174,14 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/x86/fft_init.c \ libavcodec/x86/h264_intrapred_init.c \ libavcodec/x86/hpeldsp_init.c \ + libavcodec/x86/videodsp_init.c \ + libavcodec/x86/vorbisdsp_init.c \ libavcodec/x86/vp3dsp_init.c \ libavcodec/x86/vp8dsp_init.c \ libavutil/x86/autorename_libavutil_x86_cpu.c \ libavutil/x86/autorename_libavutil_x86_float_dsp_init.c \ + libavutil/x86/cpu.c \ + libavutil/x86/float_dsp_init.c \ libavutil/x86/lls_init.c \ libavcodec/x86/deinterlace.asm \ libavcodec/x86/fft.asm \ @@ -211,6 +215,18 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/vp8.c \ libavcodec/vp8_parser.c \ libavcodec/vp8dsp.c \ + libavutil/cpu.c \ + libavutil/arm/cpu.c \ + libavutil/arm/float_dsp_neon.S \ + libavformat/options.c \ + libavformat/pcm.c \ + libavformat/utils.c \ + libavcodec/utils.c \ + libavcodec/aarch64/hpeldsp_neon.S \ + libavcodec/aarch64/h264pred_neon.S \ + libavcodec/arm/vorbisdsp_neon.S \ + libavcodec/arm/mdct_neon.S \ + libavcodec/arm/fft_neon.S \ chromium/ffmpeg_stub_headers.fragment \ chromium/ffmpegsumo.sigs" diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 29bc598..773e7d1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -4,7 +4,7 @@ %global _hardened_build 1 # define to build docs, need to undef this for bootstrapping -# where qt5-qttools builds are not yet available +# where qt5-qttools (qt5-doctools) builds are not yet available # only primary archs (for now), allow secondary to bootstrap %ifarch %{arm} %{ix86} x86_64 %global docs 1 @@ -35,8 +35,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.7.1 -Release: 8%{?dist} +Version: 5.8.0 +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -44,8 +44,8 @@ Release: 8%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.7/5.7.0/submodules/qtwebengine-opensource-src-5.7.0.tar.xz -# ./clean_qtwebengine.sh 5.7.0 +# wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz +# ./clean_qtwebengine.sh 5.8.0 Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -68,33 +68,43 @@ Patch3: qtwebengine-opensource-src-5.7.1-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch4: qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch +Patch4: qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch5: qtwebengine-opensource-src-5.7.0-system-icu-utf.patch +Patch5: qtwebengine-opensource-src-5.8.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch6: qtwebengine-opensource-src-5.7.0-no-sse2.patch +# TODO: For 5.9, we will need the GN files updated (where not done yet), too. +Patch6: qtwebengine-opensource-src-5.8.0-no-sse2.patch # fix ARM NEON handling in webrtc gyp files # Fix video_processing.gypi to only build NEON files when actually requested # (i.e., not if arm_neon=0 arm_neon_optional=0). Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch -# don't require the time zone detection API backported from ICU 55 (thanks spot) -Patch8: qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch # fix missing ARM -mfpu setting (see the comment in the no-neon patch above) Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch # chromium-skia: build SkUtilsArm.cpp also on non-Android ARM Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch -# webrtc: backport https://codereview.webrtc.org/1820133002/ "Implement CPU -# feature detection for ARM Linux." and enable the detection also for Chromium -Patch12: qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch +# webrtc: enable the CPU feature detection for ARM Linux also for Chromium +Patch12: qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch +# fix FTBFS in V8 with GCC 7 (by Ben Noordhuis, backported from Chromium RPM) +Patch13: qtwebengine-opensource-src-5.8.0-v8-gcc7.patch +# fix FTBFS in PDFium with GCC 7: backport upstream cleanup removing that code +# https://codereview.chromium.org/2154503002 +Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch +# fix FTBFS in the WTF part of Blink/WebKit with GCC 7 +Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch + +%if 0%{?fedora} && 0%{?fedora} < 25 +# work around missing qt5_qtwebengine_arches macro on F24 +%{!?qt5_qtwebengine_arches:%global qt5_qtwebengine_arches %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el} +%endif # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -184,9 +194,11 @@ BuildRequires: pkgconfig(vpx) >= 1.5.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes are backported, see: -# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=49-based -Provides: bundled(chromium) = 49 +# Some security fixes (up to version 55.0.2883.75) are backported, see: +# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=53-based +# see dist/changes-5.8.0 for the version numbers (base, security fixes) and for +# a list of CVEs fixed by the added security backports +Provides: bundled(chromium) = 53.0.2785.148 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, @@ -212,7 +224,7 @@ Provides: bundled(iccjpeg) Provides: bundled(khronos_headers) # bundled as "leveldatabase" Provides: bundled(leveldb) -Provides: bundled(libjingle) = 11250 +Provides: bundled(libjingle) = 12750 %if !0%{?use_system_libvpx} # bundled as "libvpx_new" # the version in README.chromium is wrong, see @@ -224,7 +236,7 @@ Provides: bundled(libvpx) = 1.5.0 Provides: bundled(libwebp) = 0.5.0 %endif Provides: bundled(libXNVCtrl) = 302.17 -Provides: bundled(libyuv) = 1563 +Provides: bundled(libyuv) = 1579 Provides: bundled(modp_b64) Provides: bundled(mojo) # headers only @@ -271,7 +283,7 @@ Provides: bundled(nsURLParsers) # Bundled outside of third_party, apparently not considered as such by Chromium: # see src/3rdparty/chromium/v8/include/v8_version.h for the version number -Provides: bundled(v8) = 4.9.385.33 +Provides: bundled(v8) = 5.3.332.47 # bundled by v8 (src/3rdparty/chromium/v8/src/third_party/fdlibm) # see src/3rdparty/chromium/v8/src/third_party/fdlibm/README.v8 for the version Provides: bundled(fdlibm) = 5.3 @@ -300,8 +312,13 @@ Summary: Example files for %{name} %if 0%{?docs} %package doc Summary: API documentation for %{name} -BuildRequires: qt5-qhelpgenerator -BuildRequires: qt5-qdoc +BuildRequires: qt5-doctools +BuildRequires: qt5-qtbase-doc +Requires: qt5-qtbase-doc +BuildRequires: qt5-qtxmlpatterns-doc +Requires: qt5-qtxmlpatterns-doc +BuildRequires: qt5-qtdeclarative-doc +Requires: qt5-qtdeclarative-doc BuildArch: noarch %description doc %{summary}. @@ -322,10 +339,12 @@ BuildArch: noarch %patch5 -p1 -b .system-icu-utf %patch6 -p1 -b .no-sse2 %patch7 -p1 -b .webrtc-neon -%patch8 -p1 -b .system-icu54 %patch10 -p1 -b .openmax-dl-neon %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect +%patch13 -p1 -b .v8-gcc7 +%patch14 -p1 -b .pdfium-gcc7 +%patch15 -p1 -b .wtf-gcc7 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -343,6 +362,14 @@ cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro %endif +# generate qtwebengine-3rdparty.qdoc, it is missing from the tarball +pushd src/3rdparty +python chromium/tools/licenses.py \ + --file-template ../../tools/about_credits.tmpl \ + --entry-template ../../tools/about_credits_entry.tmpl \ + credits >../webengine/doc/src/qtwebengine-3rdparty.qdoc +popd + # copy the Chromium license so it is installed with the appropriate name cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium @@ -372,7 +399,6 @@ export CFLAGS unset CXXFLAGS export CXXFLAGS -# workaround, disable parallel compilation as it fails to compile in brew make %{?_smp_mflags} %if 0%{?docs} @@ -387,6 +413,14 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} %endif +# hardlink files to {_bindir} +mkdir %{buildroot}%{_bindir} +pushd %{buildroot}%{_qt5_bindir} +for i in * ; do + ln -v ${i} %{buildroot}%{_bindir}/${i} +done +popd + ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt5_libdir} @@ -405,6 +439,8 @@ popd %files %license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* +%{_bindir}/qwebengine_convert_dict +%{_qt5_bindir}/qwebengine_convert_dict %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess %ifarch %{ix86} @@ -486,6 +522,24 @@ popd %changelog +* Tue Mar 07 2017 Kevin Kofler - 5.8.0-2 +- Fix FTBFS in the WTF part of Blink/WebKit with GCC 7 + +* Mon Mar 06 2017 Kevin Kofler - 5.8.0-1 +- Update to 5.8.0 +- Update version numbers of bundled stuff +- Rebase (unfuzz) system-nspr-prtime and system-icu-utf patches +- Drop system-icu54 patch, ICU 5.4 no longer supported +- Rebase the webrtc-neon-detect patch (backported portions no longer needed) +- Rebase the no-sse2 patch +- Update clean_ffmpeg.sh: autorename* files now #include the unrenamed ones +- Update -docs BuildRequires and Requires (Helio Castro) +- Fix FTBFS in V8 with GCC 7 (by Ben Noordhuis, backported from Chromium RPM) +- Fix FTBFS in PDFium with GCC 7: backport upstream cleanup removing that code +- Generate qtwebengine-3rdparty.qdoc, it is missing from the tarball +- Work around missing qt5_qtwebengine_arches macro on F24 +- Upstream added a qwebengine_convert_dict executable, package it + * Sat Feb 11 2017 Fedora Release Engineering - 5.7.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch b/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch deleted file mode 100644 index 7366f6a..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-system-icu54.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc ---- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2015-12-10 18:17:21.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-system-icu54/src/3rdparty/chromium/content/browser/time_zone_monitor.cc 2016-01-08 23:40:36.387525597 +0100 -@@ -22,7 +22,7 @@ - - void TimeZoneMonitor::NotifyRenderers() { - DCHECK_CURRENTLY_ON(BrowserThread::UI); --#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 54 -+#if defined(OS_CHROMEOS) || U_ICU_VERSION_MAJOR_NUM < 55 - // On CrOS and older ICU versions, ICU's default tz is already set to a new zone. - // No need to redetect it with detectHostTimeZone(). - scoped_ptr new_zone(icu::TimeZone::createDefault()); diff --git a/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch deleted file mode 100644 index 04933fc..0000000 --- a/qtwebengine-opensource-src-5.7.0-system-nspr-prtime.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/base.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-07-17 16:52:03.641799106 +0200 -@@ -634,8 +634,6 @@ - 'third_party/dmg_fp/g_fmt.cc', - 'third_party/icu/icu_utf.cc', - 'third_party/icu/icu_utf.h', -- 'third_party/nspr/prtime.cc', -- 'third_party/nspr/prtime.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'thread_task_runner_handle.cc', -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 16:52:03.642799111 +0200 -@@ -743,8 +743,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "thread_task_runner_handle.cc", - "thread_task_runner_handle.h", -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2016-07-17 16:55:11.749868819 +0200 -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/base/time/time.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2016-07-17 16:55:54.895115802 +0200 -@@ -14,7 +14,7 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "build/build_config.h" - - namespace base { diff --git a/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch deleted file mode 100644 index 325b869..0000000 --- a/qtwebengine-opensource-src-5.7.1-webrtc-neon-detect.patch +++ /dev/null @@ -1,159 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2016-12-04 15:06:23.886224907 +0100 -@@ -133,6 +133,8 @@ - #"WEBRTC_CLOCK_TYPE_REALTIME", - ] - -+ deps += [ ":cpu_features_linux" ] -+ - libs += [ "rt" ] - } - -@@ -206,3 +208,14 @@ - ] - } - } -+ -+if (is_linux) { -+ source_set("cpu_features_linux") { -+ sources = [ -+ "source/cpu_features_linux.c", -+ ] -+ -+ configs += [ "..:common_config" ] -+ public_configs = [ "..:common_inherited_config" ] -+ } -+} -diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/cpu_features_webrtc.gyp 2016-12-04 15:05:24.150142787 +0100 -@@ -7,6 +7,7 @@ - # be found in the AUTHORS file in the root of the source tree. - - { -+ 'includes': [ '../build/common.gypi', ], - 'conditions': [ - ['OS=="android"', { - 'targets': [ -@@ -21,6 +22,20 @@ - ], - }, - ], -+ }], -+ ['OS=="linux"', { -+ 'targets': [ -+ { -+ 'target_name': 'cpu_features_linux', -+ 'type': 'static_library', -+ 'sources': [ -+ 'source/cpu_features_linux.c', -+ ], -+ 'dependencies': [ -+ '<(webrtc_root)/common.gyp:webrtc_common', -+ ], -+ }, -+ ], - }], - ], # conditions - } -diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/source/cpu_features_linux.c 2016-12-04 15:05:24.150142787 +0100 -@@ -0,0 +1,83 @@ -+/* -+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include -+#include -+#include -+#if __GLIBC_PREREQ(2, 16) -+#include -+#else -+#include -+#include -+#include -+#include -+#endif -+#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" -+ -+#if defined(WEBRTC_ARCH_ARM_FAMILY) -+#include -+ -+uint64_t WebRtc_GetCPUFeaturesARM(void) { -+ uint64_t result = 0; -+ int architecture = 0; -+ unsigned long hwcap = 0; -+ const char* platform = NULL; -+#if __GLIBC_PREREQ(2, 16) -+ hwcap = getauxval(AT_HWCAP); -+ platform = (const char*)getauxval(AT_PLATFORM); -+#else -+ ElfW(auxv_t) auxv; -+ int fd = open("/proc/self/auxv", O_RDONLY); -+ if (fd >= 0) { -+ while (hwcap == 0 || platform == NULL) { -+ if (read(fd, &auxv, sizeof(auxv)) < (ssize_t)sizeof(auxv)) { -+ if (errno == EINTR) -+ continue; -+ break; -+ } -+ switch (auxv.a_type) { -+ case AT_HWCAP: -+ hwcap = auxv.a_un.a_val; -+ break; -+ case AT_PLATFORM: -+ platform = (const char*)auxv.a_un.a_val; -+ break; -+ } -+ } -+ close(fd); -+ } -+#endif // __GLIBC_PREREQ(2,16) -+#if defined(__aarch64__) -+ architecture = 8; -+ if ((hwcap & HWCAP_FP) != 0) -+ result |= kCPUFeatureVFPv3; -+ if ((hwcap & HWCAP_ASIMD) != 0) -+ result |= kCPUFeatureNEON; -+#else -+ if (platform != NULL) { -+ /* expect a string in the form "v6l" or "v7l", etc. -+ */ -+ if (platform[0] == 'v' && '0' <= platform[1] && platform[1] <= '9' && -+ (platform[2] == 'l' || platform[2] == 'b')) { -+ architecture = platform[1] - '0'; -+ } -+ } -+ if ((hwcap & HWCAP_VFPv3) != 0) -+ result |= kCPUFeatureVFPv3; -+ if ((hwcap & HWCAP_NEON) != 0) -+ result |= kCPUFeatureNEON; -+#endif -+ if (architecture >= 7) -+ result |= kCPUFeatureARMv7; -+ if (architecture >= 6) -+ result |= kCPUFeatureLDREXSTREX; -+ return result; -+} -+#endif // WEBRTC_ARCH_ARM_FAMILY -diff -Nur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2016-12-04 15:09:09.323684522 +0100 -@@ -143,6 +143,9 @@ - # Define this if the Linux system does not support CLOCK_MONOTONIC. - #'WEBRTC_CLOCK_TYPE_REALTIME', - ], -+ 'dependencies': [ -+ 'cpu_features_webrtc.gyp:cpu_features_linux', -+ ], - 'link_settings': { - 'libraries': [ '-lrt', ], - }, diff --git a/qtwebengine-opensource-src-5.7.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch similarity index 60% rename from qtwebengine-opensource-src-5.7.0-no-sse2.patch rename to qtwebengine-opensource-src-5.8.0-no-sse2.patch index a49b6d7..5e323e1 100644 --- a/qtwebengine-opensource-src-5.7.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.8.0-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2016-07-17 18:06:28.022746102 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-03-05 17:26:14.507159420 +0100 @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -30,10 +30,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/breakpad/src/bu ], 'ldflags': [ '-m32', -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/build/common.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2016-07-17 18:06:28.025746118 +0200 -@@ -3898,15 +3898,7 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2017-03-05 17:26:14.612157862 +0100 +@@ -3861,15 +3861,7 @@ # value used during computation does not change depending on # how the compiler optimized the code, since the value is # always kept in its specified precision. @@ -49,14 +49,14 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/build/common.gy '-m32', ], 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2016-07-17 19:24:47.069349645 +0200 -@@ -528,13 +528,6 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-03-05 17:38:41.416050535 +0100 +@@ -537,13 +537,6 @@ "trees/tree_synchronizer.h", ] -- if (target_cpu == "x86" || target_cpu == "x64") { +- if (current_cpu == "x86" || current_cpu == "x64") { - sources += [ - "raster/texture_compressor_etc1_sse.cc", - "raster/texture_compressor_etc1_sse.h", @@ -66,7 +66,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtw configs += [ "//build/config:precompiled_headers" ] public_deps = [ -@@ -544,6 +537,7 @@ +@@ -553,6 +546,7 @@ deps = [ "//base", "//base/third_party/dynamic_annotations", @@ -74,7 +74,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtw "//cc/proto", "//cc/surfaces:surface_id", "//gpu", -@@ -563,6 +557,36 @@ +@@ -581,6 +575,36 @@ } } @@ -85,7 +85,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtw +} + +source_set("cc_opts_sse") { -+ if (target_cpu == "x86" || target_cpu == "x64") { ++ if (current_cpu == "x86" || current_cpu == "x64") { + deps = [ + "//base", + ] @@ -111,10 +111,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/BUILD.gn qtw source_set("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2016-07-17 19:23:10.962834059 +0200 -@@ -595,14 +595,6 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2017-03-05 17:26:26.081987615 +0100 +@@ -602,14 +602,6 @@ 'includes': [ '../build/android/increase_size_for_speed.gypi', ], @@ -129,7 +129,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp qtweb }, { # GN version: "//cc/proto" -@@ -667,6 +659,7 @@ +@@ -678,6 +670,7 @@ '<(DEPTH)/ui/events/events.gyp:events_base', '<(DEPTH)/ui/gfx/gfx.gyp:gfx', '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', @@ -137,7 +137,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp qtweb ], 'defines': [ 'CC_SURFACES_IMPLEMENTATION=1', -@@ -704,5 +697,41 @@ +@@ -714,5 +707,41 @@ '../build/android/increase_size_for_speed.gypi', ], }, @@ -179,10 +179,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/cc/cc.gyp qtweb + }, ], } -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2016-07-17 18:06:36.080790050 +0200 -@@ -279,13 +279,13 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-03-05 17:26:26.082987600 +0100 +@@ -312,13 +312,13 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -201,8 +201,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUIL - deps += [ ":media_yasm" ] } - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] -@@ -484,10 +484,47 @@ + if (is_linux || is_win) { +@@ -534,10 +534,47 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -250,19 +250,19 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/BUIL "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/media.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2016-07-17 18:06:36.080790050 +0200 -@@ -11,6 +11,8 @@ - #include "base/synchronization/lock.h" +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-03-05 17:44:02.063267153 +0100 +@@ -10,6 +10,8 @@ + #include "base/metrics/field_trial.h" #include "base/trace_event/trace_event.h" - #include "build/build_config.h" + #include "media/base/media_switches.h" +#include "media/base/sinc_resampler.h" +#include "media/base/vector_math.h" #include "media/base/yuv_convert.h" - #if !defined(MEDIA_DISABLE_FFMPEG) -@@ -29,6 +31,8 @@ + #if defined(OS_ANDROID) +@@ -40,6 +42,8 @@ TRACE_EVENT_WARMUP_CATEGORY("media"); // Perform initialization of libraries which require runtime CPU detection. @@ -271,9 +271,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/medi InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2016-07-17 19:32:39.210872688 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-03-05 17:26:26.083987585 +0100 @@ -65,6 +65,17 @@ int rgbstride, YUVType yuv_type); @@ -336,9 +336,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, const uint8_t* u_buf, const uint8_t* v_buf, -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2016-07-17 18:06:36.101790164 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-03-05 17:26:26.167986340 +0100 @@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be @@ -363,9 +363,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2016-07-17 19:36:04.063964591 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-03-05 17:26:26.167986340 +0100 @@ -47,6 +47,34 @@ EmptyRegisterState(); } @@ -401,9 +401,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd void ConvertYUVToRGB32_SSE(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2016-07-17 19:37:17.605356580 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-03-05 17:26:26.167986340 +0100 @@ -20,6 +20,12 @@ int source_width, uint8_t source_y_fraction); @@ -417,9 +417,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2016-07-17 19:37:56.249562560 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-03-05 17:26:26.167986340 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -500,9 +500,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2016-07-17 18:06:36.111790219 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-03-05 17:26:26.168986325 +0100 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -554,9 +554,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2016-07-17 18:06:36.112790224 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-03-05 17:26:26.168986325 +0100 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -676,9 +676,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/simd + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2016-07-17 19:40:18.772322232 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-03-05 17:26:26.168986325 +0100 @@ -81,17 +81,12 @@ #include #include @@ -789,10 +789,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2016-07-17 18:06:36.163790503 +0200 -@@ -35,6 +35,10 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-03-05 17:26:26.169986310 +0100 +@@ -36,6 +36,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -803,9 +803,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2016-07-17 18:06:36.171790546 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-03-05 17:26:26.169986310 +0100 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -824,10 +824,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2016-07-17 19:41:45.620785149 +0200 -@@ -9,6 +9,7 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-03-05 17:26:26.169986310 +0100 +@@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" @@ -835,7 +835,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc #include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" -@@ -164,6 +165,10 @@ +@@ -166,6 +167,10 @@ static const double kKernelInterpolationFactor = 0.5; TEST(SincResamplerTest, Convolve) { @@ -846,9 +846,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/sinc // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2016-07-17 18:06:36.173790557 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-03-05 17:26:26.170986295 +0100 @@ -7,12 +7,17 @@ #include @@ -1036,9 +1036,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2016-07-17 18:06:36.174790563 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-03-05 17:26:26.170986295 +0100 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1051,18 +1051,18 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2016-07-17 19:43:25.736318783 +0200 -@@ -3,6 +3,7 @@ - // found in the LICENSE file. +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-03-05 17:26:26.171986280 +0100 +@@ -5,6 +5,7 @@ + #include #include "base/macros.h" +#include "base/cpu.h" #include "base/memory/aligned_memory.h" - #include "base/memory/scoped_ptr.h" #include "base/time/time.h" -@@ -81,15 +82,11 @@ + #include "build/build_config.h" +@@ -82,15 +83,11 @@ DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); }; @@ -1079,7 +1079,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect #endif // Benchmark for each optimized vector_math::FMAC() method. -@@ -98,6 +95,9 @@ +@@ -99,6 +96,9 @@ RunBenchmark( vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); #if defined(FMAC_FUNC) @@ -1089,7 +1089,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect // Benchmark FMAC_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -111,12 +111,24 @@ +@@ -112,12 +112,24 @@ #endif } @@ -1114,7 +1114,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect // Benchmark FMUL_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -130,6 +142,14 @@ +@@ -131,6 +143,14 @@ #endif } @@ -1129,7 +1129,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { // Benchmark EWMAAndMaxPower_C(). -@@ -138,6 +158,9 @@ +@@ -139,6 +159,9 @@ "vector_math_ewma_and_max_power", "unoptimized"); #if defined(EWMAAndMaxPower_FUNC) @@ -1139,16 +1139,16 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -155,4 +178,6 @@ +@@ -156,4 +179,6 @@ #endif } +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2016-07-17 18:06:36.193790666 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-03-05 17:26:26.171986280 +0100 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1158,18 +1158,18 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2016-07-17 19:44:10.094555220 +0200 -@@ -7,6 +7,7 @@ - #include +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-03-05 17:26:26.172986265 +0100 +@@ -9,6 +9,7 @@ + #include #include "base/macros.h" +#include "base/cpu.h" #include "base/memory/aligned_memory.h" - #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" -@@ -77,6 +78,7 @@ + #include "base/strings/stringize_macros.h" +@@ -78,6 +79,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1177,7 +1177,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMAC_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMAC_SSE( -@@ -118,6 +120,7 @@ +@@ -119,6 +121,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1185,7 +1185,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMUL_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMUL_SSE( -@@ -226,6 +229,7 @@ +@@ -227,6 +230,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1193,10 +1193,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2016-07-17 18:06:36.196790682 +0200 -@@ -33,7 +33,7 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-03-05 17:26:26.173986250 +0100 +@@ -32,7 +32,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1205,7 +1205,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ #if defined(COMPILER_MSVC) #include #else -@@ -134,7 +134,7 @@ +@@ -133,7 +133,7 @@ // Empty SIMD registers state after using them. void EmptyRegisterStateStub() {} @@ -1214,7 +1214,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ void EmptyRegisterStateIntrinsic() { _mm_empty(); } #endif typedef void (*EmptyRegisterStateProc)(); -@@ -248,34 +248,46 @@ +@@ -247,34 +247,46 @@ // Assembly code confuses MemorySanitizer. Also not available in iOS builds. #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ !defined(OS_IOS) @@ -1278,10 +1278,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2016-07-17 19:48:57.702119844 +0200 -@@ -69,6 +69,29 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-03-05 17:26:26.173986250 +0100 +@@ -71,6 +71,29 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1311,7 +1311,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -159,9 +182,32 @@ +@@ -161,9 +184,32 @@ } #endif @@ -1347,7 +1347,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -188,6 +234,32 @@ +@@ -190,6 +236,32 @@ kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1380,7 +1380,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -213,7 +285,6 @@ +@@ -215,7 +287,6 @@ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1388,10 +1388,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2016-07-17 18:06:36.201790710 +0200 -@@ -635,6 +635,37 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-03-05 17:26:26.174986235 +0100 +@@ -643,6 +643,37 @@ EXPECT_EQ(0, error); } @@ -1429,7 +1429,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -666,9 +697,40 @@ +@@ -674,9 +705,40 @@ kWidth * kBpp)); } @@ -1473,7 +1473,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -703,6 +765,40 @@ +@@ -711,6 +773,40 @@ kWidth * kBpp)); } @@ -1514,15 +1514,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -736,7 +832,6 @@ +@@ -744,7 +840,6 @@ rgb_bytes_converted.get(), kWidth * kBpp)); } -#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { - scoped_ptr src(new uint8_t[16]); -@@ -753,6 +848,30 @@ + std::unique_ptr src(new uint8_t[16]); +@@ -761,6 +856,30 @@ } } @@ -1553,7 +1553,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { base::CPU cpu; if (!cpu.has_sse2()) { -@@ -774,6 +893,38 @@ +@@ -782,6 +901,38 @@ } } @@ -1592,10 +1592,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2016-07-17 19:52:10.846175461 +0200 -@@ -907,6 +907,26 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-03-05 17:26:26.175986220 +0100 +@@ -805,6 +805,26 @@ "//base", "//ui/gfx/geometry", ] @@ -1622,10 +1622,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/BUILD.gn } # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2016-07-17 18:06:36.231790873 +0200 -@@ -1138,12 +1138,12 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2017-03-05 17:51:56.424188330 +0100 +@@ -1020,12 +1020,12 @@ ['target_arch=="ia32" or target_arch=="x64"', { 'dependencies': [ 'media_asm', @@ -1641,7 +1641,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp ], }], ['OS!="linux" and OS!="win"', { -@@ -1712,6 +1712,11 @@ +@@ -1616,6 +1616,11 @@ 'USE_NEON' ], }], @@ -1652,8 +1652,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp + }], ], }, - ], -@@ -1723,6 +1728,7 @@ + { +@@ -1633,6 +1638,7 @@ 'type': 'static_library', 'sources': [ 'base/simd/convert_rgb_to_yuv_ssse3.asm', @@ -1661,11 +1661,11 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp 'base/simd/convert_yuv_to_rgb_sse.asm', 'base/simd/convert_yuva_to_argb_mmx.asm', 'base/simd/empty_register_state_mmx.asm', -@@ -1803,6 +1809,75 @@ +@@ -1713,6 +1719,75 @@ '../third_party/yasm/yasm_compile.gypi', ], }, -+ { ++ { + # GN version: //media/base:media_mmx + 'target_name': 'media_mmx', + 'type': 'static_library', @@ -1736,11 +1736,11 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/media/media.gyp + }, ], # targets }], - ['OS=="android"', { -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2016-07-17 19:56:57.665743057 +0200 -@@ -307,11 +307,6 @@ + ['OS=="win"', { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-03-05 17:56:08.829413581 +0100 +@@ -329,11 +329,6 @@ if (!is_ios) { sources += [ "ext/platform_canvas.cc" ] } @@ -1752,10 +1752,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn q # The skia gypi values are relative to the skia_dir, so we need to rebase. sources += gypi_skia_core.sources -@@ -597,7 +592,15 @@ - ] - - if (current_cpu == "x86" || current_cpu == "x64") { +@@ -642,7 +637,15 @@ + if (skia_build_no_opts) { + sources = gypi_skia_opts.none_sources + } else if (current_cpu == "x86" || current_cpu == "x64") { - sources = gypi_skia_opts.sse2_sources + sources = gypi_skia_opts.sse2_sources + + [ @@ -1769,7 +1769,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn q deps += [ ":skia_opts_avx", ":skia_opts_avx2", -@@ -632,6 +635,13 @@ +@@ -677,6 +680,13 @@ if (mips_dsp_rev >= 1) { sources = gypi_skia_opts.mips_dsp_sources @@ -1783,9 +1783,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/BUILD.gn q } else { sources = gypi_skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2016-07-17 18:06:40.213812591 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-03-05 17:26:26.176986205 +0100 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1804,9 +1804,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convol #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convolver.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2016-07-17 20:01:19.498174087 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-03-05 17:26:26.239985269 +0100 @@ -11,6 +11,7 @@ #include @@ -1815,9 +1815,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/ext/convol #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2016-07-17 18:06:40.215812602 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-03-05 17:26:26.239985269 +0100 @@ -9,6 +9,7 @@ { 'dependencies': [ @@ -1826,7 +1826,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrom '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', ], -@@ -66,22 +67,16 @@ +@@ -67,22 +68,16 @@ 'ext/skia_utils_base.cc', ], }], @@ -1854,9 +1854,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_chrom ], 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2016-07-17 18:06:40.215812602 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2017-03-05 17:26:26.239985269 +0100 @@ -128,6 +128,37 @@ # targets that are not dependent upon the component type 'targets': [ @@ -1894,10 +1894,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia.gyp q + { 'target_name': 'image_operations_bench', # The optimize: 'max' scattered throughout are particularly - # important when compiled by MSVC 2013, which seems -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2016-07-17 18:06:40.216812607 +0200 + # important when compiled by MSVC 2013, which seems +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-03-05 17:26:26.239985269 +0100 @@ -19,10 +19,22 @@ }, @@ -1943,10 +1943,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/skia/skia_libra 'sources': [ '<@(sse2_sources)' ], 'dependencies': [ 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2016-07-17 20:06:47.037962770 +0200 -@@ -27,8 +27,8 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-03-05 17:26:26.240985255 +0100 +@@ -31,8 +31,8 @@ ] if (current_cpu == "x86" || current_cpu == "x64") { @@ -1957,7 +1957,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcm } } -@@ -64,3 +64,15 @@ +@@ -75,3 +75,15 @@ public_configs = [ ":qcms_config" ] } } @@ -1973,10 +1973,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcm + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2016-07-17 20:08:22.446483691 +0200 -@@ -42,10 +42,10 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-03-05 18:01:48.843328633 +0100 +@@ -52,10 +52,10 @@ 'conditions': [ ['target_arch=="ia32" or target_arch=="x64"', { 'defines': [ @@ -1990,10 +1990,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcm ], }], ], -@@ -85,6 +85,29 @@ +@@ -68,6 +68,29 @@ }], ], - }, + }, + { + 'target_name': 'qcms_sse2', + 'type': 'static_library', @@ -2018,11 +2018,11 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/qcm + }, + }, ], - } - -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2016-07-19 00:52:57.847430161 +0200 + 'conditions': [ + ['disable_qcms == 0', { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-03-05 17:26:26.240985255 +0100 @@ -32,7 +32,7 @@ #include "wtf/MathExtras.h" #include @@ -2032,7 +2032,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web #include #endif -@@ -438,7 +438,7 @@ +@@ -575,7 +575,7 @@ // First handle linear and exponential ramps which require looking ahead to the next event. if (nextEventType == ParamEvent::LinearRampToValue) { const float valueDelta = value2 - value1; @@ -2041,7 +2041,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web // Minimize in-loop operations. Calculate starting value and increment. Next step: value += inc. // value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1); // inc = 4 / sampleRate * k * (value2 - value1); -@@ -581,7 +581,7 @@ +@@ -738,7 +738,7 @@ for (; writeIndex < fillToFrame; ++writeIndex) values[writeIndex] = target; } else { @@ -2050,7 +2050,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web // Resolve recursion by expanding constants to achieve a 4-step loop unrolling. // v1 = v0 + (t - v0) * c // v2 = v1 + (t - v1) * c -@@ -674,7 +674,7 @@ +@@ -843,7 +843,7 @@ // Render the stretched curve data using linear interpolation. Oversampled // curve data can be provided if sharp discontinuities are desired. unsigned k = 0; @@ -2059,9 +2059,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); const __m128 vCurvePointsPerFrame = _mm_set_ps1(curvePointsPerFrame); const __m128 vNumberOfCurvePointsM1 = _mm_set_ps1(numberOfCurvePoints - 1); -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2016-07-17 18:06:40.274812924 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-03-05 18:09:17.132624414 +0100 @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2072,12 +2072,12 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web #include "platform/audio/DirectConvolver.h" #if OS(MACOSX) -@@ -35,14 +38,20 @@ +@@ -35,22 +38,44 @@ #include "platform/audio/VectorMath.h" #include "wtf/CPU.h" --#if (CPU(X86) || CPU(X86_64)) && !(OS(MACOSX) || USE(WEBAUDIO_IPP)) -+#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !(OS(MACOSX) || USE(WEBAUDIO_IPP)) +-#if (CPU(X86) || CPU(X86_64)) && !OS(MACOSX) ++#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !OS(MACOSX) #include #endif @@ -2093,9 +2093,6 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web + DirectConvolver::DirectConvolver(size_t inputBlockSize) : m_inputBlockSize(inputBlockSize) - #if USE(WEBAUDIO_IPP) -@@ -50,10 +59,26 @@ - #endif // USE(WEBAUDIO_IPP) , m_buffer(inputBlockSize * 2) { +#if CPU(X86) @@ -2121,7 +2118,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web ASSERT(framesToProcess == m_inputBlockSize); if (framesToProcess != m_inputBlockSize) return; -@@ -98,7 +123,7 @@ +@@ -82,7 +107,7 @@ #endif // CPU(X86) #else size_t i = 0; @@ -2130,7 +2127,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| // are multiples of 4. If not, use the straightforward loop below. -@@ -408,7 +433,7 @@ +@@ -392,7 +417,7 @@ } destP[i++] = sum; } @@ -2139,8 +2136,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web } #endif #endif // OS(MACOSX) -@@ -418,6 +443,8 @@ - #endif +@@ -401,10 +426,14 @@ + memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); } +#ifndef BUILD_ONLY_THE_SSE2_PARTS @@ -2148,17 +2145,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web void DirectConvolver::reset() { m_buffer.zero(); -@@ -426,5 +453,7 @@ - #endif // USE(WEBAUDIO_IPP) } +#endif + } // namespace blink -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2016-07-17 20:16:19.967090904 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-03-05 17:26:26.241985240 +0100 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2166,10 +2161,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web +#include "wtf/CPU.h" #include "wtf/Noncopyable.h" - #if USE(WEBAUDIO_IPP) -@@ -57,6 +58,11 @@ - AudioFloatArray m_overlayBuffer; - #endif // USE(WEBAUDIO_IPP) + namespace blink { +@@ -50,6 +51,11 @@ + size_t m_inputBlockSize; + AudioFloatArray m_buffer; + +#if CPU(X86) @@ -2179,15 +2174,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2016-07-17 18:06:40.274812924 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-03-05 17:26:26.242985225 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2016-07-17 20:18:38.755848676 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-03-05 17:26:26.242985225 +0100 @@ -26,15 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2262,9 +2257,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. while ((reinterpret_cast(inputP) & 0x0F) && n) { CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2016-07-17 20:19:17.818061951 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-03-05 17:26:26.305984290 +0100 @@ -33,6 +33,7 @@ #include "platform/audio/AudioArray.h" #include "platform/audio/AudioSourceProvider.h" @@ -2285,15 +2280,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2016-07-17 18:06:40.282812967 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-03-05 17:26:26.305984290 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2016-07-17 18:06:40.282812967 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-03-05 17:26:26.306984275 +0100 @@ -22,6 +22,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2489,9 +2484,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web #endif // OS(MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2016-07-17 20:23:13.405325950 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-03-05 17:26:26.306984275 +0100 @@ -26,6 +26,7 @@ #define VectorMath_h @@ -2529,16 +2524,16 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2016-07-17 18:06:40.283812973 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-03-05 17:26:26.307984260 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2016-07-17 23:45:35.669652872 +0200 -@@ -379,6 +379,11 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-03-05 17:26:26.307984260 +0100 +@@ -392,6 +392,11 @@ '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', ], }], @@ -2550,7 +2545,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web ['target_arch=="arm"', { 'dependencies': [ 'blink_arm_neon', -@@ -394,6 +399,36 @@ +@@ -406,6 +411,36 @@ }], ], }, @@ -2587,9 +2582,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web # The *NEON.cpp files fail to compile when -mthumb is passed. Force # them to build in ARM mode. # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2016-07-17 18:06:40.284812978 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-03-05 17:26:26.308984245 +0100 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2599,10 +2594,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web #include -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2016-07-18 22:28:24.771187623 +0200 -@@ -422,7 +422,7 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-03-05 17:26:26.309984231 +0100 +@@ -423,7 +423,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2611,7 +2606,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -441,7 +441,7 @@ +@@ -442,7 +442,7 @@ template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2620,7 +2615,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -463,7 +463,7 @@ +@@ -464,7 +464,7 @@ template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2629,7 +2624,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -629,7 +629,7 @@ +@@ -630,7 +630,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2638,7 +2633,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -666,7 +666,7 @@ +@@ -667,7 +667,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2647,7 +2642,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); #endif for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -740,7 +740,7 @@ +@@ -741,7 +741,7 @@ // FIXME: this routine is lossy and must be removed. template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) { @@ -2656,37 +2651,37 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); #else for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2016-07-18 19:27:29.285890664 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-03-05 18:14:44.694725685 +0100 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" - #include "webrtc/common_audio/signal_processing/include/spl_inl.h" + #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" +#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" namespace webrtc { @@ -23,7 +24,15 @@ - rtc::scoped_ptr RealFourier::Create(int fft_order) { + std::unique_ptr RealFourier::Create(int fft_order) { #if defined(RTC_USE_OPENMAX_DL) +#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) + // x86 CPU detection required. + if (WebRtc_GetCPUInfo(kSSE2)) -+ return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); ++ return std::unique_ptr(new RealFourierOpenmax(fft_order)); + else -+ return rtc::scoped_ptr(new RealFourierOoura(fft_order)); ++ return std::unique_ptr(new RealFourierOoura(fft_order)); +#else - return rtc::scoped_ptr(new RealFourierOpenmax(fft_order)); + return std::unique_ptr(new RealFourierOpenmax(fft_order)); +#endif #else - return rtc::scoped_ptr(new RealFourierOoura(fft_order)); + return std::unique_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2016-07-17 18:06:40.306813098 +0200 -@@ -1302,6 +1302,8 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-03-05 17:26:26.310984216 +0100 +@@ -1345,6 +1345,8 @@ # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] @@ -2695,7 +2690,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) -@@ -1310,6 +1312,8 @@ +@@ -1353,6 +1355,8 @@ pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) else: pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) @@ -2704,49 +2699,23 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/tools/gyp/pylib # External libs have to come after objects/archives, the linker resolve them in order. pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/build/standalone.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/build/standalone.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/build/standalone.gypi 2016-07-17 20:29:04.969207948 +0200 -@@ -117,6 +117,9 @@ - }, { - 'gomadir': '>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8.gyp 2016-07-17 18:06:40.366813425 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-03-05 17:30:17.500552662 +0100 @@ -36,6 +36,14 @@ 'v8_experimental_extra_library_files%': [], 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', @@ -2886,7 +2881,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }], + ], }, - 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], + 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], 'targets': [ @@ -49,8 +57,8 @@ }, { @@ -2908,7 +2903,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -244,7 +252,7 @@ +@@ -253,7 +261,7 @@ 'toolsets': ['target'], 'dependencies': ['js2c'], }], @@ -2917,7 +2912,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -@@ -272,7 +280,7 @@ +@@ -281,7 +289,7 @@ 'natives_blob', ], }], @@ -2926,7 +2921,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -1481,7 +1489,7 @@ +@@ -1608,7 +1616,7 @@ # See http://crbug.com/485155. 'msvs_shard': 4, }], @@ -2935,10 +2930,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2016-07-17 20:34:22.753909119 +0200 -@@ -0,0 +1,2151 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 +@@ -0,0 +1,2313 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. +# Redistribution and use in source and binary forms, with or without @@ -2970,11 +2965,11 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 +{ + 'variables': { + 'v8_target_arch': 'ia32', -+ 'icu_use_data_file_flag%': 0, + 'v8_code': 1, + 'v8_random_seed%': 314159265, + 'v8_vector_stores%': 0, + 'embed_script%': "", ++ 'warmup_script%': "", + 'v8_extra_library_files%': [], + 'v8_experimental_extra_library_files%': [], + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_sse2<(EXECUTABLE_SUFFIX)', @@ -2988,7 +2983,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }], + ], + }, -+ 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'], ++ 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], + 'targets': [ + { + 'target_name': 'v8_sse2', @@ -3007,10 +3002,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'sources': [ + # Note: on non-Windows we still build this file so that gyp + # has some sources to link into the component. -+ '../../src/v8dll-main.cc', ++ 'v8dll-main.cc', + ], + 'include_dirs': [ -+ '../..', ++ '..', + ], + 'defines': [ + 'V8_SHARED', @@ -3049,7 +3044,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + 'direct_dependent_settings': { + 'include_dirs': [ -+ '../../include', ++ '../include', + ], + }, + }, @@ -3131,7 +3126,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'v8_base_sse2', + ], + 'include_dirs+': [ -+ '../..', ++ '..', + ], + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', @@ -3145,16 +3140,24 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'action_name': 'v8_sse2_run_mksnapshot', + 'inputs': [ + '<(mksnapshot_exec)', -+ '<(embed_script)', ++ ], ++ 'conditions': [ ++ ['embed_script!=""', { ++ 'inputs': [ ++ '<(embed_script)', ++ ], ++ }], ++ ['warmup_script!=""', { ++ 'inputs': [ ++ '<(warmup_script)', ++ ], ++ }], + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', + ], + 'variables': { -+ 'mksnapshot_flags': [ -+ '--log-snapshot-positions', -+ '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', -+ ], ++ 'mksnapshot_flags': [], + 'conditions': [ + ['v8_random_seed!=0', { + 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], @@ -3169,6 +3172,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(mksnapshot_flags)', + '--startup_src', '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', + '<(embed_script)', ++ '<(warmup_script)', + ], + }, + ], @@ -3180,14 +3184,14 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'v8_base_sse2', + ], + 'include_dirs+': [ -+ '../..', ++ '..', + ], + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', -+ '../../src/snapshot/snapshot-empty.cc', ++ 'snapshot/snapshot-empty.cc', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { @@ -3242,11 +3246,11 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'v8_base_sse2', + ], + 'include_dirs+': [ -+ '../..', ++ '..', + ], + 'sources': [ -+ '../../src/snapshot/natives-external.cc', -+ '../../src/snapshot/snapshot-external.cc', ++ 'snapshot/natives-external.cc', ++ 'snapshot/snapshot-external.cc', + ], + 'actions': [ + { @@ -3255,10 +3259,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<(mksnapshot_exec)', + ], + 'variables': { -+ 'mksnapshot_flags': [ -+ '--log-snapshot-positions', -+ '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', -+ ], ++ 'mksnapshot_flags': [], + 'conditions': [ + ['v8_random_seed!=0', { + 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], @@ -3269,6 +3270,16 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + }, + 'conditions': [ ++ ['embed_script!=""', { ++ 'inputs': [ ++ '<(embed_script)', ++ ], ++ }], ++ ['warmup_script!=""', { ++ 'inputs': [ ++ '<(warmup_script)', ++ ], ++ }], + ['want_separate_host_toolset==1', { + 'target_conditions': [ + ['_toolset=="host"', { @@ -3280,6 +3291,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(mksnapshot_flags)', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', + '<(embed_script)', ++ '<(warmup_script)', + ], + }, { + 'outputs': [ @@ -3290,6 +3302,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(mksnapshot_flags)', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', ++ '<(warmup_script)', + ], + }], + ], @@ -3302,6 +3315,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<@(mksnapshot_flags)', + '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', + '<(embed_script)', ++ '<(warmup_script)', + ], + }], + ], @@ -3315,753 +3329,819 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'type': 'static_library', + 'dependencies': [ + 'v8_libbase_sse2', ++ 'v8_libsampler_sse2', + ], + 'variables': { + 'optimize': 'max', + }, + 'include_dirs+': [ -+ '../..', -+ # To be able to find base/trace_event/common/trace_event_common.h -+ '../../..', -+ ], -+ 'defines': [ -+ # TODO(jochen): Remove again after this is globally turned on. -+ 'V8_IMMINENT_DEPRECATION_WARNINGS', ++ '..', ++ '<(DEPTH)', + ], + 'sources': [ ### gcmole(all) ### -+ '../../include/v8-debug.h', -+ '../../include/v8-experimental.h', -+ '../../include/v8-platform.h', -+ '../../include/v8-profiler.h', -+ '../../include/v8-testing.h', -+ '../../include/v8-util.h', -+ '../../include/v8-version.h', -+ '../../include/v8.h', -+ '../../include/v8config.h', -+ '../../src/accessors.cc', -+ '../../src/accessors.h', -+ '../../src/address-map.cc', -+ '../../src/address-map.h', -+ '../../src/allocation.cc', -+ '../../src/allocation.h', -+ '../../src/allocation-site-scopes.cc', -+ '../../src/allocation-site-scopes.h', -+ '../../src/api-experimental.cc', -+ '../../src/api-experimental.h', -+ '../../src/api.cc', -+ '../../src/api.h', -+ '../../src/api-natives.cc', -+ '../../src/api-natives.h', -+ '../../src/arguments.cc', -+ '../../src/arguments.h', -+ '../../src/assembler.cc', -+ '../../src/assembler.h', -+ '../../src/assert-scope.h', -+ '../../src/assert-scope.cc', -+ '../../src/ast/ast-expression-rewriter.cc', -+ '../../src/ast/ast-expression-rewriter.h', -+ '../../src/ast/ast-expression-visitor.cc', -+ '../../src/ast/ast-expression-visitor.h', -+ '../../src/ast/ast-literal-reindexer.cc', -+ '../../src/ast/ast-literal-reindexer.h', -+ '../../src/ast/ast-numbering.cc', -+ '../../src/ast/ast-numbering.h', -+ '../../src/ast/ast-value-factory.cc', -+ '../../src/ast/ast-value-factory.h', -+ '../../src/ast/ast.cc', -+ '../../src/ast/ast.h', -+ '../../src/ast/modules.cc', -+ '../../src/ast/modules.h', -+ '../../src/ast/prettyprinter.cc', -+ '../../src/ast/prettyprinter.h', -+ '../../src/ast/scopeinfo.cc', -+ '../../src/ast/scopeinfo.h', -+ '../../src/ast/scopes.cc', -+ '../../src/ast/scopes.h', -+ '../../src/ast/variables.cc', -+ '../../src/ast/variables.h', -+ '../../src/atomic-utils.h', -+ '../../src/background-parsing-task.cc', -+ '../../src/background-parsing-task.h', -+ '../../src/bailout-reason.cc', -+ '../../src/bailout-reason.h', -+ '../../src/basic-block-profiler.cc', -+ '../../src/basic-block-profiler.h', -+ '../../src/bignum-dtoa.cc', -+ '../../src/bignum-dtoa.h', -+ '../../src/bignum.cc', -+ '../../src/bignum.h', -+ '../../src/bit-vector.cc', -+ '../../src/bit-vector.h', -+ '../../src/bootstrapper.cc', -+ '../../src/bootstrapper.h', -+ '../../src/builtins.cc', -+ '../../src/builtins.h', -+ '../../src/cached-powers.cc', -+ '../../src/cached-powers.h', -+ '../../src/cancelable-task.cc', -+ '../../src/cancelable-task.h', -+ '../../src/char-predicates.cc', -+ '../../src/char-predicates-inl.h', -+ '../../src/char-predicates.h', -+ '../../src/checks.h', -+ '../../src/code-factory.cc', -+ '../../src/code-factory.h', -+ '../../src/code-stubs.cc', -+ '../../src/code-stubs.h', -+ '../../src/code-stubs-hydrogen.cc', -+ '../../src/codegen.cc', -+ '../../src/codegen.h', -+ '../../src/compilation-cache.cc', -+ '../../src/compilation-cache.h', -+ '../../src/compilation-dependencies.cc', -+ '../../src/compilation-dependencies.h', -+ '../../src/compilation-statistics.cc', -+ '../../src/compilation-statistics.h', -+ '../../src/compiler/access-builder.cc', -+ '../../src/compiler/access-builder.h', -+ '../../src/compiler/access-info.cc', -+ '../../src/compiler/access-info.h', -+ '../../src/compiler/all-nodes.cc', -+ '../../src/compiler/all-nodes.h', -+ '../../src/compiler/ast-graph-builder.cc', -+ '../../src/compiler/ast-graph-builder.h', -+ '../../src/compiler/ast-loop-assignment-analyzer.cc', -+ '../../src/compiler/ast-loop-assignment-analyzer.h', -+ '../../src/compiler/basic-block-instrumentor.cc', -+ '../../src/compiler/basic-block-instrumentor.h', -+ '../../src/compiler/branch-elimination.cc', -+ '../../src/compiler/branch-elimination.h', -+ '../../src/compiler/bytecode-branch-analysis.cc', -+ '../../src/compiler/bytecode-branch-analysis.h', -+ '../../src/compiler/bytecode-graph-builder.cc', -+ '../../src/compiler/bytecode-graph-builder.h', -+ '../../src/compiler/change-lowering.cc', -+ '../../src/compiler/change-lowering.h', -+ '../../src/compiler/c-linkage.cc', -+ '../../src/compiler/coalesced-live-ranges.cc', -+ '../../src/compiler/coalesced-live-ranges.h', -+ '../../src/compiler/code-generator-impl.h', -+ '../../src/compiler/code-generator.cc', -+ '../../src/compiler/code-generator.h', -+ '../../src/compiler/code-stub-assembler.cc', -+ '../../src/compiler/code-stub-assembler.h', -+ '../../src/compiler/common-node-cache.cc', -+ '../../src/compiler/common-node-cache.h', -+ '../../src/compiler/common-operator-reducer.cc', -+ '../../src/compiler/common-operator-reducer.h', -+ '../../src/compiler/common-operator.cc', -+ '../../src/compiler/common-operator.h', -+ '../../src/compiler/control-builders.cc', -+ '../../src/compiler/control-builders.h', -+ '../../src/compiler/control-equivalence.cc', -+ '../../src/compiler/control-equivalence.h', -+ '../../src/compiler/control-flow-optimizer.cc', -+ '../../src/compiler/control-flow-optimizer.h', -+ '../../src/compiler/dead-code-elimination.cc', -+ '../../src/compiler/dead-code-elimination.h', -+ '../../src/compiler/diamond.h', -+ '../../src/compiler/escape-analysis.cc', -+ '../../src/compiler/escape-analysis.h', -+ "../../src/compiler/escape-analysis-reducer.cc", -+ "../../src/compiler/escape-analysis-reducer.h", -+ '../../src/compiler/fast-accessor-assembler.cc', -+ '../../src/compiler/fast-accessor-assembler.h', -+ '../../src/compiler/frame.cc', -+ '../../src/compiler/frame.h', -+ '../../src/compiler/frame-elider.cc', -+ '../../src/compiler/frame-elider.h', -+ "../../src/compiler/frame-states.cc", -+ "../../src/compiler/frame-states.h", -+ '../../src/compiler/gap-resolver.cc', -+ '../../src/compiler/gap-resolver.h', -+ '../../src/compiler/graph-reducer.cc', -+ '../../src/compiler/graph-reducer.h', -+ '../../src/compiler/graph-replay.cc', -+ '../../src/compiler/graph-replay.h', -+ '../../src/compiler/graph-trimmer.cc', -+ '../../src/compiler/graph-trimmer.h', -+ '../../src/compiler/graph-visualizer.cc', -+ '../../src/compiler/graph-visualizer.h', -+ '../../src/compiler/graph.cc', -+ '../../src/compiler/graph.h', -+ '../../src/compiler/greedy-allocator.cc', -+ '../../src/compiler/greedy-allocator.h', -+ '../../src/compiler/instruction-codes.h', -+ '../../src/compiler/instruction-selector-impl.h', -+ '../../src/compiler/instruction-selector.cc', -+ '../../src/compiler/instruction-selector.h', -+ '../../src/compiler/instruction-scheduler.cc', -+ '../../src/compiler/instruction-scheduler.h', -+ '../../src/compiler/instruction.cc', -+ '../../src/compiler/instruction.h', -+ '../../src/compiler/interpreter-assembler.cc', -+ '../../src/compiler/interpreter-assembler.h', -+ '../../src/compiler/js-builtin-reducer.cc', -+ '../../src/compiler/js-builtin-reducer.h', -+ '../../src/compiler/js-call-reducer.cc', -+ '../../src/compiler/js-call-reducer.h', -+ '../../src/compiler/js-context-relaxation.cc', -+ '../../src/compiler/js-context-relaxation.h', -+ '../../src/compiler/js-context-specialization.cc', -+ '../../src/compiler/js-context-specialization.h', -+ '../../src/compiler/js-frame-specialization.cc', -+ '../../src/compiler/js-frame-specialization.h', -+ '../../src/compiler/js-generic-lowering.cc', -+ '../../src/compiler/js-generic-lowering.h', -+ '../../src/compiler/js-global-object-specialization.cc', -+ '../../src/compiler/js-global-object-specialization.h', -+ '../../src/compiler/js-graph.cc', -+ '../../src/compiler/js-graph.h', -+ '../../src/compiler/js-inlining.cc', -+ '../../src/compiler/js-inlining.h', -+ '../../src/compiler/js-inlining-heuristic.cc', -+ '../../src/compiler/js-inlining-heuristic.h', -+ '../../src/compiler/js-intrinsic-lowering.cc', -+ '../../src/compiler/js-intrinsic-lowering.h', -+ '../../src/compiler/js-native-context-specialization.cc', -+ '../../src/compiler/js-native-context-specialization.h', -+ '../../src/compiler/js-operator.cc', -+ '../../src/compiler/js-operator.h', -+ '../../src/compiler/js-typed-lowering.cc', -+ '../../src/compiler/js-typed-lowering.h', -+ '../../src/compiler/jump-threading.cc', -+ '../../src/compiler/jump-threading.h', -+ '../../src/compiler/linkage.cc', -+ '../../src/compiler/linkage.h', -+ '../../src/compiler/liveness-analyzer.cc', -+ '../../src/compiler/liveness-analyzer.h', -+ '../../src/compiler/live-range-separator.cc', -+ '../../src/compiler/live-range-separator.h', -+ '../../src/compiler/load-elimination.cc', -+ '../../src/compiler/load-elimination.h', -+ '../../src/compiler/loop-analysis.cc', -+ '../../src/compiler/loop-analysis.h', -+ '../../src/compiler/loop-peeling.cc', -+ '../../src/compiler/loop-peeling.h', -+ '../../src/compiler/machine-operator-reducer.cc', -+ '../../src/compiler/machine-operator-reducer.h', -+ '../../src/compiler/machine-operator.cc', -+ '../../src/compiler/machine-operator.h', -+ '../../src/compiler/move-optimizer.cc', -+ '../../src/compiler/move-optimizer.h', -+ '../../src/compiler/node-aux-data.h', -+ '../../src/compiler/node-cache.cc', -+ '../../src/compiler/node-cache.h', -+ '../../src/compiler/node-marker.cc', -+ '../../src/compiler/node-marker.h', -+ '../../src/compiler/node-matchers.cc', -+ '../../src/compiler/node-matchers.h', -+ '../../src/compiler/node-properties.cc', -+ '../../src/compiler/node-properties.h', -+ '../../src/compiler/node.cc', -+ '../../src/compiler/node.h', -+ '../../src/compiler/opcodes.cc', -+ '../../src/compiler/opcodes.h', -+ '../../src/compiler/operator-properties.cc', -+ '../../src/compiler/operator-properties.h', -+ '../../src/compiler/operator.cc', -+ '../../src/compiler/operator.h', -+ '../../src/compiler/osr.cc', -+ '../../src/compiler/osr.h', -+ '../../src/compiler/pipeline.cc', -+ '../../src/compiler/pipeline.h', -+ '../../src/compiler/pipeline-statistics.cc', -+ '../../src/compiler/pipeline-statistics.h', -+ '../../src/compiler/raw-machine-assembler.cc', -+ '../../src/compiler/raw-machine-assembler.h', -+ '../../src/compiler/register-allocator.cc', -+ '../../src/compiler/register-allocator.h', -+ '../../src/compiler/register-allocator-verifier.cc', -+ '../../src/compiler/register-allocator-verifier.h', -+ '../../src/compiler/representation-change.cc', -+ '../../src/compiler/representation-change.h', -+ '../../src/compiler/schedule.cc', -+ '../../src/compiler/schedule.h', -+ '../../src/compiler/scheduler.cc', -+ '../../src/compiler/scheduler.h', -+ '../../src/compiler/select-lowering.cc', -+ '../../src/compiler/select-lowering.h', -+ '../../src/compiler/simplified-lowering.cc', -+ '../../src/compiler/simplified-lowering.h', -+ '../../src/compiler/simplified-operator-reducer.cc', -+ '../../src/compiler/simplified-operator-reducer.h', -+ '../../src/compiler/simplified-operator.cc', -+ '../../src/compiler/simplified-operator.h', -+ '../../src/compiler/source-position.cc', -+ '../../src/compiler/source-position.h', -+ '../../src/compiler/state-values-utils.cc', -+ '../../src/compiler/state-values-utils.h', -+ '../../src/compiler/tail-call-optimization.cc', -+ '../../src/compiler/tail-call-optimization.h', -+ '../../src/compiler/type-hint-analyzer.cc', -+ '../../src/compiler/type-hint-analyzer.h', -+ '../../src/compiler/type-hints.cc', -+ '../../src/compiler/type-hints.h', -+ '../../src/compiler/typer.cc', -+ '../../src/compiler/typer.h', -+ '../../src/compiler/value-numbering-reducer.cc', -+ '../../src/compiler/value-numbering-reducer.h', -+ '../../src/compiler/verifier.cc', -+ '../../src/compiler/verifier.h', -+ '../../src/compiler/wasm-compiler.cc', -+ '../../src/compiler/wasm-compiler.h', -+ '../../src/compiler/wasm-linkage.cc', -+ '../../src/compiler/zone-pool.cc', -+ '../../src/compiler/zone-pool.h', -+ '../../src/compiler.cc', -+ '../../src/compiler.h', -+ '../../src/context-measure.cc', -+ '../../src/context-measure.h', -+ '../../src/contexts-inl.h', -+ '../../src/contexts.cc', -+ '../../src/contexts.h', -+ '../../src/conversions-inl.h', -+ '../../src/conversions.cc', -+ '../../src/conversions.h', -+ '../../src/counters.cc', -+ '../../src/counters.h', -+ '../../src/crankshaft/hydrogen-alias-analysis.h', -+ '../../src/crankshaft/hydrogen-bce.cc', -+ '../../src/crankshaft/hydrogen-bce.h', -+ '../../src/crankshaft/hydrogen-bch.cc', -+ '../../src/crankshaft/hydrogen-bch.h', -+ '../../src/crankshaft/hydrogen-canonicalize.cc', -+ '../../src/crankshaft/hydrogen-canonicalize.h', -+ '../../src/crankshaft/hydrogen-check-elimination.cc', -+ '../../src/crankshaft/hydrogen-check-elimination.h', -+ '../../src/crankshaft/hydrogen-dce.cc', -+ '../../src/crankshaft/hydrogen-dce.h', -+ '../../src/crankshaft/hydrogen-dehoist.cc', -+ '../../src/crankshaft/hydrogen-dehoist.h', -+ '../../src/crankshaft/hydrogen-environment-liveness.cc', -+ '../../src/crankshaft/hydrogen-environment-liveness.h', -+ '../../src/crankshaft/hydrogen-escape-analysis.cc', -+ '../../src/crankshaft/hydrogen-escape-analysis.h', -+ '../../src/crankshaft/hydrogen-flow-engine.h', -+ '../../src/crankshaft/hydrogen-gvn.cc', -+ '../../src/crankshaft/hydrogen-gvn.h', -+ '../../src/crankshaft/hydrogen-infer-representation.cc', -+ '../../src/crankshaft/hydrogen-infer-representation.h', -+ '../../src/crankshaft/hydrogen-infer-types.cc', -+ '../../src/crankshaft/hydrogen-infer-types.h', -+ '../../src/crankshaft/hydrogen-instructions.cc', -+ '../../src/crankshaft/hydrogen-instructions.h', -+ '../../src/crankshaft/hydrogen-load-elimination.cc', -+ '../../src/crankshaft/hydrogen-load-elimination.h', -+ '../../src/crankshaft/hydrogen-mark-deoptimize.cc', -+ '../../src/crankshaft/hydrogen-mark-deoptimize.h', -+ '../../src/crankshaft/hydrogen-mark-unreachable.cc', -+ '../../src/crankshaft/hydrogen-mark-unreachable.h', -+ '../../src/crankshaft/hydrogen-osr.cc', -+ '../../src/crankshaft/hydrogen-osr.h', -+ '../../src/crankshaft/hydrogen-range-analysis.cc', -+ '../../src/crankshaft/hydrogen-range-analysis.h', -+ '../../src/crankshaft/hydrogen-redundant-phi.cc', -+ '../../src/crankshaft/hydrogen-redundant-phi.h', -+ '../../src/crankshaft/hydrogen-removable-simulates.cc', -+ '../../src/crankshaft/hydrogen-removable-simulates.h', -+ '../../src/crankshaft/hydrogen-representation-changes.cc', -+ '../../src/crankshaft/hydrogen-representation-changes.h', -+ '../../src/crankshaft/hydrogen-sce.cc', -+ '../../src/crankshaft/hydrogen-sce.h', -+ '../../src/crankshaft/hydrogen-store-elimination.cc', -+ '../../src/crankshaft/hydrogen-store-elimination.h', -+ '../../src/crankshaft/hydrogen-types.cc', -+ '../../src/crankshaft/hydrogen-types.h', -+ '../../src/crankshaft/hydrogen-uint32-analysis.cc', -+ '../../src/crankshaft/hydrogen-uint32-analysis.h', -+ '../../src/crankshaft/hydrogen.cc', -+ '../../src/crankshaft/hydrogen.h', -+ '../../src/crankshaft/lithium-allocator-inl.h', -+ '../../src/crankshaft/lithium-allocator.cc', -+ '../../src/crankshaft/lithium-allocator.h', -+ '../../src/crankshaft/lithium-codegen.cc', -+ '../../src/crankshaft/lithium-codegen.h', -+ '../../src/crankshaft/lithium.cc', -+ '../../src/crankshaft/lithium.h', -+ '../../src/crankshaft/lithium-inl.h', -+ '../../src/crankshaft/typing.cc', -+ '../../src/crankshaft/typing.h', -+ '../../src/crankshaft/unique.h', -+ '../../src/date.cc', -+ '../../src/date.h', -+ '../../src/dateparser-inl.h', -+ '../../src/dateparser.cc', -+ '../../src/dateparser.h', -+ '../../src/debug/debug-evaluate.cc', -+ '../../src/debug/debug-evaluate.h', -+ '../../src/debug/debug-frames.cc', -+ '../../src/debug/debug-frames.h', -+ '../../src/debug/debug-scopes.cc', -+ '../../src/debug/debug-scopes.h', -+ '../../src/debug/debug.cc', -+ '../../src/debug/debug.h', -+ '../../src/debug/liveedit.cc', -+ '../../src/debug/liveedit.h', -+ '../../src/deoptimizer.cc', -+ '../../src/deoptimizer.h', -+ '../../src/disasm.h', -+ '../../src/disassembler.cc', -+ '../../src/disassembler.h', -+ '../../src/diy-fp.cc', -+ '../../src/diy-fp.h', -+ '../../src/double.h', -+ '../../src/dtoa.cc', -+ '../../src/dtoa.h', -+ '../../src/effects.h', -+ '../../src/elements-kind.cc', -+ '../../src/elements-kind.h', -+ '../../src/elements.cc', -+ '../../src/elements.h', -+ '../../src/execution.cc', -+ '../../src/execution.h', -+ '../../src/extensions/externalize-string-extension.cc', -+ '../../src/extensions/externalize-string-extension.h', -+ '../../src/extensions/free-buffer-extension.cc', -+ '../../src/extensions/free-buffer-extension.h', -+ '../../src/extensions/gc-extension.cc', -+ '../../src/extensions/gc-extension.h', -+ '../../src/extensions/statistics-extension.cc', -+ '../../src/extensions/statistics-extension.h', -+ '../../src/extensions/trigger-failure-extension.cc', -+ '../../src/extensions/trigger-failure-extension.h', -+ '../../src/factory.cc', -+ '../../src/factory.h', -+ '../../src/fast-dtoa.cc', -+ '../../src/fast-dtoa.h', -+ '../../src/field-index.h', -+ '../../src/field-index-inl.h', -+ '../../src/fixed-dtoa.cc', -+ '../../src/fixed-dtoa.h', -+ '../../src/flag-definitions.h', -+ '../../src/flags.cc', -+ '../../src/flags.h', -+ '../../src/frames-inl.h', -+ '../../src/frames.cc', -+ '../../src/frames.h', -+ '../../src/full-codegen/full-codegen.cc', -+ '../../src/full-codegen/full-codegen.h', -+ '../../src/futex-emulation.cc', -+ '../../src/futex-emulation.h', -+ '../../src/gdb-jit.cc', -+ '../../src/gdb-jit.h', -+ '../../src/global-handles.cc', -+ '../../src/global-handles.h', -+ '../../src/globals.h', -+ '../../src/handles-inl.h', -+ '../../src/handles.cc', -+ '../../src/handles.h', -+ '../../src/hashmap.h', -+ '../../src/heap/array-buffer-tracker.cc', -+ '../../src/heap/array-buffer-tracker.h', -+ '../../src/heap/memory-reducer.cc', -+ '../../src/heap/memory-reducer.h', -+ '../../src/heap/gc-idle-time-handler.cc', -+ '../../src/heap/gc-idle-time-handler.h', -+ '../../src/heap/gc-tracer.cc', -+ '../../src/heap/gc-tracer.h', -+ '../../src/heap/heap-inl.h', -+ '../../src/heap/heap.cc', -+ '../../src/heap/heap.h', -+ '../../src/heap/incremental-marking-inl.h', -+ '../../src/heap/incremental-marking-job.cc', -+ '../../src/heap/incremental-marking-job.h', -+ '../../src/heap/incremental-marking.cc', -+ '../../src/heap/incremental-marking.h', -+ '../../src/heap/mark-compact-inl.h', -+ '../../src/heap/mark-compact.cc', -+ '../../src/heap/mark-compact.h', -+ '../../src/heap/object-stats.cc', -+ '../../src/heap/object-stats.h', -+ '../../src/heap/objects-visiting-inl.h', -+ '../../src/heap/objects-visiting.cc', -+ '../../src/heap/objects-visiting.h', -+ '../../src/heap/scavenge-job.h', -+ '../../src/heap/scavenge-job.cc', -+ '../../src/heap/scavenger-inl.h', -+ '../../src/heap/scavenger.cc', -+ '../../src/heap/scavenger.h', -+ '../../src/heap/slots-buffer.cc', -+ '../../src/heap/slots-buffer.h', -+ '../../src/heap/spaces-inl.h', -+ '../../src/heap/spaces.cc', -+ '../../src/heap/spaces.h', -+ '../../src/heap/store-buffer-inl.h', -+ '../../src/heap/store-buffer.cc', -+ '../../src/heap/store-buffer.h', -+ '../../src/i18n.cc', -+ '../../src/i18n.h', -+ '../../src/icu_util.cc', -+ '../../src/icu_util.h', -+ '../../src/ic/access-compiler.cc', -+ '../../src/ic/access-compiler.h', -+ '../../src/ic/call-optimization.cc', -+ '../../src/ic/call-optimization.h', -+ '../../src/ic/handler-compiler.cc', -+ '../../src/ic/handler-compiler.h', -+ '../../src/ic/ic-inl.h', -+ '../../src/ic/ic-state.cc', -+ '../../src/ic/ic-state.h', -+ '../../src/ic/ic.cc', -+ '../../src/ic/ic.h', -+ '../../src/ic/ic-compiler.cc', -+ '../../src/ic/ic-compiler.h', -+ '../../src/identity-map.cc', -+ '../../src/identity-map.h', -+ '../../src/interface-descriptors.cc', -+ '../../src/interface-descriptors.h', -+ '../../src/interpreter/bytecodes.cc', -+ '../../src/interpreter/bytecodes.h', -+ '../../src/interpreter/bytecode-array-builder.cc', -+ '../../src/interpreter/bytecode-array-builder.h', -+ '../../src/interpreter/bytecode-array-iterator.cc', -+ '../../src/interpreter/bytecode-array-iterator.h', -+ '../../src/interpreter/bytecode-register-allocator.cc', -+ '../../src/interpreter/bytecode-register-allocator.h', -+ '../../src/interpreter/bytecode-generator.cc', -+ '../../src/interpreter/bytecode-generator.h', -+ '../../src/interpreter/bytecode-traits.h', -+ '../../src/interpreter/constant-array-builder.cc', -+ '../../src/interpreter/constant-array-builder.h', -+ '../../src/interpreter/control-flow-builders.cc', -+ '../../src/interpreter/control-flow-builders.h', -+ '../../src/interpreter/interpreter.cc', -+ '../../src/interpreter/interpreter.h', -+ '../../src/isolate-inl.h', -+ '../../src/isolate.cc', -+ '../../src/isolate.h', -+ '../../src/json-stringifier.h', -+ '../../src/key-accumulator.h', -+ '../../src/key-accumulator.cc', -+ '../../src/layout-descriptor-inl.h', -+ '../../src/layout-descriptor.cc', -+ '../../src/layout-descriptor.h', -+ '../../src/list-inl.h', -+ '../../src/list.h', -+ '../../src/locked-queue-inl.h', -+ '../../src/locked-queue.h', -+ '../../src/log-inl.h', -+ '../../src/log-utils.cc', -+ '../../src/log-utils.h', -+ '../../src/log.cc', -+ '../../src/log.h', -+ '../../src/lookup.cc', -+ '../../src/lookup.h', -+ '../../src/macro-assembler.h', -+ '../../src/machine-type.cc', -+ '../../src/machine-type.h', -+ '../../src/messages.cc', -+ '../../src/messages.h', -+ '../../src/msan.h', -+ '../../src/objects-body-descriptors-inl.h', -+ '../../src/objects-body-descriptors.h', -+ '../../src/objects-debug.cc', -+ '../../src/objects-inl.h', -+ '../../src/objects-printer.cc', -+ '../../src/objects.cc', -+ '../../src/objects.h', -+ '../../src/optimizing-compile-dispatcher.cc', -+ '../../src/optimizing-compile-dispatcher.h', -+ '../../src/ostreams.cc', -+ '../../src/ostreams.h', -+ '../../src/parsing/expression-classifier.h', -+ '../../src/parsing/func-name-inferrer.cc', -+ '../../src/parsing/func-name-inferrer.h', -+ '../../src/parsing/json-parser.h', -+ '../../src/parsing/parameter-initializer-rewriter.cc', -+ '../../src/parsing/parameter-initializer-rewriter.h', -+ '../../src/parsing/parser-base.h', -+ '../../src/parsing/parser.cc', -+ '../../src/parsing/parser.h', -+ '../../src/parsing/pattern-rewriter.cc', -+ '../../src/parsing/preparse-data-format.h', -+ '../../src/parsing/preparse-data.cc', -+ '../../src/parsing/preparse-data.h', -+ '../../src/parsing/preparser.cc', -+ '../../src/parsing/preparser.h', -+ '../../src/parsing/rewriter.cc', -+ '../../src/parsing/rewriter.h', -+ '../../src/parsing/scanner-character-streams.cc', -+ '../../src/parsing/scanner-character-streams.h', -+ '../../src/parsing/scanner.cc', -+ '../../src/parsing/scanner.h', -+ '../../src/parsing/token.cc', -+ '../../src/parsing/token.h', -+ '../../src/pending-compilation-error-handler.cc', -+ '../../src/pending-compilation-error-handler.h', -+ '../../src/profiler/allocation-tracker.cc', -+ '../../src/profiler/allocation-tracker.h', -+ '../../src/profiler/circular-queue-inl.h', -+ '../../src/profiler/circular-queue.h', -+ '../../src/profiler/cpu-profiler-inl.h', -+ '../../src/profiler/cpu-profiler.cc', -+ '../../src/profiler/cpu-profiler.h', -+ '../../src/profiler/heap-profiler.cc', -+ '../../src/profiler/heap-profiler.h', -+ '../../src/profiler/heap-snapshot-generator-inl.h', -+ '../../src/profiler/heap-snapshot-generator.cc', -+ '../../src/profiler/heap-snapshot-generator.h', -+ '../../src/profiler/profile-generator-inl.h', -+ '../../src/profiler/profile-generator.cc', -+ '../../src/profiler/profile-generator.h', -+ '../../src/profiler/sampler.cc', -+ '../../src/profiler/sampler.h', -+ '../../src/profiler/strings-storage.cc', -+ '../../src/profiler/strings-storage.h', -+ '../../src/profiler/unbound-queue-inl.h', -+ '../../src/profiler/unbound-queue.h', -+ '../../src/property-descriptor.cc', -+ '../../src/property-descriptor.h', -+ '../../src/property-details.h', -+ '../../src/property.cc', -+ '../../src/property.h', -+ '../../src/prototype.h', -+ '../../src/regexp/bytecodes-irregexp.h', -+ '../../src/regexp/interpreter-irregexp.cc', -+ '../../src/regexp/interpreter-irregexp.h', -+ '../../src/regexp/jsregexp-inl.h', -+ '../../src/regexp/jsregexp.cc', -+ '../../src/regexp/jsregexp.h', -+ '../../src/regexp/regexp-ast.cc', -+ '../../src/regexp/regexp-ast.h', -+ '../../src/regexp/regexp-macro-assembler-irregexp-inl.h', -+ '../../src/regexp/regexp-macro-assembler-irregexp.cc', -+ '../../src/regexp/regexp-macro-assembler-irregexp.h', -+ '../../src/regexp/regexp-macro-assembler-tracer.cc', -+ '../../src/regexp/regexp-macro-assembler-tracer.h', -+ '../../src/regexp/regexp-macro-assembler.cc', -+ '../../src/regexp/regexp-macro-assembler.h', -+ '../../src/regexp/regexp-parser.cc', -+ '../../src/regexp/regexp-parser.h', -+ '../../src/regexp/regexp-stack.cc', -+ '../../src/regexp/regexp-stack.h', -+ '../../src/register-configuration.cc', -+ '../../src/register-configuration.h', -+ '../../src/runtime-profiler.cc', -+ '../../src/runtime-profiler.h', -+ '../../src/runtime/runtime-array.cc', -+ '../../src/runtime/runtime-atomics.cc', -+ '../../src/runtime/runtime-classes.cc', -+ '../../src/runtime/runtime-collections.cc', -+ '../../src/runtime/runtime-compiler.cc', -+ '../../src/runtime/runtime-date.cc', -+ '../../src/runtime/runtime-debug.cc', -+ '../../src/runtime/runtime-forin.cc', -+ '../../src/runtime/runtime-function.cc', -+ '../../src/runtime/runtime-futex.cc', -+ '../../src/runtime/runtime-generator.cc', -+ '../../src/runtime/runtime-i18n.cc', -+ '../../src/runtime/runtime-internal.cc', -+ '../../src/runtime/runtime-interpreter.cc', -+ '../../src/runtime/runtime-json.cc', -+ '../../src/runtime/runtime-literals.cc', -+ '../../src/runtime/runtime-liveedit.cc', -+ '../../src/runtime/runtime-maths.cc', -+ '../../src/runtime/runtime-numbers.cc', -+ '../../src/runtime/runtime-object.cc', -+ '../../src/runtime/runtime-observe.cc', -+ '../../src/runtime/runtime-operators.cc', -+ '../../src/runtime/runtime-proxy.cc', -+ '../../src/runtime/runtime-regexp.cc', -+ '../../src/runtime/runtime-scopes.cc', -+ '../../src/runtime/runtime-simd.cc', -+ '../../src/runtime/runtime-strings.cc', -+ '../../src/runtime/runtime-symbol.cc', -+ '../../src/runtime/runtime-test.cc', -+ '../../src/runtime/runtime-typedarray.cc', -+ '../../src/runtime/runtime-uri.cc', -+ '../../src/runtime/runtime-utils.h', -+ '../../src/runtime/runtime.cc', -+ '../../src/runtime/runtime.h', -+ '../../src/safepoint-table.cc', -+ '../../src/safepoint-table.h', -+ '../../src/signature.h', -+ '../../src/simulator.h', -+ '../../src/small-pointer-list.h', -+ '../../src/snapshot/natives.h', -+ '../../src/snapshot/natives-common.cc', -+ '../../src/snapshot/serialize.cc', -+ '../../src/snapshot/serialize.h', -+ '../../src/snapshot/snapshot.h', -+ '../../src/snapshot/snapshot-common.cc', -+ '../../src/snapshot/snapshot-source-sink.cc', -+ '../../src/snapshot/snapshot-source-sink.h', -+ '../../src/splay-tree.h', -+ '../../src/splay-tree-inl.h', -+ '../../src/startup-data-util.cc', -+ '../../src/startup-data-util.h', -+ '../../src/string-builder.cc', -+ '../../src/string-builder.h', -+ '../../src/string-search.h', -+ '../../src/string-stream.cc', -+ '../../src/string-stream.h', -+ '../../src/strtod.cc', -+ '../../src/strtod.h', -+ '../../src/ic/stub-cache.cc', -+ '../../src/ic/stub-cache.h', -+ '../../src/tracing/trace-event.cc', -+ '../../src/tracing/trace-event.h', -+ '../../src/transitions-inl.h', -+ '../../src/transitions.cc', -+ '../../src/transitions.h', -+ '../../src/type-cache.cc', -+ '../../src/type-cache.h', -+ '../../src/type-feedback-vector-inl.h', -+ '../../src/type-feedback-vector.cc', -+ '../../src/type-feedback-vector.h', -+ '../../src/type-info.cc', -+ '../../src/type-info.h', -+ '../../src/types-inl.h', -+ '../../src/types.cc', -+ '../../src/types.h', -+ '../../src/typing-asm.cc', -+ '../../src/typing-asm.h', -+ '../../src/typing-reset.cc', -+ '../../src/typing-reset.h', -+ '../../src/unicode-inl.h', -+ '../../src/unicode.cc', -+ '../../src/unicode.h', -+ '../../src/unicode-cache-inl.h', -+ '../../src/unicode-cache.h', -+ '../../src/unicode-decoder.cc', -+ '../../src/unicode-decoder.h', -+ '../../src/utils.cc', -+ '../../src/utils.h', -+ '../../src/v8.cc', -+ '../../src/v8.h', -+ '../../src/v8memory.h', -+ '../../src/v8threads.cc', -+ '../../src/v8threads.h', -+ '../../src/vector.h', -+ '../../src/version.cc', -+ '../../src/version.h', -+ '../../src/vm-state-inl.h', -+ '../../src/vm-state.h', -+ '../../src/wasm/asm-wasm-builder.cc', -+ '../../src/wasm/asm-wasm-builder.h', -+ '../../src/wasm/ast-decoder.cc', -+ '../../src/wasm/ast-decoder.h', -+ '../../src/wasm/decoder.h', -+ '../../src/wasm/encoder.cc', -+ '../../src/wasm/encoder.h', -+ '../../src/wasm/module-decoder.cc', -+ '../../src/wasm/module-decoder.h', -+ '../../src/wasm/wasm-js.cc', -+ '../../src/wasm/wasm-js.h', -+ '../../src/wasm/wasm-macro-gen.h', -+ '../../src/wasm/wasm-module.cc', -+ '../../src/wasm/wasm-module.h', -+ '../../src/wasm/wasm-opcodes.cc', -+ '../../src/wasm/wasm-opcodes.h', -+ '../../src/wasm/wasm-result.cc', -+ '../../src/wasm/wasm-result.h', -+ '../../src/zone.cc', -+ '../../src/zone.h', -+ '../../src/zone-allocator.h', -+ '../../src/zone-containers.h', -+ '../../src/third_party/fdlibm/fdlibm.cc', -+ '../../src/third_party/fdlibm/fdlibm.h', ++ '../include/v8-debug.h', ++ '../include/v8-experimental.h', ++ '../include/v8-platform.h', ++ '../include/v8-profiler.h', ++ '../include/v8-testing.h', ++ '../include/v8-util.h', ++ '../include/v8-version.h', ++ '../include/v8.h', ++ '../include/v8config.h', ++ 'accessors.cc', ++ 'accessors.h', ++ 'address-map.cc', ++ 'address-map.h', ++ 'allocation.cc', ++ 'allocation.h', ++ 'allocation-site-scopes.cc', ++ 'allocation-site-scopes.h', ++ 'api-experimental.cc', ++ 'api-experimental.h', ++ 'api.cc', ++ 'api.h', ++ 'api-arguments-inl.h', ++ 'api-arguments.cc', ++ 'api-arguments.h', ++ 'api-natives.cc', ++ 'api-natives.h', ++ 'arguments.cc', ++ 'arguments.h', ++ 'assembler.cc', ++ 'assembler.h', ++ 'assert-scope.h', ++ 'assert-scope.cc', ++ 'ast/ast-expression-rewriter.cc', ++ 'ast/ast-expression-rewriter.h', ++ 'ast/ast-expression-visitor.cc', ++ 'ast/ast-expression-visitor.h', ++ 'ast/ast-literal-reindexer.cc', ++ 'ast/ast-literal-reindexer.h', ++ 'ast/ast-numbering.cc', ++ 'ast/ast-numbering.h', ++ 'ast/ast-type-bounds.h', ++ 'ast/ast-value-factory.cc', ++ 'ast/ast-value-factory.h', ++ 'ast/ast.cc', ++ 'ast/ast.h', ++ 'ast/modules.cc', ++ 'ast/modules.h', ++ 'ast/prettyprinter.cc', ++ 'ast/prettyprinter.h', ++ 'ast/scopeinfo.cc', ++ 'ast/scopeinfo.h', ++ 'ast/scopes.cc', ++ 'ast/scopes.h', ++ 'ast/variables.cc', ++ 'ast/variables.h', ++ 'background-parsing-task.cc', ++ 'background-parsing-task.h', ++ 'bailout-reason.cc', ++ 'bailout-reason.h', ++ 'basic-block-profiler.cc', ++ 'basic-block-profiler.h', ++ 'bignum-dtoa.cc', ++ 'bignum-dtoa.h', ++ 'bignum.cc', ++ 'bignum.h', ++ 'bit-vector.cc', ++ 'bit-vector.h', ++ 'bootstrapper.cc', ++ 'bootstrapper.h', ++ 'builtins.cc', ++ 'builtins.h', ++ 'cached-powers.cc', ++ 'cached-powers.h', ++ 'cancelable-task.cc', ++ 'cancelable-task.h', ++ 'char-predicates.cc', ++ 'char-predicates-inl.h', ++ 'char-predicates.h', ++ 'checks.h', ++ 'code-events.h', ++ 'code-factory.cc', ++ 'code-factory.h', ++ 'code-stub-assembler.cc', ++ 'code-stub-assembler.h', ++ 'code-stubs.cc', ++ 'code-stubs.h', ++ 'code-stubs-hydrogen.cc', ++ 'codegen.cc', ++ 'codegen.h', ++ 'collector.h', ++ 'compilation-cache.cc', ++ 'compilation-cache.h', ++ 'compilation-dependencies.cc', ++ 'compilation-dependencies.h', ++ 'compilation-statistics.cc', ++ 'compilation-statistics.h', ++ 'compiler/access-builder.cc', ++ 'compiler/access-builder.h', ++ 'compiler/access-info.cc', ++ 'compiler/access-info.h', ++ 'compiler/all-nodes.cc', ++ 'compiler/all-nodes.h', ++ 'compiler/ast-graph-builder.cc', ++ 'compiler/ast-graph-builder.h', ++ 'compiler/ast-loop-assignment-analyzer.cc', ++ 'compiler/ast-loop-assignment-analyzer.h', ++ 'compiler/basic-block-instrumentor.cc', ++ 'compiler/basic-block-instrumentor.h', ++ 'compiler/branch-elimination.cc', ++ 'compiler/branch-elimination.h', ++ 'compiler/bytecode-branch-analysis.cc', ++ 'compiler/bytecode-branch-analysis.h', ++ 'compiler/bytecode-graph-builder.cc', ++ 'compiler/bytecode-graph-builder.h', ++ 'compiler/c-linkage.cc', ++ 'compiler/checkpoint-elimination.cc', ++ 'compiler/checkpoint-elimination.h', ++ 'compiler/code-generator-impl.h', ++ 'compiler/code-generator.cc', ++ 'compiler/code-generator.h', ++ 'compiler/code-assembler.cc', ++ 'compiler/code-assembler.h', ++ 'compiler/common-node-cache.cc', ++ 'compiler/common-node-cache.h', ++ 'compiler/common-operator-reducer.cc', ++ 'compiler/common-operator-reducer.h', ++ 'compiler/common-operator.cc', ++ 'compiler/common-operator.h', ++ 'compiler/control-builders.cc', ++ 'compiler/control-builders.h', ++ 'compiler/control-equivalence.cc', ++ 'compiler/control-equivalence.h', ++ 'compiler/control-flow-optimizer.cc', ++ 'compiler/control-flow-optimizer.h', ++ 'compiler/dead-code-elimination.cc', ++ 'compiler/dead-code-elimination.h', ++ 'compiler/diamond.h', ++ 'compiler/effect-control-linearizer.cc', ++ 'compiler/effect-control-linearizer.h', ++ 'compiler/escape-analysis.cc', ++ 'compiler/escape-analysis.h', ++ "compiler/escape-analysis-reducer.cc", ++ "compiler/escape-analysis-reducer.h", ++ 'compiler/frame.cc', ++ 'compiler/frame.h', ++ 'compiler/frame-elider.cc', ++ 'compiler/frame-elider.h', ++ "compiler/frame-states.cc", ++ "compiler/frame-states.h", ++ 'compiler/gap-resolver.cc', ++ 'compiler/gap-resolver.h', ++ 'compiler/graph-reducer.cc', ++ 'compiler/graph-reducer.h', ++ 'compiler/graph-replay.cc', ++ 'compiler/graph-replay.h', ++ 'compiler/graph-trimmer.cc', ++ 'compiler/graph-trimmer.h', ++ 'compiler/graph-visualizer.cc', ++ 'compiler/graph-visualizer.h', ++ 'compiler/graph.cc', ++ 'compiler/graph.h', ++ 'compiler/instruction-codes.h', ++ 'compiler/instruction-selector-impl.h', ++ 'compiler/instruction-selector.cc', ++ 'compiler/instruction-selector.h', ++ 'compiler/instruction-scheduler.cc', ++ 'compiler/instruction-scheduler.h', ++ 'compiler/instruction.cc', ++ 'compiler/instruction.h', ++ 'compiler/int64-lowering.cc', ++ 'compiler/int64-lowering.h', ++ 'compiler/js-builtin-reducer.cc', ++ 'compiler/js-builtin-reducer.h', ++ 'compiler/js-call-reducer.cc', ++ 'compiler/js-call-reducer.h', ++ 'compiler/js-context-specialization.cc', ++ 'compiler/js-context-specialization.h', ++ 'compiler/js-create-lowering.cc', ++ 'compiler/js-create-lowering.h', ++ 'compiler/js-frame-specialization.cc', ++ 'compiler/js-frame-specialization.h', ++ 'compiler/js-generic-lowering.cc', ++ 'compiler/js-generic-lowering.h', ++ 'compiler/js-global-object-specialization.cc', ++ 'compiler/js-global-object-specialization.h', ++ 'compiler/js-graph.cc', ++ 'compiler/js-graph.h', ++ 'compiler/js-inlining.cc', ++ 'compiler/js-inlining.h', ++ 'compiler/js-inlining-heuristic.cc', ++ 'compiler/js-inlining-heuristic.h', ++ 'compiler/js-intrinsic-lowering.cc', ++ 'compiler/js-intrinsic-lowering.h', ++ 'compiler/js-native-context-specialization.cc', ++ 'compiler/js-native-context-specialization.h', ++ 'compiler/js-operator.cc', ++ 'compiler/js-operator.h', ++ 'compiler/js-typed-lowering.cc', ++ 'compiler/js-typed-lowering.h', ++ 'compiler/jump-threading.cc', ++ 'compiler/jump-threading.h', ++ 'compiler/linkage.cc', ++ 'compiler/linkage.h', ++ 'compiler/liveness-analyzer.cc', ++ 'compiler/liveness-analyzer.h', ++ 'compiler/live-range-separator.cc', ++ 'compiler/live-range-separator.h', ++ 'compiler/load-elimination.cc', ++ 'compiler/load-elimination.h', ++ 'compiler/loop-analysis.cc', ++ 'compiler/loop-analysis.h', ++ 'compiler/loop-peeling.cc', ++ 'compiler/loop-peeling.h', ++ 'compiler/machine-operator-reducer.cc', ++ 'compiler/machine-operator-reducer.h', ++ 'compiler/machine-operator.cc', ++ 'compiler/machine-operator.h', ++ 'compiler/memory-optimizer.cc', ++ 'compiler/memory-optimizer.h', ++ 'compiler/move-optimizer.cc', ++ 'compiler/move-optimizer.h', ++ 'compiler/node-aux-data.h', ++ 'compiler/node-cache.cc', ++ 'compiler/node-cache.h', ++ 'compiler/node-marker.cc', ++ 'compiler/node-marker.h', ++ 'compiler/node-matchers.cc', ++ 'compiler/node-matchers.h', ++ 'compiler/node-properties.cc', ++ 'compiler/node-properties.h', ++ 'compiler/node.cc', ++ 'compiler/node.h', ++ 'compiler/opcodes.cc', ++ 'compiler/opcodes.h', ++ 'compiler/operation-typer.cc', ++ 'compiler/operation-typer.h', ++ 'compiler/operator-properties.cc', ++ 'compiler/operator-properties.h', ++ 'compiler/operator.cc', ++ 'compiler/operator.h', ++ 'compiler/osr.cc', ++ 'compiler/osr.h', ++ 'compiler/pipeline.cc', ++ 'compiler/pipeline.h', ++ 'compiler/pipeline-statistics.cc', ++ 'compiler/pipeline-statistics.h', ++ 'compiler/raw-machine-assembler.cc', ++ 'compiler/raw-machine-assembler.h', ++ 'compiler/redundancy-elimination.cc', ++ 'compiler/redundancy-elimination.h', ++ 'compiler/register-allocator.cc', ++ 'compiler/register-allocator.h', ++ 'compiler/register-allocator-verifier.cc', ++ 'compiler/register-allocator-verifier.h', ++ 'compiler/representation-change.cc', ++ 'compiler/representation-change.h', ++ 'compiler/schedule.cc', ++ 'compiler/schedule.h', ++ 'compiler/scheduler.cc', ++ 'compiler/scheduler.h', ++ 'compiler/select-lowering.cc', ++ 'compiler/select-lowering.h', ++ 'compiler/simplified-lowering.cc', ++ 'compiler/simplified-lowering.h', ++ 'compiler/simplified-operator-reducer.cc', ++ 'compiler/simplified-operator-reducer.h', ++ 'compiler/simplified-operator.cc', ++ 'compiler/simplified-operator.h', ++ 'compiler/source-position.cc', ++ 'compiler/source-position.h', ++ 'compiler/state-values-utils.cc', ++ 'compiler/state-values-utils.h', ++ 'compiler/store-store-elimination.cc', ++ 'compiler/store-store-elimination.h', ++ 'compiler/tail-call-optimization.cc', ++ 'compiler/tail-call-optimization.h', ++ 'compiler/type-hint-analyzer.cc', ++ 'compiler/type-hint-analyzer.h', ++ 'compiler/type-hints.cc', ++ 'compiler/type-hints.h', ++ 'compiler/typer.cc', ++ 'compiler/typer.h', ++ 'compiler/value-numbering-reducer.cc', ++ 'compiler/value-numbering-reducer.h', ++ 'compiler/verifier.cc', ++ 'compiler/verifier.h', ++ 'compiler/wasm-compiler.cc', ++ 'compiler/wasm-compiler.h', ++ 'compiler/wasm-linkage.cc', ++ 'compiler/zone-pool.cc', ++ 'compiler/zone-pool.h', ++ 'compiler.cc', ++ 'compiler.h', ++ 'context-measure.cc', ++ 'context-measure.h', ++ 'contexts-inl.h', ++ 'contexts.cc', ++ 'contexts.h', ++ 'conversions-inl.h', ++ 'conversions.cc', ++ 'conversions.h', ++ 'counters-inl.h', ++ 'counters.cc', ++ 'counters.h', ++ 'crankshaft/compilation-phase.cc', ++ 'crankshaft/compilation-phase.h', ++ 'crankshaft/hydrogen-alias-analysis.h', ++ 'crankshaft/hydrogen-bce.cc', ++ 'crankshaft/hydrogen-bce.h', ++ 'crankshaft/hydrogen-canonicalize.cc', ++ 'crankshaft/hydrogen-canonicalize.h', ++ 'crankshaft/hydrogen-check-elimination.cc', ++ 'crankshaft/hydrogen-check-elimination.h', ++ 'crankshaft/hydrogen-dce.cc', ++ 'crankshaft/hydrogen-dce.h', ++ 'crankshaft/hydrogen-dehoist.cc', ++ 'crankshaft/hydrogen-dehoist.h', ++ 'crankshaft/hydrogen-environment-liveness.cc', ++ 'crankshaft/hydrogen-environment-liveness.h', ++ 'crankshaft/hydrogen-escape-analysis.cc', ++ 'crankshaft/hydrogen-escape-analysis.h', ++ 'crankshaft/hydrogen-flow-engine.h', ++ 'crankshaft/hydrogen-gvn.cc', ++ 'crankshaft/hydrogen-gvn.h', ++ 'crankshaft/hydrogen-infer-representation.cc', ++ 'crankshaft/hydrogen-infer-representation.h', ++ 'crankshaft/hydrogen-infer-types.cc', ++ 'crankshaft/hydrogen-infer-types.h', ++ 'crankshaft/hydrogen-instructions.cc', ++ 'crankshaft/hydrogen-instructions.h', ++ 'crankshaft/hydrogen-load-elimination.cc', ++ 'crankshaft/hydrogen-load-elimination.h', ++ 'crankshaft/hydrogen-mark-deoptimize.cc', ++ 'crankshaft/hydrogen-mark-deoptimize.h', ++ 'crankshaft/hydrogen-mark-unreachable.cc', ++ 'crankshaft/hydrogen-mark-unreachable.h', ++ 'crankshaft/hydrogen-osr.cc', ++ 'crankshaft/hydrogen-osr.h', ++ 'crankshaft/hydrogen-range-analysis.cc', ++ 'crankshaft/hydrogen-range-analysis.h', ++ 'crankshaft/hydrogen-redundant-phi.cc', ++ 'crankshaft/hydrogen-redundant-phi.h', ++ 'crankshaft/hydrogen-removable-simulates.cc', ++ 'crankshaft/hydrogen-removable-simulates.h', ++ 'crankshaft/hydrogen-representation-changes.cc', ++ 'crankshaft/hydrogen-representation-changes.h', ++ 'crankshaft/hydrogen-sce.cc', ++ 'crankshaft/hydrogen-sce.h', ++ 'crankshaft/hydrogen-store-elimination.cc', ++ 'crankshaft/hydrogen-store-elimination.h', ++ 'crankshaft/hydrogen-types.cc', ++ 'crankshaft/hydrogen-types.h', ++ 'crankshaft/hydrogen-uint32-analysis.cc', ++ 'crankshaft/hydrogen-uint32-analysis.h', ++ 'crankshaft/hydrogen.cc', ++ 'crankshaft/hydrogen.h', ++ 'crankshaft/lithium-allocator-inl.h', ++ 'crankshaft/lithium-allocator.cc', ++ 'crankshaft/lithium-allocator.h', ++ 'crankshaft/lithium-codegen.cc', ++ 'crankshaft/lithium-codegen.h', ++ 'crankshaft/lithium.cc', ++ 'crankshaft/lithium.h', ++ 'crankshaft/lithium-inl.h', ++ 'crankshaft/typing.cc', ++ 'crankshaft/typing.h', ++ 'crankshaft/unique.h', ++ 'date.cc', ++ 'date.h', ++ 'dateparser-inl.h', ++ 'dateparser.cc', ++ 'dateparser.h', ++ 'debug/debug-evaluate.cc', ++ 'debug/debug-evaluate.h', ++ 'debug/debug-frames.cc', ++ 'debug/debug-frames.h', ++ 'debug/debug-scopes.cc', ++ 'debug/debug-scopes.h', ++ 'debug/debug.cc', ++ 'debug/debug.h', ++ 'debug/liveedit.cc', ++ 'debug/liveedit.h', ++ 'deoptimizer.cc', ++ 'deoptimizer.h', ++ 'disasm.h', ++ 'disassembler.cc', ++ 'disassembler.h', ++ 'diy-fp.cc', ++ 'diy-fp.h', ++ 'double.h', ++ 'dtoa.cc', ++ 'dtoa.h', ++ 'effects.h', ++ 'eh-frame.cc', ++ 'eh-frame.h', ++ 'elements-kind.cc', ++ 'elements-kind.h', ++ 'elements.cc', ++ 'elements.h', ++ 'execution.cc', ++ 'execution.h', ++ 'extensions/externalize-string-extension.cc', ++ 'extensions/externalize-string-extension.h', ++ 'extensions/free-buffer-extension.cc', ++ 'extensions/free-buffer-extension.h', ++ 'extensions/gc-extension.cc', ++ 'extensions/gc-extension.h', ++ 'extensions/ignition-statistics-extension.cc', ++ 'extensions/ignition-statistics-extension.h', ++ 'extensions/statistics-extension.cc', ++ 'extensions/statistics-extension.h', ++ 'extensions/trigger-failure-extension.cc', ++ 'extensions/trigger-failure-extension.h', ++ 'external-reference-table.cc', ++ 'external-reference-table.h', ++ 'factory.cc', ++ 'factory.h', ++ 'fast-accessor-assembler.cc', ++ 'fast-accessor-assembler.h', ++ 'fast-dtoa.cc', ++ 'fast-dtoa.h', ++ 'field-index.h', ++ 'field-index-inl.h', ++ 'field-type.cc', ++ 'field-type.h', ++ 'fixed-dtoa.cc', ++ 'fixed-dtoa.h', ++ 'flag-definitions.h', ++ 'flags.cc', ++ 'flags.h', ++ 'frames-inl.h', ++ 'frames.cc', ++ 'frames.h', ++ 'full-codegen/full-codegen.cc', ++ 'full-codegen/full-codegen.h', ++ 'futex-emulation.cc', ++ 'futex-emulation.h', ++ 'gdb-jit.cc', ++ 'gdb-jit.h', ++ 'global-handles.cc', ++ 'global-handles.h', ++ 'globals.h', ++ 'handles-inl.h', ++ 'handles.cc', ++ 'handles.h', ++ 'heap-symbols.h', ++ 'heap/array-buffer-tracker-inl.h', ++ 'heap/array-buffer-tracker.cc', ++ 'heap/array-buffer-tracker.h', ++ 'heap/memory-reducer.cc', ++ 'heap/memory-reducer.h', ++ 'heap/gc-idle-time-handler.cc', ++ 'heap/gc-idle-time-handler.h', ++ 'heap/gc-tracer.cc', ++ 'heap/gc-tracer.h', ++ 'heap/heap-inl.h', ++ 'heap/heap.cc', ++ 'heap/heap.h', ++ 'heap/incremental-marking-inl.h', ++ 'heap/incremental-marking-job.cc', ++ 'heap/incremental-marking-job.h', ++ 'heap/incremental-marking.cc', ++ 'heap/incremental-marking.h', ++ 'heap/mark-compact-inl.h', ++ 'heap/mark-compact.cc', ++ 'heap/mark-compact.h', ++ 'heap/object-stats.cc', ++ 'heap/object-stats.h', ++ 'heap/objects-visiting-inl.h', ++ 'heap/objects-visiting.cc', ++ 'heap/objects-visiting.h', ++ 'heap/page-parallel-job.h', ++ 'heap/remembered-set.cc', ++ 'heap/remembered-set.h', ++ 'heap/scavenge-job.h', ++ 'heap/scavenge-job.cc', ++ 'heap/scavenger-inl.h', ++ 'heap/scavenger.cc', ++ 'heap/scavenger.h', ++ 'heap/slot-set.h', ++ 'heap/spaces-inl.h', ++ 'heap/spaces.cc', ++ 'heap/spaces.h', ++ 'heap/store-buffer.cc', ++ 'heap/store-buffer.h', ++ 'i18n.cc', ++ 'i18n.h', ++ 'icu_util.cc', ++ 'icu_util.h', ++ 'ic/access-compiler.cc', ++ 'ic/access-compiler.h', ++ 'ic/call-optimization.cc', ++ 'ic/call-optimization.h', ++ 'ic/handler-compiler.cc', ++ 'ic/handler-compiler.h', ++ 'ic/ic-inl.h', ++ 'ic/ic-state.cc', ++ 'ic/ic-state.h', ++ 'ic/ic.cc', ++ 'ic/ic.h', ++ 'ic/ic-compiler.cc', ++ 'ic/ic-compiler.h', ++ 'identity-map.cc', ++ 'identity-map.h', ++ 'interface-descriptors.cc', ++ 'interface-descriptors.h', ++ 'interpreter/bytecodes.cc', ++ 'interpreter/bytecodes.h', ++ 'interpreter/bytecode-array-builder.cc', ++ 'interpreter/bytecode-array-builder.h', ++ 'interpreter/bytecode-array-iterator.cc', ++ 'interpreter/bytecode-array-iterator.h', ++ 'interpreter/bytecode-array-writer.cc', ++ 'interpreter/bytecode-array-writer.h', ++ 'interpreter/bytecode-dead-code-optimizer.cc', ++ 'interpreter/bytecode-dead-code-optimizer.h', ++ 'interpreter/bytecode-label.h', ++ 'interpreter/bytecode-generator.cc', ++ 'interpreter/bytecode-generator.h', ++ 'interpreter/bytecode-peephole-optimizer.cc', ++ 'interpreter/bytecode-peephole-optimizer.h', ++ 'interpreter/bytecode-pipeline.cc', ++ 'interpreter/bytecode-pipeline.h', ++ 'interpreter/bytecode-register-allocator.cc', ++ 'interpreter/bytecode-register-allocator.h', ++ 'interpreter/bytecode-register-optimizer.cc', ++ 'interpreter/bytecode-register-optimizer.h', ++ 'interpreter/bytecode-traits.h', ++ 'interpreter/constant-array-builder.cc', ++ 'interpreter/constant-array-builder.h', ++ 'interpreter/control-flow-builders.cc', ++ 'interpreter/control-flow-builders.h', ++ 'interpreter/handler-table-builder.cc', ++ 'interpreter/handler-table-builder.h', ++ 'interpreter/interpreter.cc', ++ 'interpreter/interpreter.h', ++ 'interpreter/interpreter-assembler.cc', ++ 'interpreter/interpreter-assembler.h', ++ 'interpreter/interpreter-intrinsics.cc', ++ 'interpreter/interpreter-intrinsics.h', ++ 'interpreter/source-position-table.cc', ++ 'interpreter/source-position-table.h', ++ 'isolate-inl.h', ++ 'isolate.cc', ++ 'isolate.h', ++ 'json-parser.cc', ++ 'json-parser.h', ++ 'json-stringifier.cc', ++ 'json-stringifier.h', ++ 'keys.h', ++ 'keys.cc', ++ 'layout-descriptor-inl.h', ++ 'layout-descriptor.cc', ++ 'layout-descriptor.h', ++ 'list-inl.h', ++ 'list.h', ++ 'locked-queue-inl.h', ++ 'locked-queue.h', ++ 'log-inl.h', ++ 'log-utils.cc', ++ 'log-utils.h', ++ 'log.cc', ++ 'log.h', ++ 'lookup.cc', ++ 'lookup.h', ++ 'macro-assembler.h', ++ 'machine-type.cc', ++ 'machine-type.h', ++ 'messages.cc', ++ 'messages.h', ++ 'msan.h', ++ 'objects-body-descriptors-inl.h', ++ 'objects-body-descriptors.h', ++ 'objects-debug.cc', ++ 'objects-inl.h', ++ 'objects-printer.cc', ++ 'objects.cc', ++ 'objects.h', ++ 'optimizing-compile-dispatcher.cc', ++ 'optimizing-compile-dispatcher.h', ++ 'ostreams.cc', ++ 'ostreams.h', ++ 'parsing/expression-classifier.h', ++ 'parsing/func-name-inferrer.cc', ++ 'parsing/func-name-inferrer.h', ++ 'parsing/parameter-initializer-rewriter.cc', ++ 'parsing/parameter-initializer-rewriter.h', ++ 'parsing/parser-base.h', ++ 'parsing/parser.cc', ++ 'parsing/parser.h', ++ 'parsing/pattern-rewriter.cc', ++ 'parsing/preparse-data-format.h', ++ 'parsing/preparse-data.cc', ++ 'parsing/preparse-data.h', ++ 'parsing/preparser.cc', ++ 'parsing/preparser.h', ++ 'parsing/rewriter.cc', ++ 'parsing/rewriter.h', ++ 'parsing/scanner-character-streams.cc', ++ 'parsing/scanner-character-streams.h', ++ 'parsing/scanner.cc', ++ 'parsing/scanner.h', ++ 'parsing/token.cc', ++ 'parsing/token.h', ++ 'pending-compilation-error-handler.cc', ++ 'pending-compilation-error-handler.h', ++ 'perf-jit.cc', ++ 'perf-jit.h', ++ 'profiler/allocation-tracker.cc', ++ 'profiler/allocation-tracker.h', ++ 'profiler/circular-queue-inl.h', ++ 'profiler/circular-queue.h', ++ 'profiler/cpu-profiler-inl.h', ++ 'profiler/cpu-profiler.cc', ++ 'profiler/cpu-profiler.h', ++ 'profiler/heap-profiler.cc', ++ 'profiler/heap-profiler.h', ++ 'profiler/heap-snapshot-generator-inl.h', ++ 'profiler/heap-snapshot-generator.cc', ++ 'profiler/heap-snapshot-generator.h', ++ 'profiler/profiler-listener.cc', ++ 'profiler/profiler-listener.h', ++ 'profiler/profile-generator-inl.h', ++ 'profiler/profile-generator.cc', ++ 'profiler/profile-generator.h', ++ 'profiler/sampling-heap-profiler.cc', ++ 'profiler/sampling-heap-profiler.h', ++ 'profiler/strings-storage.cc', ++ 'profiler/strings-storage.h', ++ 'profiler/tick-sample.cc', ++ 'profiler/tick-sample.h', ++ 'profiler/unbound-queue-inl.h', ++ 'profiler/unbound-queue.h', ++ 'property-descriptor.cc', ++ 'property-descriptor.h', ++ 'property-details.h', ++ 'property.cc', ++ 'property.h', ++ 'prototype.h', ++ 'regexp/bytecodes-irregexp.h', ++ 'regexp/interpreter-irregexp.cc', ++ 'regexp/interpreter-irregexp.h', ++ 'regexp/jsregexp-inl.h', ++ 'regexp/jsregexp.cc', ++ 'regexp/jsregexp.h', ++ 'regexp/regexp-ast.cc', ++ 'regexp/regexp-ast.h', ++ 'regexp/regexp-macro-assembler-irregexp-inl.h', ++ 'regexp/regexp-macro-assembler-irregexp.cc', ++ 'regexp/regexp-macro-assembler-irregexp.h', ++ 'regexp/regexp-macro-assembler-tracer.cc', ++ 'regexp/regexp-macro-assembler-tracer.h', ++ 'regexp/regexp-macro-assembler.cc', ++ 'regexp/regexp-macro-assembler.h', ++ 'regexp/regexp-parser.cc', ++ 'regexp/regexp-parser.h', ++ 'regexp/regexp-stack.cc', ++ 'regexp/regexp-stack.h', ++ 'register-configuration.cc', ++ 'register-configuration.h', ++ 'runtime-profiler.cc', ++ 'runtime-profiler.h', ++ 'runtime/runtime-array.cc', ++ 'runtime/runtime-atomics.cc', ++ 'runtime/runtime-classes.cc', ++ 'runtime/runtime-collections.cc', ++ 'runtime/runtime-compiler.cc', ++ 'runtime/runtime-date.cc', ++ 'runtime/runtime-debug.cc', ++ 'runtime/runtime-forin.cc', ++ 'runtime/runtime-function.cc', ++ 'runtime/runtime-futex.cc', ++ 'runtime/runtime-generator.cc', ++ 'runtime/runtime-i18n.cc', ++ 'runtime/runtime-internal.cc', ++ 'runtime/runtime-interpreter.cc', ++ 'runtime/runtime-literals.cc', ++ 'runtime/runtime-liveedit.cc', ++ 'runtime/runtime-maths.cc', ++ 'runtime/runtime-numbers.cc', ++ 'runtime/runtime-object.cc', ++ 'runtime/runtime-operators.cc', ++ 'runtime/runtime-proxy.cc', ++ 'runtime/runtime-regexp.cc', ++ 'runtime/runtime-scopes.cc', ++ 'runtime/runtime-simd.cc', ++ 'runtime/runtime-strings.cc', ++ 'runtime/runtime-symbol.cc', ++ 'runtime/runtime-test.cc', ++ 'runtime/runtime-typedarray.cc', ++ 'runtime/runtime-utils.h', ++ 'runtime/runtime.cc', ++ 'runtime/runtime.h', ++ 'safepoint-table.cc', ++ 'safepoint-table.h', ++ 'signature.h', ++ 'simulator.h', ++ 'small-pointer-list.h', ++ 'snapshot/code-serializer.cc', ++ 'snapshot/code-serializer.h', ++ 'snapshot/deserializer.cc', ++ 'snapshot/deserializer.h', ++ 'snapshot/natives.h', ++ 'snapshot/natives-common.cc', ++ 'snapshot/partial-serializer.cc', ++ 'snapshot/partial-serializer.h', ++ 'snapshot/serializer.cc', ++ 'snapshot/serializer.h', ++ 'snapshot/serializer-common.cc', ++ 'snapshot/serializer-common.h', ++ 'snapshot/snapshot.h', ++ 'snapshot/snapshot-common.cc', ++ 'snapshot/snapshot-source-sink.cc', ++ 'snapshot/snapshot-source-sink.h', ++ 'snapshot/startup-serializer.cc', ++ 'snapshot/startup-serializer.h', ++ 'source-position.h', ++ 'splay-tree.h', ++ 'splay-tree-inl.h', ++ 'startup-data-util.cc', ++ 'startup-data-util.h', ++ 'string-builder.cc', ++ 'string-builder.h', ++ 'string-search.h', ++ 'string-stream.cc', ++ 'string-stream.h', ++ 'strtod.cc', ++ 'strtod.h', ++ 'ic/stub-cache.cc', ++ 'ic/stub-cache.h', ++ 'tracing/trace-event.cc', ++ 'tracing/trace-event.h', ++ 'transitions-inl.h', ++ 'transitions.cc', ++ 'transitions.h', ++ 'type-cache.cc', ++ 'type-cache.h', ++ 'type-feedback-vector-inl.h', ++ 'type-feedback-vector.cc', ++ 'type-feedback-vector.h', ++ 'type-info.cc', ++ 'type-info.h', ++ 'types.cc', ++ 'types.h', ++ 'typing-asm.cc', ++ 'typing-asm.h', ++ 'unicode-inl.h', ++ 'unicode.cc', ++ 'unicode.h', ++ 'unicode-cache-inl.h', ++ 'unicode-cache.h', ++ 'unicode-decoder.cc', ++ 'unicode-decoder.h', ++ 'uri.cc', ++ 'uri.h', ++ 'utils-inl.h', ++ 'utils.cc', ++ 'utils.h', ++ 'v8.cc', ++ 'v8.h', ++ 'v8memory.h', ++ 'v8threads.cc', ++ 'v8threads.h', ++ 'vector.h', ++ 'version.cc', ++ 'version.h', ++ 'vm-state-inl.h', ++ 'vm-state.h', ++ 'wasm/asm-types.cc', ++ 'wasm/asm-types.h', ++ 'wasm/asm-wasm-builder.cc', ++ 'wasm/asm-wasm-builder.h', ++ 'wasm/ast-decoder.cc', ++ 'wasm/ast-decoder.h', ++ 'wasm/decoder.h', ++ 'wasm/encoder.cc', ++ 'wasm/encoder.h', ++ 'wasm/leb-helper.h', ++ 'wasm/module-decoder.cc', ++ 'wasm/module-decoder.h', ++ 'wasm/switch-logic.h', ++ 'wasm/switch-logic.cc', ++ 'wasm/wasm-debug.cc', ++ 'wasm/wasm-debug.h', ++ 'wasm/wasm-external-refs.cc', ++ 'wasm/wasm-external-refs.h', ++ 'wasm/wasm-function-name-table.cc', ++ 'wasm/wasm-function-name-table.h', ++ 'wasm/wasm-js.cc', ++ 'wasm/wasm-js.h', ++ 'wasm/wasm-macro-gen.h', ++ 'wasm/wasm-module.cc', ++ 'wasm/wasm-module.h', ++ 'wasm/wasm-interpreter.cc', ++ 'wasm/wasm-interpreter.h', ++ 'wasm/wasm-opcodes.cc', ++ 'wasm/wasm-opcodes.h', ++ 'wasm/wasm-result.cc', ++ 'wasm/wasm-result.h', ++ 'zone.cc', ++ 'zone.h', ++ 'zone-allocator.h', ++ 'zone-containers.h', + ], + 'conditions': [ + ['OS!="win" and remove_v8base_debug_symbols==1', { @@ -4074,354 +4154,396 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }], + ['v8_target_arch=="arm"', { + 'sources': [ ### gcmole(arch:arm) ### -+ '../../src/arm/assembler-arm-inl.h', -+ '../../src/arm/assembler-arm.cc', -+ '../../src/arm/assembler-arm.h', -+ '../../src/arm/builtins-arm.cc', -+ '../../src/arm/code-stubs-arm.cc', -+ '../../src/arm/code-stubs-arm.h', -+ '../../src/arm/codegen-arm.cc', -+ '../../src/arm/codegen-arm.h', -+ '../../src/arm/constants-arm.h', -+ '../../src/arm/constants-arm.cc', -+ '../../src/arm/cpu-arm.cc', -+ '../../src/arm/deoptimizer-arm.cc', -+ '../../src/arm/disasm-arm.cc', -+ '../../src/arm/frames-arm.cc', -+ '../../src/arm/frames-arm.h', -+ '../../src/arm/interface-descriptors-arm.cc', -+ '../../src/arm/interface-descriptors-arm.h', -+ '../../src/arm/macro-assembler-arm.cc', -+ '../../src/arm/macro-assembler-arm.h', -+ '../../src/arm/simulator-arm.cc', -+ '../../src/arm/simulator-arm.h', -+ '../../src/compiler/arm/code-generator-arm.cc', -+ '../../src/compiler/arm/instruction-codes-arm.h', -+ '../../src/compiler/arm/instruction-scheduler-arm.cc', -+ '../../src/compiler/arm/instruction-selector-arm.cc', -+ '../../src/crankshaft/arm/lithium-arm.cc', -+ '../../src/crankshaft/arm/lithium-arm.h', -+ '../../src/crankshaft/arm/lithium-codegen-arm.cc', -+ '../../src/crankshaft/arm/lithium-codegen-arm.h', -+ '../../src/crankshaft/arm/lithium-gap-resolver-arm.cc', -+ '../../src/crankshaft/arm/lithium-gap-resolver-arm.h', -+ '../../src/debug/arm/debug-arm.cc', -+ '../../src/full-codegen/arm/full-codegen-arm.cc', -+ '../../src/ic/arm/access-compiler-arm.cc', -+ '../../src/ic/arm/handler-compiler-arm.cc', -+ '../../src/ic/arm/ic-arm.cc', -+ '../../src/ic/arm/ic-compiler-arm.cc', -+ '../../src/ic/arm/stub-cache-arm.cc', -+ '../../src/regexp/arm/regexp-macro-assembler-arm.cc', -+ '../../src/regexp/arm/regexp-macro-assembler-arm.h', ++ 'arm/assembler-arm-inl.h', ++ 'arm/assembler-arm.cc', ++ 'arm/assembler-arm.h', ++ 'arm/builtins-arm.cc', ++ 'arm/code-stubs-arm.cc', ++ 'arm/code-stubs-arm.h', ++ 'arm/codegen-arm.cc', ++ 'arm/codegen-arm.h', ++ 'arm/constants-arm.h', ++ 'arm/constants-arm.cc', ++ 'arm/cpu-arm.cc', ++ 'arm/deoptimizer-arm.cc', ++ 'arm/disasm-arm.cc', ++ 'arm/frames-arm.cc', ++ 'arm/frames-arm.h', ++ 'arm/interface-descriptors-arm.cc', ++ 'arm/interface-descriptors-arm.h', ++ 'arm/macro-assembler-arm.cc', ++ 'arm/macro-assembler-arm.h', ++ 'arm/simulator-arm.cc', ++ 'arm/simulator-arm.h', ++ 'compiler/arm/code-generator-arm.cc', ++ 'compiler/arm/instruction-codes-arm.h', ++ 'compiler/arm/instruction-scheduler-arm.cc', ++ 'compiler/arm/instruction-selector-arm.cc', ++ 'crankshaft/arm/lithium-arm.cc', ++ 'crankshaft/arm/lithium-arm.h', ++ 'crankshaft/arm/lithium-codegen-arm.cc', ++ 'crankshaft/arm/lithium-codegen-arm.h', ++ 'crankshaft/arm/lithium-gap-resolver-arm.cc', ++ 'crankshaft/arm/lithium-gap-resolver-arm.h', ++ 'debug/arm/debug-arm.cc', ++ 'full-codegen/arm/full-codegen-arm.cc', ++ 'ic/arm/access-compiler-arm.cc', ++ 'ic/arm/handler-compiler-arm.cc', ++ 'ic/arm/ic-arm.cc', ++ 'ic/arm/ic-compiler-arm.cc', ++ 'ic/arm/stub-cache-arm.cc', ++ 'regexp/arm/regexp-macro-assembler-arm.cc', ++ 'regexp/arm/regexp-macro-assembler-arm.h', + ], + }], + ['v8_target_arch=="arm64"', { + 'sources': [ ### gcmole(arch:arm64) ### -+ '../../src/arm64/assembler-arm64.cc', -+ '../../src/arm64/assembler-arm64.h', -+ '../../src/arm64/assembler-arm64-inl.h', -+ '../../src/arm64/builtins-arm64.cc', -+ '../../src/arm64/codegen-arm64.cc', -+ '../../src/arm64/codegen-arm64.h', -+ '../../src/arm64/code-stubs-arm64.cc', -+ '../../src/arm64/code-stubs-arm64.h', -+ '../../src/arm64/constants-arm64.h', -+ '../../src/arm64/cpu-arm64.cc', -+ '../../src/arm64/decoder-arm64.cc', -+ '../../src/arm64/decoder-arm64.h', -+ '../../src/arm64/decoder-arm64-inl.h', -+ '../../src/arm64/deoptimizer-arm64.cc', -+ '../../src/arm64/disasm-arm64.cc', -+ '../../src/arm64/disasm-arm64.h', -+ '../../src/arm64/frames-arm64.cc', -+ '../../src/arm64/frames-arm64.h', -+ '../../src/arm64/instructions-arm64.cc', -+ '../../src/arm64/instructions-arm64.h', -+ '../../src/arm64/instrument-arm64.cc', -+ '../../src/arm64/instrument-arm64.h', -+ '../../src/arm64/interface-descriptors-arm64.cc', -+ '../../src/arm64/interface-descriptors-arm64.h', -+ '../../src/arm64/macro-assembler-arm64.cc', -+ '../../src/arm64/macro-assembler-arm64.h', -+ '../../src/arm64/macro-assembler-arm64-inl.h', -+ '../../src/arm64/simulator-arm64.cc', -+ '../../src/arm64/simulator-arm64.h', -+ '../../src/arm64/utils-arm64.cc', -+ '../../src/arm64/utils-arm64.h', -+ '../../src/compiler/arm64/code-generator-arm64.cc', -+ '../../src/compiler/arm64/instruction-codes-arm64.h', -+ '../../src/compiler/arm64/instruction-scheduler-arm64.cc', -+ '../../src/compiler/arm64/instruction-selector-arm64.cc', -+ '../../src/crankshaft/arm64/delayed-masm-arm64.cc', -+ '../../src/crankshaft/arm64/delayed-masm-arm64.h', -+ '../../src/crankshaft/arm64/delayed-masm-arm64-inl.h', -+ '../../src/crankshaft/arm64/lithium-arm64.cc', -+ '../../src/crankshaft/arm64/lithium-arm64.h', -+ '../../src/crankshaft/arm64/lithium-codegen-arm64.cc', -+ '../../src/crankshaft/arm64/lithium-codegen-arm64.h', -+ '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.cc', -+ '../../src/crankshaft/arm64/lithium-gap-resolver-arm64.h', -+ '../../src/debug/arm64/debug-arm64.cc', -+ '../../src/full-codegen/arm64/full-codegen-arm64.cc', -+ '../../src/ic/arm64/access-compiler-arm64.cc', -+ '../../src/ic/arm64/handler-compiler-arm64.cc', -+ '../../src/ic/arm64/ic-arm64.cc', -+ '../../src/ic/arm64/ic-compiler-arm64.cc', -+ '../../src/ic/arm64/stub-cache-arm64.cc', -+ '../../src/regexp/arm64/regexp-macro-assembler-arm64.cc', -+ '../../src/regexp/arm64/regexp-macro-assembler-arm64.h', ++ 'arm64/assembler-arm64.cc', ++ 'arm64/assembler-arm64.h', ++ 'arm64/assembler-arm64-inl.h', ++ 'arm64/builtins-arm64.cc', ++ 'arm64/codegen-arm64.cc', ++ 'arm64/codegen-arm64.h', ++ 'arm64/code-stubs-arm64.cc', ++ 'arm64/code-stubs-arm64.h', ++ 'arm64/constants-arm64.h', ++ 'arm64/cpu-arm64.cc', ++ 'arm64/decoder-arm64.cc', ++ 'arm64/decoder-arm64.h', ++ 'arm64/decoder-arm64-inl.h', ++ 'arm64/deoptimizer-arm64.cc', ++ 'arm64/disasm-arm64.cc', ++ 'arm64/disasm-arm64.h', ++ 'arm64/frames-arm64.cc', ++ 'arm64/frames-arm64.h', ++ 'arm64/instructions-arm64.cc', ++ 'arm64/instructions-arm64.h', ++ 'arm64/instrument-arm64.cc', ++ 'arm64/instrument-arm64.h', ++ 'arm64/interface-descriptors-arm64.cc', ++ 'arm64/interface-descriptors-arm64.h', ++ 'arm64/macro-assembler-arm64.cc', ++ 'arm64/macro-assembler-arm64.h', ++ 'arm64/macro-assembler-arm64-inl.h', ++ 'arm64/simulator-arm64.cc', ++ 'arm64/simulator-arm64.h', ++ 'arm64/utils-arm64.cc', ++ 'arm64/utils-arm64.h', ++ 'compiler/arm64/code-generator-arm64.cc', ++ 'compiler/arm64/instruction-codes-arm64.h', ++ 'compiler/arm64/instruction-scheduler-arm64.cc', ++ 'compiler/arm64/instruction-selector-arm64.cc', ++ 'crankshaft/arm64/delayed-masm-arm64.cc', ++ 'crankshaft/arm64/delayed-masm-arm64.h', ++ 'crankshaft/arm64/delayed-masm-arm64-inl.h', ++ 'crankshaft/arm64/lithium-arm64.cc', ++ 'crankshaft/arm64/lithium-arm64.h', ++ 'crankshaft/arm64/lithium-codegen-arm64.cc', ++ 'crankshaft/arm64/lithium-codegen-arm64.h', ++ 'crankshaft/arm64/lithium-gap-resolver-arm64.cc', ++ 'crankshaft/arm64/lithium-gap-resolver-arm64.h', ++ 'debug/arm64/debug-arm64.cc', ++ 'full-codegen/arm64/full-codegen-arm64.cc', ++ 'ic/arm64/access-compiler-arm64.cc', ++ 'ic/arm64/handler-compiler-arm64.cc', ++ 'ic/arm64/ic-arm64.cc', ++ 'ic/arm64/ic-compiler-arm64.cc', ++ 'ic/arm64/stub-cache-arm64.cc', ++ 'regexp/arm64/regexp-macro-assembler-arm64.cc', ++ 'regexp/arm64/regexp-macro-assembler-arm64.h', + ], + }], + ['v8_target_arch=="ia32"', { + 'sources': [ ### gcmole(arch:ia32) ### -+ '../../src/ia32/assembler-ia32-inl.h', -+ '../../src/ia32/assembler-ia32.cc', -+ '../../src/ia32/assembler-ia32.h', -+ '../../src/ia32/builtins-ia32.cc', -+ '../../src/ia32/code-stubs-ia32.cc', -+ '../../src/ia32/code-stubs-ia32.h', -+ '../../src/ia32/codegen-ia32.cc', -+ '../../src/ia32/codegen-ia32.h', -+ '../../src/ia32/cpu-ia32.cc', -+ '../../src/ia32/deoptimizer-ia32.cc', -+ '../../src/ia32/disasm-ia32.cc', -+ '../../src/ia32/frames-ia32.cc', -+ '../../src/ia32/frames-ia32.h', -+ '../../src/ia32/interface-descriptors-ia32.cc', -+ '../../src/ia32/macro-assembler-ia32.cc', -+ '../../src/ia32/macro-assembler-ia32.h', -+ '../../src/compiler/ia32/code-generator-ia32.cc', -+ '../../src/compiler/ia32/instruction-codes-ia32.h', -+ '../../src/compiler/ia32/instruction-scheduler-ia32.cc', -+ '../../src/compiler/ia32/instruction-selector-ia32.cc', -+ '../../src/crankshaft/ia32/lithium-codegen-ia32.cc', -+ '../../src/crankshaft/ia32/lithium-codegen-ia32.h', -+ '../../src/crankshaft/ia32/lithium-gap-resolver-ia32.cc', -+ '../../src/crankshaft/ia32/lithium-gap-resolver-ia32.h', -+ '../../src/crankshaft/ia32/lithium-ia32.cc', -+ '../../src/crankshaft/ia32/lithium-ia32.h', -+ '../../src/debug/ia32/debug-ia32.cc', -+ '../../src/full-codegen/ia32/full-codegen-ia32.cc', -+ '../../src/ic/ia32/access-compiler-ia32.cc', -+ '../../src/ic/ia32/handler-compiler-ia32.cc', -+ '../../src/ic/ia32/ic-ia32.cc', -+ '../../src/ic/ia32/ic-compiler-ia32.cc', -+ '../../src/ic/ia32/stub-cache-ia32.cc', -+ '../../src/regexp/ia32/regexp-macro-assembler-ia32.cc', -+ '../../src/regexp/ia32/regexp-macro-assembler-ia32.h', ++ 'ia32/assembler-ia32-inl.h', ++ 'ia32/assembler-ia32.cc', ++ 'ia32/assembler-ia32.h', ++ 'ia32/builtins-ia32.cc', ++ 'ia32/code-stubs-ia32.cc', ++ 'ia32/code-stubs-ia32.h', ++ 'ia32/codegen-ia32.cc', ++ 'ia32/codegen-ia32.h', ++ 'ia32/cpu-ia32.cc', ++ 'ia32/deoptimizer-ia32.cc', ++ 'ia32/disasm-ia32.cc', ++ 'ia32/frames-ia32.cc', ++ 'ia32/frames-ia32.h', ++ 'ia32/interface-descriptors-ia32.cc', ++ 'ia32/macro-assembler-ia32.cc', ++ 'ia32/macro-assembler-ia32.h', ++ 'compiler/ia32/code-generator-ia32.cc', ++ 'compiler/ia32/instruction-codes-ia32.h', ++ 'compiler/ia32/instruction-scheduler-ia32.cc', ++ 'compiler/ia32/instruction-selector-ia32.cc', ++ 'crankshaft/ia32/lithium-codegen-ia32.cc', ++ 'crankshaft/ia32/lithium-codegen-ia32.h', ++ 'crankshaft/ia32/lithium-gap-resolver-ia32.cc', ++ 'crankshaft/ia32/lithium-gap-resolver-ia32.h', ++ 'crankshaft/ia32/lithium-ia32.cc', ++ 'crankshaft/ia32/lithium-ia32.h', ++ 'debug/ia32/debug-ia32.cc', ++ 'full-codegen/ia32/full-codegen-ia32.cc', ++ 'ic/ia32/access-compiler-ia32.cc', ++ 'ic/ia32/handler-compiler-ia32.cc', ++ 'ic/ia32/ic-ia32.cc', ++ 'ic/ia32/ic-compiler-ia32.cc', ++ 'ic/ia32/stub-cache-ia32.cc', ++ 'regexp/ia32/regexp-macro-assembler-ia32.cc', ++ 'regexp/ia32/regexp-macro-assembler-ia32.h', + ], + }], + ['v8_target_arch=="x87"', { + 'sources': [ ### gcmole(arch:x87) ### -+ '../../src/x87/assembler-x87-inl.h', -+ '../../src/x87/assembler-x87.cc', -+ '../../src/x87/assembler-x87.h', -+ '../../src/x87/builtins-x87.cc', -+ '../../src/x87/code-stubs-x87.cc', -+ '../../src/x87/code-stubs-x87.h', -+ '../../src/x87/codegen-x87.cc', -+ '../../src/x87/codegen-x87.h', -+ '../../src/x87/cpu-x87.cc', -+ '../../src/x87/deoptimizer-x87.cc', -+ '../../src/x87/disasm-x87.cc', -+ '../../src/x87/frames-x87.cc', -+ '../../src/x87/frames-x87.h', -+ '../../src/x87/interface-descriptors-x87.cc', -+ '../../src/x87/macro-assembler-x87.cc', -+ '../../src/x87/macro-assembler-x87.h', -+ '../../src/compiler/x87/code-generator-x87.cc', -+ '../../src/compiler/x87/instruction-codes-x87.h', -+ '../../src/compiler/x87/instruction-scheduler-x87.cc', -+ '../../src/compiler/x87/instruction-selector-x87.cc', -+ '../../src/crankshaft/x87/lithium-codegen-x87.cc', -+ '../../src/crankshaft/x87/lithium-codegen-x87.h', -+ '../../src/crankshaft/x87/lithium-gap-resolver-x87.cc', -+ '../../src/crankshaft/x87/lithium-gap-resolver-x87.h', -+ '../../src/crankshaft/x87/lithium-x87.cc', -+ '../../src/crankshaft/x87/lithium-x87.h', -+ '../../src/debug/x87/debug-x87.cc', -+ '../../src/full-codegen/x87/full-codegen-x87.cc', -+ '../../src/ic/x87/access-compiler-x87.cc', -+ '../../src/ic/x87/handler-compiler-x87.cc', -+ '../../src/ic/x87/ic-x87.cc', -+ '../../src/ic/x87/ic-compiler-x87.cc', -+ '../../src/ic/x87/stub-cache-x87.cc', -+ '../../src/regexp/x87/regexp-macro-assembler-x87.cc', -+ '../../src/regexp/x87/regexp-macro-assembler-x87.h', ++ 'x87/assembler-x87-inl.h', ++ 'x87/assembler-x87.cc', ++ 'x87/assembler-x87.h', ++ 'x87/builtins-x87.cc', ++ 'x87/code-stubs-x87.cc', ++ 'x87/code-stubs-x87.h', ++ 'x87/codegen-x87.cc', ++ 'x87/codegen-x87.h', ++ 'x87/cpu-x87.cc', ++ 'x87/deoptimizer-x87.cc', ++ 'x87/disasm-x87.cc', ++ 'x87/frames-x87.cc', ++ 'x87/frames-x87.h', ++ 'x87/interface-descriptors-x87.cc', ++ 'x87/macro-assembler-x87.cc', ++ 'x87/macro-assembler-x87.h', ++ 'compiler/x87/code-generator-x87.cc', ++ 'compiler/x87/instruction-codes-x87.h', ++ 'compiler/x87/instruction-scheduler-x87.cc', ++ 'compiler/x87/instruction-selector-x87.cc', ++ 'crankshaft/x87/lithium-codegen-x87.cc', ++ 'crankshaft/x87/lithium-codegen-x87.h', ++ 'crankshaft/x87/lithium-gap-resolver-x87.cc', ++ 'crankshaft/x87/lithium-gap-resolver-x87.h', ++ 'crankshaft/x87/lithium-x87.cc', ++ 'crankshaft/x87/lithium-x87.h', ++ 'debug/x87/debug-x87.cc', ++ 'full-codegen/x87/full-codegen-x87.cc', ++ 'ic/x87/access-compiler-x87.cc', ++ 'ic/x87/handler-compiler-x87.cc', ++ 'ic/x87/ic-x87.cc', ++ 'ic/x87/ic-compiler-x87.cc', ++ 'ic/x87/stub-cache-x87.cc', ++ 'regexp/x87/regexp-macro-assembler-x87.cc', ++ 'regexp/x87/regexp-macro-assembler-x87.h', + ], + }], + ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { + 'sources': [ ### gcmole(arch:mipsel) ### -+ '../../src/mips/assembler-mips.cc', -+ '../../src/mips/assembler-mips.h', -+ '../../src/mips/assembler-mips-inl.h', -+ '../../src/mips/builtins-mips.cc', -+ '../../src/mips/codegen-mips.cc', -+ '../../src/mips/codegen-mips.h', -+ '../../src/mips/code-stubs-mips.cc', -+ '../../src/mips/code-stubs-mips.h', -+ '../../src/mips/constants-mips.cc', -+ '../../src/mips/constants-mips.h', -+ '../../src/mips/cpu-mips.cc', -+ '../../src/mips/deoptimizer-mips.cc', -+ '../../src/mips/disasm-mips.cc', -+ '../../src/mips/frames-mips.cc', -+ '../../src/mips/frames-mips.h', -+ '../../src/mips/interface-descriptors-mips.cc', -+ '../../src/mips/macro-assembler-mips.cc', -+ '../../src/mips/macro-assembler-mips.h', -+ '../../src/mips/simulator-mips.cc', -+ '../../src/mips/simulator-mips.h', -+ '../../src/compiler/mips/code-generator-mips.cc', -+ '../../src/compiler/mips/instruction-codes-mips.h', -+ '../../src/compiler/mips/instruction-scheduler-mips.cc', -+ '../../src/compiler/mips/instruction-selector-mips.cc', -+ '../../src/crankshaft/mips/lithium-codegen-mips.cc', -+ '../../src/crankshaft/mips/lithium-codegen-mips.h', -+ '../../src/crankshaft/mips/lithium-gap-resolver-mips.cc', -+ '../../src/crankshaft/mips/lithium-gap-resolver-mips.h', -+ '../../src/crankshaft/mips/lithium-mips.cc', -+ '../../src/crankshaft/mips/lithium-mips.h', -+ '../../src/full-codegen/mips/full-codegen-mips.cc', -+ '../../src/debug/mips/debug-mips.cc', -+ '../../src/ic/mips/access-compiler-mips.cc', -+ '../../src/ic/mips/handler-compiler-mips.cc', -+ '../../src/ic/mips/ic-mips.cc', -+ '../../src/ic/mips/ic-compiler-mips.cc', -+ '../../src/ic/mips/stub-cache-mips.cc', -+ '../../src/regexp/mips/regexp-macro-assembler-mips.cc', -+ '../../src/regexp/mips/regexp-macro-assembler-mips.h', ++ 'mips/assembler-mips.cc', ++ 'mips/assembler-mips.h', ++ 'mips/assembler-mips-inl.h', ++ 'mips/builtins-mips.cc', ++ 'mips/codegen-mips.cc', ++ 'mips/codegen-mips.h', ++ 'mips/code-stubs-mips.cc', ++ 'mips/code-stubs-mips.h', ++ 'mips/constants-mips.cc', ++ 'mips/constants-mips.h', ++ 'mips/cpu-mips.cc', ++ 'mips/deoptimizer-mips.cc', ++ 'mips/disasm-mips.cc', ++ 'mips/frames-mips.cc', ++ 'mips/frames-mips.h', ++ 'mips/interface-descriptors-mips.cc', ++ 'mips/macro-assembler-mips.cc', ++ 'mips/macro-assembler-mips.h', ++ 'mips/simulator-mips.cc', ++ 'mips/simulator-mips.h', ++ 'compiler/mips/code-generator-mips.cc', ++ 'compiler/mips/instruction-codes-mips.h', ++ 'compiler/mips/instruction-scheduler-mips.cc', ++ 'compiler/mips/instruction-selector-mips.cc', ++ 'crankshaft/mips/lithium-codegen-mips.cc', ++ 'crankshaft/mips/lithium-codegen-mips.h', ++ 'crankshaft/mips/lithium-gap-resolver-mips.cc', ++ 'crankshaft/mips/lithium-gap-resolver-mips.h', ++ 'crankshaft/mips/lithium-mips.cc', ++ 'crankshaft/mips/lithium-mips.h', ++ 'full-codegen/mips/full-codegen-mips.cc', ++ 'debug/mips/debug-mips.cc', ++ 'ic/mips/access-compiler-mips.cc', ++ 'ic/mips/handler-compiler-mips.cc', ++ 'ic/mips/ic-mips.cc', ++ 'ic/mips/ic-compiler-mips.cc', ++ 'ic/mips/stub-cache-mips.cc', ++ 'regexp/mips/regexp-macro-assembler-mips.cc', ++ 'regexp/mips/regexp-macro-assembler-mips.h', + ], + }], + ['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { + 'sources': [ ### gcmole(arch:mips64el) ### -+ '../../src/mips64/assembler-mips64.cc', -+ '../../src/mips64/assembler-mips64.h', -+ '../../src/mips64/assembler-mips64-inl.h', -+ '../../src/mips64/builtins-mips64.cc', -+ '../../src/mips64/codegen-mips64.cc', -+ '../../src/mips64/codegen-mips64.h', -+ '../../src/mips64/code-stubs-mips64.cc', -+ '../../src/mips64/code-stubs-mips64.h', -+ '../../src/mips64/constants-mips64.cc', -+ '../../src/mips64/constants-mips64.h', -+ '../../src/mips64/cpu-mips64.cc', -+ '../../src/mips64/deoptimizer-mips64.cc', -+ '../../src/mips64/disasm-mips64.cc', -+ '../../src/mips64/frames-mips64.cc', -+ '../../src/mips64/frames-mips64.h', -+ '../../src/mips64/interface-descriptors-mips64.cc', -+ '../../src/mips64/macro-assembler-mips64.cc', -+ '../../src/mips64/macro-assembler-mips64.h', -+ '../../src/mips64/simulator-mips64.cc', -+ '../../src/mips64/simulator-mips64.h', -+ '../../src/compiler/mips64/code-generator-mips64.cc', -+ '../../src/compiler/mips64/instruction-codes-mips64.h', -+ '../../src/compiler/mips64/instruction-scheduler-mips64.cc', -+ '../../src/compiler/mips64/instruction-selector-mips64.cc', -+ '../../src/crankshaft/mips64/lithium-codegen-mips64.cc', -+ '../../src/crankshaft/mips64/lithium-codegen-mips64.h', -+ '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.cc', -+ '../../src/crankshaft/mips64/lithium-gap-resolver-mips64.h', -+ '../../src/crankshaft/mips64/lithium-mips64.cc', -+ '../../src/crankshaft/mips64/lithium-mips64.h', -+ '../../src/debug/mips64/debug-mips64.cc', -+ '../../src/full-codegen/mips64/full-codegen-mips64.cc', -+ '../../src/ic/mips64/access-compiler-mips64.cc', -+ '../../src/ic/mips64/handler-compiler-mips64.cc', -+ '../../src/ic/mips64/ic-mips64.cc', -+ '../../src/ic/mips64/ic-compiler-mips64.cc', -+ '../../src/ic/mips64/stub-cache-mips64.cc', -+ '../../src/regexp/mips64/regexp-macro-assembler-mips64.cc', -+ '../../src/regexp/mips64/regexp-macro-assembler-mips64.h', ++ 'mips64/assembler-mips64.cc', ++ 'mips64/assembler-mips64.h', ++ 'mips64/assembler-mips64-inl.h', ++ 'mips64/builtins-mips64.cc', ++ 'mips64/codegen-mips64.cc', ++ 'mips64/codegen-mips64.h', ++ 'mips64/code-stubs-mips64.cc', ++ 'mips64/code-stubs-mips64.h', ++ 'mips64/constants-mips64.cc', ++ 'mips64/constants-mips64.h', ++ 'mips64/cpu-mips64.cc', ++ 'mips64/deoptimizer-mips64.cc', ++ 'mips64/disasm-mips64.cc', ++ 'mips64/frames-mips64.cc', ++ 'mips64/frames-mips64.h', ++ 'mips64/interface-descriptors-mips64.cc', ++ 'mips64/macro-assembler-mips64.cc', ++ 'mips64/macro-assembler-mips64.h', ++ 'mips64/simulator-mips64.cc', ++ 'mips64/simulator-mips64.h', ++ 'compiler/mips64/code-generator-mips64.cc', ++ 'compiler/mips64/instruction-codes-mips64.h', ++ 'compiler/mips64/instruction-scheduler-mips64.cc', ++ 'compiler/mips64/instruction-selector-mips64.cc', ++ 'crankshaft/mips64/lithium-codegen-mips64.cc', ++ 'crankshaft/mips64/lithium-codegen-mips64.h', ++ 'crankshaft/mips64/lithium-gap-resolver-mips64.cc', ++ 'crankshaft/mips64/lithium-gap-resolver-mips64.h', ++ 'crankshaft/mips64/lithium-mips64.cc', ++ 'crankshaft/mips64/lithium-mips64.h', ++ 'debug/mips64/debug-mips64.cc', ++ 'full-codegen/mips64/full-codegen-mips64.cc', ++ 'ic/mips64/access-compiler-mips64.cc', ++ 'ic/mips64/handler-compiler-mips64.cc', ++ 'ic/mips64/ic-mips64.cc', ++ 'ic/mips64/ic-compiler-mips64.cc', ++ 'ic/mips64/stub-cache-mips64.cc', ++ 'regexp/mips64/regexp-macro-assembler-mips64.cc', ++ 'regexp/mips64/regexp-macro-assembler-mips64.h', + ], + }], + ['v8_target_arch=="x64" or v8_target_arch=="x32"', { + 'sources': [ ### gcmole(arch:x64) ### -+ '../../src/crankshaft/x64/lithium-codegen-x64.cc', -+ '../../src/crankshaft/x64/lithium-codegen-x64.h', -+ '../../src/crankshaft/x64/lithium-gap-resolver-x64.cc', -+ '../../src/crankshaft/x64/lithium-gap-resolver-x64.h', -+ '../../src/crankshaft/x64/lithium-x64.cc', -+ '../../src/crankshaft/x64/lithium-x64.h', -+ '../../src/x64/assembler-x64-inl.h', -+ '../../src/x64/assembler-x64.cc', -+ '../../src/x64/assembler-x64.h', -+ '../../src/x64/builtins-x64.cc', -+ '../../src/x64/code-stubs-x64.cc', -+ '../../src/x64/code-stubs-x64.h', -+ '../../src/x64/codegen-x64.cc', -+ '../../src/x64/codegen-x64.h', -+ '../../src/x64/cpu-x64.cc', -+ '../../src/x64/deoptimizer-x64.cc', -+ '../../src/x64/disasm-x64.cc', -+ '../../src/x64/frames-x64.cc', -+ '../../src/x64/frames-x64.h', -+ '../../src/x64/interface-descriptors-x64.cc', -+ '../../src/x64/macro-assembler-x64.cc', -+ '../../src/x64/macro-assembler-x64.h', -+ '../../src/debug/x64/debug-x64.cc', -+ '../../src/full-codegen/x64/full-codegen-x64.cc', -+ '../../src/ic/x64/access-compiler-x64.cc', -+ '../../src/ic/x64/handler-compiler-x64.cc', -+ '../../src/ic/x64/ic-x64.cc', -+ '../../src/ic/x64/ic-compiler-x64.cc', -+ '../../src/ic/x64/stub-cache-x64.cc', -+ '../../src/regexp/x64/regexp-macro-assembler-x64.cc', -+ '../../src/regexp/x64/regexp-macro-assembler-x64.h', ++ 'crankshaft/x64/lithium-codegen-x64.cc', ++ 'crankshaft/x64/lithium-codegen-x64.h', ++ 'crankshaft/x64/lithium-gap-resolver-x64.cc', ++ 'crankshaft/x64/lithium-gap-resolver-x64.h', ++ 'crankshaft/x64/lithium-x64.cc', ++ 'crankshaft/x64/lithium-x64.h', ++ 'x64/assembler-x64-inl.h', ++ 'x64/assembler-x64.cc', ++ 'x64/assembler-x64.h', ++ 'x64/builtins-x64.cc', ++ 'x64/code-stubs-x64.cc', ++ 'x64/code-stubs-x64.h', ++ 'x64/codegen-x64.cc', ++ 'x64/codegen-x64.h', ++ 'x64/cpu-x64.cc', ++ 'x64/deoptimizer-x64.cc', ++ 'x64/disasm-x64.cc', ++ 'x64/frames-x64.cc', ++ 'x64/frames-x64.h', ++ 'x64/interface-descriptors-x64.cc', ++ 'x64/macro-assembler-x64.cc', ++ 'x64/macro-assembler-x64.h', ++ 'debug/x64/debug-x64.cc', ++ 'full-codegen/x64/full-codegen-x64.cc', ++ 'ic/x64/access-compiler-x64.cc', ++ 'ic/x64/handler-compiler-x64.cc', ++ 'ic/x64/ic-x64.cc', ++ 'ic/x64/ic-compiler-x64.cc', ++ 'ic/x64/stub-cache-x64.cc', ++ 'regexp/x64/regexp-macro-assembler-x64.cc', ++ 'regexp/x64/regexp-macro-assembler-x64.h', + ], + }], + ['v8_target_arch=="x64"', { + 'sources': [ -+ '../../src/compiler/x64/code-generator-x64.cc', -+ '../../src/compiler/x64/instruction-codes-x64.h', -+ '../../src/compiler/x64/instruction-scheduler-x64.cc', -+ '../../src/compiler/x64/instruction-selector-x64.cc', ++ 'compiler/x64/code-generator-x64.cc', ++ 'compiler/x64/instruction-codes-x64.h', ++ 'compiler/x64/instruction-scheduler-x64.cc', ++ 'compiler/x64/instruction-selector-x64.cc', + ], + }], + ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { + 'sources': [ ### gcmole(arch:ppc) ### -+ '../../src/compiler/ppc/code-generator-ppc.cc', -+ '../../src/compiler/ppc/instruction-codes-ppc.h', -+ '../../src/compiler/ppc/instruction-scheduler-ppc.cc', -+ '../../src/compiler/ppc/instruction-selector-ppc.cc', -+ '../../src/crankshaft/ppc/lithium-ppc.cc', -+ '../../src/crankshaft/ppc/lithium-ppc.h', -+ '../../src/crankshaft/ppc/lithium-codegen-ppc.cc', -+ '../../src/crankshaft/ppc/lithium-codegen-ppc.h', -+ '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.cc', -+ '../../src/crankshaft/ppc/lithium-gap-resolver-ppc.h', -+ '../../src/debug/ppc/debug-ppc.cc', -+ '../../src/full-codegen/ppc/full-codegen-ppc.cc', -+ '../../src/ic/ppc/access-compiler-ppc.cc', -+ '../../src/ic/ppc/handler-compiler-ppc.cc', -+ '../../src/ic/ppc/ic-ppc.cc', -+ '../../src/ic/ppc/ic-compiler-ppc.cc', -+ '../../src/ic/ppc/stub-cache-ppc.cc', -+ '../../src/ppc/assembler-ppc-inl.h', -+ '../../src/ppc/assembler-ppc.cc', -+ '../../src/ppc/assembler-ppc.h', -+ '../../src/ppc/builtins-ppc.cc', -+ '../../src/ppc/code-stubs-ppc.cc', -+ '../../src/ppc/code-stubs-ppc.h', -+ '../../src/ppc/codegen-ppc.cc', -+ '../../src/ppc/codegen-ppc.h', -+ '../../src/ppc/constants-ppc.h', -+ '../../src/ppc/constants-ppc.cc', -+ '../../src/ppc/cpu-ppc.cc', -+ '../../src/ppc/deoptimizer-ppc.cc', -+ '../../src/ppc/disasm-ppc.cc', -+ '../../src/ppc/frames-ppc.cc', -+ '../../src/ppc/frames-ppc.h', -+ '../../src/ppc/interface-descriptors-ppc.cc', -+ '../../src/ppc/interface-descriptors-ppc.h', -+ '../../src/ppc/macro-assembler-ppc.cc', -+ '../../src/ppc/macro-assembler-ppc.h', -+ '../../src/ppc/simulator-ppc.cc', -+ '../../src/ppc/simulator-ppc.h', -+ '../../src/regexp/ppc/regexp-macro-assembler-ppc.cc', -+ '../../src/regexp/ppc/regexp-macro-assembler-ppc.h', ++ 'compiler/ppc/code-generator-ppc.cc', ++ 'compiler/ppc/instruction-codes-ppc.h', ++ 'compiler/ppc/instruction-scheduler-ppc.cc', ++ 'compiler/ppc/instruction-selector-ppc.cc', ++ 'crankshaft/ppc/lithium-ppc.cc', ++ 'crankshaft/ppc/lithium-ppc.h', ++ 'crankshaft/ppc/lithium-codegen-ppc.cc', ++ 'crankshaft/ppc/lithium-codegen-ppc.h', ++ 'crankshaft/ppc/lithium-gap-resolver-ppc.cc', ++ 'crankshaft/ppc/lithium-gap-resolver-ppc.h', ++ 'debug/ppc/debug-ppc.cc', ++ 'full-codegen/ppc/full-codegen-ppc.cc', ++ 'ic/ppc/access-compiler-ppc.cc', ++ 'ic/ppc/handler-compiler-ppc.cc', ++ 'ic/ppc/ic-ppc.cc', ++ 'ic/ppc/ic-compiler-ppc.cc', ++ 'ic/ppc/stub-cache-ppc.cc', ++ 'ppc/assembler-ppc-inl.h', ++ 'ppc/assembler-ppc.cc', ++ 'ppc/assembler-ppc.h', ++ 'ppc/builtins-ppc.cc', ++ 'ppc/code-stubs-ppc.cc', ++ 'ppc/code-stubs-ppc.h', ++ 'ppc/codegen-ppc.cc', ++ 'ppc/codegen-ppc.h', ++ 'ppc/constants-ppc.h', ++ 'ppc/constants-ppc.cc', ++ 'ppc/cpu-ppc.cc', ++ 'ppc/deoptimizer-ppc.cc', ++ 'ppc/disasm-ppc.cc', ++ 'ppc/frames-ppc.cc', ++ 'ppc/frames-ppc.h', ++ 'ppc/interface-descriptors-ppc.cc', ++ 'ppc/macro-assembler-ppc.cc', ++ 'ppc/macro-assembler-ppc.h', ++ 'ppc/simulator-ppc.cc', ++ 'ppc/simulator-ppc.h', ++ 'regexp/ppc/regexp-macro-assembler-ppc.cc', ++ 'regexp/ppc/regexp-macro-assembler-ppc.h', ++ ], ++ }], ++ ['v8_target_arch=="s390" or v8_target_arch=="s390x"', { ++ 'sources': [ ### gcmole(arch:s390) ### ++ 'compiler/s390/code-generator-s390.cc', ++ 'compiler/s390/instruction-codes-s390.h', ++ 'compiler/s390/instruction-scheduler-s390.cc', ++ 'compiler/s390/instruction-selector-s390.cc', ++ 'crankshaft/s390/lithium-codegen-s390.cc', ++ 'crankshaft/s390/lithium-codegen-s390.h', ++ 'crankshaft/s390/lithium-gap-resolver-s390.cc', ++ 'crankshaft/s390/lithium-gap-resolver-s390.h', ++ 'crankshaft/s390/lithium-s390.cc', ++ 'crankshaft/s390/lithium-s390.h', ++ 'debug/s390/debug-s390.cc', ++ 'full-codegen/s390/full-codegen-s390.cc', ++ 'ic/s390/access-compiler-s390.cc', ++ 'ic/s390/handler-compiler-s390.cc', ++ 'ic/s390/ic-compiler-s390.cc', ++ 'ic/s390/ic-s390.cc', ++ 'ic/s390/stub-cache-s390.cc', ++ 'regexp/s390/regexp-macro-assembler-s390.cc', ++ 'regexp/s390/regexp-macro-assembler-s390.h', ++ 's390/assembler-s390.cc', ++ 's390/assembler-s390.h', ++ 's390/assembler-s390-inl.h', ++ 's390/builtins-s390.cc', ++ 's390/codegen-s390.cc', ++ 's390/codegen-s390.h', ++ 's390/code-stubs-s390.cc', ++ 's390/code-stubs-s390.h', ++ 's390/constants-s390.cc', ++ 's390/constants-s390.h', ++ 's390/cpu-s390.cc', ++ 's390/deoptimizer-s390.cc', ++ 's390/disasm-s390.cc', ++ 's390/frames-s390.cc', ++ 's390/frames-s390.h', ++ 's390/interface-descriptors-s390.cc', ++ 's390/macro-assembler-s390.cc', ++ 's390/macro-assembler-s390.h', ++ 's390/simulator-s390.cc', ++ 's390/simulator-s390.h', + ], + }], + ['OS=="win"', { @@ -4449,11 +4571,24 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'dependencies': [ + '<(icu_gyp_path):icui18n', + '<(icu_gyp_path):icuuc', -+ ] ++ ], ++ 'conditions': [ ++ ['icu_use_data_file_flag==1', { ++ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], ++ }, { # else icu_use_data_file_flag !=1 ++ 'conditions': [ ++ ['OS=="win"', { ++ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'], ++ }, { ++ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'], ++ }], ++ ], ++ }], ++ ], + }, { # v8_enable_i18n_support==0 + 'sources!': [ -+ '../../src/i18n.cc', -+ '../../src/i18n.h', ++ 'i18n.cc', ++ 'i18n.h', + ], + }], + ['OS=="win" and v8_enable_i18n_support==1', { @@ -4461,17 +4596,6 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '<(icu_gyp_path):icudata', + ], + }], -+ ['icu_use_data_file_flag==1', { -+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], -+ }, { # else icu_use_data_file_flag !=1 -+ 'conditions': [ -+ ['OS=="win"', { -+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'], -+ }, { -+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'], -+ }], -+ ], -+ }], + ], + }, + { @@ -4481,60 +4605,70 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'optimize': 'max', + }, + 'include_dirs+': [ -+ '../..', ++ '..', + ], + 'sources': [ -+ '../../src/base/adapters.h', -+ '../../src/base/atomicops.h', -+ '../../src/base/atomicops_internals_arm64_gcc.h', -+ '../../src/base/atomicops_internals_arm_gcc.h', -+ '../../src/base/atomicops_internals_atomicword_compat.h', -+ '../../src/base/atomicops_internals_mac.h', -+ '../../src/base/atomicops_internals_mips_gcc.h', -+ '../../src/base/atomicops_internals_mips64_gcc.h', -+ '../../src/base/atomicops_internals_portable.h', -+ '../../src/base/atomicops_internals_ppc_gcc.h', -+ '../../src/base/atomicops_internals_tsan.h', -+ '../../src/base/atomicops_internals_x86_gcc.cc', -+ '../../src/base/atomicops_internals_x86_gcc.h', -+ '../../src/base/atomicops_internals_x86_msvc.h', -+ '../../src/base/bits.cc', -+ '../../src/base/bits.h', -+ '../../src/base/build_config.h', -+ '../../src/base/compiler-specific.h', -+ '../../src/base/cpu.cc', -+ '../../src/base/cpu.h', -+ '../../src/base/division-by-constant.cc', -+ '../../src/base/division-by-constant.h', -+ '../../src/base/flags.h', -+ '../../src/base/functional.cc', -+ '../../src/base/functional.h', -+ '../../src/base/iterator.h', -+ '../../src/base/lazy-instance.h', -+ '../../src/base/logging.cc', -+ '../../src/base/logging.h', -+ '../../src/base/macros.h', -+ '../../src/base/once.cc', -+ '../../src/base/once.h', -+ '../../src/base/platform/elapsed-timer.h', -+ '../../src/base/platform/time.cc', -+ '../../src/base/platform/time.h', -+ '../../src/base/platform/condition-variable.cc', -+ '../../src/base/platform/condition-variable.h', -+ '../../src/base/platform/mutex.cc', -+ '../../src/base/platform/mutex.h', -+ '../../src/base/platform/platform.h', -+ '../../src/base/platform/semaphore.cc', -+ '../../src/base/platform/semaphore.h', -+ '../../src/base/safe_conversions.h', -+ '../../src/base/safe_conversions_impl.h', -+ '../../src/base/safe_math.h', -+ '../../src/base/safe_math_impl.h', -+ '../../src/base/smart-pointers.h', -+ '../../src/base/sys-info.cc', -+ '../../src/base/sys-info.h', -+ '../../src/base/utils/random-number-generator.cc', -+ '../../src/base/utils/random-number-generator.h', ++ 'base/accounting-allocator.cc', ++ 'base/accounting-allocator.h', ++ 'base/adapters.h', ++ 'base/atomic-utils.h', ++ 'base/atomicops.h', ++ 'base/atomicops_internals_arm64_gcc.h', ++ 'base/atomicops_internals_arm_gcc.h', ++ 'base/atomicops_internals_atomicword_compat.h', ++ 'base/atomicops_internals_mac.h', ++ 'base/atomicops_internals_mips_gcc.h', ++ 'base/atomicops_internals_mips64_gcc.h', ++ 'base/atomicops_internals_portable.h', ++ 'base/atomicops_internals_ppc_gcc.h', ++ 'base/atomicops_internals_s390_gcc.h', ++ 'base/atomicops_internals_tsan.h', ++ 'base/atomicops_internals_x86_gcc.cc', ++ 'base/atomicops_internals_x86_gcc.h', ++ 'base/atomicops_internals_x86_msvc.h', ++ 'base/bits.cc', ++ 'base/bits.h', ++ 'base/build_config.h', ++ 'base/compiler-specific.h', ++ 'base/cpu.cc', ++ 'base/cpu.h', ++ 'base/division-by-constant.cc', ++ 'base/division-by-constant.h', ++ 'base/file-utils.cc', ++ 'base/file-utils.h', ++ 'base/flags.h', ++ 'base/format-macros.h', ++ 'base/functional.cc', ++ 'base/functional.h', ++ 'base/hashmap.h', ++ 'base/ieee754.cc', ++ 'base/ieee754.h', ++ 'base/iterator.h', ++ 'base/lazy-instance.h', ++ 'base/logging.cc', ++ 'base/logging.h', ++ 'base/macros.h', ++ 'base/once.cc', ++ 'base/once.h', ++ 'base/platform/elapsed-timer.h', ++ 'base/platform/time.cc', ++ 'base/platform/time.h', ++ 'base/platform/condition-variable.cc', ++ 'base/platform/condition-variable.h', ++ 'base/platform/mutex.cc', ++ 'base/platform/mutex.h', ++ 'base/platform/platform.h', ++ 'base/platform/semaphore.cc', ++ 'base/platform/semaphore.h', ++ 'base/safe_conversions.h', ++ 'base/safe_conversions_impl.h', ++ 'base/safe_math.h', ++ 'base/safe_math_impl.h', ++ 'base/smart-pointers.h', ++ 'base/sys-info.cc', ++ 'base/sys-info.h', ++ 'base/utils/random-number-generator.cc', ++ 'base/utils/random-number-generator.h', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { @@ -4558,22 +4692,23 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }], + ], + 'sources': [ -+ '../../src/base/platform/platform-linux.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-linux.cc', ++ 'base/platform/platform-posix.cc' + ], + } + ], + ['OS=="android"', { + 'sources': [ -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-posix.cc' + ], + 'link_settings': { + 'target_conditions': [ -+ ['_toolset=="host"', { ++ ['_toolset=="host" and host_os!="mac"', { + # Only include libdl and librt on host builds because they + # are included by default on Android target builds, and we + # don't want to re-include them here since this will change + # library order and break (see crbug.com/469973). ++ # These libraries do not exist on Mac hosted builds. + 'libraries': [ + '-ldl', + '-lrt' @@ -4586,17 +4721,17 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'target_conditions': [ + ['_toolset=="host"', { + 'sources': [ -+ '../../src/base/platform/platform-macos.cc' ++ 'base/platform/platform-macos.cc' + ] + }, { + 'sources': [ -+ '../../src/base/platform/platform-linux.cc' ++ 'base/platform/platform-linux.cc' + ] + }], + ], + }, { + 'sources': [ -+ '../../src/base/platform/platform-linux.cc' ++ 'base/platform/platform-linux.cc' + ] + }], + ], @@ -4618,23 +4753,23 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + }, + 'sources': [ -+ '../../src/base/platform/platform-posix.cc', -+ '../../src/base/qnx-math.h', ++ 'base/platform/platform-posix.cc', ++ 'base/qnx-math.h', + ], + 'target_conditions': [ + ['_toolset=="host" and host_os=="linux"', { + 'sources': [ -+ '../../src/base/platform/platform-linux.cc' ++ 'base/platform/platform-linux.cc' + ], + }], + ['_toolset=="host" and host_os=="mac"', { + 'sources': [ -+ '../../src/base/platform/platform-macos.cc' ++ 'base/platform/platform-macos.cc' + ], + }], + ['_toolset=="target"', { + 'sources': [ -+ '../../src/base/platform/platform-qnx.cc' ++ 'base/platform/platform-qnx.cc' + ], + }], + ], @@ -4646,8 +4781,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '-L/usr/local/lib -lexecinfo', + ]}, + 'sources': [ -+ '../../src/base/platform/platform-freebsd.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-freebsd.cc', ++ 'base/platform/platform-posix.cc' + ], + } + ], @@ -4657,8 +4792,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '-L/usr/local/lib -lexecinfo', + ]}, + 'sources': [ -+ '../../src/base/platform/platform-openbsd.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-openbsd.cc', ++ 'base/platform/platform-posix.cc' + ], + } + ], @@ -4668,15 +4803,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo', + ]}, + 'sources': [ -+ '../../src/base/platform/platform-openbsd.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-openbsd.cc', ++ 'base/platform/platform-posix.cc' + ], + } + ], + ['OS=="aix"', { + 'sources': [ -+ '../../src/base/platform/platform-aix.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-aix.cc', ++ 'base/platform/platform-posix.cc' + ]}, + ], + ['OS=="solaris"', { @@ -4685,15 +4820,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + '-lnsl -lrt', + ]}, + 'sources': [ -+ '../../src/base/platform/platform-solaris.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-solaris.cc', ++ 'base/platform/platform-posix.cc' + ], + } + ], + ['OS=="mac"', { + 'sources': [ -+ '../../src/base/platform/platform-macos.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-macos.cc', ++ 'base/platform/platform-posix.cc' + ]}, + ], + ['OS=="win"', { @@ -4711,13 +4846,13 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'conditions': [ + ['build_env=="Cygwin"', { + 'sources': [ -+ '../../src/base/platform/platform-cygwin.cc', -+ '../../src/base/platform/platform-posix.cc' ++ 'base/platform/platform-cygwin.cc', ++ 'base/platform/platform-posix.cc' + ], + }, { + 'sources': [ -+ '../../src/base/platform/platform-win32.cc', -+ '../../src/base/win32-headers.h', ++ 'base/platform/platform-win32.cc', ++ 'base/win32-headers.h', + ], + }], + ], @@ -4726,8 +4861,8 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }, + }, { + 'sources': [ -+ '../../src/base/platform/platform-win32.cc', -+ '../../src/base/win32-headers.h', ++ 'base/platform/platform-win32.cc', ++ 'base/win32-headers.h', + ], + 'msvs_disabled_warnings': [4351, 4355, 4800], + 'link_settings': { @@ -4748,16 +4883,17 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'v8_libbase_sse2', + ], + 'include_dirs+': [ -+ '../..', ++ '..', ++ '../include', + ], + 'sources': [ -+ '../../include/libplatform/libplatform.h', -+ '../../src/libplatform/default-platform.cc', -+ '../../src/libplatform/default-platform.h', -+ '../../src/libplatform/task-queue.cc', -+ '../../src/libplatform/task-queue.h', -+ '../../src/libplatform/worker-thread.cc', -+ '../../src/libplatform/worker-thread.h', ++ '../include/libplatform/libplatform.h', ++ 'libplatform/default-platform.cc', ++ 'libplatform/default-platform.h', ++ 'libplatform/task-queue.cc', ++ 'libplatform/task-queue.h', ++ 'libplatform/worker-thread.cc', ++ 'libplatform/worker-thread.h', + ], + 'conditions': [ + ['want_separate_host_toolset==1', { @@ -4766,6 +4902,41 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'toolsets': ['target'], + }], + ], ++ 'direct_dependent_settings': { ++ 'include_dirs': [ ++ '../include', ++ ], ++ }, ++ }, ++ { ++ 'target_name': 'v8_libsampler_sse2', ++ 'type': 'static_library', ++ 'variables': { ++ 'optimize': 'max', ++ }, ++ 'dependencies': [ ++ 'v8_libbase_sse2', ++ ], ++ 'include_dirs+': [ ++ '..', ++ '../include', ++ ], ++ 'sources': [ ++ 'libsampler/v8-sampler.cc', ++ 'libsampler/v8-sampler.h' ++ ], ++ 'conditions': [ ++ ['want_separate_host_toolset==1', { ++ 'toolsets': ['host', 'target'], ++ }, { ++ 'toolsets': ['target'], ++ }], ++ ], ++ 'direct_dependent_settings': { ++ 'include_dirs': [ ++ '../include', ++ ], ++ }, + }, + { + 'target_name': 'natives_blob_sse2', @@ -4782,7 +4953,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'actions': [{ + 'action_name': 'v8_sse2_concatenate_natives_blob', + 'inputs': [ -+ '../../tools/concatenate-files.py', ++ '../tools/concatenate-files.py', + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', + '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', + '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', @@ -4834,104 +5005,90 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }, { + 'toolsets': ['target'], + }], -+ ['v8_enable_i18n_support==1', { -+ 'variables': { -+ 'i18n_library_files': [ -+ '../../src/js/i18n.js', -+ ], -+ }, -+ }, { -+ 'variables': { -+ 'i18n_library_files': [], -+ }, -+ }], + ], + 'variables': { + 'library_files': [ -+ '../../src/js/macros.py', -+ '../../src/messages.h', -+ '../../src/js/prologue.js', -+ '../../src/js/runtime.js', -+ '../../src/js/v8natives.js', -+ '../../src/js/symbol.js', -+ '../../src/js/array.js', -+ '../../src/js/string.js', -+ '../../src/js/uri.js', -+ '../../src/js/math.js', -+ '../../src/third_party/fdlibm/fdlibm.js', -+ '../../src/js/regexp.js', -+ '../../src/js/arraybuffer.js', -+ '../../src/js/typedarray.js', -+ '../../src/js/iterator-prototype.js', -+ '../../src/js/generator.js', -+ '../../src/js/object-observe.js', -+ '../../src/js/collection.js', -+ '../../src/js/weak-collection.js', -+ '../../src/js/collection-iterator.js', -+ '../../src/js/promise.js', -+ '../../src/js/messages.js', -+ '../../src/js/json.js', -+ '../../src/js/array-iterator.js', -+ '../../src/js/string-iterator.js', -+ '../../src/js/templates.js', -+ '../../src/js/spread.js', -+ '../../src/debug/mirrors.js', -+ '../../src/debug/debug.js', -+ '../../src/debug/liveedit.js', ++ 'js/macros.py', ++ 'messages.h', ++ 'js/prologue.js', ++ 'js/runtime.js', ++ 'js/v8natives.js', ++ 'js/symbol.js', ++ 'js/array.js', ++ 'js/string.js', ++ 'js/math.js', ++ 'third_party/fdlibm/fdlibm.js', ++ 'js/regexp.js', ++ 'js/arraybuffer.js', ++ 'js/typedarray.js', ++ 'js/iterator-prototype.js', ++ 'js/collection.js', ++ 'js/weak-collection.js', ++ 'js/collection-iterator.js', ++ 'js/promise.js', ++ 'js/messages.js', ++ 'js/array-iterator.js', ++ 'js/string-iterator.js', ++ 'js/templates.js', ++ 'js/spread.js', ++ 'js/proxy.js', ++ 'debug/mirrors.js', ++ 'debug/debug.js', ++ 'debug/liveedit.js', + ], + 'experimental_library_files': [ -+ '../../src/js/macros.py', -+ '../../src/messages.h', -+ '../../src/js/proxy.js', -+ '../../src/js/generator.js', -+ '../../src/js/harmony-atomics.js', -+ '../../src/js/harmony-regexp.js', -+ '../../src/js/harmony-reflect.js', -+ '../../src/js/harmony-object-observe.js', -+ '../../src/js/harmony-sharedarraybuffer.js', -+ '../../src/js/harmony-simd.js', -+ '../../src/js/harmony-species.js', -+ '../../src/js/harmony-unicode-regexps.js', -+ '../../src/js/promise-extra.js', ++ 'js/macros.py', ++ 'messages.h', ++ 'js/harmony-atomics.js', ++ 'js/harmony-sharedarraybuffer.js', ++ 'js/harmony-simd.js', ++ 'js/harmony-string-padding.js', ++ 'js/promise-extra.js', ++ 'js/harmony-async-await.js' + ], + 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.bin', + 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental_sse2.bin', + 'libraries_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-extras_sse2.bin', + 'libraries_experimental_extras_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental-extras_sse2.bin', ++ 'conditions': [ ++ ['v8_enable_i18n_support==1', { ++ 'library_files': ['js/i18n.js'], ++ 'experimental_library_files': [ ++ 'js/icu-case-mapping.js', ++ 'js/intl-extra.js', ++ ], ++ }], ++ ], + }, + 'actions': [ + { + 'action_name': 'v8_sse2_js2c', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(library_files)', -+ '<@(i18n_library_files)' + ], + 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + 'CORE', + '<@(library_files)', -+ '<@(i18n_library_files)' + ], + }, + { + 'action_name': 'v8_sse2_js2c_bin', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(library_files)', -+ '<@(i18n_library_files)' + ], + 'outputs': ['<@(libraries_bin_file)'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', + 'CORE', + '<@(library_files)', -+ '<@(i18n_library_files)', + '--startup_blob', '<@(libraries_bin_file)', + '--nojs', + ], @@ -4939,28 +5096,28 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + { + 'action_name': 'v8_sse2_js2c_experimental', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(experimental_library_files)', + ], + 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + 'EXPERIMENTAL', -+ '<@(experimental_library_files)' ++ '<@(experimental_library_files)', + ], + }, + { + 'action_name': 'v8_sse2_js2c_experimental_bin', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(experimental_library_files)', + ], + 'outputs': ['<@(libraries_experimental_bin_file)'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', + 'EXPERIMENTAL', + '<@(experimental_library_files)', @@ -4971,13 +5128,13 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + { + 'action_name': 'v8_sse2_js2c_extras', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(v8_extra_library_files)', + ], + 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + 'EXTRAS', + '<@(v8_extra_library_files)', @@ -4986,13 +5143,13 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + { + 'action_name': 'v8_sse2_js2c_extras_bin', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(v8_extra_library_files)', + ], + 'outputs': ['<@(libraries_extras_bin_file)'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', + 'EXTRAS', + '<@(v8_extra_library_files)', @@ -5003,7 +5160,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + { + 'action_name': 'v8_sse2_js2c_experimental_extras', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(v8_experimental_extra_library_files)', + ], + 'outputs': [ @@ -5011,7 +5168,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', + 'EXPERIMENTAL_EXTRAS', + '<@(v8_experimental_extra_library_files)', @@ -5020,13 +5177,13 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + { + 'action_name': 'v8_sse2_js2c_experimental_extras_bin', + 'inputs': [ -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<@(v8_experimental_extra_library_files)', + ], + 'outputs': ['<@(libraries_experimental_extras_bin_file)'], + 'action': [ + 'python', -+ '../../tools/js2c.py', ++ '../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', + 'EXPERIMENTAL_EXTRAS', + '<@(v8_experimental_extra_library_files)', @@ -5041,15 +5198,15 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'type': 'none', + 'variables': { + 'heapobject_files': [ -+ '../../src/objects.h', -+ '../../src/objects-inl.h', ++ 'objects.h', ++ 'objects-inl.h', + ], + }, + 'actions': [ + { + 'action_name': 'v8_sse2_gen-postmortem-metadata', + 'inputs': [ -+ '../../tools/gen-postmortem-metadata.py', ++ '../tools/gen-postmortem-metadata.py', + '<@(heapobject_files)', + ], + 'outputs': [ @@ -5057,7 +5214,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + ], + 'action': [ + 'python', -+ '../../tools/gen-postmortem-metadata.py', ++ '../tools/gen-postmortem-metadata.py', + '<@(_outputs)', + '<@(heapobject_files)' + ] @@ -5069,10 +5226,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + 'type': 'executable', + 'dependencies': ['v8_base_sse2', 'v8_nosnapshot_sse2', 'v8_libplatform_sse2'], + 'include_dirs+': [ -+ '../..', ++ '..', + ], + 'sources': [ -+ '../../src/snapshot/mksnapshot.cc', ++ 'snapshot/mksnapshot.cc', + ], + 'conditions': [ + ['v8_enable_i18n_support==1', { @@ -5090,9 +5247,9 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/v8/tools/gyp/v8 + }, + ], +} -diff -Nur qtwebengine-opensource-src-5.7.0/src/core/core_module.pro qtwebengine-opensource-src-5.7.0-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.7.0/src/core/core_module.pro 2016-06-07 06:20:06.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/core/core_module.pro 2016-07-17 18:06:40.383813518 +0200 +diff -Nur qtwebengine-opensource-src-5.8.0/src/core/core_module.pro qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.8.0/src/core/core_module.pro 2017-01-03 11:35:11.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro 2017-03-05 17:30:17.502552632 +0100 @@ -9,6 +9,29 @@ error("Could not find the linking information that gyp should have generated.") } @@ -5123,7 +5280,7 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/core/core_module.pro qtwebengine- load(qt_module) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() -@@ -72,7 +95,12 @@ +@@ -74,7 +97,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -5137,10 +5294,10 @@ diff -Nur qtwebengine-opensource-src-5.7.0/src/core/core_module.pro qtwebengine- !use?(system_icu) { icu.CONFIG += no_check_exist -diff -Nur qtwebengine-opensource-src-5.7.0/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.7.0-no-sse2/src/core/qtwebengine.gypi ---- qtwebengine-opensource-src-5.7.0/src/core/qtwebengine.gypi 2016-06-07 06:20:06.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-no-sse2/src/core/qtwebengine.gypi 2016-07-17 18:06:40.391813562 +0200 -@@ -60,6 +60,11 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi +--- qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi 2017-01-03 11:35:11.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi 2017-03-05 17:30:17.503552617 +0100 +@@ -63,6 +63,11 @@ }, }, 'conditions': [ diff --git a/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch b/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch new file mode 100644 index 0000000..ce2c180 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch @@ -0,0 +1,600 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-03-06 13:04:01.784297561 +0100 +@@ -454,7 +454,7 @@ + } + + void app::ClearTimerCommon(const CJS_Value& param) { +- if (param.GetType() != CJS_Value::VT_fxobject) ++ if (param.GetType() != CJS_Value::VT_object) + return; + + v8::Local pObj = param.ToV8Object(); +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-03-06 13:04:01.783297575 +0100 +@@ -411,22 +411,20 @@ + + int nlength = params.size(); + if (nlength == 9) { +- if (params[8].GetType() == CJS_Value::VT_fxobject) { ++ if (params[8].GetType() == CJS_Value::VT_object) { + v8::Local pObj = params[8].ToV8Object(); +- { +- if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { +- if (CJS_Object* pJSObj = params[8].ToCJSObject()) { +- if (PrintParamsObj* pprintparamsObj = +- (PrintParamsObj*)pJSObj->GetEmbedObject()) { +- bUI = pprintparamsObj->bUI; +- nStart = pprintparamsObj->nStart; +- nEnd = pprintparamsObj->nEnd; +- bSilent = pprintparamsObj->bSilent; +- bShrinkToFit = pprintparamsObj->bShrinkToFit; +- bPrintAsImage = pprintparamsObj->bPrintAsImage; +- bReverse = pprintparamsObj->bReverse; +- bAnnotations = pprintparamsObj->bAnnotations; +- } ++ if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { ++ if (CJS_Object* pJSObj = params[8].ToCJSObject()) { ++ if (PrintParamsObj* pprintparamsObj = ++ static_cast(pJSObj->GetEmbedObject())) { ++ bUI = pprintparamsObj->bUI; ++ nStart = pprintparamsObj->nStart; ++ nEnd = pprintparamsObj->nEnd; ++ bSilent = pprintparamsObj->bSilent; ++ bShrinkToFit = pprintparamsObj->bShrinkToFit; ++ bPrintAsImage = pprintparamsObj->bPrintAsImage; ++ bReverse = pprintparamsObj->bReverse; ++ bAnnotations = pprintparamsObj->bAnnotations; + } + } + } +@@ -597,18 +595,16 @@ + v8::Local pObj = params[0].ToV8Object(); + v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"cURL"); + if (!pValue.IsEmpty()) +- strURL = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ strURL = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"bFDF"); +- bFDF = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); ++ bFDF = CJS_Value(pRuntime, pValue).ToBool(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"bEmpty"); +- bEmpty = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); ++ bEmpty = CJS_Value(pRuntime, pValue).ToBool(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"aFields"); +- aFields.Attach( +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array()); ++ aFields.Attach(CJS_Value(pRuntime, pValue).ToV8Array()); + } + + CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); +@@ -691,25 +687,22 @@ + v8::Local pObj = params[0].ToV8Object(); + + v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"bUI"); +- bUI = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToInt(); ++ bUI = CJS_Value(pRuntime, pValue).ToInt(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cTo"); +- cTo = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cTo = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cCc"); +- cCc = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cCc = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cBcc"); +- cBcc = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cBcc = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cSubject"); +- cSubject = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cSubject = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cMsg"); +- cMsg = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cMsg = CJS_Value(pRuntime, pValue).ToCFXWideString(); + } + + pRuntime->BeginBlock(); +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-03-06 13:04:01.785297546 +0100 +@@ -17,63 +17,6 @@ + #include "fpdfsdk/javascript/cjs_context.h" + #include "fpdfsdk/javascript/resource.h" + +-// Helper class for compile-time calculation of hash values in order to +-// avoid having global object initializers. +-template +-struct CHash; +- +-// Only needed to hash single-character strings. +-template +-struct CHash { +- static const unsigned value = N; +-}; +- +-template +-struct CHash { +- static const unsigned value = (ACC * 1313LLU + N) & 0xFFFFFFFF; +-}; +- +-template +-struct CHash { +- static const unsigned value = CHash::value, Ns...>::value; +-}; +- +-const unsigned int JSCONST_nStringHash = +- CHash<'s', 't', 'r', 'i', 'n', 'g'>::value; +-const unsigned int JSCONST_nNumberHash = +- CHash<'n', 'u', 'm', 'b', 'e', 'r'>::value; +-const unsigned int JSCONST_nBoolHash = +- CHash<'b', 'o', 'o', 'l', 'e', 'a', 'n'>::value; +-const unsigned int JSCONST_nDateHash = CHash<'d', 'a', 't', 'e'>::value; +-const unsigned int JSCONST_nObjectHash = +- CHash<'o', 'b', 'j', 'e', 'c', 't'>::value; +-const unsigned int JSCONST_nFXobjHash = CHash<'f', 'x', 'o', 'b', 'j'>::value; +-const unsigned int JSCONST_nNullHash = CHash<'n', 'u', 'l', 'l'>::value; +-const unsigned int JSCONST_nUndefHash = +- CHash<'u', 'n', 'd', 'e', 'f', 'i', 'n', 'e', 'd'>::value; +- +-static unsigned JS_CalcHash(const wchar_t* main) { +- return (unsigned)FX_HashCode_GetW(CFX_WideStringC(main), false); +-} +- +-#ifndef NDEBUG +-class HashVerify { +- public: +- HashVerify(); +-} g_hashVerify; +- +-HashVerify::HashVerify() { +- ASSERT(JSCONST_nStringHash == JS_CalcHash(kFXJSValueNameString)); +- ASSERT(JSCONST_nNumberHash == JS_CalcHash(kFXJSValueNameNumber)); +- ASSERT(JSCONST_nBoolHash == JS_CalcHash(kFXJSValueNameBoolean)); +- ASSERT(JSCONST_nDateHash == JS_CalcHash(kFXJSValueNameDate)); +- ASSERT(JSCONST_nObjectHash == JS_CalcHash(kFXJSValueNameObject)); +- ASSERT(JSCONST_nFXobjHash == JS_CalcHash(kFXJSValueNameFxobj)); +- ASSERT(JSCONST_nNullHash == JS_CalcHash(kFXJSValueNameNull)); +- ASSERT(JSCONST_nUndefHash == JS_CalcHash(kFXJSValueNameUndefined)); +-} +-#endif +- + BEGIN_JS_STATIC_CONST(CJS_Global) + END_JS_STATIC_CONST() + +@@ -335,9 +278,8 @@ + CFX_WideString ws = + FXJS_ToString(isolate, FXJS_GetArrayElement(isolate, pKeyList, i)); + CFX_ByteString sKey = ws.UTF8Encode(); +- + v8::Local v = FXJS_GetObjectElement(isolate, pObj, ws); +- switch (GET_VALUE_TYPE(v)) { ++ switch (CJS_Value::GetValueType(v)) { + case CJS_Value::VT_number: { + CJS_KeyValue* pObjElement = new CJS_KeyValue; + pObjElement->nType = JS_GLOBALDATA_TYPE_NUMBER; +@@ -353,8 +295,7 @@ + array.Add(pObjElement); + } break; + case CJS_Value::VT_string: { +- CFX_ByteString sValue = +- CJS_Value(pRuntime, v, CJS_Value::VT_string).ToCFXByteString(); ++ CFX_ByteString sValue = CJS_Value(pRuntime, v).ToCFXByteString(); + CJS_KeyValue* pObjElement = new CJS_KeyValue; + pObjElement->nType = JS_GLOBALDATA_TYPE_STRING; + pObjElement->sKey = sKey; +@@ -500,26 +441,3 @@ + m_mapGlobal[propname] = pNewData; + return TRUE; + } +- +-CJS_Value::Type GET_VALUE_TYPE(v8::Local p) { +- const unsigned int nHash = JS_CalcHash(FXJS_GetTypeof(p)); +- +- if (nHash == JSCONST_nUndefHash) +- return CJS_Value::VT_undefined; +- if (nHash == JSCONST_nNullHash) +- return CJS_Value::VT_null; +- if (nHash == JSCONST_nStringHash) +- return CJS_Value::VT_string; +- if (nHash == JSCONST_nNumberHash) +- return CJS_Value::VT_number; +- if (nHash == JSCONST_nBoolHash) +- return CJS_Value::VT_boolean; +- if (nHash == JSCONST_nDateHash) +- return CJS_Value::VT_date; +- if (nHash == JSCONST_nObjectHash) +- return CJS_Value::VT_object; +- if (nHash == JSCONST_nFXobjHash) +- return CJS_Value::VT_fxobject; +- +- return CJS_Value::VT_unknown; +-} +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-03-06 13:04:01.783297575 +0100 +@@ -111,7 +111,7 @@ + CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); + C* pObj = reinterpret_cast(pJSObj->GetEmbedObject()); + CFX_WideString sError; +- CJS_PropValue propValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); ++ CJS_PropValue propValue(CJS_Value(pRuntime, value)); + propValue.StartSetting(); + if (!(pObj->*M)(pContext, propValue, sError)) { + FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string, +@@ -149,7 +149,7 @@ + IJS_Context* pContext = pRuntime->GetCurrentContext(); + std::vector parameters; + for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { +- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); ++ parameters.push_back(CJS_Value(pRuntime, info[i])); + } + CJS_Value valueRes(pRuntime); + CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); +@@ -404,7 +404,7 @@ + CFX_WideString propname = CFX_WideString::FromUTF8( + CFX_ByteStringC(*utf8_value, utf8_value.length())); + CFX_WideString sError; +- CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); ++ CJS_PropValue PropValue(CJS_Value(pRuntime, value)); + PropValue.StartSetting(); + if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) { + FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError)); +@@ -447,7 +447,7 @@ + IJS_Context* pContext = pRuntime->GetCurrentContext(); + std::vector parameters; + for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { +- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); ++ parameters.push_back(CJS_Value(pRuntime, info[i])); + } + CJS_Value valueRes(pRuntime); + CFX_WideString sError; +@@ -485,6 +485,4 @@ + } \ + } + +-CJS_Value::Type GET_VALUE_TYPE(v8::Local p); +- + #endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-03-06 13:10:30.896809956 +0100 +@@ -22,11 +22,10 @@ + return *(double*)g_nan; + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime) +- : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {} ++CJS_Value::CJS_Value(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {} + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t) +- : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {} ++CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue) ++ : m_pValue(pValue), m_pJSRuntime(pRuntime) {} + + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const int& iValue) + : m_pJSRuntime(pRuntime) { +@@ -48,23 +47,11 @@ + operator=(dValue); + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pJsObj) +- : m_pJSRuntime(pRuntime) { +- operator=(pJsObj); +-} +- + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pJsObj) + : m_pJSRuntime(pRuntime) { + operator=(pJsObj); + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Document* pJsDoc) +- : m_pJSRuntime(pRuntime) { +- m_eType = VT_object; +- if (pJsDoc) +- m_pValue = pJsDoc->ToV8Object(); +-} +- + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr) + : m_pJSRuntime(pRuntime) { + operator=(pWstr); +@@ -84,19 +71,17 @@ + + CJS_Value::CJS_Value(const CJS_Value& other) = default; + +-void CJS_Value::Attach(v8::Local pValue, Type t) { ++void CJS_Value::Attach(v8::Local pValue) { + m_pValue = pValue; +- m_eType = t; + } + + void CJS_Value::Attach(CJS_Value* pValue) { + if (pValue) +- Attach(pValue->ToV8Value(), pValue->GetType()); ++ Attach(pValue->ToV8Value()); + } + + void CJS_Value::Detach() { + m_pValue = v8::Local(); +- m_eType = VT_unknown; + } + + int CJS_Value::ToInt() const { +@@ -146,7 +131,7 @@ + + void CJS_Value::MaybeCoerceToNumber() { + bool bAllowNaN = false; +- if (m_eType == VT_string) { ++ if (GetType() == VT_string) { + CFX_ByteString bstr = ToCFXByteString(); + if (bstr.GetLength() == 0) + return; +@@ -162,32 +147,26 @@ + if (std::isnan(num->Value()) && !bAllowNaN) + return; + m_pValue = num; +- m_eType = VT_number; + } + + void CJS_Value::operator=(int iValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), iValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(bool bValue) { + m_pValue = FXJS_NewBoolean(m_pJSRuntime->GetIsolate(), bValue); +- m_eType = VT_boolean; + } + + void CJS_Value::operator=(double dValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), dValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(float fValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), fValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(v8::Local pObj) { + m_pValue = FXJS_NewObject(m_pJSRuntime->GetIsolate(), pObj); +- m_eType = VT_fxobject; + } + + void CJS_Value::operator=(CJS_Object* pObj) { +@@ -195,21 +174,12 @@ + operator=(pObj->ToV8Object()); + } + +-void CJS_Value::operator=(CJS_Document* pJsDoc) { +- m_eType = VT_object; +- if (pJsDoc) { +- m_pValue = pJsDoc->ToV8Object(); +- } +-} +- + void CJS_Value::operator=(const FX_WCHAR* pWstr) { + m_pValue = FXJS_NewString(m_pJSRuntime->GetIsolate(), (wchar_t*)pWstr); +- m_eType = VT_string; + } + + void CJS_Value::SetNull() { + m_pValue = FXJS_NewNull(); +- m_eType = VT_null; + } + + void CJS_Value::operator=(const FX_CHAR* pStr) { +@@ -219,36 +189,34 @@ + void CJS_Value::operator=(CJS_Array& array) { + m_pValue = + FXJS_NewObject2(m_pJSRuntime->GetIsolate(), (v8::Local)array); +- m_eType = VT_object; + } + + void CJS_Value::operator=(CJS_Date& date) { + m_pValue = FXJS_NewDate(m_pJSRuntime->GetIsolate(), (double)date); +- m_eType = VT_date; + } + + void CJS_Value::operator=(CJS_Value value) { + m_pValue = value.ToV8Value(); +- m_eType = value.m_eType; + m_pJSRuntime = value.m_pJSRuntime; + } + +-CJS_Value::Type CJS_Value::GetType() const { +- if (m_pValue.IsEmpty()) ++// static ++CJS_Value::Type CJS_Value::GetValueType(v8::Local value) { ++ if (value.IsEmpty()) + return VT_unknown; +- if (m_pValue->IsString()) ++ if (value->IsString()) + return VT_string; +- if (m_pValue->IsNumber()) ++ if (value->IsNumber()) + return VT_number; +- if (m_pValue->IsBoolean()) ++ if (value->IsBoolean()) + return VT_boolean; +- if (m_pValue->IsDate()) ++ if (value->IsDate()) + return VT_date; +- if (m_pValue->IsObject()) ++ if (value->IsObject()) + return VT_object; +- if (m_pValue->IsNull()) ++ if (value->IsNull()) + return VT_null; +- if (m_pValue->IsUndefined()) ++ if (value->IsUndefined()) + return VT_undefined; + return VT_unknown; + } +@@ -427,7 +395,7 @@ + return; + v8::Local p = + FXJS_GetArrayElement(m_pJSRuntime->GetIsolate(), m_pArray, index); +- value.Attach(p, CJS_Value::VT_object); ++ value.Attach(p); + } + + void CJS_Array::SetElement(unsigned index, CJS_Value value) { +@@ -899,7 +867,7 @@ + v8::Local v8Value = + FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); + if (!v8Value->IsUndefined()) +- result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); ++ result[i] = CJS_Value(pRuntime, v8Value); + } + va_end(ap); + return result; +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-03-06 13:04:01.784297561 +0100 +@@ -27,20 +27,17 @@ + VT_boolean, + VT_date, + VT_object, +- VT_fxobject, + VT_null, + VT_undefined + }; + + CJS_Value(CJS_Runtime* pRuntime); +- CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t); ++ CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue); + CJS_Value(CJS_Runtime* pRuntime, const int& iValue); + CJS_Value(CJS_Runtime* pRuntime, const double& dValue); + CJS_Value(CJS_Runtime* pRuntime, const float& fValue); + CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); +- CJS_Value(CJS_Runtime* pRuntime, v8::Local); +- CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); +- CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); ++ CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); + CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); + CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); + CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); +@@ -49,11 +46,12 @@ + CJS_Value(const CJS_Value& other); + + void SetNull(); +- void Attach(v8::Local pValue, Type t); ++ void Attach(v8::Local pValue); + void Attach(CJS_Value* pValue); + void Detach(); + +- Type GetType() const; ++ static Type GetValueType(v8::Local value); ++ Type GetType() const { return GetValueType(m_pValue); } + int ToInt() const; + bool ToBool() const; + double ToDouble() const; +@@ -66,8 +64,7 @@ + v8::Local ToV8Value() const; + + // Replace the current |m_pValue| with a v8::Number if possible +- // to make one from the current |m_pValue|, updating |m_eType| +- // as appropriate to indicate the result. ++ // to make one from the current |m_pValue|. + void MaybeCoerceToNumber(); + + void operator=(int iValue); +@@ -75,7 +72,6 @@ + void operator=(double val); + void operator=(float val); + void operator=(CJS_Object* val); +- void operator=(CJS_Document* val); + void operator=(v8::Local val); + void operator=(CJS_Array& val); + void operator=(CJS_Date& val); +@@ -91,7 +87,6 @@ + CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } + + protected: +- Type m_eType; + v8::Local m_pValue; + CJS_Runtime* m_pJSRuntime; + }; +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-03-06 13:06:10.884476877 +0100 +@@ -10,15 +10,6 @@ + + #include "core/fxcrt/include/fx_basic.h" + +-const wchar_t kFXJSValueNameString[] = L"string"; +-const wchar_t kFXJSValueNameNumber[] = L"number"; +-const wchar_t kFXJSValueNameBoolean[] = L"boolean"; +-const wchar_t kFXJSValueNameDate[] = L"date"; +-const wchar_t kFXJSValueNameObject[] = L"object"; +-const wchar_t kFXJSValueNameFxobj[] = L"fxobj"; +-const wchar_t kFXJSValueNameNull[] = L"null"; +-const wchar_t kFXJSValueNameUndefined[] = L"undefined"; +- + // Keep this consistent with the values defined in gin/public/context_holder.h + // (without actually requiring a dependency on gin itself for the standalone + // embedders of PDFIum). The value we want to use is: +@@ -540,26 +531,6 @@ + .ToLocalChecked()); + } + +-const wchar_t* FXJS_GetTypeof(v8::Local pObj) { +- if (pObj.IsEmpty()) +- return nullptr; +- if (pObj->IsString()) +- return kFXJSValueNameString; +- if (pObj->IsNumber()) +- return kFXJSValueNameNumber; +- if (pObj->IsBoolean()) +- return kFXJSValueNameBoolean; +- if (pObj->IsDate()) +- return kFXJSValueNameDate; +- if (pObj->IsObject()) +- return kFXJSValueNameObject; +- if (pObj->IsNull()) +- return kFXJSValueNameNull; +- if (pObj->IsUndefined()) +- return kFXJSValueNameUndefined; +- return nullptr; +-} +- + void FXJS_SetPrivate(v8::Isolate* pIsolate, + v8::Local pObj, + void* p) { +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-03-06 13:06:40.283062272 +0100 +@@ -118,15 +118,6 @@ + FXJS_PerIsolateData(); + }; + +-extern const wchar_t kFXJSValueNameString[]; +-extern const wchar_t kFXJSValueNameNumber[]; +-extern const wchar_t kFXJSValueNameBoolean[]; +-extern const wchar_t kFXJSValueNameDate[]; +-extern const wchar_t kFXJSValueNameObject[]; +-extern const wchar_t kFXJSValueNameFxobj[]; +-extern const wchar_t kFXJSValueNameNull[]; +-extern const wchar_t kFXJSValueNameUndefined[]; +- + class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + void* Allocate(size_t length) override; + void* AllocateUninitialized(size_t length) override; +@@ -209,7 +200,6 @@ + bool bStatic = false); + v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate); + int FXJS_GetObjDefnID(v8::Local pObj); +-const wchar_t* FXJS_GetTypeof(v8::Local pObj); + + void FXJS_SetPrivate(v8::Isolate* pIsolate, + v8::Local pObj, diff --git a/qtwebengine-opensource-src-5.7.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch similarity index 72% rename from qtwebengine-opensource-src-5.7.0-system-icu-utf.patch rename to qtwebengine-opensource-src-5.8.0-system-icu-utf.patch index 80b53a4..dff88b5 100644 --- a/qtwebengine-opensource-src-5.7.0-system-icu-utf.patch +++ b/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch @@ -1,7 +1,7 @@ -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2016-07-17 16:52:03.641799106 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2016-07-17 17:20:50.666600419 +0200 -@@ -632,8 +632,6 @@ +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:50:49.266714740 +0100 +@@ -674,8 +674,6 @@ 'third_party/dmg_fp/dmg_fp.h', 'third_party/dmg_fp/dtoa_wrapper.cc', 'third_party/dmg_fp/g_fmt.cc', @@ -9,22 +9,22 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi - 'third_party/icu/icu_utf.h', 'third_party/superfasthash/superfasthash.c', 'third_party/xdg_mime/xdgmime.h', - 'thread_task_runner_handle.cc', -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 16:52:03.642799111 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2016-07-17 17:20:50.667600425 +0200 -@@ -741,8 +741,6 @@ + 'threading/non_thread_safe.h', +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:50:49.267714725 +0100 +@@ -801,8 +801,6 @@ "third_party/dmg_fp/dmg_fp.h", "third_party/dmg_fp/dtoa_wrapper.cc", "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", "third_party/superfasthash/superfasthash.c", - "thread_task_runner_handle.cc", - "thread_task_runner_handle.h", -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2016-07-17 17:20:50.668600430 +0200 + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-03-05 16:50:49.267714725 +0100 @@ -18,7 +18,7 @@ #if defined(OS_MACOSX) @@ -34,7 +34,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi #endif #if defined(OS_WIN) -@@ -1138,9 +1138,9 @@ +@@ -1150,9 +1150,9 @@ int* index) { int codepoint = 0; while (*index < length && codepoint == 0) { @@ -46,10 +46,10 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi DCHECK_GT(codepoint, 0); if (codepoint > 0) { // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2016-07-17 17:25:23.443128277 +0200 -@@ -15,7 +15,7 @@ +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-03-05 16:50:49.268714710 +0100 +@@ -16,7 +16,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" @@ -58,7 +58,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi #include "base/values.h" namespace base { -@@ -625,8 +625,8 @@ +@@ -631,8 +631,8 @@ int32_t next_char = 0; while (CanConsume(1)) { @@ -69,7 +69,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi if (next_char < 0 || !IsValidCharacter(next_char)) { ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); return false; -@@ -719,7 +719,7 @@ +@@ -725,7 +725,7 @@ return false; } } else if (next_char == '"') { @@ -78,7 +78,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi out->Swap(&string); return true; } else { -@@ -759,10 +759,10 @@ +@@ -765,10 +765,10 @@ // If this is a high surrogate, consume the next code unit to get the // low surrogate. @@ -91,7 +91,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi return false; // Make sure that the token has more characters to consume the -@@ -779,24 +779,24 @@ +@@ -785,24 +785,24 @@ NextNChars(3); @@ -121,7 +121,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi } dest_string->append(code_unit8); -@@ -813,9 +813,9 @@ +@@ -819,9 +819,9 @@ } else { char utf8_units[4] = { 0 }; int offset = 0; @@ -133,9 +133,9 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi // zero terminated at this point. |offset| contains the correct length. dest->AppendString(std::string(utf8_units, offset)); } -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2016-07-17 17:20:50.668600430 +0200 +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-03-05 16:50:49.268714710 +0100 @@ -14,7 +14,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" @@ -145,9 +145,9 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2016-07-17 17:20:50.669600436 +0200 +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-03-05 16:50:49.404712681 +0100 @@ -4,13 +4,13 @@ #include "base/strings/pattern.h" @@ -203,9 +203,9 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi *p += offset; return c; } -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2016-07-17 17:20:50.669600436 +0200 +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-03-05 16:50:49.404712681 +0100 @@ -8,7 +8,7 @@ #include "base/logging.h" @@ -215,11 +215,11 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2016-07-17 17:29:39.032552674 +0200 -@@ -26,7 +26,7 @@ - #include "base/strings/string_split.h" +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-03-05 16:50:49.404712681 +0100 +@@ -25,7 +25,7 @@ + #include "base/memory/singleton.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" -#include "base/third_party/icu/icu_utf.h" @@ -227,7 +227,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi #include "build/build_config.h" namespace base { -@@ -358,19 +358,19 @@ +@@ -357,19 +357,19 @@ } DCHECK_LE(byte_size, static_cast(std::numeric_limits::max())); @@ -251,7 +251,7 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { char_index = prev - 1; -@@ -523,7 +523,7 @@ +@@ -522,7 +522,7 @@ while (char_index < src_len) { int32_t code_point; @@ -260,9 +260,9 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi if (!IsValidCharacter(code_point)) return false; } -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2016-07-17 17:31:29.363164013 +0200 +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-03-05 16:50:49.404712681 +0100 @@ -4,7 +4,7 @@ #include "base/strings/utf_string_conversion_utils.h" @@ -341,9 +341,9 @@ diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromi } // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-opensource-src-5.7.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2016-07-17 17:20:50.687600537 +0200 +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-03-05 16:50:49.405712666 +0100 @@ -5,13 +5,13 @@ #include "ui/gfx/utf16_indexing.h" diff --git a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch new file mode 100644 index 0000000..4f17325 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch @@ -0,0 +1,48 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 +@@ -676,8 +676,6 @@ + 'third_party/dmg_fp/g_fmt.cc', + 'third_party/icu/icu_utf.cc', + 'third_party/icu/icu_utf.h', +- 'third_party/nspr/prtime.cc', +- 'third_party/nspr/prtime.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'threading/non_thread_safe.h', +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 +@@ -803,8 +803,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-03-05 16:48:14.208027199 +0100 +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-03-05 16:48:14.298025856 +0100 +@@ -14,7 +14,7 @@ + #include "base/logging.h" + #include "base/macros.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "build/build_config.h" + + namespace base { diff --git a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch new file mode 100644 index 0000000..8a87503 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch @@ -0,0 +1,71 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-03-06 02:05:57.848394582 +0100 +@@ -99,7 +99,7 @@ + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h 2017-03-06 02:05:57.990392454 +0100 +@@ -3193,22 +3193,10 @@ + public: + typedef Shape ShapeT; + +- // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } +- +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ // Wrapper methods. Defined in src/objects-inl.h ++ // to break a cycle with src/heap/heap.h. ++ inline uint32_t Hash(Key key); ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h 2017-03-06 02:05:57.992392424 +0100 +@@ -38,6 +38,25 @@ + namespace v8 { + namespace internal { + ++template ++uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++uint32_t HashTable::HashForObject(Key key, ++ Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ + PropertyDetails::PropertyDetails(Smi* smi) { + value_ = smi->value(); + } diff --git a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch new file mode 100644 index 0000000..8e26dbe --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch @@ -0,0 +1,32 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-03-05 17:08:43.547748044 +0100 +@@ -108,9 +108,7 @@ + if (is_linux) { + defines += [ "WEBRTC_THREAD_RR" ] + +- if (!build_with_chromium) { +- deps += [ ":cpu_features_linux" ] +- } ++ deps += [ ":cpu_features_linux" ] + + libs += [ "rt" ] + } +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-03-05 17:07:01.869254856 +0100 +@@ -112,12 +112,8 @@ + 'defines': [ + 'WEBRTC_THREAD_RR', + ], +- 'conditions': [ +- ['build_with_chromium==0', { +- 'dependencies': [ +- 'cpu_features_webrtc.gyp:cpu_features_linux', +- ], +- }], ++ 'dependencies': [ ++ 'cpu_features_webrtc.gyp:cpu_features_linux', + ], + 'link_settings': { + 'libraries': [ '-lrt', ], diff --git a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch new file mode 100644 index 0000000..f679530 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-03-07 03:00:44.783316233 +0100 +@@ -542,6 +542,8 @@ + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::swap(LinkedHashSet& other) + { diff --git a/sources b/sources index 7782518..805aa50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -323e546bcefd533a973bc07c94793bb8 qtwebengine-opensource-src-5.7.1-clean.tar.xz +SHA512 (qtwebengine-opensource-src-5.8.0-clean.tar.xz) = 18a49156da8d2e21fb0fe4781646c753c82d616964dd14b0651a1097b2a79a5ddb852dbdcc838d1e9e9a4ec460dd77fbab78a03672f5e827ab061fdf97db4a25 From a9c34c53912fc962113cf921c9aae65383570372 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 30 Mar 2017 11:18:03 -0500 Subject: [PATCH 135/437] make buildable against qt5 < 5.8 too --- qt5-qtwebengine.spec | 35 +++++++++++++++------ qtwebengine-opensource-src-5.8.0-qt57.patch | 12 +++++++ 2 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 qtwebengine-opensource-src-5.8.0-qt57.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 773e7d1..09c5527 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -100,6 +100,8 @@ Patch13: qtwebengine-opensource-src-5.8.0-v8-gcc7.patch Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch # fix FTBFS in the WTF part of Blink/WebKit with GCC 7 Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch +# FTBFS using qt < 5.8 +Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -109,16 +111,20 @@ Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} -BuildRequires: qt5-qtbase-devel >= %{version} +BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-private-devel # TODO: check of = is really needed or if >= would be good enough -- rex %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} -BuildRequires: qt5-qtdeclarative-devel >= %{version} -BuildRequires: qt5-qtxmlpatterns-devel >= %{version} -BuildRequires: qt5-qtlocation-devel >= %{version} -BuildRequires: qt5-qtsensors-devel >= %{version} -BuildRequires: qt5-qtwebchannel-devel >= %{version} -BuildRequires: qt5-qttools-static >= %{version} +# building on/for qt-5.8+ or not? -- rex +%if "%(echo %{_qt5_version} | cut -d. -f1,2)" == "5.8" +%global qt58 1 +%endif +BuildRequires: qt5-qtdeclarative-devel +BuildRequires: qt5-qtxmlpatterns-devel +BuildRequires: qt5-qtlocation-devel +BuildRequires: qt5-qtsensors-devel +BuildRequires: qt5-qtwebchannel-devel +BuildRequires: qt5-qttools-static BuildRequires: ninja-build BuildRequires: cmake BuildRequires: bison @@ -312,7 +318,8 @@ Summary: Example files for %{name} %if 0%{?docs} %package doc Summary: API documentation for %{name} -BuildRequires: qt5-doctools +BuildRequires: qt5-qdoc +BuildRequires: qt5-qhelpgenerator BuildRequires: qt5-qtbase-doc Requires: qt5-qtbase-doc BuildRequires: qt5-qtxmlpatterns-doc @@ -345,6 +352,7 @@ BuildArch: noarch %patch13 -p1 -b .v8-gcc7 %patch14 -p1 -b .pdfium-gcc7 %patch15 -p1 -b .wtf-gcc7 +%patch20 -p1 -b .qt57 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -413,13 +421,15 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} %endif +if [ -d "%{buildroot}%{_qt5_bindir}" ]; then # hardlink files to {_bindir} -mkdir %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_bindir} pushd %{buildroot}%{_qt5_bindir} for i in * ; do ln -v ${i} %{buildroot}%{_bindir}/${i} done popd +fi ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs @@ -439,8 +449,10 @@ popd %files %license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* +%if 0%{?qt58} %{_bindir}/qwebengine_convert_dict %{_qt5_bindir}/qwebengine_convert_dict +%endif %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess %ifarch %{ix86} @@ -522,6 +534,9 @@ popd %changelog +* Thu Mar 30 2017 Rex Dieter - 5.8.0-3 +- make buildable against qt5 < 5.8 too + * Tue Mar 07 2017 Kevin Kofler - 5.8.0-2 - Fix FTBFS in the WTF part of Blink/WebKit with GCC 7 diff --git a/qtwebengine-opensource-src-5.8.0-qt57.patch b/qtwebengine-opensource-src-5.8.0-qt57.patch new file mode 100644 index 0000000..480ae11 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-qt57.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp +--- qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 2017-01-03 04:35:11.000000000 -0600 ++++ qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp 2017-03-24 14:43:55.120363292 -0500 +@@ -109,7 +109,7 @@ net::ProxyConfigService::ConfigAvailabil + } + m_qtApplicationProxy = qtProxy; + m_qtProxyConfig = net::ProxyConfig(); +-#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) + if (qtProxy.type() == QNetworkProxy::NoProxy + && QNetworkProxyFactory::usesSystemConfiguration()) { + *config = systemConfig; From 859bcea06035e9881438601e34e662fa86fd85ee Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 30 Mar 2017 19:37:42 -0500 Subject: [PATCH 136/437] adjust sse2 patch to use src/3rdparty/chromium/v8/src/v8_sse2.gyp location instead --- qtwebengine-opensource-src-5.8.0-no-sse2.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.8.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch index 5e323e1..4976535 100644 --- a/qtwebengine-opensource-src-5.8.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.8.0-no-sse2.patch @@ -2930,9 +2930,9 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp q 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 @@ -0,0 +1,2313 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. From 6b35b7c497e83acd67f38f6dc94443dab7f14151 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 31 Mar 2017 02:50:27 +0200 Subject: [PATCH 137/437] Revert "adjust sse2 patch to use src/3rdparty/chromium/v8/src/v8_sse2.gyp location instead" This reverts commit 859bcea06035e9881438601e34e662fa86fd85ee. The file must not be moved back, the outdated reference to the old location must be fixed instead. --- qtwebengine-opensource-src-5.8.0-no-sse2.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qtwebengine-opensource-src-5.8.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch index 4976535..5e323e1 100644 --- a/qtwebengine-opensource-src-5.8.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.8.0-no-sse2.patch @@ -2930,9 +2930,9 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp q 'defines': [ 'BUILDING_V8_SHARED', 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/tools/gyp/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 @@ -0,0 +1,2313 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. From 6441d4c5a97ce621ce623efd116aab64e472b7d0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 31 Mar 2017 02:54:55 +0200 Subject: [PATCH 138/437] Fix no-sse2 patch FTBFS (on i686) * Fri Mar 31 2017 Kevin Kofler - 5.8.0-4 - Fix no-sse2 patch FTBFS (on i686) --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-opensource-src-5.8.0-no-sse2.patch | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 09c5527..9ff3475 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -534,6 +534,9 @@ popd %changelog +* Fri Mar 31 2017 Kevin Kofler - 5.8.0-4 +- Fix no-sse2 patch FTBFS (on i686) + * Thu Mar 30 2017 Rex Dieter - 5.8.0-3 - make buildable against qt5 < 5.8 too diff --git a/qtwebengine-opensource-src-5.8.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch index 5e323e1..ee15329 100644 --- a/qtwebengine-opensource-src-5.8.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.8.0-no-sse2.patch @@ -5303,7 +5303,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi qtwebengine 'conditions': [ + ['target_arch=="ia32"', { + 'dependencies': [ -+ '<(chromium_src_dir)/v8/tools/gyp/v8_sse2.gyp:v8_sse2', ++ '<(chromium_src_dir)/v8/src/v8_sse2.gyp:v8_sse2', + ], + }], ['OS=="win" and win_use_allocator_shim==1', { From d26228fd6f897370462f79521bb0284b134cfeb7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 31 Mar 2017 10:27:00 +0200 Subject: [PATCH 139/437] Enable use_spellchecker explicitly so that it is also enabled on Qt 5.7 * Fri Mar 31 2017 Kevin Kofler - 5.8.0-5 - Enable use_spellchecker explicitly so that it is also enabled on Qt 5.7 --- qt5-qtwebengine.spec | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9ff3475..ae1b390 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -115,10 +115,6 @@ BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-private-devel # TODO: check of = is really needed or if >= would be good enough -- rex %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} -# building on/for qt-5.8+ or not? -- rex -%if "%(echo %{_qt5_version} | cut -d. -f1,2)" == "5.8" -%global qt58 1 -%endif BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qtxmlpatterns-devel BuildRequires: qt5-qtlocation-devel @@ -399,7 +395,8 @@ export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" WEBENGINE_CONFIG+="use_system_icu use_system_protobuf" .. +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" \ + WEBENGINE_CONFIG+="use_system_icu use_system_protobuf use_spellchecker" .. # if we keep these set here, gyp picks up duplicate flags unset CFLAGS @@ -449,10 +446,8 @@ popd %files %license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* -%if 0%{?qt58} %{_bindir}/qwebengine_convert_dict %{_qt5_bindir}/qwebengine_convert_dict -%endif %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess %ifarch %{ix86} @@ -534,6 +529,9 @@ popd %changelog +* Fri Mar 31 2017 Kevin Kofler - 5.8.0-5 +- Enable use_spellchecker explicitly so that it is also enabled on Qt 5.7 + * Fri Mar 31 2017 Kevin Kofler - 5.8.0-4 - Fix no-sse2 patch FTBFS (on i686) From d3327ed64b64e0fc1d8effe074b4a0968700afd9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 31 Mar 2017 12:17:05 +0200 Subject: [PATCH 140/437] Use file triggers to automatically convert system hunspell dictionaries --- qt5-qtwebengine.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ae1b390..e57cce7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -25,6 +25,9 @@ #global prerelease rc +# spellchecking dictionary directory +%global _qtwebengine_dictionaries_dir %{_qt5_datadir}/qtwebengine_dictionaries + # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) %global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ @@ -440,9 +443,21 @@ for prl_file in libQt5*.prl ; do done popd +mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%filetriggerin -- %{_datadir}/myspell +while read filename ; do + case "$filename" in + *.dic) + bdicname=%{_qtwebengine_dictionaries_dir}/`basename -s .dic "$filename"`.bdic + %{_qt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" + ;; + esac +done + %files %license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* @@ -456,6 +471,7 @@ popd %endif %{_qt5_plugindir}/designer/libqwebengineview.so %{_qt5_datadir}/resources/ +%dir %{_qtwebengine_dictionaries_dir} %dir %{_qt5_translationdir}/qtwebengine_locales %lang(am) %{_qt5_translationdir}/qtwebengine_locales/am.pak %lang(ar) %{_qt5_translationdir}/qtwebengine_locales/ar.pak @@ -531,6 +547,7 @@ popd %changelog * Fri Mar 31 2017 Kevin Kofler - 5.8.0-5 - Enable use_spellchecker explicitly so that it is also enabled on Qt 5.7 +- Use file triggers to automatically convert system hunspell dictionaries * Fri Mar 31 2017 Kevin Kofler - 5.8.0-4 - Fix no-sse2 patch FTBFS (on i686) From 6d6e485ffb6aabac01fc0b363a4fc3fc97d97de6 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 2 Apr 2017 00:09:23 +0200 Subject: [PATCH 141/437] spec cleanup Spell checking is now always enabled, so qwebengine_convert_dict is now always installed, so remove the conditional around the binary handling. --- qt5-qtwebengine.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e57cce7..3fd4ea0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -421,7 +421,6 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} %endif -if [ -d "%{buildroot}%{_qt5_bindir}" ]; then # hardlink files to {_bindir} mkdir -p %{buildroot}%{_bindir} pushd %{buildroot}%{_qt5_bindir} @@ -429,7 +428,6 @@ for i in * ; do ln -v ${i} %{buildroot}%{_bindir}/${i} done popd -fi ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs From 0761086c282552b86e5dcbbf5d8756a68c868306 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 3 Apr 2017 08:15:14 -0500 Subject: [PATCH 142/437] build docs on all archs --- qt5-qtwebengine.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3fd4ea0..20c5f88 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -5,10 +5,7 @@ # define to build docs, need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available -# only primary archs (for now), allow secondary to bootstrap -%ifarch %{arm} %{ix86} x86_64 %global docs 1 -%endif %if 0%{?fedora} > 23 # need libvpx >= 1.5.0 @@ -39,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -543,6 +540,9 @@ done %changelog +* Mon Apr 03 2017 Rex Dieter - 5.8.0-6 +- build docs on all archs + * Fri Mar 31 2017 Kevin Kofler - 5.8.0-5 - Enable use_spellchecker explicitly so that it is also enabled on Qt 5.7 - Use file triggers to automatically convert system hunspell dictionaries From 0041669bae615055caf10801c36ee3ac49823a55 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 4 Apr 2017 17:23:25 +0200 Subject: [PATCH 143/437] File trigger: silence qwebengine_convert_dict output and ignore its exit code * Tue Apr 04 2017 Kevin Kofler - 5.8.0-6 - File trigger: silence qwebengine_convert_dict output and ignore its exit code --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 20c5f88..12bbf05 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -448,7 +448,7 @@ while read filename ; do case "$filename" in *.dic) bdicname=%{_qtwebengine_dictionaries_dir}/`basename -s .dic "$filename"`.bdic - %{_qt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" + %{_qt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" &> /dev/null || : ;; esac done @@ -540,6 +540,9 @@ done %changelog +* Tue Apr 04 2017 Kevin Kofler - 5.8.0-7 +- File trigger: silence qwebengine_convert_dict output and ignore its exit code + * Mon Apr 03 2017 Rex Dieter - 5.8.0-6 - build docs on all archs From 9ecb278a2da28f028bcef771e27cdf1d6efcbbbe Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 10 Apr 2017 07:14:37 -0500 Subject: [PATCH 144/437] Qt5WebEngineCoreConfig.cmake: fix when using Qt < %version (#1438877) --- qt5-qtwebengine.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 12bbf05..036114b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,7 +36,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -440,6 +440,11 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} +# adjust cmake dep(s) to allow for using the same Qt5 that was used to build it (even if older) +sed -i -e "s|%{version} \${_|%{_qt5_version} \${_|" \ + %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine/Qt5WebEngineCoreConfig.cmake + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -540,6 +545,9 @@ done %changelog +* Mon Apr 10 2017 Rex Dieter - 5.8.0-8 +- Qt5WebEngineCoreConfig.cmake: fix when using Qt < %%version (#1438877) + * Tue Apr 04 2017 Kevin Kofler - 5.8.0-7 - File trigger: silence qwebengine_convert_dict output and ignore its exit code From 217b1bfc13c8128af71b52a27eb64107792ad979 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 10 Apr 2017 15:58:16 -0500 Subject: [PATCH 145/437] fix sed to make all *Config.cmake replacements --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 036114b..dc02338 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -441,8 +441,8 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it (even if older) -sed -i -e "s|%{version} \${_|%{_qt5_version} \${_|" \ - %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine/Qt5WebEngineCoreConfig.cmake +sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ + %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake %post -p /sbin/ldconfig From b72c3e9db869383f0d2c3c7a0375e13490e012c2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 17 Apr 2017 07:24:57 -0500 Subject: [PATCH 146/437] +macros.qt5-qtwebengine --- macros.qt5-qtwebengine | 4 ++++ qt5-qtwebengine.spec | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 macros.qt5-qtwebengine diff --git a/macros.qt5-qtwebengine b/macros.qt5-qtwebengine new file mode 100644 index 0000000..d96f3df --- /dev/null +++ b/macros.qt5-qtwebengine @@ -0,0 +1,4 @@ +%_qt5 qtwebengine @@NAME@@ +%_qt5_qtwebengine_epoch @@EPOCH@@ +%_qt5_qtwebengine_version @@VERSION@@ +%_qt5_qtwebengine_evr @@EVR@@ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index dc02338..1c85c48 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -25,6 +25,8 @@ # spellchecking dictionary directory %global _qtwebengine_dictionaries_dir %{_qt5_datadir}/qtwebengine_dictionaries +%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere # else) %global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ @@ -36,7 +38,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 8%{?dist} +Release: 9%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -51,6 +53,8 @@ Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py +# macros +Source10: macros.qt5-qtwebengine # some tweaks to linux.pri (system libs, link libpci, run unbundling script) Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the @@ -418,6 +422,16 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} %endif +# rpm macros +install -p -m644 -D %{SOURCE10} \ + %{buildroot}%{rpm_macros_dir}/macros.qt5-qtwebengine +sed -i \ + -e "s|@@NAME@@|%{name}|g" \ + -e "s|@@EPOCH@@|%{?epoch}%{!?epoch:0}|g" \ + -e "s|@@VERSION@@|%{version}|g" \ + -e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" \ + %{buildroot}%{rpm_macros_dir}/macros.qt5-qtwebengine + # hardlink files to {_bindir} mkdir -p %{buildroot}%{_bindir} pushd %{buildroot}%{_qt5_bindir} @@ -528,6 +542,7 @@ done %lang(zh_TW) %{_qt5_translationdir}/qtwebengine_locales/zh-TW.pak %files devel +%{rpm_macros_dir}/macros.qt5-qtwebengine %{_qt5_headerdir}/Qt*/ %{_qt5_libdir}/libQt5*.so %{_qt5_libdir}/libQt5*.prl @@ -545,6 +560,9 @@ done %changelog +* Mon Apr 17 2017 Rex Dieter - 5.8.0-9 +- +macros.qt5-qtwebengine + * Mon Apr 10 2017 Rex Dieter - 5.8.0-8 - Qt5WebEngineCoreConfig.cmake: fix when using Qt < %%version (#1438877) From 9c17aa1fd8e6ff4a2e3905dfd73d73f4691d8dc0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 25 Apr 2017 23:54:33 +0200 Subject: [PATCH 147/437] Backport upstream fix for blank pages when a link opens in a new tab * Tue Apr 25 2017 Kevin Kofler - 5.8.0-10 - Backport upstream fix for blank pages when a link opens in a new tab --- qt5-qtwebengine.spec | 10 +++- ...source-src-5.8.0-fix-open-in-new-tab.patch | 46 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1c85c48..f72d08f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -38,7 +38,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 9%{?dist} +Release: 10%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -105,7 +105,9 @@ Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch # fix FTBFS in the WTF part of Blink/WebKit with GCC 7 Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch # FTBFS using qt < 5.8 -Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch +Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch +# upstream fix for blank pages when a link opens in a new tab +Patch100: qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -353,6 +355,7 @@ BuildArch: noarch %patch14 -p1 -b .pdfium-gcc7 %patch15 -p1 -b .wtf-gcc7 %patch20 -p1 -b .qt57 +%patch100 -p1 -b .fix-open-in-new-tab # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -560,6 +563,9 @@ done %changelog +* Tue Apr 25 2017 Kevin Kofler - 5.8.0-10 +- Backport upstream fix for blank pages when a link opens in a new tab + * Mon Apr 17 2017 Rex Dieter - 5.8.0-9 - +macros.qt5-qtwebengine diff --git a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch new file mode 100644 index 0000000..c95a712 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch @@ -0,0 +1,46 @@ +From 8e147ed3be7740092de233a2a7c67ec890069649 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20Br=C3=BCning?= +Date: Mon, 13 Mar 2017 11:13:56 +0100 +Subject: Remove stale parent connection when initializing delegate as a child + +When clicking on a blank link target, the constructor of the +RenderWidgetHostViewQtDelegateWidget instance for the newly created +view is called with the originating QWebEngineView as its parent +and will connect its removeParentBeforeParentDelete slot to the +originating view's destroyed signal. + +This leads to the situation where the delegate's parent will be set to +null when the originating view is closed, causing the view to display +only an empty widget with the actual web contents remaining live in +the background. + +This patch removes the connection to the old view when initializing +the delegate as a child of the QWebEnginePagePrivate instance. The +addition to the layout updates the parent and child relationship +between the view and the delegate internally. + +Task-number: QTBUG-58381 +Change-Id: I448380478c2bcfcfbddaee8a35caf46010e57972 +Reviewed-by: Florian Bruhin +Reviewed-by: Joerg Bornemann +--- + src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +index e7ad5b1..14c4d72 100644 +--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp ++++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +@@ -163,6 +163,9 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* + + QWebEnginePagePrivate *pagePrivate = static_cast(container); + if (pagePrivate->view) { ++ if (parentWidget()) ++ disconnect(parentWidget(), &QObject::destroyed, ++ this, &RenderWidgetHostViewQtDelegateWidget::removeParentBeforeParentDelete); + pagePrivate->view->layout()->addWidget(this); + pagePrivate->view->setFocusProxy(this); + show(); +-- +cgit v1.0-4-g1e03 + From 35eddbb31cd735f55de2dd9fda75959825491542 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 28 Apr 2017 10:27:37 +0200 Subject: [PATCH 148/437] Backport upstream fix for non-functional dead keys in text fields * Fri Apr 28 2017 Kevin Kofler - 5.8.0-11 - Backport upstream fix for non-functional dead keys in text fields --- qt5-qtwebengine.spec | 8 +++- ...e-opensource-src-5.8.0-fix-dead-keys.patch | 40 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f72d08f..647305b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -38,7 +38,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 10%{?dist} +Release: 11%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -108,6 +108,8 @@ Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch # upstream fix for blank pages when a link opens in a new tab Patch100: qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch +# upstream fix for non-functional dead keys in text fields +Patch101: qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -356,6 +358,7 @@ BuildArch: noarch %patch15 -p1 -b .wtf-gcc7 %patch20 -p1 -b .qt57 %patch100 -p1 -b .fix-open-in-new-tab +%patch101 -p1 -b .fix-dead-keys # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -563,6 +566,9 @@ done %changelog +* Fri Apr 28 2017 Kevin Kofler - 5.8.0-11 +- Backport upstream fix for non-functional dead keys in text fields + * Tue Apr 25 2017 Kevin Kofler - 5.8.0-10 - Backport upstream fix for blank pages when a link opens in a new tab diff --git a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch new file mode 100644 index 0000000..a0cf81c --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch @@ -0,0 +1,40 @@ +From 31374ba98829e984c7600419c0e5fa71b96fc530 Mon Sep 17 00:00:00 2001 +From: Peter Varga +Date: Fri, 24 Mar 2017 14:31:02 +0100 +Subject: Forward input method events to RWHV in widget + +Task-number: QTBUG-58362 +Change-Id: Id4cf57c60da17538b224bb9bc91277c324c6a55d +Reviewed-by: Viktor Engelmann +Reviewed-by: Allan Sandfeld Jensen +--- + .../render_widget_host_view_qt_delegate_widget.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +index 14c4d72..fd58a07 100644 +--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp ++++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +@@ -84,10 +84,19 @@ protected: + { + m_client->forwardEvent(event); + } ++ void inputMethodEvent(QInputMethodEvent *event) override ++ { ++ m_client->forwardEvent(event); ++ } + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override + { + return m_client->updatePaintNode(oldNode); + } ++ ++ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override ++ { ++ return m_client->inputMethodQuery(query); ++ } + private: + RenderWidgetHostViewQtDelegateClient *m_client; + }; +-- +cgit v1.0-4-g1e03 + From 2d1135b7932202e96358fb5010886be3cce74ee7 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 10 May 2017 09:19:30 -0500 Subject: [PATCH 149/437] rebuild (Qt-5.9) at least until proper qtwebengine-5.9 is ready --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 647305b..0c803c7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -38,7 +38,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 11%{?dist} +Release: 12%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -566,6 +566,9 @@ done %changelog +* Wed May 10 2017 Rex Dieter - 5.8.0-12 +- rebuild (Qt-5.9) + * Fri Apr 28 2017 Kevin Kofler - 5.8.0-11 - Backport upstream fix for non-functional dead keys in text fields From b8ca77a695c2e73e18c827c238e1386cf0714f39 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 10 May 2017 16:36:51 +0200 Subject: [PATCH 150/437] - Remove docs due transition --- qt5-qtwebengine.spec | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0c803c7..5685cc4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -3,10 +3,6 @@ %global _hardened_build 1 -# define to build docs, need to undef this for bootstrapping -# where qt5-qttools (qt5-doctools) builds are not yet available -%global docs 1 - %if 0%{?fedora} > 23 # need libvpx >= 1.5.0 %global use_system_libvpx 1 @@ -38,10 +34,9 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 12%{?dist} +Release: 13%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details -# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html # The other licenses are from Chromium and the code it bundles License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io @@ -318,24 +313,6 @@ Summary: Example files for %{name} %description examples %{summary}. - -%if 0%{?docs} -%package doc -Summary: API documentation for %{name} -BuildRequires: qt5-qdoc -BuildRequires: qt5-qhelpgenerator -BuildRequires: qt5-qtbase-doc -Requires: qt5-qtbase-doc -BuildRequires: qt5-qtxmlpatterns-doc -Requires: qt5-qtxmlpatterns-doc -BuildRequires: qt5-qtdeclarative-doc -Requires: qt5-qtdeclarative-doc -BuildArch: noarch -%description doc -%{summary}. -%endif - - %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .linux-pri @@ -416,18 +393,9 @@ export CXXFLAGS make %{?_smp_mflags} -%if 0%{?docs} -make %{?_smp_mflags} docs -%endif -popd - %install make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} -%if 0%{?docs} -make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} -%endif - # rpm macros install -p -m644 -D %{SOURCE10} \ %{buildroot}%{rpm_macros_dir}/macros.qt5-qtwebengine @@ -559,13 +527,11 @@ done %files examples %{_qt5_examplesdir}/ -%if 0%{?docs} -%files doc -%{_qt5_docdir}/* -%endif - %changelog +* Wed May 10 2017 Helio Chissini de Castro - 5.8.0-13 +- Remove docs to transition to full qt5-doc package submodule + * Wed May 10 2017 Rex Dieter - 5.8.0-12 - rebuild (Qt-5.9) From 83336fef8b0463669bc93cd05f0e6b9ddee8fa7f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 10 May 2017 09:39:00 -0500 Subject: [PATCH 151/437] Revert "- Remove docs due transition" This reverts commit b8ca77a695c2e73e18c827c238e1386cf0714f39. --- qt5-qtwebengine.spec | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5685cc4..0c803c7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -3,6 +3,10 @@ %global _hardened_build 1 +# define to build docs, need to undef this for bootstrapping +# where qt5-qttools (qt5-doctools) builds are not yet available +%global docs 1 + %if 0%{?fedora} > 23 # need libvpx >= 1.5.0 %global use_system_libvpx 1 @@ -34,9 +38,10 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 13%{?dist} +Release: 12%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details +# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html # The other licenses are from Chromium and the code it bundles License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io @@ -313,6 +318,24 @@ Summary: Example files for %{name} %description examples %{summary}. + +%if 0%{?docs} +%package doc +Summary: API documentation for %{name} +BuildRequires: qt5-qdoc +BuildRequires: qt5-qhelpgenerator +BuildRequires: qt5-qtbase-doc +Requires: qt5-qtbase-doc +BuildRequires: qt5-qtxmlpatterns-doc +Requires: qt5-qtxmlpatterns-doc +BuildRequires: qt5-qtdeclarative-doc +Requires: qt5-qtdeclarative-doc +BuildArch: noarch +%description doc +%{summary}. +%endif + + %prep %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .linux-pri @@ -393,9 +416,18 @@ export CXXFLAGS make %{?_smp_mflags} +%if 0%{?docs} +make %{?_smp_mflags} docs +%endif +popd + %install make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%if 0%{?docs} +make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%endif + # rpm macros install -p -m644 -D %{SOURCE10} \ %{buildroot}%{rpm_macros_dir}/macros.qt5-qtwebengine @@ -527,11 +559,13 @@ done %files examples %{_qt5_examplesdir}/ +%if 0%{?docs} +%files doc +%{_qt5_docdir}/* +%endif -%changelog -* Wed May 10 2017 Helio Chissini de Castro - 5.8.0-13 -- Remove docs to transition to full qt5-doc package submodule +%changelog * Wed May 10 2017 Rex Dieter - 5.8.0-12 - rebuild (Qt-5.9) From 72d1dd590df92016cf401ff0b9f93b1fff1c8d9c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 10 May 2017 09:40:51 -0500 Subject: [PATCH 152/437] disable -doc for f27+ --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0c803c7..fbea8a1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -5,7 +5,10 @@ # define to build docs, need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available +# disable on f27+ or where Qt-5.9 is present (for now) +%if 0%{?fedora} < 27 %global docs 1 +%endif %if 0%{?fedora} > 23 # need libvpx >= 1.5.0 @@ -567,7 +570,7 @@ done %changelog * Wed May 10 2017 Rex Dieter - 5.8.0-12 -- rebuild (Qt-5.9) +- rebuild (Qt-5.9), disable docs for f27+ * Fri Apr 28 2017 Kevin Kofler - 5.8.0-11 - Backport upstream fix for non-functional dead keys in text fields From f10952772db5edf089071a9ad6193cdf73aeed3a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 11 May 2017 12:08:30 -0500 Subject: [PATCH 153/437] apply Qt5WebEngineCoreConfig.cmake hack only on < f27 --- qt5-qtwebengine.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fbea8a1..8d47bad 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -41,7 +41,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 12%{?dist} +Release: 13%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -463,9 +463,11 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} -# adjust cmake dep(s) to allow for using the same Qt5 that was used to build it (even if older) +# adjust cmake dep(s) to allow for using the same Qt5 that was used to build it (if older) +%if 0%{?fedora} < 27 sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake +%endif %post -p /sbin/ldconfig @@ -569,6 +571,9 @@ done %changelog +* Thu May 11 2017 Rex Dieter - 5.8.0-13 +- apply Qt5WebEngineCoreConfig.cmake hack only on < f27 + * Wed May 10 2017 Rex Dieter - 5.8.0-12 - rebuild (Qt-5.9), disable docs for f27+ From 9fcae6afb81c9cf3881b7cb0ba1fbc3e9749c36b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 11 May 2017 12:15:44 -0500 Subject: [PATCH 154/437] add comment about version hack future improvements --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8d47bad..18dc3fe 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -463,7 +463,8 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} -# adjust cmake dep(s) to allow for using the same Qt5 that was used to build it (if older) +# adjust cmake dep(s) to allow for using the same Qt5 that was used to build it +# only if older... (I suppose what we really want is the lesser of %%version, %%_qt5_version) %if 0%{?fedora} < 27 sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake From 0d029998f5fe5294e490a1957191e584525fe459 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 13 May 2017 10:03:12 -0500 Subject: [PATCH 155/437] fix rpm macros --- macros.qt5-qtwebengine | 2 +- qt5-qtwebengine.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros.qt5-qtwebengine b/macros.qt5-qtwebengine index d96f3df..5b2f86b 100644 --- a/macros.qt5-qtwebengine +++ b/macros.qt5-qtwebengine @@ -1,4 +1,4 @@ -%_qt5 qtwebengine @@NAME@@ +%_qt5_qtwebengine @@NAME@@ %_qt5_qtwebengine_epoch @@EPOCH@@ %_qt5_qtwebengine_version @@VERSION@@ %_qt5_qtwebengine_evr @@EVR@@ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 18dc3fe..5ddbf65 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -41,7 +41,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.8.0 -Release: 13%{?dist} +Release: 14%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Sat May 13 2017 Rex Dieter - 5.8.0-14 +- fix rpm macros + * Thu May 11 2017 Rex Dieter - 5.8.0-13 - apply Qt5WebEngineCoreConfig.cmake hack only on < f27 From 7816e88f62f2da31954d17cc5c755d88ebe1625f Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:43:14 +0200 Subject: [PATCH 156/437] Prep webengine 5.9.0 --- .gitignore | 1 + ...nsource-src-5.9.0-webrtc-neon-detect.patch | 27 + ...nsource-src-5.9.0-system-nspr-prtime.patch | 54 + ...-opensource-src-5.9.0-system-icu-utf.patch | 552 ++++++ ...bengine-opensource-src-5.9.0-no-sse2.patch | 1700 +++++++---------- ...-opensource-src-5.9.-openmax-dl-neon.patch | 29 +- ...ngine-opensource-src-5.9.0-linux-pri.patch | 33 + ...e-opensource-src-5.9.0-no-icudtl-dat.patch | 21 +- qt5-qtwebengine.spec | 91 +- ...urce-src-5.6.0-beta-fix-extractcflag.patch | 12 - ...ngine-opensource-src-5.7.0-linux-pri.patch | 26 - ...ngine-opensource-src-5.7.1-skia-neon.patch | 15 - ...e-opensource-src-5.8.0-fix-dead-keys.patch | 40 - ...source-src-5.8.0-fix-open-in-new-tab.patch | 46 - ...ine-opensource-src-5.8.0-pdfium-gcc7.patch | 600 ------ qtwebengine-opensource-src-5.8.0-qt57.patch | 12 - ...-opensource-src-5.8.0-system-icu-utf.patch | 362 ---- ...nsource-src-5.8.0-system-nspr-prtime.patch | 48 - ...bengine-opensource-src-5.8.0-v8-gcc7.patch | 71 - ...nsource-src-5.8.0-webrtc-neon-detect.patch | 32 - ...engine-opensource-src-5.8.0-wtf-gcc7.patch | 12 - sources | 2 +- 22 files changed, 1414 insertions(+), 2372 deletions(-) create mode 100644 0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch create mode 100644 0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch create mode 100644 0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch rename qtwebengine-opensource-src-5.8.0-no-sse2.patch => 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch (73%) rename qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch => 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch (72%) create mode 100644 0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch rename qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch => 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch (69%) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch delete mode 100644 qtwebengine-opensource-src-5.7.0-linux-pri.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-skia-neon.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-qt57.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-system-icu-utf.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-v8-gcc7.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch diff --git a/.gitignore b/.gitignore index 0983a72..3eee6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /qtwebengine-opensource-src-5.7.0-clean.tar.xz /qtwebengine-opensource-src-5.7.1-clean.tar.xz /qtwebengine-opensource-src-5.8.0-clean.tar.xz +/qtwebengine-opensource-src-5.9.0-clean.tar.xz diff --git a/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch b/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch new file mode 100644 index 0000000..7c48a10 --- /dev/null +++ b/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch @@ -0,0 +1,27 @@ +From bef192680ca3c78493c064d7b4a21b79afa92c3e Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 10:41:10 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-webrtc-neon-detect + +--- + src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +index 8bed25e27..b0cc2a5e3 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +@@ -93,9 +93,7 @@ rtc_static_library("system_wrappers") { + if (is_linux) { + defines += [ "WEBRTC_THREAD_RR" ] + +- if (!build_with_chromium) { +- deps += [ ":cpu_features_linux" ] +- } ++ deps += [ ":cpu_features_linux" ] + + libs += [ "rt" ] + } +-- +2.13.0 + diff --git a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch new file mode 100644 index 0000000..5bc39ee --- /dev/null +++ b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -0,0 +1,54 @@ +From 60434d58353db516e795e12817e1953700f9e5e4 Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 10:46:36 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-nspr-prtime + +--- + src/3rdparty/chromium/base/BUILD.gn | 2 -- + src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- + src/3rdparty/chromium/base/time/time.cc | 2 +- + 3 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn +index f2672cba7..66f2be1ff 100644 +--- a/src/3rdparty/chromium/base/BUILD.gn ++++ b/src/3rdparty/chromium/base/BUILD.gn +@@ -833,8 +833,6 @@ component("base") { + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff --git a/src/3rdparty/chromium/base/time/pr_time_unittest.cc b/src/3rdparty/chromium/base/time/pr_time_unittest.cc +index 3f1a348ae..8f1a11e51 100644 +--- a/src/3rdparty/chromium/base/time/pr_time_unittest.cc ++++ b/src/3rdparty/chromium/base/time/pr_time_unittest.cc +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff --git a/src/3rdparty/chromium/base/time/time.cc b/src/3rdparty/chromium/base/time/time.cc +index 4e942015f..29fde71dd 100644 +--- a/src/3rdparty/chromium/base/time/time.cc ++++ b/src/3rdparty/chromium/base/time/time.cc +@@ -13,8 +13,8 @@ + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/macros.h" ++#include + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" + #include "build/build_config.h" + + namespace base { +-- +2.13.0 + diff --git a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch new file mode 100644 index 0000000..c7fc67f --- /dev/null +++ b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -0,0 +1,552 @@ +From 63abd7883643841941505c82d42589d8d6814478 Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 11:16:12 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-icu-utf + +--- + src/3rdparty/chromium/base/BUILD.gn | 2 -- + src/3rdparty/chromium/base/files/file_path.cc | 6 ++--- + src/3rdparty/chromium/base/json/json_parser.cc | 28 ++++++++++---------- + src/3rdparty/chromium/base/json/string_escape.cc | 2 +- + src/3rdparty/chromium/base/strings/pattern.cc | 9 +++---- + src/3rdparty/chromium/base/strings/string_split.cc | 2 +- + src/3rdparty/chromium/base/strings/string_util.cc | 10 ++++---- + .../base/strings/utf_string_conversion_utils.cc | 28 ++++++++++---------- + .../chromium/base/third_party/icu/icu_utf.cc | 30 +++++++++++----------- + .../browser/devtools/devtools_io_context.cc | 4 +-- + .../chromium/net/cert/internal/parse_name.cc | 6 ++--- + .../chromium/ui/base/ime/input_method_chromeos.cc | 2 +- + src/3rdparty/chromium/ui/gfx/utf16_indexing.cc | 4 +-- + 13 files changed, 65 insertions(+), 68 deletions(-) + +diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn +index 66f2be1ff..51faf08ad 100644 +--- a/src/3rdparty/chromium/base/BUILD.gn ++++ b/src/3rdparty/chromium/base/BUILD.gn +@@ -831,8 +831,6 @@ component("base") { + "third_party/dmg_fp/dmg_fp.h", + "third_party/dmg_fp/dtoa_wrapper.cc", + "third_party/dmg_fp/g_fmt.cc", +- "third_party/icu/icu_utf.cc", +- "third_party/icu/icu_utf.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff --git a/src/3rdparty/chromium/base/files/file_path.cc b/src/3rdparty/chromium/base/files/file_path.cc +index cff862ae1..b17b46e5f 100644 +--- a/src/3rdparty/chromium/base/files/file_path.cc ++++ b/src/3rdparty/chromium/base/files/file_path.cc +@@ -18,7 +18,7 @@ + + #if defined(OS_MACOSX) + #include "base/mac/scoped_cftyperef.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #endif + + #if defined(OS_WIN) +@@ -1156,9 +1156,9 @@ inline int HFSReadNextNonIgnorableCodepoint(const char* string, + int* index) { + int codepoint = 0; + while (*index < length && codepoint == 0) { +- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string ++ // U8_NEXT returns a value < 0 in error cases. For purposes of string + // comparison, we just use that value and flag it with DCHECK. +- CBU8_NEXT(string, *index, length, codepoint); ++ U8_NEXT(string, *index, length, codepoint); + DCHECK_GT(codepoint, 0); + if (codepoint > 0) { + // Check if there is a subtable for this upper byte. +diff --git a/src/3rdparty/chromium/base/json/json_parser.cc b/src/3rdparty/chromium/base/json/json_parser.cc +index cd427da9e..82ff9773c 100644 +--- a/src/3rdparty/chromium/base/json/json_parser.cc ++++ b/src/3rdparty/chromium/base/json/json_parser.cc +@@ -16,7 +16,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "base/values.h" + + namespace base { +@@ -630,21 +630,21 @@ bool JSONParser::ConsumeStringRaw(StringBuilder* out) { + + while (CanConsume(1)) { + int start_index = index_; +- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. +- CBU8_NEXT(start_pos_, index_, length, next_char); ++ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. ++ U8_NEXT(start_pos_, index_, length, next_char); + if (next_char < 0 || !IsValidCharacter(next_char)) { + if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { + ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); + return false; + } +- CBU8_NEXT(start_pos_, start_index, length, next_char); ++ U8_NEXT(start_pos_, start_index, length, next_char); + string.Convert(); + string.AppendString(kUnicodeReplacementString); + continue; + } + + if (next_char == '"') { +- --index_; // Rewind by one because of CBU8_NEXT. ++ --index_; // Rewind by one because of U8_NEXT. + out->Swap(&string); + return true; + } +@@ -774,10 +774,10 @@ bool JSONParser::DecodeUTF16(std::string* dest_string) { + + // If this is a high surrogate, consume the next code unit to get the + // low surrogate. +- if (CBU16_IS_SURROGATE(code_unit16_high)) { ++ if (U16_IS_SURROGATE(code_unit16_high)) { + // Make sure this is the high surrogate. If not, it's an encoding + // error. +- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) ++ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) + return false; + + // Make sure that the token has more characters to consume the +@@ -794,24 +794,24 @@ bool JSONParser::DecodeUTF16(std::string* dest_string) { + + NextNChars(3); + +- if (!CBU16_IS_TRAIL(code_unit16_low)) { ++ if (!U16_IS_TRAIL(code_unit16_low)) { + return false; + } + + uint32_t code_point = +- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); ++ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); + if (!IsValidCharacter(code_point)) + return false; + + offset = 0; +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_point); + } else { + // Not a surrogate. +- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); ++ DCHECK(U16_IS_SINGLE(code_unit16_high)); + if (!IsValidCharacter(code_unit16_high)) + return false; + +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); + } + + dest_string->append(code_unit8); +@@ -828,9 +828,9 @@ void JSONParser::DecodeUTF8(const int32_t& point, StringBuilder* dest) { + } else { + char utf8_units[4] = { 0 }; + int offset = 0; +- CBU8_APPEND_UNSAFE(utf8_units, offset, point); ++ U8_APPEND_UNSAFE(utf8_units, offset, point); + dest->Convert(); +- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be ++ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be + // zero terminated at this point. |offset| contains the correct length. + dest->AppendString(std::string(utf8_units, offset)); + } +diff --git a/src/3rdparty/chromium/base/json/string_escape.cc b/src/3rdparty/chromium/base/json/string_escape.cc +index f67fa93bf..907b80a73 100644 +--- a/src/3rdparty/chromium/base/json/string_escape.cc ++++ b/src/3rdparty/chromium/base/json/string_escape.cc +@@ -14,7 +14,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +diff --git a/src/3rdparty/chromium/base/strings/pattern.cc b/src/3rdparty/chromium/base/strings/pattern.cc +index af30aab86..7df8f7255 100644 +--- a/src/3rdparty/chromium/base/strings/pattern.cc ++++ b/src/3rdparty/chromium/base/strings/pattern.cc +@@ -3,8 +3,7 @@ + // found in the LICENSE file. + + #include "base/strings/pattern.h" +- +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +@@ -39,7 +38,7 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, + const CHAR* string_next = *string; + base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); + if (pattern_char == next(&string_next, string_end) && +- pattern_char != CBU_SENTINEL) { ++ pattern_char != U_SENTINEL) { + *pattern = pattern_next; + *string = string_next; + } else { +@@ -136,7 +135,7 @@ struct NextCharUTF8 { + base_icu::UChar32 operator()(const char** p, const char* end) { + base_icu::UChar32 c; + int offset = 0; +- CBU8_NEXT(*p, offset, end - *p, c); ++ U8_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } +@@ -146,7 +145,7 @@ struct NextCharUTF16 { + base_icu::UChar32 operator()(const char16** p, const char16* end) { + base_icu::UChar32 c; + int offset = 0; +- CBU16_NEXT(*p, offset, end - *p, c); ++ U16_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } +diff --git a/src/3rdparty/chromium/base/strings/string_split.cc b/src/3rdparty/chromium/base/strings/string_split.cc +index a8180b24d..ac771a0f0 100644 +--- a/src/3rdparty/chromium/base/strings/string_split.cc ++++ b/src/3rdparty/chromium/base/strings/string_split.cc +@@ -8,7 +8,7 @@ + + #include "base/logging.h" + #include "base/strings/string_util.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +diff --git a/src/3rdparty/chromium/base/strings/string_util.cc b/src/3rdparty/chromium/base/strings/string_util.cc +index cb668ed7f..542f12819 100644 +--- a/src/3rdparty/chromium/base/strings/string_util.cc ++++ b/src/3rdparty/chromium/base/strings/string_util.cc +@@ -25,7 +25,7 @@ + #include "base/memory/singleton.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "build/build_config.h" + + namespace base { +@@ -357,19 +357,19 @@ void TruncateUTF8ToByteSize(const std::string& input, + } + DCHECK_LE(byte_size, + static_cast(std::numeric_limits::max())); +- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. ++ // Note: This cast is necessary because U8_NEXT uses int32_ts. + int32_t truncation_length = static_cast(byte_size); + int32_t char_index = truncation_length - 1; + const char* data = input.data(); + +- // Using CBU8, we will move backwards from the truncation point ++ // Using U8, we will move backwards from the truncation point + // to the beginning of the string looking for a valid UTF8 + // character. Once a full UTF8 character is found, we will + // truncate the string to the end of that character. + while (char_index >= 0) { + int32_t prev = char_index; + base_icu::UChar32 code_point = 0; +- CBU8_NEXT(data, char_index, truncation_length, code_point); ++ U8_NEXT(data, char_index, truncation_length, code_point); + if (!IsValidCharacter(code_point) || + !IsValidCodepoint(code_point)) { + char_index = prev - 1; +@@ -522,7 +522,7 @@ bool IsStringUTF8(const StringPiece& str) { + + while (char_index < src_len) { + int32_t code_point; +- CBU8_NEXT(src, char_index, src_len, code_point); ++ U8_NEXT(src, char_index, src_len, code_point); + if (!IsValidCharacter(code_point)) + return false; + } +diff --git a/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc b/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +index 3101a6028..7f7d84b3c 100644 +--- a/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ++++ b/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +@@ -4,7 +4,7 @@ + + #include "base/strings/utf_string_conversion_utils.h" + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +@@ -18,7 +18,7 @@ bool ReadUnicodeCharacter(const char* src, + // use a signed type for code_point. But this function returns false + // on error anyway, so code_point_out is unsigned. + int32_t code_point; +- CBU8_NEXT(src, *char_index, src_len, code_point); ++ U8_NEXT(src, *char_index, src_len, code_point); + *code_point_out = static_cast(code_point); + + // The ICU macro above moves to the next char, we want to point to the last +@@ -33,16 +33,16 @@ bool ReadUnicodeCharacter(const char16* src, + int32_t src_len, + int32_t* char_index, + uint32_t* code_point) { +- if (CBU16_IS_SURROGATE(src[*char_index])) { +- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || ++ if (U16_IS_SURROGATE(src[*char_index])) { ++ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || + *char_index + 1 >= src_len || +- !CBU16_IS_TRAIL(src[*char_index + 1])) { ++ !U16_IS_TRAIL(src[*char_index + 1])) { + // Invalid surrogate pair. + return false; + } + + // Valid surrogate pair. +- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], ++ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], + src[*char_index + 1]); + (*char_index)++; + } else { +@@ -76,30 +76,30 @@ size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output) { + } + + +- // CBU8_APPEND_UNSAFE can append up to 4 bytes. ++ // U8_APPEND_UNSAFE can append up to 4 bytes. + size_t char_offset = output->length(); + size_t original_char_offset = char_offset; +- output->resize(char_offset + CBU8_MAX_LENGTH); ++ output->resize(char_offset + U8_MAX_LENGTH); + +- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); + +- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so ++ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so + // it will represent the new length of the string. + output->resize(char_offset); + return char_offset - original_char_offset; + } + + size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { +- if (CBU16_LENGTH(code_point) == 1) { ++ if (U16_LENGTH(code_point) == 1) { + // Thie code point is in the Basic Multilingual Plane (BMP). + output->push_back(static_cast(code_point)); + return 1; + } + // Non-BMP characters use a double-character encoding. + size_t char_offset = output->length(); +- output->resize(char_offset + CBU16_MAX_LENGTH); +- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); +- return CBU16_MAX_LENGTH; ++ output->resize(char_offset + U16_MAX_LENGTH); ++ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ return U16_MAX_LENGTH; + } + + // Generalized Unicode converter ----------------------------------------------- +diff --git a/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc b/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc +index 2b67c5d9c..7ca6a6e0f 100644 +--- a/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc ++++ b/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc +@@ -17,7 +17,7 @@ + * that would otherwise be too long as macros. + */ + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base_icu { + +@@ -35,14 +35,14 @@ namespace base_icu { + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +-#define CBUTF8_ERROR_VALUE_1 0x15 ++#define UTF8_ERROR_VALUE_1 0x15 + + /** + * See documentation on UTF8_ERROR_VALUE_1 for details. + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +-#define CBUTF8_ERROR_VALUE_2 0x9f ++#define UTF8_ERROR_VALUE_2 0x9f + + + /** +@@ -51,7 +51,7 @@ namespace base_icu { + * + * @deprecated ICU 2.4. Obsolete, see utf_old.h. + */ +-#define CBUTF_ERROR_VALUE 0xffff ++#define UTF_ERROR_VALUE 0xffff + + /* + * This table could be replaced on many machines by +@@ -103,7 +103,7 @@ utf8_minLegal[4]={ 0, 0x80, 0x800, 0x10000 }; + + static const UChar32 + utf8_errorValue[6]={ +- CBUTF8_ERROR_VALUE_1, CBUTF8_ERROR_VALUE_2, CBUTF_ERROR_VALUE, 0x10ffff, ++ UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_2, UTF_ERROR_VALUE, 0x10ffff, + 0x3ffffff, 0x7fffffff + }; + +@@ -135,11 +135,11 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, + UChar32 c, + UBool strict) { + int32_t i = *pi; +- uint8_t count = CBU8_COUNT_TRAIL_BYTES(c); ++ uint8_t count = U8_COUNT_TRAIL_BYTES(c); + if((i)+count<=(length)) { + uint8_t trail, illegal = 0; + +- CBU8_MASK_LEAD_BYTE((c), count); ++ U8_MASK_LEAD_BYTE((c), count); + /* count==0 for illegally leading trail bytes and the illegal bytes 0xfe and 0xff */ + switch(count) { + /* each branch falls through to the next one */ +@@ -169,9 +169,9 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, + break; + case 0: + if(strict>=0) { +- return CBUTF8_ERROR_VALUE_1; ++ return UTF8_ERROR_VALUE_1; + } else { +- return CBU_SENTINEL; ++ return U_SENTINEL; + } + /* no default branch to optimize switch() - all values are covered */ + } +@@ -189,21 +189,21 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, + + /* correct sequence - all trail bytes have (b7..b6)==(10)? */ + /* illegal is also set if count>=4 */ +- if(illegal || (c)0 && CBU8_IS_TRAIL(s[i])) { ++ while(count>0 && U8_IS_TRAIL(s[i])) { + ++(i); + --count; + } + if(strict>=0) { + c=utf8_errorValue[errorCount-count]; + } else { +- c=CBU_SENTINEL; ++ c=U_SENTINEL; + } +- } else if((strict)>0 && CBU_IS_UNICODE_NONCHAR(c)) { ++ } else if((strict)>0 && U_IS_UNICODE_NONCHAR(c)) { + /* strict: forbid non-characters like U+fffe */ + c=utf8_errorValue[count]; + } +@@ -211,13 +211,13 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, + /* error handling */ + int32_t i0 = i; + /* don't just set (i)=(length) in case there is an illegal sequence */ +- while((i)<(length) && CBU8_IS_TRAIL(s[i])) { ++ while((i)<(length) && U8_IS_TRAIL(s[i])) { + ++(i); + } + if(strict>=0) { + c=utf8_errorValue[i-i0]; + } else { +- c=CBU_SENTINEL; ++ c=U_SENTINEL; + } + } + *pi=i; +diff --git a/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc b/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc +index 55f65f8c3..a7d616115 100644 +--- a/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc ++++ b/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc +@@ -8,7 +8,7 @@ + #include "base/files/file_util.h" + #include "base/strings/string_number_conversions.h" + #include "base/strings/string_util.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "content/public/browser/browser_thread.h" + + namespace content { +@@ -87,7 +87,7 @@ void Stream::ReadOnFileThread(off_t position, size_t max_size, + } else { + // Provided client has requested sufficient large block, make their + // life easier by not truncating in the middle of a UTF-8 character. +- if (size_got > 6 && !CBU8_IS_SINGLE(buffer[size_got - 1])) { ++ if (size_got > 6 && !U8_IS_SINGLE(buffer[size_got - 1])) { + base::TruncateUTF8ToByteSize(buffer, size_got, &buffer); + size_got = buffer.size(); + } else { +diff --git a/src/3rdparty/chromium/net/cert/internal/parse_name.cc b/src/3rdparty/chromium/net/cert/internal/parse_name.cc +index bb9b64051..5eaeb52d0 100644 +--- a/src/3rdparty/chromium/net/cert/internal/parse_name.cc ++++ b/src/3rdparty/chromium/net/cert/internal/parse_name.cc +@@ -10,7 +10,7 @@ + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" + #include "base/sys_byteorder.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace net { + +@@ -35,7 +35,7 @@ bool ConvertBmpStringValue(const der::Input& in, std::string* out) { + + // BMPString only supports codepoints in the Basic Multilingual Plane; + // surrogates are not allowed. +- if (CBU_IS_SURROGATE(c)) ++ if (U_IS_SURROGATE(c)) + return false; + } + return base::UTF16ToUTF8(in_16bit.data(), in_16bit.size(), out); +@@ -55,7 +55,7 @@ bool ConvertUniversalStringValue(const der::Input& in, std::string* out) { + for (const uint32_t c : in_32bit) { + // UniversalString is UCS-4 in big-endian order. + uint32_t codepoint = base::NetToHost32(c); +- if (!CBU_IS_UNICODE_CHAR(codepoint)) ++ if (!U_IS_UNICODE_CHAR(codepoint)) + return false; + + base::WriteUnicodeCharacter(codepoint, out); +diff --git a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc +index a8ac9028f..8fa5d2a64 100644 +--- a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc ++++ b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc +@@ -17,7 +17,7 @@ + #include "base/strings/string_util.h" + #include "base/strings/utf_string_conversions.h" + #include "base/sys_info.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "ui/base/ime/chromeos/ime_keyboard.h" + #include "ui/base/ime/chromeos/input_method_manager.h" + #include "ui/base/ime/composition_text.h" +diff --git a/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc b/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +index c7f38de0d..08a0ff5fb 100644 +--- a/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ++++ b/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +@@ -5,13 +5,13 @@ + #include "ui/gfx/utf16_indexing.h" + + #include "base/logging.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace gfx { + + bool IsValidCodePointIndex(const base::string16& s, size_t index) { + return index == 0 || index == s.length() || +- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); ++ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); + } + + ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { +-- +2.13.0 + diff --git a/qtwebengine-opensource-src-5.8.0-no-sse2.patch b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch similarity index 73% rename from qtwebengine-opensource-src-5.8.0-no-sse2.patch rename to 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch index ee15329..5df622b 100644 --- a/qtwebengine-opensource-src-5.8.0-no-sse2.patch +++ b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1,6 +1,64 @@ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-03-05 17:26:14.507159420 +0100 +From 844246bd10971ec348f044bc7a13acb17b9ce033 Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 14:38:20 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-sse2 + +--- + .../chromium/breakpad/src/build/common.gypi | 8 +- + src/3rdparty/chromium/cc/BUILD.gn | 39 +- + src/3rdparty/chromium/media/BUILD.gn | 20 + + src/3rdparty/chromium/media/base/BUILD.gn | 48 +- + src/3rdparty/chromium/media/base/media.cc | 4 + + .../chromium/media/base/simd/convert_yuv_to_rgb.h | 34 + + .../media/base/simd/convert_yuv_to_rgb_mmx.asm | 24 + + .../media/base/simd/convert_yuv_to_rgb_x86.cc | 56 + + src/3rdparty/chromium/media/base/simd/filter_yuv.h | 6 + + .../chromium/media/base/simd/filter_yuv_mmx.cc | 79 + + .../chromium/media/base/simd/sinc_resampler_sse.cc | 50 + + .../chromium/media/base/simd/vector_math_sse.cc | 118 + + src/3rdparty/chromium/media/base/sinc_resampler.cc | 81 +- + src/3rdparty/chromium/media/base/sinc_resampler.h | 4 + + .../chromium/media/base/sinc_resampler_perftest.cc | 4 + + .../chromium/media/base/sinc_resampler_unittest.cc | 5 + + src/3rdparty/chromium/media/base/vector_math.cc | 150 +- + src/3rdparty/chromium/media/base/vector_math.h | 5 + + .../chromium/media/base/vector_math_perftest.cc | 35 +- + .../chromium/media/base/vector_math_testing.h | 2 +- + .../chromium/media/base/vector_math_unittest.cc | 4 + + src/3rdparty/chromium/media/base/yuv_convert.cc | 50 +- + .../chromium/media/base/yuv_convert_perftest.cc | 79 +- + .../chromium/media/base/yuv_convert_unittest.cc | 159 +- + src/3rdparty/chromium/skia/BUILD.gn | 52 +- + src/3rdparty/chromium/skia/ext/convolver.cc | 11 +- + src/3rdparty/chromium/skia/ext/convolver.h | 1 + + .../Source/modules/webaudio/AudioParamTimeline.cpp | 8 +- + .../Source/platform/audio/DirectConvolver.cpp | 40 +- + .../WebKit/Source/platform/audio/DirectConvolver.h | 7 + + .../WebKit/Source/platform/audio/SincResampler.cpp | 31 +- + .../WebKit/Source/platform/audio/SincResampler.h | 7 + + .../WebKit/Source/platform/audio/VectorMath.cpp | 97 +- + .../WebKit/Source/platform/audio/VectorMath.h | 23 + + .../graphics/cpu/x86/WebGLImageConversionSSE.h | 2 +- + .../platform/graphics/gpu/WebGLImageConversion.cpp | 12 +- + src/3rdparty/chromium/third_party/qcms/BUILD.gn | 17 +- + .../webrtc/common_audio/real_fourier.cc | 9 + + src/3rdparty/chromium/v8/BUILD.gn | 72 +- + src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh | 56 + + src/3rdparty/chromium/v8/src/v8.gyp | 12 +- + src/3rdparty/chromium/v8/src/v8_sse2.gyp | 2313 ++++++++++++++++++++ + src/core/core_module.pro | 30 +- + 43 files changed, 3537 insertions(+), 327 deletions(-) + create mode 100644 src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm + create mode 100644 src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc + create mode 100644 src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc + create mode 100644 src/3rdparty/chromium/media/base/simd/vector_math_sse.cc + create mode 100644 src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh + create mode 100644 src/3rdparty/chromium/v8/src/v8_sse2.gyp + +diff --git a/src/3rdparty/chromium/breakpad/src/build/common.gypi b/src/3rdparty/chromium/breakpad/src/build/common.gypi +index b9466a325..8ad78e24f 100644 +--- a/src/3rdparty/chromium/breakpad/src/build/common.gypi ++++ b/src/3rdparty/chromium/breakpad/src/build/common.gypi @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -8,7 +66,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/bu - # On Linux, we build with sse2 for Chromium builds. - 'disable_sse2%': 0, + # Do not assume SSE2 by default (Fedora patch). -+ 'disable_sse2%': 1 ++ 'disable_sse2%': 1, }, 'target_arch%': '<(target_arch)', @@ -30,29 +88,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/bu ], 'ldflags': [ '-m32', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2017-03-05 17:26:14.612157862 +0100 -@@ -3861,15 +3861,7 @@ - # value used during computation does not change depending on - # how the compiler optimized the code, since the value is - # always kept in its specified precision. -- # -- # Refer to http://crbug.com/348761 for rationale behind SSE2 -- # being a minimum requirement for 32-bit Linux builds and -- # http://crbug.com/313032 for an example where this has "bit" -- # us in the past. - 'cflags': [ -- '-msse2', -- '-mfpmath=sse', -- '-mmmx', # Allows mmintrin.h for MMX intrinsics. - '-m32', - ], - 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-03-05 17:38:41.416050535 +0100 -@@ -537,13 +537,6 @@ +diff --git a/src/3rdparty/chromium/cc/BUILD.gn b/src/3rdparty/chromium/cc/BUILD.gn +index e461a898d..b50659b89 100644 +--- a/src/3rdparty/chromium/cc/BUILD.gn ++++ b/src/3rdparty/chromium/cc/BUILD.gn +@@ -567,13 +567,6 @@ component("cc") { "trees/tree_synchronizer.h", ] @@ -66,7 +106,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtw configs += [ "//build/config:precompiled_headers" ] public_deps = [ -@@ -553,6 +546,7 @@ +@@ -583,6 +576,7 @@ component("cc") { deps = [ "//base", "//base/third_party/dynamic_annotations", @@ -74,7 +114,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtw "//cc/proto", "//cc/surfaces:surface_id", "//gpu", -@@ -581,6 +575,36 @@ +@@ -612,6 +606,37 @@ component("cc") { } } @@ -108,81 +148,46 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtw + } +} + - source_set("test_support") { ++ + static_library("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2017-03-05 17:26:26.081987615 +0100 -@@ -602,14 +602,6 @@ - 'includes': [ - '../build/android/increase_size_for_speed.gypi', - ], -- 'conditions': [ -- ['target_arch == "ia32" or target_arch == "x64"', { -- 'sources': [ -- 'raster/texture_compressor_etc1_sse.cc', -- 'raster/texture_compressor_etc1_sse.h', -- ], -- }], -- ], - }, - { - # GN version: "//cc/proto" -@@ -678,6 +670,7 @@ - '<(DEPTH)/ui/events/events.gyp:events_base', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', -+ 'cc_opts', - ], - 'defines': [ - 'CC_SURFACES_IMPLEMENTATION=1', -@@ -714,5 +707,41 @@ - '../build/android/increase_size_for_speed.gypi', - ], - }, -+ { -+ 'target_name': 'cc_opts', -+ 'type': 'static_library', -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'CC_IMPLEMENTATION=1', -+ ], -+ 'dependencies': [ -+ 'cc_opts_sse', -+ ] -+ }], -+ ], -+ }, -+ { -+ 'target_name': 'cc_opts_sse', -+ 'type': 'static_library', -+ 'dependencies': [ -+ '<(DEPTH)/base/base.gyp:base', -+ ], -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'CC_IMPLEMENTATION=1', -+ ], -+ 'sources': [ -+ # Conditional compilation for SSE2 code on x86 and x64 machines -+ 'raster/texture_compressor_etc1_sse.cc', -+ 'raster/texture_compressor_etc1_sse.h', -+ ], -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ ], -+ }, - ], +diff --git a/src/3rdparty/chromium/media/BUILD.gn b/src/3rdparty/chromium/media/BUILD.gn +index 652aad4d9..063254830 100644 +--- a/src/3rdparty/chromium/media/BUILD.gn ++++ b/src/3rdparty/chromium/media/BUILD.gn +@@ -832,6 +832,26 @@ component("shared_memory_support") { + "//base", + "//ui/gfx/geometry", + ] ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":shared_memory_support_sse", ++ ] ++ } ++} ++ ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("shared_memory_support_sse") { ++ sources = [ ++ "base/simd/vector_math_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } } -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-03-05 17:26:26.082987600 +0100 -@@ -312,13 +312,13 @@ + + # TODO(watk): Refactor tests that could be made to run on Android. See +diff --git a/src/3rdparty/chromium/media/base/BUILD.gn b/src/3rdparty/chromium/media/base/BUILD.gn +index d288ec787..fac712c00 100644 +--- a/src/3rdparty/chromium/media/base/BUILD.gn ++++ b/src/3rdparty/chromium/media/base/BUILD.gn +@@ -336,11 +336,12 @@ target(link_target_type, "base") { } if (current_cpu == "x86" || current_cpu == "x64") { @@ -198,11 +203,9 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUIL + ":media_sse", + ":media_sse2", ] -- deps += [ ":media_yasm" ] + deps += [ ":media_yasm" ] } - - if (is_linux || is_win) { -@@ -534,10 +534,47 @@ +@@ -539,10 +540,47 @@ source_set("perftests") { } if (current_cpu == "x86" || current_cpu == "x64") { @@ -250,9 +253,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUIL "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-03-05 17:44:02.063267153 +0100 +diff --git a/src/3rdparty/chromium/media/base/media.cc b/src/3rdparty/chromium/media/base/media.cc +index 38daf05b8..bb43b405f 100644 +--- a/src/3rdparty/chromium/media/base/media.cc ++++ b/src/3rdparty/chromium/media/base/media.cc @@ -10,6 +10,8 @@ #include "base/metrics/field_trial.h" #include "base/trace_event/trace_event.h" @@ -262,7 +266,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/medi #include "media/base/yuv_convert.h" #if defined(OS_ANDROID) -@@ -40,6 +42,8 @@ +@@ -40,6 +42,8 @@ class MediaInitializer { TRACE_EVENT_WARMUP_CATEGORY("media"); // Perform initialization of libraries which require runtime CPU detection. @@ -271,10 +275,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/medi InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-03-05 17:26:26.083987585 +0100 -@@ -65,6 +65,17 @@ +diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +index a421ff566..8373fde90 100644 +--- a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ++++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +@@ -65,6 +65,17 @@ MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8_t* yplane, int rgbstride, YUVType yuv_type); @@ -292,9 +297,9 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -@@ -124,6 +135,13 @@ - ptrdiff_t width, - const int16_t* convert_table); +@@ -86,6 +97,13 @@ MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8_t* y_buf, + ptrdiff_t source_dx, + const int16_t* convert_table); +MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, + const uint8_t* uplane, @@ -303,12 +308,12 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd + ptrdiff_t width, + const int16_t* convert_table); + - MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -@@ -131,6 +149,14 @@ - ptrdiff_t width, - const int16_t* convert_table); + MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -94,6 +112,14 @@ MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf, + ptrdiff_t source_dx, + const int16_t* convert_table); +MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, + const uint8_t* u_buf, @@ -318,12 +323,12 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd + ptrdiff_t source_dx, + const int16_t* convert_table); + - MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -147,6 +173,14 @@ - ptrdiff_t source_dx, - const int16_t* convert_table); + MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( + const uint8_t* y_buf, + const uint8_t* u_buf, +@@ -104,6 +130,14 @@ MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( + int source_dx, + const int16_t* convert_table); +MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, + const uint8_t* u_buf, @@ -333,13 +338,15 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd + ptrdiff_t source_dx, + const int16_t* convert_table); + - MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-03-05 17:26:26.167986340 +0100 -@@ -0,0 +1,23 @@ + } // namespace media + + // Assembly functions are declared without namespace. +diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +new file mode 100644 +index 000000000..3650c9f73 +--- /dev/null ++++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +@@ -0,0 +1,24 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be +; found in the LICENSE file. @@ -363,13 +370,43 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-03-05 17:26:26.167986340 +0100 -@@ -47,6 +47,34 @@ ++ +diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +index a06799bfd..819bb60a8 100644 +--- a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ++++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +@@ -47,6 +47,62 @@ void ConvertYUVAToARGB_MMX(const uint8_t* yplane, EmptyRegisterState(); } ++void ConvertYUVToRGB32_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type) { ++ unsigned int y_shift = GetVerticalShift(yuv_type); ++ for (int y = 0; y < height; ++y) { ++ uint8_t* rgb_row = rgbframe + y * rgbstride; ++ const uint8_t* y_ptr = yplane + y * ystride; ++ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; ++ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; ++ ++ ConvertYUVToRGB32Row_MMX(y_ptr, ++ u_ptr, ++ v_ptr, ++ rgb_row, ++ width, ++ GetLookupTable(yuv_type)); ++ } ++ ++ EmptyRegisterState(); ++} ++ +void ConvertYUVToRGB32_MMX(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, @@ -401,10 +438,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd void ConvertYUVToRGB32_SSE(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-03-05 17:26:26.167986340 +0100 -@@ -20,6 +20,12 @@ +diff --git a/src/3rdparty/chromium/media/base/simd/filter_yuv.h b/src/3rdparty/chromium/media/base/simd/filter_yuv.h +index af30bd133..206fb7f11 100644 +--- a/src/3rdparty/chromium/media/base/simd/filter_yuv.h ++++ b/src/3rdparty/chromium/media/base/simd/filter_yuv.h +@@ -20,6 +20,12 @@ MEDIA_EXPORT void FilterYUVRows_C(uint8_t* ybuf, int source_width, uint8_t source_y_fraction); @@ -417,9 +455,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-03-05 17:26:26.167986340 +0100 +diff --git a/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc b/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +new file mode 100644 +index 000000000..416aca699 +--- /dev/null ++++ b/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -500,9 +540,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-03-05 17:26:26.168986325 +0100 +diff --git a/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc b/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +new file mode 100644 +index 000000000..c5d03dc48 +--- /dev/null ++++ b/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -554,9 +596,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-03-05 17:26:26.168986325 +0100 +diff --git a/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc b/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +new file mode 100644 +index 000000000..c2121225c +--- /dev/null ++++ b/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -676,9 +720,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-03-05 17:26:26.168986325 +0100 +diff --git a/src/3rdparty/chromium/media/base/sinc_resampler.cc b/src/3rdparty/chromium/media/base/sinc_resampler.cc +index cffb0c9d6..010775544 100644 +--- a/src/3rdparty/chromium/media/base/sinc_resampler.cc ++++ b/src/3rdparty/chromium/media/base/sinc_resampler.cc @@ -81,17 +81,12 @@ #include #include @@ -699,7 +744,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc #endif namespace media { -@@ -112,10 +107,41 @@ +@@ -112,10 +107,41 @@ static double SincScaleFactor(double io_ratio) { return sinc_scale_factor; } @@ -741,7 +786,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc SincResampler::SincResampler(double io_sample_rate_ratio, int request_frames, const ReadCB& read_cb) -@@ -343,46 +369,7 @@ +@@ -328,46 +354,7 @@ float SincResampler::Convolve_C(const float* input_ptr, const float* k1, kernel_interpolation_factor * sum2); } @@ -789,10 +834,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-03-05 17:26:26.169986310 +0100 -@@ -36,6 +36,10 @@ +diff --git a/src/3rdparty/chromium/media/base/sinc_resampler.h b/src/3rdparty/chromium/media/base/sinc_resampler.h +index afbd2abc9..9e3df2c55 100644 +--- a/src/3rdparty/chromium/media/base/sinc_resampler.h ++++ b/src/3rdparty/chromium/media/base/sinc_resampler.h +@@ -36,6 +36,10 @@ class MEDIA_EXPORT SincResampler { kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -803,9 +849,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-03-05 17:26:26.169986310 +0100 +diff --git a/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc b/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +index 9cb7f4f2e..285382490 100644 +--- a/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ++++ b/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -814,7 +861,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc #include "base/time/time.h" #include "build/build_config.h" #include "media/base/sinc_resampler.h" -@@ -61,6 +62,9 @@ +@@ -61,6 +62,9 @@ TEST(SincResamplerPerfTest, Convolve) { &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); #if defined(CONVOLVE_FUNC) @@ -824,9 +871,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-03-05 17:26:26.169986310 +0100 +diff --git a/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc b/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +index 8dd346ee4..7401eee96 100644 +--- a/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ++++ b/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc @@ -10,6 +10,7 @@ #include "base/bind.h" @@ -835,7 +883,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc #include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" -@@ -166,6 +167,10 @@ +@@ -166,6 +167,10 @@ TEST(SincResamplerTest, DISABLED_SetRatioBench) { static const double kKernelInterpolationFactor = 0.5; TEST(SincResamplerTest, Convolve) { @@ -846,9 +894,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-03-05 17:26:26.170986295 +0100 +diff --git a/src/3rdparty/chromium/media/base/vector_math.cc b/src/3rdparty/chromium/media/base/vector_math.cc +index 578290538..e041d8d4c 100644 +--- a/src/3rdparty/chromium/media/base/vector_math.cc ++++ b/src/3rdparty/chromium/media/base/vector_math.cc @@ -7,12 +7,17 @@ #include @@ -924,7 +973,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect void FMAC(const float src[], float scale, int len, float dest[]) { // Ensure |src| and |dest| are 16-byte aligned. DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); -@@ -89,111 +126,6 @@ +@@ -89,111 +126,6 @@ std::pair EWMAAndMaxPower_C( return result; } @@ -1036,10 +1085,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-03-05 17:26:26.170986295 +0100 -@@ -15,6 +15,11 @@ +diff --git a/src/3rdparty/chromium/media/base/vector_math.h b/src/3rdparty/chromium/media/base/vector_math.h +index a148ca050..0a2cb06f6 100644 +--- a/src/3rdparty/chromium/media/base/vector_math.h ++++ b/src/3rdparty/chromium/media/base/vector_math.h +@@ -15,6 +15,11 @@ namespace vector_math { // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1051,9 +1101,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-03-05 17:26:26.171986280 +0100 +diff --git a/src/3rdparty/chromium/media/base/vector_math_perftest.cc b/src/3rdparty/chromium/media/base/vector_math_perftest.cc +index 59b259dc2..c4c89a3b5 100644 +--- a/src/3rdparty/chromium/media/base/vector_math_perftest.cc ++++ b/src/3rdparty/chromium/media/base/vector_math_perftest.cc @@ -5,6 +5,7 @@ #include @@ -1062,7 +1113,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect #include "base/memory/aligned_memory.h" #include "base/time/time.h" #include "build/build_config.h" -@@ -82,15 +83,11 @@ +@@ -82,15 +83,11 @@ class VectorMathPerfTest : public testing::Test { DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); }; @@ -1079,7 +1130,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect #endif // Benchmark for each optimized vector_math::FMAC() method. -@@ -99,6 +96,9 @@ +@@ -99,6 +96,9 @@ TEST_F(VectorMathPerfTest, FMAC) { RunBenchmark( vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); #if defined(FMAC_FUNC) @@ -1089,7 +1140,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect // Benchmark FMAC_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -112,12 +112,24 @@ +@@ -112,12 +112,24 @@ TEST_F(VectorMathPerfTest, FMAC) { #endif } @@ -1114,7 +1165,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect // Benchmark FMUL_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -131,6 +143,14 @@ +@@ -131,6 +143,14 @@ TEST_F(VectorMathPerfTest, FMUL) { #endif } @@ -1129,7 +1180,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { // Benchmark EWMAAndMaxPower_C(). -@@ -139,6 +159,9 @@ +@@ -139,6 +159,9 @@ TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { "vector_math_ewma_and_max_power", "unoptimized"); #if defined(EWMAAndMaxPower_FUNC) @@ -1139,17 +1190,18 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -156,4 +179,6 @@ +@@ -156,4 +179,6 @@ TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { #endif } +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-03-05 17:26:26.171986280 +0100 -@@ -19,7 +19,7 @@ +diff --git a/src/3rdparty/chromium/media/base/vector_math_testing.h b/src/3rdparty/chromium/media/base/vector_math_testing.h +index 9240fbf54..b0b304409 100644 +--- a/src/3rdparty/chromium/media/base/vector_math_testing.h ++++ b/src/3rdparty/chromium/media/base/vector_math_testing.h +@@ -19,7 +19,7 @@ MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1158,9 +1210,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-03-05 17:26:26.172986265 +0100 +diff --git a/src/3rdparty/chromium/media/base/vector_math_unittest.cc b/src/3rdparty/chromium/media/base/vector_math_unittest.cc +index 3fcb3fad4..c4e8586aa 100644 +--- a/src/3rdparty/chromium/media/base/vector_math_unittest.cc ++++ b/src/3rdparty/chromium/media/base/vector_math_unittest.cc @@ -9,6 +9,7 @@ #include @@ -1169,7 +1222,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect #include "base/memory/aligned_memory.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringize_macros.h" -@@ -78,6 +79,7 @@ +@@ -78,6 +79,7 @@ TEST_F(VectorMathTest, FMAC) { #if defined(ARCH_CPU_X86_FAMILY) { @@ -1177,7 +1230,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMAC_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMAC_SSE( -@@ -119,6 +121,7 @@ +@@ -119,6 +121,7 @@ TEST_F(VectorMathTest, FMUL) { #if defined(ARCH_CPU_X86_FAMILY) { @@ -1185,7 +1238,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("FMUL_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMUL_SSE( -@@ -227,6 +230,7 @@ +@@ -227,6 +230,7 @@ class EWMATestScenario { #if defined(ARCH_CPU_X86_FAMILY) { @@ -1193,9 +1246,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-03-05 17:26:26.173986250 +0100 +diff --git a/src/3rdparty/chromium/media/base/yuv_convert.cc b/src/3rdparty/chromium/media/base/yuv_convert.cc +index 2cdd9b1fd..2fc643416 100644 +--- a/src/3rdparty/chromium/media/base/yuv_convert.cc ++++ b/src/3rdparty/chromium/media/base/yuv_convert.cc @@ -32,7 +32,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1205,7 +1259,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ #if defined(COMPILER_MSVC) #include #else -@@ -133,7 +133,7 @@ +@@ -133,7 +133,7 @@ static const int16_t* g_table_rec709_ptr = NULL; // Empty SIMD registers state after using them. void EmptyRegisterStateStub() {} @@ -1214,7 +1268,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ void EmptyRegisterStateIntrinsic() { _mm_empty(); } #endif typedef void (*EmptyRegisterStateProc)(); -@@ -247,34 +247,46 @@ +@@ -247,34 +247,46 @@ void InitializeCPUSpecificYUVConversions() { // Assembly code confuses MemorySanitizer. Also not available in iOS builds. #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ !defined(OS_IOS) @@ -1278,10 +1332,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-03-05 17:26:26.173986250 +0100 -@@ -71,6 +71,29 @@ +diff --git a/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc b/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +index ddf777cf3..f5520fd58 100644 +--- a/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ++++ b/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +@@ -71,6 +71,29 @@ class YUVConvertPerfTest : public testing::Test { DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1311,7 +1366,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -161,9 +184,32 @@ +@@ -161,9 +184,32 @@ TEST_F(YUVConvertPerfTest, I422AlphaToARGBRow_SSSE3) { } #endif @@ -1347,7 +1402,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -190,6 +236,32 @@ +@@ -190,6 +236,32 @@ TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1380,7 +1435,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -215,7 +287,6 @@ +@@ -215,7 +287,6 @@ TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1388,10 +1443,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-03-05 17:26:26.174986235 +0100 -@@ -643,6 +643,37 @@ +diff --git a/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc b/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +index ec872c89b..801466add 100644 +--- a/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ++++ b/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +@@ -643,6 +643,37 @@ TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) { EXPECT_EQ(0, error); } @@ -1429,7 +1485,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -674,9 +705,40 @@ +@@ -674,9 +705,40 @@ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { kWidth * kBpp)); } @@ -1473,7 +1529,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -711,6 +773,40 @@ +@@ -711,6 +773,40 @@ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { kWidth * kBpp)); } @@ -1514,7 +1570,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -744,7 +840,6 @@ +@@ -744,7 +840,6 @@ TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { rgb_bytes_converted.get(), kWidth * kBpp)); } @@ -1522,7 +1578,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { std::unique_ptr src(new uint8_t[16]); -@@ -761,6 +856,30 @@ +@@ -761,6 +856,30 @@ TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { } } @@ -1553,7 +1609,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { base::CPU cpu; if (!cpu.has_sse2()) { -@@ -782,6 +901,38 @@ +@@ -782,6 +901,38 @@ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { } } @@ -1592,172 +1648,55 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-03-05 17:26:26.175986220 +0100 -@@ -805,6 +805,26 @@ - "//base", - "//ui/gfx/geometry", - ] -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":shared_memory_support_sse", -+ ] -+ } -+} -+ -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("shared_memory_support_sse") { -+ sources = [ -+ "base/simd/vector_math_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } - } - - # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2017-03-05 17:51:56.424188330 +0100 -@@ -1020,12 +1020,12 @@ - ['target_arch=="ia32" or target_arch=="x64"', { - 'dependencies': [ - 'media_asm', -+ 'media_mmx', -+ 'media_sse', -+ 'media_sse2', - ], - 'sources': [ -- 'base/simd/convert_rgb_to_yuv_sse2.cc', -- 'base/simd/convert_rgb_to_yuv_ssse3.cc', - 'base/simd/convert_yuv_to_rgb_x86.cc', -- 'base/simd/filter_yuv_sse2.cc', - ], - }], - ['OS!="linux" and OS!="win"', { -@@ -1616,6 +1616,11 @@ - 'USE_NEON' - ], - }], -+ ['target_arch=="ia32" or target_arch=="x64"', { -+ 'dependencies': [ -+ 'shared_memory_support_sse' -+ ], -+ }], - ], - }, - { -@@ -1633,6 +1638,7 @@ - 'type': 'static_library', - 'sources': [ - 'base/simd/convert_rgb_to_yuv_ssse3.asm', -+ 'base/simd/convert_yuv_to_rgb_mmx.asm', - 'base/simd/convert_yuv_to_rgb_sse.asm', - 'base/simd/convert_yuva_to_argb_mmx.asm', - 'base/simd/empty_register_state_mmx.asm', -@@ -1713,6 +1719,75 @@ - '../third_party/yasm/yasm_compile.gypi', - ], - }, -+ { -+ # GN version: //media/base:media_mmx -+ 'target_name': 'media_mmx', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-mmmx', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/filter_yuv_mmx.cc', -+ ], -+ }, -+ { -+ # GN version: //media/base:media_sse -+ 'target_name': 'media_sse', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/sinc_resampler_sse.cc', -+ ], -+ }, -+ { -+ # GN version: //media/base:media_sse2 -+ 'target_name': 'media_sse2', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse2', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/convert_rgb_to_yuv_sse2.cc', -+ 'base/simd/convert_rgb_to_yuv_ssse3.cc', -+ 'base/simd/filter_yuv_sse2.cc', -+ ], -+ }, -+ { -+ 'target_name': 'shared_memory_support_sse', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/vector_math_sse.cc', -+ ], -+ }, - ], # targets - }], - ['OS=="win"', { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-03-05 17:56:08.829413581 +0100 -@@ -329,11 +329,6 @@ - if (!is_ios) { - sources += [ "ext/platform_canvas.cc" ] - } -- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { -- sources += [ "ext/convolver_SSE2.cc" ] -- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { -- sources += [ "ext/convolver_mips_dspr2.cc" ] -- } - - # The skia gypi values are relative to the skia_dir, so we need to rebase. - sources += gypi_skia_core.sources -@@ -642,7 +637,15 @@ +diff --git a/src/3rdparty/chromium/skia/BUILD.gn b/src/3rdparty/chromium/skia/BUILD.gn +index 55854ffe6..9a1d4ec0f 100644 +--- a/src/3rdparty/chromium/skia/BUILD.gn ++++ b/src/3rdparty/chromium/skia/BUILD.gn +@@ -1,38 +1,3 @@ +-# Copyright (c) 2013 The Chromium Authors. All rights reserved. +-# Use of this source code is governed by a BSD-style license that can be +-# found in the LICENSE file. +- +-import("//build/config/features.gni") +-import("//build/config/ui.gni") +-import("//printing/features/features.gni") +-import("//testing/test.gni") +-import("//third_party/skia/gn/shared_sources.gni") +- +-if (current_cpu == "arm") { +- import("//build/config/arm.gni") +-} +-if (current_cpu == "mipsel" || current_cpu == "mips64el") { +- import("//build/config/mips.gni") +-} +- +-skia_support_gpu = !is_ios +-skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) +- +-# When building Chrome for iOS with GYP, the target cpu is not known during +-# the invocation of gyp. This cause the iOS build to use non-optimised skia. +-# Replicate this with GN to avoid introducing regression as recommended by +-# the OWNERS of skia. +- +-declare_args() { +- skia_whitelist_serialized_typefaces = false +- +- # TODO(crbug.com/607933): Once GYP is no longer supported, port iOS to use +- # optimised skia. +- skia_build_no_opts = is_ios +-} +- +-# External-facing config for dependent code. +-config("skia_config") { + include_dirs = [ + "config", + "ext", +@@ -608,7 +573,15 @@ source_set("skia_opts") { if (skia_build_no_opts) { - sources = gypi_skia_opts.none_sources + sources = skia_opts.none_sources } else if (current_cpu == "x86" || current_cpu == "x64") { -- sources = gypi_skia_opts.sse2_sources -+ sources = gypi_skia_opts.sse2_sources + +- sources = skia_opts.sse2_sources ++ sources = skia_opts.sse2_sources + + [ + # Chrome-specific. + "ext/convolver_SSE2.cc", @@ -1768,11 +1707,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn q + } deps += [ ":skia_opts_avx", - ":skia_opts_avx2", -@@ -677,6 +680,13 @@ + ":skia_opts_hsw", +@@ -644,6 +617,13 @@ source_set("skia_opts") { if (mips_dsp_rev >= 1) { - sources = gypi_skia_opts.mips_dsp_sources + sources = skia_opts.mips_dsp_sources + if (mips_dsp_rev >= 2) { + sources += [ + # Chrome-specific. @@ -1781,12 +1720,13 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn q + ] + } } else { - sources = gypi_skia_opts.none_sources + sources = skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-03-05 17:26:26.176986205 +0100 -@@ -362,10 +362,13 @@ +diff --git a/src/3rdparty/chromium/skia/ext/convolver.cc b/src/3rdparty/chromium/skia/ext/convolver.cc +index 092fefaa9..4b40ffd2c 100644 +--- a/src/3rdparty/chromium/skia/ext/convolver.cc ++++ b/src/3rdparty/chromium/skia/ext/convolver.cc +@@ -362,10 +362,13 @@ struct ConvolveProcs { void SetupSIMD(ConvolveProcs *procs) { #ifdef SIMD_SSE2 @@ -1804,9 +1744,10 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convol #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-03-05 17:26:26.239985269 +0100 +diff --git a/src/3rdparty/chromium/skia/ext/convolver.h b/src/3rdparty/chromium/skia/ext/convolver.h +index 1f33d4c0f..f7cd4770a 100644 +--- a/src/3rdparty/chromium/skia/ext/convolver.h ++++ b/src/3rdparty/chromium/skia/ext/convolver.h @@ -11,6 +11,7 @@ #include @@ -1815,215 +1756,11 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convol #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-03-05 17:26:26.239985269 +0100 -@@ -9,6 +9,7 @@ - { - 'dependencies': [ - 'skia_library', -+ 'skia_chrome_opts', - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - ], -@@ -67,22 +68,16 @@ - 'ext/skia_utils_base.cc', - ], - }], -+ ['OS == "ios"', { -+ 'dependencies!': [ -+ 'skia_chrome_opts', -+ ], -+ }], - [ 'OS != "android" and (OS != "linux" or use_cairo==1)', { - 'sources!': [ - 'ext/bitmap_platform_device_skia.cc', - ], - }], -- [ 'OS != "ios" and target_arch != "arm" and target_arch != "mipsel" and \ -- target_arch != "arm64" and target_arch != "mips64el"', { -- 'sources': [ -- 'ext/convolver_SSE2.cc', -- ], -- }], -- [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ -- 'sources': [ -- 'ext/convolver_mips_dspr2.cc', -- ], -- }], - ], - - 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2017-03-05 17:26:26.239985269 +0100 -@@ -128,6 +128,37 @@ - # targets that are not dependent upon the component type - 'targets': [ - { -+ 'target_name': 'skia_chrome_opts', -+ 'type': 'static_library', -+ 'include_dirs': [ -+ '..', -+ 'config', -+ '../third_party/skia/include/core', -+ ], -+ 'conditions': [ -+ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ -+ target_arch != "arm" and target_arch != "mipsel" and \ -+ target_arch != "arm64" and target_arch != "mips64el"', { -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ [ 'target_arch != "arm" and target_arch != "mipsel" and \ -+ target_arch != "arm64" and target_arch != "mips64el"', { -+ 'sources': [ -+ 'ext/convolver_SSE2.cc', -+ 'ext/convolver_SSE2.h', -+ ], -+ }], -+ [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ -+ 'sources': [ -+ 'ext/convolver_mips_dspr2.cc', -+ 'ext/convolver_mips_dspr2.h', -+ ], -+ }], -+ ], -+ }, -+ { - 'target_name': 'image_operations_bench', - # The optimize: 'max' scattered throughout are particularly - # important when compiled by MSVC 2013, which seems -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-03-05 17:26:26.239985269 +0100 -@@ -19,10 +19,22 @@ - }, - - 'targets': [ -- # SSE files have to be built in a separate target, because gcc needs -- # different -msse flags for different SSE levels which enable use of SSE -- # intrinsics but also allow emission of SSE2 instructions for scalar code. -- # gyp does not allow per-file compiler flags. -+ # Due to an unfortunate intersection of lameness between gcc and gyp, -+ # we have to build the *_SSE2.cpp files in a separate target. The -+ # gcc lameness is that, in order to compile SSE2 intrinsics code, it -+ # must be passed the -msse2 flag. However, with this flag, it may -+ # emit SSE2 instructions even for scalar code, such as the CPUID -+ # test used to test for the presence of SSE2. So that, and all other -+ # code must be compiled *without* -msse2. The gyp lameness is that it -+ # does not allow file-specific CFLAGS, so we must create this extra -+ # target for those files to be compiled with -msse2. -+ # -+ # This is actually only a problem on 32-bit Linux (all Intel Macs have -+ # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit -+ # SSE2 from instrinsics, which generating plain ol' 386 for everything -+ # else). However, to keep the .gyp file simple and avoid platform-specific -+ # build breakage, we do this on all platforms. -+ - # For about the same reason, we need to compile the ARM opts files - # separately as well. - { -@@ -45,12 +57,13 @@ - ], - 'include_dirs': [ '<@(include_dirs)' ], - 'conditions': [ -+ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ -+ target_arch != "arm" and target_arch != "arm64" and \ -+ target_arch != "mipsel" and target_arch != "mips64el"', { -+ 'cflags': [ '-msse2' ], -+ }], - [ 'target_arch != "arm" and target_arch != "mipsel" and \ - target_arch != "arm64" and target_arch != "mips64el"', { -- # Chrome builds with -msse2 locally, so sse2_sources could in theory -- # be in the regular skia target. But we need skia_opts for arm -- # anyway, so putting sse2_sources here is simpler than making this -- # conditionally a type none target on x86. - 'sources': [ '<@(sse2_sources)' ], - 'dependencies': [ - 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-03-05 17:26:26.240985255 +0100 -@@ -31,8 +31,8 @@ - ] - - if (current_cpu == "x86" || current_cpu == "x64") { -- defines = [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ "qcms_sse2" ] - } - } - -@@ -75,3 +75,15 @@ - public_configs = [ ":qcms_config" ] - } - } -+ -+source_set("qcms_sse2") { -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ public_configs = [ ":qcms_config" ] -+ -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ defines = [ "SSE2_ENABLE" ] -+ sources = [ "src/transform-sse2.c" ] -+ cflags = [ "-msse2" ] -+ } -+} -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-03-05 18:01:48.843328633 +0100 -@@ -52,10 +52,10 @@ - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'defines': [ -- 'SSE2_ENABLE', -+ 'SSE2_ENABLE', # runtime detection - ], -- 'sources': [ -- 'src/transform-sse2.c', -+ 'dependencies': [ -+ 'qcms_sse2', - ], - }], - ], -@@ -68,6 +68,29 @@ - }], - ], - }, -+ { -+ 'target_name': 'qcms_sse2', -+ 'type': 'static_library', -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'SSE2_ENABLE', -+ ], -+ 'sources': [ -+ # Conditional compilation for SSE2 code on x86 and x64 machines -+ 'src/transform-sse2.c', -+ ], -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ ], -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ './src', -+ ], -+ }, -+ }, - ], - 'conditions': [ - ['disable_qcms == 0', { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-03-05 17:26:26.240985255 +0100 -@@ -32,7 +32,7 @@ +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +index 8e558f439..20ba17688 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +@@ -31,7 +31,7 @@ #include "wtf/MathExtras.h" #include @@ -2032,36 +1769,37 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include #endif -@@ -575,7 +575,7 @@ - // First handle linear and exponential ramps which require looking ahead to the next event. - if (nextEventType == ParamEvent::LinearRampToValue) { - const float valueDelta = value2 - value1; +@@ -662,7 +662,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, + // the next event. + if (nextEventType == ParamEvent::LinearRampToValue) { + const float valueDelta = value2 - value1; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Minimize in-loop operations. Calculate starting value and increment. Next step: value += inc. - // value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1); - // inc = 4 / sampleRate * k * (value2 - value1); -@@ -738,7 +738,7 @@ - for (; writeIndex < fillToFrame; ++writeIndex) - values[writeIndex] = target; - } else { + if (fillToFrame > writeIndex) { + // Minimize in-loop operations. Calculate starting value and increment. + // Next step: value += inc. +@@ -841,7 +841,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, + for (; writeIndex < fillToFrame; ++writeIndex) + values[writeIndex] = target; + } else { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Resolve recursion by expanding constants to achieve a 4-step loop unrolling. - // v1 = v0 + (t - v0) * c - // v2 = v1 + (t - v1) * c -@@ -843,7 +843,7 @@ - // Render the stretched curve data using linear interpolation. Oversampled - // curve data can be provided if sharp discontinuities are desired. - unsigned k = 0; + if (fillToFrame > writeIndex) { + // Resolve recursion by expanding constants to achieve a 4-step + // loop unrolling. +@@ -959,7 +959,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, + // Oversampled curve data can be provided if sharp discontinuities are + // desired. + unsigned k = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); - const __m128 vCurvePointsPerFrame = _mm_set_ps1(curvePointsPerFrame); - const __m128 vNumberOfCurvePointsM1 = _mm_set_ps1(numberOfCurvePoints - 1); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-03-05 18:09:17.132624414 +0100 + if (fillToFrame > writeIndex) { + const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); + const __m128 vCurvePointsPerFrame = +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +index a77ec195c..d76c2d015 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2072,7 +1810,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include "platform/audio/DirectConvolver.h" #if OS(MACOSX) -@@ -35,22 +38,44 @@ +@@ -35,21 +38,45 @@ #include "platform/audio/VectorMath.h" #include "wtf/CPU.h" @@ -2092,68 +1830,68 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web +#ifndef BUILD_ONLY_THE_SSE2_PARTS + DirectConvolver::DirectConvolver(size_t inputBlockSize) - : m_inputBlockSize(inputBlockSize) - , m_buffer(inputBlockSize * 2) - { +- : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) {} ++ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) ++{ +#if CPU(X86) + base::CPU cpu; + m_haveSSE2 = cpu.has_sse2(); +#endif - } - ++} +#endif -+ + +#ifdef BUILD_ONLY_THE_SSE2_PARTS +void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) +#else - void DirectConvolver::process(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) + void DirectConvolver::process(AudioFloatArray* convolutionKernel, + const float* sourceP, + float* destP, +- size_t framesToProcess) { ++ size_t framesToProcess) +#endif - { -+#if CPU(X86) && !defined(__SSE2__) ++{ ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (m_haveSSE2) { + m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); + return; + } +#endif - ASSERT(framesToProcess == m_inputBlockSize); - if (framesToProcess != m_inputBlockSize) - return; -@@ -82,7 +107,7 @@ - #endif // CPU(X86) + ASSERT(framesToProcess == m_inputBlockSize); + if (framesToProcess != m_inputBlockSize) + return; +@@ -83,7 +110,7 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, + #endif // CPU(X86) #else - size_t i = 0; + size_t i = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| - // are multiples of 4. If not, use the straightforward loop below. - -@@ -392,7 +417,7 @@ - } - destP[i++] = sum; + // Convolution using SSE2. Currently only do this if both |kernelSize| and + // |framesToProcess| are multiples of 4. If not, use the straightforward loop + // below. +@@ -397,7 +424,7 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, + } + destP[i++] = sum; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif - #endif // OS(MACOSX) -@@ -401,10 +426,14 @@ - memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); + #endif // OS(MACOSX) +@@ -406,8 +433,9 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, + memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); } +#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void DirectConvolver::reset() - { - m_buffer.zero(); + void DirectConvolver::reset() { + m_buffer.zero(); } - +- +#endif -+ - } // namespace blink - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-03-05 17:26:26.241985240 +0100 + } // namespace blink +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +index 848f6aa73..78ea0d84c 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2162,27 +1900,23 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include "wtf/Noncopyable.h" namespace blink { -@@ -50,6 +51,11 @@ - size_t m_inputBlockSize; +@@ -54,6 +55,12 @@ class PLATFORM_EXPORT DirectConvolver { + size_t m_inputBlockSize; - AudioFloatArray m_buffer; + AudioFloatArray m_buffer; + +#if CPU(X86) + bool m_haveSSE2; + void m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess); +#endif ++ }; - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-03-05 17:26:26.242985225 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-03-05 17:26:26.242985225 +0100 + } // namespace blink +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +index e7ca2c77d..a0ad93953 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp @@ -26,15 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2206,60 +1940,64 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web + // Input buffer layout, dividing the total buffer into regions (r0 - r5): // - // |----------------|----------------------------------------------------------------|----------------| -@@ -64,6 +71,8 @@ + // |----------------|-----------------------------------------|----------------| +@@ -66,6 +73,8 @@ namespace blink { +#ifndef BUILD_ONLY_THE_SSE2_PARTS + - SincResampler::SincResampler(double scaleFactor, unsigned kernelSize, unsigned numberOfKernelOffsets) - : m_scaleFactor(scaleFactor) - , m_kernelSize(kernelSize) -@@ -77,6 +86,10 @@ - , m_sourceProvider(nullptr) - , m_isBufferPrimed(false) - { + SincResampler::SincResampler(double scaleFactor, + unsigned kernelSize, + unsigned numberOfKernelOffsets) +@@ -81,6 +90,10 @@ SincResampler::SincResampler(double scaleFactor, + m_sourceFramesAvailable(0), + m_sourceProvider(nullptr), + m_isBufferPrimed(false) { +#if CPU(X86) + base::CPU cpu; + m_haveSSE2 = cpu.has_sse2(); +#endif - initializeKernel(); + initializeKernel(); } -@@ -193,8 +206,20 @@ - } +@@ -200,10 +213,22 @@ void SincResampler::process(const float* source, + remaining -= framesThisTime; + } } ++#endif //BUILD_ONLY_THE_SSE2_PARTS -+#endif -+ +#ifdef BUILD_ONLY_THE_SSE2_PARTS +void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) +#else - void SincResampler::process(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) + void SincResampler::process(AudioSourceProvider* sourceProvider, + float* destination, +- size_t framesToProcess) { ++ size_t framesToProcess) +#endif - { ++{ +#if CPU(X86) && !defined(__SSE2__) + if (m_haveSSE2) { + m_processSSE2(sourceProvider, destination, framesToProcess); + return; + } +#endif - bool isGood = sourceProvider && m_blockSize > m_kernelSize && m_inputBuffer.size() >= m_blockSize + m_kernelSize && !(m_kernelSize % 2); - ASSERT(isGood); - if (!isGood) -@@ -256,7 +281,7 @@ - { - float input; + bool isGood = sourceProvider && m_blockSize > m_kernelSize && + m_inputBuffer.size() >= m_blockSize + m_kernelSize && + !(m_kernelSize % 2); +@@ -269,7 +294,7 @@ void SincResampler::process(AudioSourceProvider* sourceProvider, + { + float input; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. - while ((reinterpret_cast(inputP) & 0x0F) && n) { - CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-03-05 17:26:26.305984290 +0100 + // If the sourceP address is not 16-byte aligned, the first several + // frames (at most three) should be processed seperately. + while ((reinterpret_cast(inputP) & 0x0F) && n) { +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +index b96ec94cf..4b6b3293e 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h @@ -33,6 +33,7 @@ #include "platform/audio/AudioArray.h" #include "platform/audio/AudioSourceProvider.h" @@ -2268,29 +2006,25 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include "wtf/Noncopyable.h" namespace blink { -@@ -84,6 +85,11 @@ +@@ -96,6 +97,12 @@ class PLATFORM_EXPORT SincResampler { - // The buffer is primed once at the very beginning of processing. - bool m_isBufferPrimed; + // The buffer is primed once at the very beginning of processing. + bool m_isBufferPrimed; + +#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); ++ bool m_haveSSE2; ++ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); +#endif ++ }; }; - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-03-05 17:26:26.305984290 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-03-05 17:26:26.306984275 +0100 -@@ -22,6 +22,9 @@ - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + } // namespace blink +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +index 8f3592cd7..ba9fc1a73 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +@@ -23,6 +23,9 @@ + * DAMAGE. */ +// include this first to get it before the CPU() function-like macro @@ -2299,7 +2033,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include "platform/audio/VectorMath.h" #include "wtf/Assertions.h" #include "wtf/CPU.h" -@@ -32,10 +35,14 @@ +@@ -33,10 +36,14 @@ #include #endif @@ -2315,7 +2049,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #if HAVE(ARM_NEON_INTRINSICS) #include #endif -@@ -118,11 +125,25 @@ +@@ -165,15 +172,30 @@ void vclip(const float* sourceP, } #else @@ -2327,167 +2061,181 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web +static base::CPU cpu; +#endif + - void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) - { + void vsma(const float* sourceP, + int sourceStride, + const float* scale, + float* destP, + int destStride, + size_t framesToProcess) { +- int n = framesToProcess; +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, destStride, framesToProcess); + return; + } +#endif - int n = framesToProcess; ++ ++int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; - -@@ -193,9 +214,15 @@ + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; - void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) - { +@@ -269,9 +291,16 @@ void vsmul(const float* sourceP, + float* destP, + int destStride, + size_t framesToProcess) { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess); + return; + } +#endif - int n = framesToProcess; ++ + int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; -@@ -266,16 +293,22 @@ - sourceP += sourceStride; - destP += destStride; +@@ -360,7 +389,7 @@ void vsmul(const float* sourceP, + sourceP += sourceStride; + destP += destStride; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif } - - void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) - { +@@ -372,9 +401,16 @@ void vadd(const float* source1P, + float* destP, + int destStride, + size_t framesToProcess) { +- int n = framesToProcess; +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); + return; + } +#endif - int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) ++ int n = framesToProcess; ++ +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -378,17 +411,23 @@ - source2P += sourceStride2; - destP += destStride; + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -501,7 +537,7 @@ void vadd(const float* source1P, + source2P += sourceStride2; + destP += destStride; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif } - - void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) - { +@@ -513,9 +549,16 @@ void vmul(const float* source1P, + float* destP, + int destStride, + size_t framesToProcess) { +- int n = framesToProcess; +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); + return; + } +#endif - - int n = framesToProcess; ++ ++int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -460,8 +499,14 @@ - - void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) - { + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the source1P address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -614,8 +657,15 @@ void zvmul(const float* real1P, + float* realDestP, + float* imagDestP, + size_t framesToProcess) { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, imagDestP, framesToProcess); + return; + } +#endif - unsigned i = 0; ++ + unsigned i = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. - // Otherwise, fall through to the scalar code below. - if (!(reinterpret_cast(real1P) & 0x0F) -@@ -516,10 +561,16 @@ - - void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) - { + // Only use the SSE optimization in the very common case that all addresses + // are 16-byte aligned. Otherwise, fall through to the scalar code below. + if (!(reinterpret_cast(real1P) & 0x0F) && +@@ -671,10 +721,17 @@ void vsvesq(const float* sourceP, + int sourceStride, + float* sumP, + size_t framesToProcess) { +- int n = framesToProcess; +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, framesToProcess); + return; + } +#endif - int n = framesToProcess; - float sum = 0; ++ ++ int n = framesToProcess; + float sum = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -581,10 +632,16 @@ - - void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess) - { + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -740,10 +797,16 @@ void vmaxmgv(const float* sourceP, + int sourceStride, + float* maxP, + size_t framesToProcess) { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, framesToProcess); + return; + } +#endif - int n = framesToProcess; - float max = 0; + int n = framesToProcess; + float max = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -648,6 +705,8 @@ - *maxP = max; - } - + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -839,6 +902,7 @@ void vclip(const float* sourceP, + float* destP, + int destStride, + size_t framesToProcess) { +#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess) - { - int n = framesToProcess; -@@ -678,6 +737,12 @@ - } + int n = framesToProcess; + float lowThreshold = *lowThresholdP; + float highThreshold = *highThresholdP; +@@ -888,6 +952,11 @@ void vclip(const float* sourceP, + destP += destStride; + } } - +#endif + +#ifdef BUILD_ONLY_THE_SSE2_PARTS +} // namespace SSE2 +#endif -+ - #endif // OS(MACOSX) - } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-03-05 17:26:26.306984275 +0100 -@@ -26,6 +26,7 @@ + #endif // OS(MACOSX) + +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +index 8f375071c..d92e5b85e 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +@@ -27,6 +27,7 @@ #define VectorMath_h #include "platform/PlatformExport.h" @@ -2495,9 +2243,9 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include "wtf/build_config.h" #include -@@ -55,6 +56,28 @@ - // Copies elements while clipping values to the threshold inputs. - PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); +@@ -97,6 +98,28 @@ PLATFORM_EXPORT void vclip(const float* sourceP, + int destStride, + size_t framesToProcess); +#if CPU(X86) +namespace SSE2 { @@ -2521,70 +2269,13 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web +} +#endif + - } // namespace VectorMath - } // namespace blink - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-03-05 17:26:26.307984260 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-03-05 17:26:26.307984260 +0100 -@@ -392,6 +392,11 @@ - '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', - ], - }], -+ ['target_arch == "ia32"', { -+ 'dependencies': [ -+ 'blink_sse2', -+ ], -+ }], - ['target_arch=="arm"', { - 'dependencies': [ - 'blink_arm_neon', -@@ -406,6 +411,36 @@ - }], - ], - }, -+ { -+ 'target_name': 'blink_sse2', -+ 'conditions': [ -+ ['target_arch=="ia32"', { -+ 'type': 'static_library', -+ 'dependencies': [ -+ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', -+ '../config.gyp:config', -+ '../wtf/wtf.gyp:wtf', -+ 'blink_common', -+ 'blink_heap_asm_stubs', -+ ], -+ 'defines': [ -+ 'BLINK_PLATFORM_IMPLEMENTATION=1', -+ 'INSIDE_BLINK', -+ ], -+ 'sources': [ -+ 'audio/DirectConvolverSSE2.cpp', -+ 'audio/SincResamplerSSE2.cpp', -+ 'audio/VectorMathSSE2.cpp', -+ ], -+ 'cflags': [ -+ '-msse2', -+ '-mfpmath=sse', -+ ], -+ },{ # target_arch != "ia32" -+ 'type': 'none', -+ }], -+ ], -+ }, - # The *NEON.cpp files fail to compile when -mthumb is passed. Force - # them to build in ARM mode. - # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-03-05 17:26:26.308984245 +0100 + } // namespace VectorMath + } // namespace blink + +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +index e30fcb464..4b3437057 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2594,66 +2285,100 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/Web #include -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-03-05 17:26:26.309984231 +0100 -@@ -423,7 +423,7 @@ - const uint32_t* source32 = reinterpret_cast_ptr(source); - uint32_t* destination32 = reinterpret_cast_ptr(destination); +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +index be417ea88..e79034424 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +@@ -441,7 +441,7 @@ void unpack( + const uint32_t* source32 = reinterpret_cast_ptr(source); + uint32_t* destination32 = reinterpret_cast_ptr(destination); -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); + SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -442,7 +442,7 @@ - - template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) - { + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -467,7 +467,7 @@ void unpack( + const uint16_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); + SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -464,7 +464,7 @@ - - template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) - { +@@ -496,7 +496,7 @@ void unpack( + const uint16_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); + SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -630,7 +630,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { +@@ -711,7 +711,7 @@ void pack(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); + SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -667,7 +667,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -768,7 +768,7 @@ void pack(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); + SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -741,7 +741,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -880,7 +880,7 @@ void pack(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); - #else - for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-03-05 18:14:44.694725685 +0100 + SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +diff --git a/src/3rdparty/chromium/third_party/qcms/BUILD.gn b/src/3rdparty/chromium/third_party/qcms/BUILD.gn +index 1183569be..771dd02c8 100644 +--- a/src/3rdparty/chromium/third_party/qcms/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/qcms/BUILD.gn +@@ -30,8 +30,8 @@ static_library("qcms") { + ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- defines = [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines = [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ "qcms_sse2" ] + } + } + +@@ -74,3 +74,16 @@ if (!disable_qcms) { + public_configs = [ ":qcms_config" ] + } + } ++ ++source_set("qcms_sse2") { ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] ++ public_configs = [ ":qcms_config" ] ++ ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ defines = [ "SSE2_ENABLE" ] ++ sources = [ "src/transform-sse2.c" ] ++ cflags = [ "-msse2" ] ++ } ++} ++ +diff --git a/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc b/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +index e721346f3..ef5a4e4a7 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2662,7 +2387,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/web namespace webrtc { -@@ -23,7 +24,15 @@ +@@ -23,7 +24,15 @@ const size_t RealFourier::kFftBufferAlignment = 32; std::unique_ptr RealFourier::Create(int fft_order) { #if defined(RTC_USE_OPENMAX_DL) @@ -2678,34 +2403,15 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/web #else return std::unique_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-03-05 17:26:26.310984216 +0100 -@@ -1345,6 +1345,8 @@ - # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. - prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] - prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] -+ if len(solibs): -+ prefixed_solibs = ['$$PWD/' + so for so in toAbsPaths(solibs)] - - pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) - pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) -@@ -1353,6 +1355,8 @@ - pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) - else: - pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) -+ if len(solibs): -+ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_solibs))) - # External libs have to come after objects/archives, the linker resolve them in order. - pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) - # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-03-05 18:22:29.296777508 +0100 -@@ -1523,41 +1523,41 @@ - - if (v8_target_cpu == "x86") { - sources += [ +diff --git a/src/3rdparty/chromium/v8/BUILD.gn b/src/3rdparty/chromium/v8/BUILD.gn +index 9b209dfff..d88261d53 100644 +--- a/src/3rdparty/chromium/v8/BUILD.gn ++++ b/src/3rdparty/chromium/v8/BUILD.gn +@@ -1769,43 +1769,41 @@ v8_static_library("v8_base") { + + if (v8_current_cpu == "x86") { + sources += [ ### gcmole(arch:ia32) ### +- "src/builtins/ia32/builtins-ia32.cc", - "src/compiler/ia32/code-generator-ia32.cc", - "src/compiler/ia32/instruction-codes-ia32.h", - "src/compiler/ia32/instruction-scheduler-ia32.cc", @@ -2721,7 +2427,6 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtw - "src/ia32/assembler-ia32-inl.h", - "src/ia32/assembler-ia32.cc", - "src/ia32/assembler-ia32.h", -- "src/ia32/builtins-ia32.cc", - "src/ia32/code-stubs-ia32.cc", - "src/ia32/code-stubs-ia32.h", - "src/ia32/codegen-ia32.cc", @@ -2734,6 +2439,8 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtw - "src/ia32/interface-descriptors-ia32.cc", - "src/ia32/macro-assembler-ia32.cc", - "src/ia32/macro-assembler-ia32.h", +- "src/ia32/simulator-ia32.cc", +- "src/ia32/simulator-ia32.h", - "src/ic/ia32/access-compiler-ia32.cc", - "src/ic/ia32/handler-compiler-ia32.cc", - "src/ic/ia32/ic-compiler-ia32.cc", @@ -2777,37 +2484,13 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtw + "src/regexp/x87/regexp-macro-assembler-x87.cc", + "src/regexp/x87/regexp-macro-assembler-x87.h", ] - } else if (v8_target_cpu == "x64") { - sources += [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-03-05 18:20:24.988636550 +0100 -@@ -159,6 +159,9 @@ - }, { - 'gomadir': '>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-03-05 17:30:17.500552662 +0100 -@@ -36,6 +36,14 @@ - 'v8_experimental_extra_library_files%': [], - 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', - 'remove_v8base_debug_symbols%': 0, -+ 'conditions': [ -+ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds -+ ['target_arch == "ia32"', { -+ 'v8_component%': 'shared_library', -+ }, { -+ 'v8_component%': '<(component)', -+ }], -+ ], - }, - 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], - 'targets': [ -@@ -49,8 +57,8 @@ +diff --git a/src/3rdparty/chromium/v8/src/v8.gyp b/src/3rdparty/chromium/v8/src/v8.gyp +index 020ec0928..2add932fc 100644 +--- a/src/3rdparty/chromium/v8/src/v8.gyp ++++ b/src/3rdparty/chromium/v8/src/v8.gyp +@@ -51,8 +51,8 @@ }, { 'toolsets': ['target'], }], @@ -2894,16 +2563,16 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp q 'sources': [ # Note: on non-Windows we still build this file so that gyp # has some sources to link into the component. -@@ -161,7 +169,7 @@ +@@ -151,7 +151,7 @@ 'js2c', ], }], - ['component=="shared_library"', { + ['v8_component=="shared_library"', { 'defines': [ - 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -253,7 +261,7 @@ + ], +@@ -243,7 +243,7 @@ 'toolsets': ['target'], 'dependencies': ['js2c'], }], @@ -2911,17 +2580,17 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp q + ['v8_component=="shared_library"', { 'defines': [ 'BUILDING_V8_SHARED', - 'V8_SHARED', -@@ -281,7 +289,7 @@ + ], +@@ -270,7 +270,7 @@ 'natives_blob', ], }], - ['component=="shared_library"', { + ['v8_component=="shared_library"', { 'defines': [ - 'V8_SHARED', 'BUILDING_V8_SHARED', -@@ -1608,7 +1616,7 @@ + ], +@@ -1727,7 +1727,7 @@ # See http://crbug.com/485155. 'msvs_shard': 4, }], @@ -2929,10 +2598,12 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp q + ['v8_component=="shared_library"', { 'defines': [ 'BUILDING_V8_SHARED', - 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 + ], +diff --git a/src/3rdparty/chromium/v8/src/v8_sse2.gyp b/src/3rdparty/chromium/v8/src/v8_sse2.gyp +new file mode 100644 +index 000000000..140b071a6 +--- /dev/null ++++ b/src/3rdparty/chromium/v8/src/v8_sse2.gyp @@ -0,0 +1,2313 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -5247,11 +4918,12 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2. + }, + ], +} -diff -Nur qtwebengine-opensource-src-5.8.0/src/core/core_module.pro qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.8.0/src/core/core_module.pro 2017-01-03 11:35:11.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro 2017-03-05 17:30:17.502552632 +0100 -@@ -9,6 +9,29 @@ - error("Could not find the linking information that gyp should have generated.") +diff --git a/src/core/core_module.pro b/src/core/core_module.pro +index 44e8ac613..7fe1a49e9 100644 +--- a/src/core/core_module.pro ++++ b/src/core/core_module.pro +@@ -10,6 +10,29 @@ linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri + error("Could not find the linking information that gn should have generated.") } +# find the shared libraries in the link line @@ -5280,7 +4952,7 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/core/core_module.pro qtwebengine- load(qt_module) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() -@@ -74,7 +97,12 @@ +@@ -100,7 +123,12 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -5294,18 +4966,6 @@ diff -Nur qtwebengine-opensource-src-5.8.0/src/core/core_module.pro qtwebengine- !use?(system_icu) { icu.CONFIG += no_check_exist -diff -Nur qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi ---- qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi 2017-01-03 11:35:11.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi 2017-03-05 17:30:17.503552617 +0100 -@@ -63,6 +63,11 @@ - }, - }, - 'conditions': [ -+ ['target_arch=="ia32"', { -+ 'dependencies': [ -+ '<(chromium_src_dir)/v8/src/v8_sse2.gyp:v8_sse2', -+ ], -+ }], - ['OS=="win" and win_use_allocator_shim==1', { - 'dependencies': [ - '<(chromium_src_dir)/base/allocator/allocator.gyp:allocator', +-- +2.13.0 + diff --git a/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch similarity index 72% rename from qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch rename to 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch index 08ff6e5..732be1a 100644 --- a/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch +++ b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch @@ -1,6 +1,17 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-12-03 22:50:19.369158276 +0100 +From 8bad8aac82444a9e1feda3f1a8b214b81be8a8fc Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 15:02:52 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.-openmax-dl-neon + +--- + .../chromium/third_party/openmax_dl/dl/dl.gyp | 9 ---- + .../third_party/openmax_dl/dl/sp/src/arm/detect.c | 56 ++++++++++++++++++---- + 2 files changed, 48 insertions(+), 17 deletions(-) + +diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp b/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp +index 2b0826fe1..20b4b1f35 100644 +--- a/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp ++++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp @@ -219,15 +219,6 @@ 'conditions': [ ['arm_neon_optional==1', { @@ -17,9 +28,10 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/open 'sources': [ # Detection routine 'sp/src/arm/detect.c', -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-12-03 22:48:13.745095083 +0100 +diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +index 57bfe4089..94a3f7ddc 100644 +--- a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c ++++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c @@ -9,13 +9,57 @@ * */ @@ -82,7 +94,7 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/open } static void SetFFTRoutines() { -@@ -24,13 +68,9 @@ +@@ -24,13 +68,9 @@ static void SetFFTRoutines() { * forward and inverse FFTs */ if (omxSP_HasArmNeon()) { @@ -96,3 +108,6 @@ diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/open omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp; omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp; } +-- +2.13.0 + diff --git a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch new file mode 100644 index 0000000..92c12de --- /dev/null +++ b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch @@ -0,0 +1,33 @@ +From a7885b823a2d3fc853f532fb5ae3a43a3e9967c0 Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 15:13:15 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-linux-pri + +--- + src/core/config/linux.pri | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +index 24951cd07..c28e3b312 100644 +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -147,4 +147,16 @@ host_build { + use?(system_icu): gn_args += use_system_icu=true icu_use_data_file=false + use?(system_ffmpeg): gn_args += use_system_ffmpeg=true + #use?(system_protobuf): gn_args += use_system_protobuf=true ++ ++ # some more system packages, that are not checked for for some reason ++ gn_args += use_system_re2=true ++ ++ # yasm is only used on x86, and passing use_system_yasm makes the build fail on ++ # other architectures (e.g., ARM), so make it conditional on the architecture ++ contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ gn_args += use_system_yasm=true ++ } ++ ++ #link libpci instead of dlopening it, our Qt packaging depends on it anyway ++ gn_args += linux_link_libpci=true + } +-- +2.13.0 + diff --git a/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch similarity index 69% rename from qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch rename to 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch index 00cbfc2..bf97a76 100644 --- a/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch +++ b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch @@ -1,7 +1,17 @@ -diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp ---- qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp 2016-03-03 17:02:28.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp 2016-03-18 03:08:24.385444415 +0100 -@@ -207,24 +207,7 @@ +From 99294d646e58bcbedc5987a1816fed592290566f Mon Sep 17 00:00:00 2001 +From: Helio Chissini de Castro +Date: Wed, 31 May 2017 15:16:56 +0200 +Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-icudtl-dat + +--- + src/core/web_engine_library_info.cpp | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp +index f46f8f425..96cd48ac4 100644 +--- a/src/core/web_engine_library_info.cpp ++++ b/src/core/web_engine_library_info.cpp +@@ -254,24 +254,7 @@ QString icuDataPath() #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) return getResourcesPath(frameworkBundle()); #else @@ -26,3 +36,6 @@ diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp q return potentialResourcesPath; #endif } +-- +2.13.0 + diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5ddbf65..b039a74 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -40,8 +40,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.8.0 -Release: 14%{?dist} +Version: 5.9.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -51,68 +51,40 @@ URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg # wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz # ./clean_qtwebengine.sh 5.8.0 -Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz +Source0: https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine -# some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch -# quick hack to avoid checking for the nonexistent icudtl.dat and silence the -# resulting warnings - not upstreamable as is because it removes the fallback -# mechanism for the ICU data directory (which is not used in our builds because -# we use the system ICU, which embeds the data statically) completely -Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch -# fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the -# ARM flags with our %%qmake_qt5 macro, including for the next patch -Patch2: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch -# disable NEON vector instructions on ARM where the NEON code FTBFS due to -# GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -# otherwise, we use the arm-fpu-fix below instead (which this patch contains) -Patch3: qtwebengine-opensource-src-5.7.1-no-neon.patch +# webrtc: enable the CPU feature detection for ARM Linux also for Chromium +Patch0: 0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch4: qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch +Patch1: 0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch5: qtwebengine-opensource-src-5.8.0-system-icu-utf.patch +Patch2: 0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) # TODO: For 5.9, we will need the GN files updated (where not done yet), too. -Patch6: qtwebengine-opensource-src-5.8.0-no-sse2.patch -# fix ARM NEON handling in webrtc gyp files -# Fix video_processing.gypi to only build NEON files when actually requested -# (i.e., not if arm_neon=0 arm_neon_optional=0). -Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch -# fix missing ARM -mfpu setting (see the comment in the no-neon patch above) -Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch +Patch3: 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) -Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch -# chromium-skia: build SkUtilsArm.cpp also on non-Android ARM -Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch -# webrtc: enable the CPU feature detection for ARM Linux also for Chromium -Patch12: qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch -# fix FTBFS in V8 with GCC 7 (by Ben Noordhuis, backported from Chromium RPM) -Patch13: qtwebengine-opensource-src-5.8.0-v8-gcc7.patch -# fix FTBFS in PDFium with GCC 7: backport upstream cleanup removing that code -# https://codereview.chromium.org/2154503002 -Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch -# fix FTBFS in the WTF part of Blink/WebKit with GCC 7 -Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch -# FTBFS using qt < 5.8 -Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch -# upstream fix for blank pages when a link opens in a new tab -Patch100: qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch -# upstream fix for non-functional dead keys in text fields -Patch101: qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch +Patch4: 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch +# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +Patch5: 0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch +# quick hack to avoid checking for the nonexistent icudtl.dat and silence the +# resulting warnings - not upstreamable as is because it removes the fallback +# mechanism for the ICU data directory (which is not used in our builds because +# we use the system ICU, which embeds the data statically) completely +Patch6: 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -340,28 +312,16 @@ BuildArch: noarch %prep -%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} -%patch0 -p1 -b .linux-pri -%patch1 -p1 -b .no-icudtl-dat -%patch2 -p1 -b .fix-extractcflag +%setup -q -n %{qt_module}-opensource-src-%{version} %if 0%{?arm_neon} -%patch9 -p1 -b .arm-fpu-fix -%else -%patch3 -p1 -b .no-neon +%patch0 -p1 -b .webrtc-neon-detect %endif -%patch4 -p1 -b .system-nspr-prtime -%patch5 -p1 -b .system-icu-utf -%patch6 -p1 -b .no-sse2 -%patch7 -p1 -b .webrtc-neon -%patch10 -p1 -b .openmax-dl-neon -%patch11 -p1 -b .skia-neon -%patch12 -p1 -b .webrtc-neon-detect -%patch13 -p1 -b .v8-gcc7 -%patch14 -p1 -b .pdfium-gcc7 -%patch15 -p1 -b .wtf-gcc7 -%patch20 -p1 -b .qt57 -%patch100 -p1 -b .fix-open-in-new-tab -%patch101 -p1 -b .fix-dead-keys +%patch1 -p1 -b .system-nspr-prtime +%patch2 -p1 -b .system-icu-utf +%patch3 -p1 -b .no-sse2 +%patch4 -p1 -b .openmax-dl-neon +%patch5 -p1 -b .linux-pri +%patch6 -p1 -b .no-icudtl # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -572,6 +532,9 @@ done %changelog +* Wed May 31 2017 Helio Chissini de Castro - 5.9.0-1 +- Upstream official release + * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch deleted file mode 100644 index 8beae69..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf ---- qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf 2016-01-10 18:15:23.942032985 +0100 -@@ -87,7 +87,7 @@ - } - - defineReplace(extractCFlag) { -- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS -+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE - OPTION = $$find(CFLAGS, $$1) - OPTION = $$split(OPTION, =) - return ($$member(OPTION, 1)) diff --git a/qtwebengine-opensource-src-5.7.0-linux-pri.patch b/qtwebengine-opensource-src-5.7.0-linux-pri.patch deleted file mode 100644 index 321a1d7..0000000 --- a/qtwebengine-opensource-src-5.7.0-linux-pri.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri 2016-06-07 06:20:06.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 22:18:17.312471202 +0200 -@@ -46,3 +46,22 @@ - use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 - use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 - use?(system_protobuf): GYP_CONFIG += use_system_protobuf=1 -+ -+# some more system packages, that are not checked for for some reason -+GYP_CONFIG += use_system_re2=1 -+ -+# yasm is only used on x86, and passing use_system_yasm makes the build fail on -+# other architectures (e.g., ARM), so make it conditional on the architecture -+contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+ GYP_CONFIG += use_system_yasm=1 -+} -+ -+# link libpci instead of dlopening it, our Qt packaging depends on it anyway -+GYP_CONFIG += linux_link_libpci=1 -+ -+# run the unbundling script Chromium provides -+CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" -+R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" -+R_G_F_PY_ARGS = "-D use_system_re2=1" -+log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.7.1-skia-neon.patch b/qtwebengine-opensource-src-5.7.1-skia-neon.patch deleted file mode 100644 index c9b385b..0000000 --- a/qtwebengine-opensource-src-5.7.1-skia-neon.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi 2016-12-04 14:34:12.531877529 +0100 -@@ -159,6 +159,11 @@ - '../build/android/ndk.gyp:cpu_features', - ], - }], -+ [ 'OS != "android" and target_arch == "arm"', { -+ 'sources': [ -+ '../third_party/skia/src/core/SkUtilsArm.cpp', -+ ], -+ }], - [ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', { - 'dependencies': [ - '../build/linux/system.gyp:fontconfig', diff --git a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch deleted file mode 100644 index a0cf81c..0000000 --- a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 31374ba98829e984c7600419c0e5fa71b96fc530 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 24 Mar 2017 14:31:02 +0100 -Subject: Forward input method events to RWHV in widget - -Task-number: QTBUG-58362 -Change-Id: Id4cf57c60da17538b224bb9bc91277c324c6a55d -Reviewed-by: Viktor Engelmann -Reviewed-by: Allan Sandfeld Jensen ---- - .../render_widget_host_view_qt_delegate_widget.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -index 14c4d72..fd58a07 100644 ---- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -@@ -84,10 +84,19 @@ protected: - { - m_client->forwardEvent(event); - } -+ void inputMethodEvent(QInputMethodEvent *event) override -+ { -+ m_client->forwardEvent(event); -+ } - QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override - { - return m_client->updatePaintNode(oldNode); - } -+ -+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override -+ { -+ return m_client->inputMethodQuery(query); -+ } - private: - RenderWidgetHostViewQtDelegateClient *m_client; - }; --- -cgit v1.0-4-g1e03 - diff --git a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch deleted file mode 100644 index c95a712..0000000 --- a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8e147ed3be7740092de233a2a7c67ec890069649 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20Br=C3=BCning?= -Date: Mon, 13 Mar 2017 11:13:56 +0100 -Subject: Remove stale parent connection when initializing delegate as a child - -When clicking on a blank link target, the constructor of the -RenderWidgetHostViewQtDelegateWidget instance for the newly created -view is called with the originating QWebEngineView as its parent -and will connect its removeParentBeforeParentDelete slot to the -originating view's destroyed signal. - -This leads to the situation where the delegate's parent will be set to -null when the originating view is closed, causing the view to display -only an empty widget with the actual web contents remaining live in -the background. - -This patch removes the connection to the old view when initializing -the delegate as a child of the QWebEnginePagePrivate instance. The -addition to the layout updates the parent and child relationship -between the view and the delegate internally. - -Task-number: QTBUG-58381 -Change-Id: I448380478c2bcfcfbddaee8a35caf46010e57972 -Reviewed-by: Florian Bruhin -Reviewed-by: Joerg Bornemann ---- - src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -index e7ad5b1..14c4d72 100644 ---- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -@@ -163,6 +163,9 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* - - QWebEnginePagePrivate *pagePrivate = static_cast(container); - if (pagePrivate->view) { -+ if (parentWidget()) -+ disconnect(parentWidget(), &QObject::destroyed, -+ this, &RenderWidgetHostViewQtDelegateWidget::removeParentBeforeParentDelete); - pagePrivate->view->layout()->addWidget(this); - pagePrivate->view->setFocusProxy(this); - show(); --- -cgit v1.0-4-g1e03 - diff --git a/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch b/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch deleted file mode 100644 index ce2c180..0000000 --- a/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch +++ /dev/null @@ -1,600 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-03-06 13:04:01.784297561 +0100 -@@ -454,7 +454,7 @@ - } - - void app::ClearTimerCommon(const CJS_Value& param) { -- if (param.GetType() != CJS_Value::VT_fxobject) -+ if (param.GetType() != CJS_Value::VT_object) - return; - - v8::Local pObj = param.ToV8Object(); -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-03-06 13:04:01.783297575 +0100 -@@ -411,22 +411,20 @@ - - int nlength = params.size(); - if (nlength == 9) { -- if (params[8].GetType() == CJS_Value::VT_fxobject) { -+ if (params[8].GetType() == CJS_Value::VT_object) { - v8::Local pObj = params[8].ToV8Object(); -- { -- if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { -- if (CJS_Object* pJSObj = params[8].ToCJSObject()) { -- if (PrintParamsObj* pprintparamsObj = -- (PrintParamsObj*)pJSObj->GetEmbedObject()) { -- bUI = pprintparamsObj->bUI; -- nStart = pprintparamsObj->nStart; -- nEnd = pprintparamsObj->nEnd; -- bSilent = pprintparamsObj->bSilent; -- bShrinkToFit = pprintparamsObj->bShrinkToFit; -- bPrintAsImage = pprintparamsObj->bPrintAsImage; -- bReverse = pprintparamsObj->bReverse; -- bAnnotations = pprintparamsObj->bAnnotations; -- } -+ if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { -+ if (CJS_Object* pJSObj = params[8].ToCJSObject()) { -+ if (PrintParamsObj* pprintparamsObj = -+ static_cast(pJSObj->GetEmbedObject())) { -+ bUI = pprintparamsObj->bUI; -+ nStart = pprintparamsObj->nStart; -+ nEnd = pprintparamsObj->nEnd; -+ bSilent = pprintparamsObj->bSilent; -+ bShrinkToFit = pprintparamsObj->bShrinkToFit; -+ bPrintAsImage = pprintparamsObj->bPrintAsImage; -+ bReverse = pprintparamsObj->bReverse; -+ bAnnotations = pprintparamsObj->bAnnotations; - } - } - } -@@ -597,18 +595,16 @@ - v8::Local pObj = params[0].ToV8Object(); - v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"cURL"); - if (!pValue.IsEmpty()) -- strURL = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ strURL = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"bFDF"); -- bFDF = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); -+ bFDF = CJS_Value(pRuntime, pValue).ToBool(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"bEmpty"); -- bEmpty = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); -+ bEmpty = CJS_Value(pRuntime, pValue).ToBool(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"aFields"); -- aFields.Attach( -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array()); -+ aFields.Attach(CJS_Value(pRuntime, pValue).ToV8Array()); - } - - CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); -@@ -691,25 +687,22 @@ - v8::Local pObj = params[0].ToV8Object(); - - v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"bUI"); -- bUI = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToInt(); -+ bUI = CJS_Value(pRuntime, pValue).ToInt(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cTo"); -- cTo = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cTo = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cCc"); -- cCc = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cCc = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cBcc"); -- cBcc = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cBcc = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cSubject"); -- cSubject = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cSubject = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cMsg"); -- cMsg = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cMsg = CJS_Value(pRuntime, pValue).ToCFXWideString(); - } - - pRuntime->BeginBlock(); -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-03-06 13:04:01.785297546 +0100 -@@ -17,63 +17,6 @@ - #include "fpdfsdk/javascript/cjs_context.h" - #include "fpdfsdk/javascript/resource.h" - --// Helper class for compile-time calculation of hash values in order to --// avoid having global object initializers. --template --struct CHash; -- --// Only needed to hash single-character strings. --template --struct CHash { -- static const unsigned value = N; --}; -- --template --struct CHash { -- static const unsigned value = (ACC * 1313LLU + N) & 0xFFFFFFFF; --}; -- --template --struct CHash { -- static const unsigned value = CHash::value, Ns...>::value; --}; -- --const unsigned int JSCONST_nStringHash = -- CHash<'s', 't', 'r', 'i', 'n', 'g'>::value; --const unsigned int JSCONST_nNumberHash = -- CHash<'n', 'u', 'm', 'b', 'e', 'r'>::value; --const unsigned int JSCONST_nBoolHash = -- CHash<'b', 'o', 'o', 'l', 'e', 'a', 'n'>::value; --const unsigned int JSCONST_nDateHash = CHash<'d', 'a', 't', 'e'>::value; --const unsigned int JSCONST_nObjectHash = -- CHash<'o', 'b', 'j', 'e', 'c', 't'>::value; --const unsigned int JSCONST_nFXobjHash = CHash<'f', 'x', 'o', 'b', 'j'>::value; --const unsigned int JSCONST_nNullHash = CHash<'n', 'u', 'l', 'l'>::value; --const unsigned int JSCONST_nUndefHash = -- CHash<'u', 'n', 'd', 'e', 'f', 'i', 'n', 'e', 'd'>::value; -- --static unsigned JS_CalcHash(const wchar_t* main) { -- return (unsigned)FX_HashCode_GetW(CFX_WideStringC(main), false); --} -- --#ifndef NDEBUG --class HashVerify { -- public: -- HashVerify(); --} g_hashVerify; -- --HashVerify::HashVerify() { -- ASSERT(JSCONST_nStringHash == JS_CalcHash(kFXJSValueNameString)); -- ASSERT(JSCONST_nNumberHash == JS_CalcHash(kFXJSValueNameNumber)); -- ASSERT(JSCONST_nBoolHash == JS_CalcHash(kFXJSValueNameBoolean)); -- ASSERT(JSCONST_nDateHash == JS_CalcHash(kFXJSValueNameDate)); -- ASSERT(JSCONST_nObjectHash == JS_CalcHash(kFXJSValueNameObject)); -- ASSERT(JSCONST_nFXobjHash == JS_CalcHash(kFXJSValueNameFxobj)); -- ASSERT(JSCONST_nNullHash == JS_CalcHash(kFXJSValueNameNull)); -- ASSERT(JSCONST_nUndefHash == JS_CalcHash(kFXJSValueNameUndefined)); --} --#endif -- - BEGIN_JS_STATIC_CONST(CJS_Global) - END_JS_STATIC_CONST() - -@@ -335,9 +278,8 @@ - CFX_WideString ws = - FXJS_ToString(isolate, FXJS_GetArrayElement(isolate, pKeyList, i)); - CFX_ByteString sKey = ws.UTF8Encode(); -- - v8::Local v = FXJS_GetObjectElement(isolate, pObj, ws); -- switch (GET_VALUE_TYPE(v)) { -+ switch (CJS_Value::GetValueType(v)) { - case CJS_Value::VT_number: { - CJS_KeyValue* pObjElement = new CJS_KeyValue; - pObjElement->nType = JS_GLOBALDATA_TYPE_NUMBER; -@@ -353,8 +295,7 @@ - array.Add(pObjElement); - } break; - case CJS_Value::VT_string: { -- CFX_ByteString sValue = -- CJS_Value(pRuntime, v, CJS_Value::VT_string).ToCFXByteString(); -+ CFX_ByteString sValue = CJS_Value(pRuntime, v).ToCFXByteString(); - CJS_KeyValue* pObjElement = new CJS_KeyValue; - pObjElement->nType = JS_GLOBALDATA_TYPE_STRING; - pObjElement->sKey = sKey; -@@ -500,26 +441,3 @@ - m_mapGlobal[propname] = pNewData; - return TRUE; - } -- --CJS_Value::Type GET_VALUE_TYPE(v8::Local p) { -- const unsigned int nHash = JS_CalcHash(FXJS_GetTypeof(p)); -- -- if (nHash == JSCONST_nUndefHash) -- return CJS_Value::VT_undefined; -- if (nHash == JSCONST_nNullHash) -- return CJS_Value::VT_null; -- if (nHash == JSCONST_nStringHash) -- return CJS_Value::VT_string; -- if (nHash == JSCONST_nNumberHash) -- return CJS_Value::VT_number; -- if (nHash == JSCONST_nBoolHash) -- return CJS_Value::VT_boolean; -- if (nHash == JSCONST_nDateHash) -- return CJS_Value::VT_date; -- if (nHash == JSCONST_nObjectHash) -- return CJS_Value::VT_object; -- if (nHash == JSCONST_nFXobjHash) -- return CJS_Value::VT_fxobject; -- -- return CJS_Value::VT_unknown; --} -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-03-06 13:04:01.783297575 +0100 -@@ -111,7 +111,7 @@ - CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); - C* pObj = reinterpret_cast(pJSObj->GetEmbedObject()); - CFX_WideString sError; -- CJS_PropValue propValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); -+ CJS_PropValue propValue(CJS_Value(pRuntime, value)); - propValue.StartSetting(); - if (!(pObj->*M)(pContext, propValue, sError)) { - FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string, -@@ -149,7 +149,7 @@ - IJS_Context* pContext = pRuntime->GetCurrentContext(); - std::vector parameters; - for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { -- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); -+ parameters.push_back(CJS_Value(pRuntime, info[i])); - } - CJS_Value valueRes(pRuntime); - CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); -@@ -404,7 +404,7 @@ - CFX_WideString propname = CFX_WideString::FromUTF8( - CFX_ByteStringC(*utf8_value, utf8_value.length())); - CFX_WideString sError; -- CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); -+ CJS_PropValue PropValue(CJS_Value(pRuntime, value)); - PropValue.StartSetting(); - if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) { - FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError)); -@@ -447,7 +447,7 @@ - IJS_Context* pContext = pRuntime->GetCurrentContext(); - std::vector parameters; - for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { -- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); -+ parameters.push_back(CJS_Value(pRuntime, info[i])); - } - CJS_Value valueRes(pRuntime); - CFX_WideString sError; -@@ -485,6 +485,4 @@ - } \ - } - --CJS_Value::Type GET_VALUE_TYPE(v8::Local p); -- - #endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-03-06 13:10:30.896809956 +0100 -@@ -22,11 +22,10 @@ - return *(double*)g_nan; - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime) -- : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {} -+CJS_Value::CJS_Value(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {} - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t) -- : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {} -+CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue) -+ : m_pValue(pValue), m_pJSRuntime(pRuntime) {} - - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const int& iValue) - : m_pJSRuntime(pRuntime) { -@@ -48,23 +47,11 @@ - operator=(dValue); - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pJsObj) -- : m_pJSRuntime(pRuntime) { -- operator=(pJsObj); --} -- - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pJsObj) - : m_pJSRuntime(pRuntime) { - operator=(pJsObj); - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Document* pJsDoc) -- : m_pJSRuntime(pRuntime) { -- m_eType = VT_object; -- if (pJsDoc) -- m_pValue = pJsDoc->ToV8Object(); --} -- - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr) - : m_pJSRuntime(pRuntime) { - operator=(pWstr); -@@ -84,19 +71,17 @@ - - CJS_Value::CJS_Value(const CJS_Value& other) = default; - --void CJS_Value::Attach(v8::Local pValue, Type t) { -+void CJS_Value::Attach(v8::Local pValue) { - m_pValue = pValue; -- m_eType = t; - } - - void CJS_Value::Attach(CJS_Value* pValue) { - if (pValue) -- Attach(pValue->ToV8Value(), pValue->GetType()); -+ Attach(pValue->ToV8Value()); - } - - void CJS_Value::Detach() { - m_pValue = v8::Local(); -- m_eType = VT_unknown; - } - - int CJS_Value::ToInt() const { -@@ -146,7 +131,7 @@ - - void CJS_Value::MaybeCoerceToNumber() { - bool bAllowNaN = false; -- if (m_eType == VT_string) { -+ if (GetType() == VT_string) { - CFX_ByteString bstr = ToCFXByteString(); - if (bstr.GetLength() == 0) - return; -@@ -162,32 +147,26 @@ - if (std::isnan(num->Value()) && !bAllowNaN) - return; - m_pValue = num; -- m_eType = VT_number; - } - - void CJS_Value::operator=(int iValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), iValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(bool bValue) { - m_pValue = FXJS_NewBoolean(m_pJSRuntime->GetIsolate(), bValue); -- m_eType = VT_boolean; - } - - void CJS_Value::operator=(double dValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), dValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(float fValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), fValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(v8::Local pObj) { - m_pValue = FXJS_NewObject(m_pJSRuntime->GetIsolate(), pObj); -- m_eType = VT_fxobject; - } - - void CJS_Value::operator=(CJS_Object* pObj) { -@@ -195,21 +174,12 @@ - operator=(pObj->ToV8Object()); - } - --void CJS_Value::operator=(CJS_Document* pJsDoc) { -- m_eType = VT_object; -- if (pJsDoc) { -- m_pValue = pJsDoc->ToV8Object(); -- } --} -- - void CJS_Value::operator=(const FX_WCHAR* pWstr) { - m_pValue = FXJS_NewString(m_pJSRuntime->GetIsolate(), (wchar_t*)pWstr); -- m_eType = VT_string; - } - - void CJS_Value::SetNull() { - m_pValue = FXJS_NewNull(); -- m_eType = VT_null; - } - - void CJS_Value::operator=(const FX_CHAR* pStr) { -@@ -219,36 +189,34 @@ - void CJS_Value::operator=(CJS_Array& array) { - m_pValue = - FXJS_NewObject2(m_pJSRuntime->GetIsolate(), (v8::Local)array); -- m_eType = VT_object; - } - - void CJS_Value::operator=(CJS_Date& date) { - m_pValue = FXJS_NewDate(m_pJSRuntime->GetIsolate(), (double)date); -- m_eType = VT_date; - } - - void CJS_Value::operator=(CJS_Value value) { - m_pValue = value.ToV8Value(); -- m_eType = value.m_eType; - m_pJSRuntime = value.m_pJSRuntime; - } - --CJS_Value::Type CJS_Value::GetType() const { -- if (m_pValue.IsEmpty()) -+// static -+CJS_Value::Type CJS_Value::GetValueType(v8::Local value) { -+ if (value.IsEmpty()) - return VT_unknown; -- if (m_pValue->IsString()) -+ if (value->IsString()) - return VT_string; -- if (m_pValue->IsNumber()) -+ if (value->IsNumber()) - return VT_number; -- if (m_pValue->IsBoolean()) -+ if (value->IsBoolean()) - return VT_boolean; -- if (m_pValue->IsDate()) -+ if (value->IsDate()) - return VT_date; -- if (m_pValue->IsObject()) -+ if (value->IsObject()) - return VT_object; -- if (m_pValue->IsNull()) -+ if (value->IsNull()) - return VT_null; -- if (m_pValue->IsUndefined()) -+ if (value->IsUndefined()) - return VT_undefined; - return VT_unknown; - } -@@ -427,7 +395,7 @@ - return; - v8::Local p = - FXJS_GetArrayElement(m_pJSRuntime->GetIsolate(), m_pArray, index); -- value.Attach(p, CJS_Value::VT_object); -+ value.Attach(p); - } - - void CJS_Array::SetElement(unsigned index, CJS_Value value) { -@@ -899,7 +867,7 @@ - v8::Local v8Value = - FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); - if (!v8Value->IsUndefined()) -- result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); -+ result[i] = CJS_Value(pRuntime, v8Value); - } - va_end(ap); - return result; -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-03-06 13:04:01.784297561 +0100 -@@ -27,20 +27,17 @@ - VT_boolean, - VT_date, - VT_object, -- VT_fxobject, - VT_null, - VT_undefined - }; - - CJS_Value(CJS_Runtime* pRuntime); -- CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t); -+ CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue); - CJS_Value(CJS_Runtime* pRuntime, const int& iValue); - CJS_Value(CJS_Runtime* pRuntime, const double& dValue); - CJS_Value(CJS_Runtime* pRuntime, const float& fValue); - CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); -- CJS_Value(CJS_Runtime* pRuntime, v8::Local); -- CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); -- CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); -+ CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); - CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); - CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); - CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); -@@ -49,11 +46,12 @@ - CJS_Value(const CJS_Value& other); - - void SetNull(); -- void Attach(v8::Local pValue, Type t); -+ void Attach(v8::Local pValue); - void Attach(CJS_Value* pValue); - void Detach(); - -- Type GetType() const; -+ static Type GetValueType(v8::Local value); -+ Type GetType() const { return GetValueType(m_pValue); } - int ToInt() const; - bool ToBool() const; - double ToDouble() const; -@@ -66,8 +64,7 @@ - v8::Local ToV8Value() const; - - // Replace the current |m_pValue| with a v8::Number if possible -- // to make one from the current |m_pValue|, updating |m_eType| -- // as appropriate to indicate the result. -+ // to make one from the current |m_pValue|. - void MaybeCoerceToNumber(); - - void operator=(int iValue); -@@ -75,7 +72,6 @@ - void operator=(double val); - void operator=(float val); - void operator=(CJS_Object* val); -- void operator=(CJS_Document* val); - void operator=(v8::Local val); - void operator=(CJS_Array& val); - void operator=(CJS_Date& val); -@@ -91,7 +87,6 @@ - CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } - - protected: -- Type m_eType; - v8::Local m_pValue; - CJS_Runtime* m_pJSRuntime; - }; -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-03-06 13:06:10.884476877 +0100 -@@ -10,15 +10,6 @@ - - #include "core/fxcrt/include/fx_basic.h" - --const wchar_t kFXJSValueNameString[] = L"string"; --const wchar_t kFXJSValueNameNumber[] = L"number"; --const wchar_t kFXJSValueNameBoolean[] = L"boolean"; --const wchar_t kFXJSValueNameDate[] = L"date"; --const wchar_t kFXJSValueNameObject[] = L"object"; --const wchar_t kFXJSValueNameFxobj[] = L"fxobj"; --const wchar_t kFXJSValueNameNull[] = L"null"; --const wchar_t kFXJSValueNameUndefined[] = L"undefined"; -- - // Keep this consistent with the values defined in gin/public/context_holder.h - // (without actually requiring a dependency on gin itself for the standalone - // embedders of PDFIum). The value we want to use is: -@@ -540,26 +531,6 @@ - .ToLocalChecked()); - } - --const wchar_t* FXJS_GetTypeof(v8::Local pObj) { -- if (pObj.IsEmpty()) -- return nullptr; -- if (pObj->IsString()) -- return kFXJSValueNameString; -- if (pObj->IsNumber()) -- return kFXJSValueNameNumber; -- if (pObj->IsBoolean()) -- return kFXJSValueNameBoolean; -- if (pObj->IsDate()) -- return kFXJSValueNameDate; -- if (pObj->IsObject()) -- return kFXJSValueNameObject; -- if (pObj->IsNull()) -- return kFXJSValueNameNull; -- if (pObj->IsUndefined()) -- return kFXJSValueNameUndefined; -- return nullptr; --} -- - void FXJS_SetPrivate(v8::Isolate* pIsolate, - v8::Local pObj, - void* p) { -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-03-06 13:06:40.283062272 +0100 -@@ -118,15 +118,6 @@ - FXJS_PerIsolateData(); - }; - --extern const wchar_t kFXJSValueNameString[]; --extern const wchar_t kFXJSValueNameNumber[]; --extern const wchar_t kFXJSValueNameBoolean[]; --extern const wchar_t kFXJSValueNameDate[]; --extern const wchar_t kFXJSValueNameObject[]; --extern const wchar_t kFXJSValueNameFxobj[]; --extern const wchar_t kFXJSValueNameNull[]; --extern const wchar_t kFXJSValueNameUndefined[]; -- - class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { - void* Allocate(size_t length) override; - void* AllocateUninitialized(size_t length) override; -@@ -209,7 +200,6 @@ - bool bStatic = false); - v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate); - int FXJS_GetObjDefnID(v8::Local pObj); --const wchar_t* FXJS_GetTypeof(v8::Local pObj); - - void FXJS_SetPrivate(v8::Isolate* pIsolate, - v8::Local pObj, diff --git a/qtwebengine-opensource-src-5.8.0-qt57.patch b/qtwebengine-opensource-src-5.8.0-qt57.patch deleted file mode 100644 index 480ae11..0000000 --- a/qtwebengine-opensource-src-5.8.0-qt57.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp ---- qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 2017-01-03 04:35:11.000000000 -0600 -+++ qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp 2017-03-24 14:43:55.120363292 -0500 -@@ -109,7 +109,7 @@ net::ProxyConfigService::ConfigAvailabil - } - m_qtApplicationProxy = qtProxy; - m_qtProxyConfig = net::ProxyConfig(); --#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) -+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) - if (qtProxy.type() == QNetworkProxy::NoProxy - && QNetworkProxyFactory::usesSystemConfiguration()) { - *config = systemConfig; diff --git a/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch deleted file mode 100644 index dff88b5..0000000 --- a/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch +++ /dev/null @@ -1,362 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:50:49.266714740 +0100 -@@ -674,8 +674,6 @@ - 'third_party/dmg_fp/dmg_fp.h', - 'third_party/dmg_fp/dtoa_wrapper.cc', - 'third_party/dmg_fp/g_fmt.cc', -- 'third_party/icu/icu_utf.cc', -- 'third_party/icu/icu_utf.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'threading/non_thread_safe.h', -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:50:49.267714725 +0100 -@@ -801,8 +801,6 @@ - "third_party/dmg_fp/dmg_fp.h", - "third_party/dmg_fp/dtoa_wrapper.cc", - "third_party/dmg_fp/g_fmt.cc", -- "third_party/icu/icu_utf.cc", -- "third_party/icu/icu_utf.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-03-05 16:50:49.267714725 +0100 -@@ -18,7 +18,7 @@ - - #if defined(OS_MACOSX) - #include "base/mac/scoped_cftyperef.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #endif - - #if defined(OS_WIN) -@@ -1150,9 +1150,9 @@ - int* index) { - int codepoint = 0; - while (*index < length && codepoint == 0) { -- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string -+ // U8_NEXT returns a value < 0 in error cases. For purposes of string - // comparison, we just use that value and flag it with DCHECK. -- CBU8_NEXT(string, *index, length, codepoint); -+ U8_NEXT(string, *index, length, codepoint); - DCHECK_GT(codepoint, 0); - if (codepoint > 0) { - // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-03-05 16:50:49.268714710 +0100 -@@ -16,7 +16,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "base/values.h" - - namespace base { -@@ -631,8 +631,8 @@ - int32_t next_char = 0; - - while (CanConsume(1)) { -- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. -- CBU8_NEXT(start_pos_, index_, length, next_char); -+ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. -+ U8_NEXT(start_pos_, index_, length, next_char); - if (next_char < 0 || !IsValidCharacter(next_char)) { - ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); - return false; -@@ -725,7 +725,7 @@ - return false; - } - } else if (next_char == '"') { -- --index_; // Rewind by one because of CBU8_NEXT. -+ --index_; // Rewind by one because of U8_NEXT. - out->Swap(&string); - return true; - } else { -@@ -765,10 +765,10 @@ - - // If this is a high surrogate, consume the next code unit to get the - // low surrogate. -- if (CBU16_IS_SURROGATE(code_unit16_high)) { -+ if (U16_IS_SURROGATE(code_unit16_high)) { - // Make sure this is the high surrogate. If not, it's an encoding - // error. -- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) -+ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) - return false; - - // Make sure that the token has more characters to consume the -@@ -785,24 +785,24 @@ - - NextNChars(3); - -- if (!CBU16_IS_TRAIL(code_unit16_low)) { -+ if (!U16_IS_TRAIL(code_unit16_low)) { - return false; - } - - uint32_t code_point = -- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); -+ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); - if (!IsValidCharacter(code_point)) - return false; - - offset = 0; -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_point); - } else { - // Not a surrogate. -- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); -+ DCHECK(U16_IS_SINGLE(code_unit16_high)); - if (!IsValidCharacter(code_unit16_high)) - return false; - -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); - } - - dest_string->append(code_unit8); -@@ -819,9 +819,9 @@ - } else { - char utf8_units[4] = { 0 }; - int offset = 0; -- CBU8_APPEND_UNSAFE(utf8_units, offset, point); -+ U8_APPEND_UNSAFE(utf8_units, offset, point); - dest->Convert(); -- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be -+ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be - // zero terminated at this point. |offset| contains the correct length. - dest->AppendString(std::string(utf8_units, offset)); - } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-03-05 16:50:49.268714710 +0100 -@@ -14,7 +14,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-03-05 16:50:49.404712681 +0100 -@@ -4,13 +4,13 @@ - - #include "base/strings/pattern.h" - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - - namespace { - --static bool IsWildcard(base_icu::UChar32 character) { -+static bool IsWildcard(UChar32 character) { - return character == '*' || character == '?'; - } - -@@ -37,9 +37,9 @@ - // Check if the chars match, if so, increment the ptrs. - const CHAR* pattern_next = *pattern; - const CHAR* string_next = *string; -- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); -+ UChar32 pattern_char = next(&pattern_next, pattern_end); - if (pattern_char == next(&string_next, string_end) && -- pattern_char != CBU_SENTINEL) { -+ pattern_char != U_SENTINEL) { - *pattern = pattern_next; - *string = string_next; - } else { -@@ -133,20 +133,20 @@ - } - - struct NextCharUTF8 { -- base_icu::UChar32 operator()(const char** p, const char* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char** p, const char* end) { -+ UChar32 c; - int offset = 0; -- CBU8_NEXT(*p, offset, end - *p, c); -+ U8_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } - }; - - struct NextCharUTF16 { -- base_icu::UChar32 operator()(const char16** p, const char16* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char16** p, const char16* end) { -+ UChar32 c; - int offset = 0; -- CBU16_NEXT(*p, offset, end - *p, c); -+ U16_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-03-05 16:50:49.404712681 +0100 -@@ -8,7 +8,7 @@ - - #include "base/logging.h" - #include "base/strings/string_util.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-03-05 16:50:49.404712681 +0100 -@@ -25,7 +25,7 @@ - #include "base/memory/singleton.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "build/build_config.h" - - namespace base { -@@ -357,19 +357,19 @@ - } - DCHECK_LE(byte_size, - static_cast(std::numeric_limits::max())); -- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. -+ // Note: This cast is necessary because U8_NEXT uses int32_ts. - int32_t truncation_length = static_cast(byte_size); - int32_t char_index = truncation_length - 1; - const char* data = input.data(); - -- // Using CBU8, we will move backwards from the truncation point -+ // Using U8, we will move backwards from the truncation point - // to the beginning of the string looking for a valid UTF8 - // character. Once a full UTF8 character is found, we will - // truncate the string to the end of that character. - while (char_index >= 0) { - int32_t prev = char_index; -- base_icu::UChar32 code_point = 0; -- CBU8_NEXT(data, char_index, truncation_length, code_point); -+ UChar32 code_point = 0; -+ U8_NEXT(data, char_index, truncation_length, code_point); - if (!IsValidCharacter(code_point) || - !IsValidCodepoint(code_point)) { - char_index = prev - 1; -@@ -522,7 +522,7 @@ - - while (char_index < src_len) { - int32_t code_point; -- CBU8_NEXT(src, char_index, src_len, code_point); -+ U8_NEXT(src, char_index, src_len, code_point); - if (!IsValidCharacter(code_point)) - return false; - } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-03-05 16:50:49.404712681 +0100 -@@ -4,7 +4,7 @@ - - #include "base/strings/utf_string_conversion_utils.h" - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -@@ -18,7 +18,7 @@ - // use a signed type for code_point. But this function returns false - // on error anyway, so code_point_out is unsigned. - int32_t code_point; -- CBU8_NEXT(src, *char_index, src_len, code_point); -+ U8_NEXT(src, *char_index, src_len, code_point); - *code_point_out = static_cast(code_point); - - // The ICU macro above moves to the next char, we want to point to the last -@@ -33,16 +33,16 @@ - int32_t src_len, - int32_t* char_index, - uint32_t* code_point) { -- if (CBU16_IS_SURROGATE(src[*char_index])) { -- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || -+ if (U16_IS_SURROGATE(src[*char_index])) { -+ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || - *char_index + 1 >= src_len || -- !CBU16_IS_TRAIL(src[*char_index + 1])) { -+ !U16_IS_TRAIL(src[*char_index + 1])) { - // Invalid surrogate pair. - return false; - } - - // Valid surrogate pair. -- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], -+ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], - src[*char_index + 1]); - (*char_index)++; - } else { -@@ -76,30 +76,30 @@ - } - - -- // CBU8_APPEND_UNSAFE can append up to 4 bytes. -+ // U8_APPEND_UNSAFE can append up to 4 bytes. - size_t char_offset = output->length(); - size_t original_char_offset = char_offset; -- output->resize(char_offset + CBU8_MAX_LENGTH); -+ output->resize(char_offset + U8_MAX_LENGTH); - -- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); - -- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so -+ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so - // it will represent the new length of the string. - output->resize(char_offset); - return char_offset - original_char_offset; - } - - size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { -- if (CBU16_LENGTH(code_point) == 1) { -+ if (U16_LENGTH(code_point) == 1) { - // Thie code point is in the Basic Multilingual Plane (BMP). - output->push_back(static_cast(code_point)); - return 1; - } - // Non-BMP characters use a double-character encoding. - size_t char_offset = output->length(); -- output->resize(char_offset + CBU16_MAX_LENGTH); -- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -- return CBU16_MAX_LENGTH; -+ output->resize(char_offset + U16_MAX_LENGTH); -+ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ return U16_MAX_LENGTH; - } - - // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-03-05 16:50:49.405712666 +0100 -@@ -5,13 +5,13 @@ - #include "ui/gfx/utf16_indexing.h" - - #include "base/logging.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace gfx { - - bool IsValidCodePointIndex(const base::string16& s, size_t index) { - return index == 0 || index == s.length() || -- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); -+ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); - } - - ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { diff --git a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch deleted file mode 100644 index 4f17325..0000000 --- a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 -@@ -676,8 +676,6 @@ - 'third_party/dmg_fp/g_fmt.cc', - 'third_party/icu/icu_utf.cc', - 'third_party/icu/icu_utf.h', -- 'third_party/nspr/prtime.cc', -- 'third_party/nspr/prtime.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'threading/non_thread_safe.h', -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 -@@ -803,8 +803,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-03-05 16:48:14.208027199 +0100 -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-03-05 16:48:14.298025856 +0100 -@@ -14,7 +14,7 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "build/build_config.h" - - namespace base { diff --git a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch deleted file mode 100644 index 8a87503..0000000 --- a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-03-06 02:05:57.848394582 +0100 -@@ -99,7 +99,7 @@ - - template - static inline void IterateBody(HeapObject* obj, int object_size) { -- IterateBody(obj); -+ IterateBody(obj); - } - }; - -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h 2017-03-06 02:05:57.990392454 +0100 -@@ -3193,22 +3193,10 @@ - public: - typedef Shape ShapeT; - -- // Wrapper methods -- inline uint32_t Hash(Key key) { -- if (Shape::UsesSeed) { -- return Shape::SeededHash(key, GetHeap()->HashSeed()); -- } else { -- return Shape::Hash(key); -- } -- } -- -- inline uint32_t HashForObject(Key key, Object* object) { -- if (Shape::UsesSeed) { -- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -- } else { -- return Shape::HashForObject(key, object); -- } -- } -+ // Wrapper methods. Defined in src/objects-inl.h -+ // to break a cycle with src/heap/heap.h. -+ inline uint32_t Hash(Key key); -+ inline uint32_t HashForObject(Key key, Object* object); - - // Returns a new HashTable object. - MUST_USE_RESULT static Handle New( -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h 2017-03-06 02:05:57.992392424 +0100 -@@ -38,6 +38,25 @@ - namespace v8 { - namespace internal { - -+template -+uint32_t HashTable::Hash(Key key) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHash(key, GetHeap()->HashSeed()); -+ } else { -+ return Shape::Hash(key); -+ } -+} -+ -+template -+uint32_t HashTable::HashForObject(Key key, -+ Object* object) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -+ } else { -+ return Shape::HashForObject(key, object); -+ } -+} -+ - PropertyDetails::PropertyDetails(Smi* smi) { - value_ = smi->value(); - } diff --git a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch deleted file mode 100644 index 8e26dbe..0000000 --- a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-03-05 17:08:43.547748044 +0100 -@@ -108,9 +108,7 @@ - if (is_linux) { - defines += [ "WEBRTC_THREAD_RR" ] - -- if (!build_with_chromium) { -- deps += [ ":cpu_features_linux" ] -- } -+ deps += [ ":cpu_features_linux" ] - - libs += [ "rt" ] - } -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-03-05 17:07:01.869254856 +0100 -@@ -112,12 +112,8 @@ - 'defines': [ - 'WEBRTC_THREAD_RR', - ], -- 'conditions': [ -- ['build_with_chromium==0', { -- 'dependencies': [ -- 'cpu_features_webrtc.gyp:cpu_features_linux', -- ], -- }], -+ 'dependencies': [ -+ 'cpu_features_webrtc.gyp:cpu_features_linux', - ], - 'link_settings': { - 'libraries': [ '-lrt', ], diff --git a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch deleted file mode 100644 index f679530..0000000 --- a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-03-07 03:00:44.783316233 +0100 -@@ -542,6 +542,8 @@ - return *this; - } - -+inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); -+ - template - inline void LinkedHashSet::swap(LinkedHashSet& other) - { diff --git a/sources b/sources index 805aa50..fb92ca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.8.0-clean.tar.xz) = 18a49156da8d2e21fb0fe4781646c753c82d616964dd14b0651a1097b2a79a5ddb852dbdcc838d1e9e9a4ec460dd77fbab78a03672f5e827ab061fdf97db4a25 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = b80070b267bffb29a17f8fbf9da8c9f9fe6d59c12bccb3710370b1c830f0f162199341266da6c24563e75f17f6f9d850fd762f58ab1fafc2535f432d6180c98c From 024052080f87f20df7b3cd6f411f2f3d91a0e518 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:52:05 +0200 Subject: [PATCH 157/437] - Proper source --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b039a74..ddc64fc 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -49,9 +49,9 @@ Release: 1%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz +# wget https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz # ./clean_qtwebengine.sh 5.8.0 -Source0: https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz +Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh From ee046f9af5635bb49d85121ec73e3cfe9415105a Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Fri, 2 Jun 2017 08:52:30 +0200 Subject: [PATCH 158/437] - Fix icu and nspr patches. One to go --- ...nsource-src-5.9.0-system-nspr-prtime.patch | 26 ++++-- ...-opensource-src-5.9.0-system-icu-utf.patch | 80 ++++++++++++++----- ...bengine-opensource-src-5.9.0-no-sse2.patch | 2 +- ...-opensource-src-5.9.-openmax-dl-neon.patch | 2 +- ...ngine-opensource-src-5.9.0-linux-pri.patch | 2 +- ...e-opensource-src-5.9.0-no-icudtl-dat.patch | 2 +- qt5-qtwebengine.spec | 2 +- 7 files changed, 88 insertions(+), 28 deletions(-) diff --git a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch index 5bc39ee..9ec4358 100644 --- a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -1,13 +1,14 @@ -From 60434d58353db516e795e12817e1953700f9e5e4 Mon Sep 17 00:00:00 2001 +From 1592ad223b8fe064a72e21e54d36de4bc9949756 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 10:46:36 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-nspr-prtime --- - src/3rdparty/chromium/base/BUILD.gn | 2 -- - src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- - src/3rdparty/chromium/base/time/time.cc | 2 +- - 3 files changed, 2 insertions(+), 4 deletions(-) + src/3rdparty/chromium/base/BUILD.gn | 2 -- + src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- + src/3rdparty/chromium/base/time/time.cc | 2 +- + src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py | 4 ++++ + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn index f2672cba7..66f2be1ff 100644 @@ -49,6 +50,21 @@ index 4e942015f..29fde71dd 100644 #include "build/build_config.h" namespace base { +diff --git a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +index 43d252b43..fc7efd80a 100755 +--- a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ++++ b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +@@ -576,6 +576,10 @@ def write_gn_ninja(path, root_gen_dir, options): + + if is_linux: + libs.extend(['-lrt']) ++ libs.extend(['-lplds4']) ++ libs.extend(['-lplc4']) ++ libs.extend(['-lnspr4']) ++ + ldflags.extend(['-pthread']) + + static_libraries['xdg_user_dirs'] = { -- 2.13.0 diff --git a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch index c7fc67f..4d6034d 100644 --- a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -1,26 +1,27 @@ -From 63abd7883643841941505c82d42589d8d6814478 Mon Sep 17 00:00:00 2001 +From dff1d03d1c4936183c46ff13f2bbd65901cf4ebb Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 11:16:12 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-icu-utf --- - src/3rdparty/chromium/base/BUILD.gn | 2 -- + src/3rdparty/chromium/base/BUILD.gn | 4 +-- src/3rdparty/chromium/base/files/file_path.cc | 6 ++--- src/3rdparty/chromium/base/json/json_parser.cc | 28 ++++++++++---------- src/3rdparty/chromium/base/json/string_escape.cc | 2 +- - src/3rdparty/chromium/base/strings/pattern.cc | 9 +++---- + src/3rdparty/chromium/base/strings/pattern.cc | 21 ++++++++------- src/3rdparty/chromium/base/strings/string_split.cc | 2 +- - src/3rdparty/chromium/base/strings/string_util.cc | 10 ++++---- + src/3rdparty/chromium/base/strings/string_util.cc | 12 ++++----- .../base/strings/utf_string_conversion_utils.cc | 28 ++++++++++---------- .../chromium/base/third_party/icu/icu_utf.cc | 30 +++++++++++----------- .../browser/devtools/devtools_io_context.cc | 4 +-- .../chromium/net/cert/internal/parse_name.cc | 6 ++--- + .../chromium/tools/gn/bootstrap/bootstrap.py | 3 +++ .../chromium/ui/base/ime/input_method_chromeos.cc | 2 +- src/3rdparty/chromium/ui/gfx/utf16_indexing.cc | 4 +-- - 13 files changed, 65 insertions(+), 68 deletions(-) + 14 files changed, 77 insertions(+), 75 deletions(-) diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn -index 66f2be1ff..51faf08ad 100644 +index 66f2be1ff..a7d384ca4 100644 --- a/src/3rdparty/chromium/base/BUILD.gn +++ b/src/3rdparty/chromium/base/BUILD.gn @@ -831,8 +831,6 @@ component("base") { @@ -32,6 +33,15 @@ index 66f2be1ff..51faf08ad 100644 "third_party/superfasthash/superfasthash.c", "threading/non_thread_safe.h", "threading/non_thread_safe_impl.cc", +@@ -1357,6 +1355,8 @@ component("base") { + linux_configs += [ "//build/config/linux:glib" ] + } + ++ libs += [ "icu18n" ] ++ + defines += [ "USE_SYMBOLIZE" ] + + configs += linux_configs diff --git a/src/3rdparty/chromium/base/files/file_path.cc b/src/3rdparty/chromium/base/files/file_path.cc index cff862ae1..b17b46e5f 100644 --- a/src/3rdparty/chromium/base/files/file_path.cc @@ -165,10 +175,10 @@ index f67fa93bf..907b80a73 100644 namespace base { diff --git a/src/3rdparty/chromium/base/strings/pattern.cc b/src/3rdparty/chromium/base/strings/pattern.cc -index af30aab86..7df8f7255 100644 +index af30aab86..c4ce6fc86 100644 --- a/src/3rdparty/chromium/base/strings/pattern.cc +++ b/src/3rdparty/chromium/base/strings/pattern.cc -@@ -3,8 +3,7 @@ +@@ -3,14 +3,13 @@ // found in the LICENSE file. #include "base/strings/pattern.h" @@ -178,27 +188,46 @@ index af30aab86..7df8f7255 100644 namespace base { -@@ -39,7 +38,7 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, + namespace { + +-static bool IsWildcard(base_icu::UChar32 character) { ++static bool IsWildcard(UChar32 character) { + return character == '*' || character == '?'; + } + +@@ -37,9 +36,9 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, + // Check if the chars match, if so, increment the ptrs. + const CHAR* pattern_next = *pattern; const CHAR* string_next = *string; - base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); +- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); ++ UChar32 pattern_char = next(&pattern_next, pattern_end); if (pattern_char == next(&string_next, string_end) && - pattern_char != CBU_SENTINEL) { + pattern_char != U_SENTINEL) { *pattern = pattern_next; *string = string_next; } else { -@@ -136,7 +135,7 @@ struct NextCharUTF8 { - base_icu::UChar32 operator()(const char** p, const char* end) { - base_icu::UChar32 c; +@@ -133,20 +132,20 @@ static bool MatchPatternT(const CHAR* eval, const CHAR* eval_end, + } + + struct NextCharUTF8 { +- base_icu::UChar32 operator()(const char** p, const char* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char** p, const char* end) { ++ UChar32 c; int offset = 0; - CBU8_NEXT(*p, offset, end - *p, c); + U8_NEXT(*p, offset, end - *p, c); *p += offset; return c; } -@@ -146,7 +145,7 @@ struct NextCharUTF16 { - base_icu::UChar32 operator()(const char16** p, const char16* end) { - base_icu::UChar32 c; + }; + + struct NextCharUTF16 { +- base_icu::UChar32 operator()(const char16** p, const char16* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char16** p, const char16* end) { ++ UChar32 c; int offset = 0; - CBU16_NEXT(*p, offset, end - *p, c); + U16_NEXT(*p, offset, end - *p, c); @@ -219,7 +248,7 @@ index a8180b24d..ac771a0f0 100644 namespace base { diff --git a/src/3rdparty/chromium/base/strings/string_util.cc b/src/3rdparty/chromium/base/strings/string_util.cc -index cb668ed7f..542f12819 100644 +index cb668ed7f..c57ccf391 100644 --- a/src/3rdparty/chromium/base/strings/string_util.cc +++ b/src/3rdparty/chromium/base/strings/string_util.cc @@ -25,7 +25,7 @@ @@ -248,8 +277,9 @@ index cb668ed7f..542f12819 100644 // truncate the string to the end of that character. while (char_index >= 0) { int32_t prev = char_index; - base_icu::UChar32 code_point = 0; +- base_icu::UChar32 code_point = 0; - CBU8_NEXT(data, char_index, truncation_length, code_point); ++ UChar32 code_point = 0; + U8_NEXT(data, char_index, truncation_length, code_point); if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { @@ -514,6 +544,20 @@ index bb9b64051..5eaeb52d0 100644 return false; base::WriteUnicodeCharacter(codepoint, out); +diff --git a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +index fc7efd80a..6dcec7f0e 100755 +--- a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ++++ b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +@@ -579,6 +579,9 @@ def write_gn_ninja(path, root_gen_dir, options): + libs.extend(['-lplds4']) + libs.extend(['-lplc4']) + libs.extend(['-lnspr4']) ++ libs.extend(['-licui18n']) ++ libs.extend(['-licuuc']) ++ libs.extend(['-licudata']) + + ldflags.extend(['-pthread']) + diff --git a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc index a8ac9028f..8fa5d2a64 100644 --- a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc diff --git a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch index 5df622b..0671b2c 100644 --- a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1,4 +1,4 @@ -From 844246bd10971ec348f044bc7a13acb17b9ce033 Mon Sep 17 00:00:00 2001 +From 6b733561c390650c11f8e570f59374dde04bed5e Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 14:38:20 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-sse2 diff --git a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch index 732be1a..e3edcd2 100644 --- a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch +++ b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch @@ -1,4 +1,4 @@ -From 8bad8aac82444a9e1feda3f1a8b214b81be8a8fc Mon Sep 17 00:00:00 2001 +From 707210834b559d54fc7d9dd39a087041d668c9b8 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:02:52 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.-openmax-dl-neon diff --git a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch index 92c12de..f45a7c1 100644 --- a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch +++ b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch @@ -1,4 +1,4 @@ -From a7885b823a2d3fc853f532fb5ae3a43a3e9967c0 Mon Sep 17 00:00:00 2001 +From c509c48670c74b4b29be32f9d6d8ca7687ffd340 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:13:15 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-linux-pri diff --git a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch index bf97a76..883e3f1 100644 --- a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch +++ b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch @@ -1,4 +1,4 @@ -From 99294d646e58bcbedc5987a1816fed592290566f Mon Sep 17 00:00:00 2001 +From 3edff809547a66830834ed687f138c37f912ee70 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:16:56 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-icudtl-dat diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ddc64fc..949c3db 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -368,7 +368,7 @@ export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" \ +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug use_system_icu force_debug_info" \ WEBENGINE_CONFIG+="use_system_icu use_system_protobuf use_spellchecker" .. # if we keep these set here, gyp picks up duplicate flags From e83ec109c866b66c33e636408855c9a2cba88b3f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 5 Jun 2017 23:59:21 +0200 Subject: [PATCH 159/437] Revert "- Fix icu and nspr patches. One to go" This reverts commit ee046f9af5635bb49d85121ec73e3cfe9415105a. I already told you last time (5.8) that this way of maintaining patches (importing them all into git and reexporting them from there each time) is not how I work (I want only those patches rebased and renamed that actually need rebasing) and that you are only causing me more work. Please keep your hands off my package from now on. --- ...nsource-src-5.9.0-system-nspr-prtime.patch | 26 ++---- ...-opensource-src-5.9.0-system-icu-utf.patch | 80 +++++-------------- ...bengine-opensource-src-5.9.0-no-sse2.patch | 2 +- ...-opensource-src-5.9.-openmax-dl-neon.patch | 2 +- ...ngine-opensource-src-5.9.0-linux-pri.patch | 2 +- ...e-opensource-src-5.9.0-no-icudtl-dat.patch | 2 +- qt5-qtwebengine.spec | 2 +- 7 files changed, 28 insertions(+), 88 deletions(-) diff --git a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch index 9ec4358..5bc39ee 100644 --- a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -1,14 +1,13 @@ -From 1592ad223b8fe064a72e21e54d36de4bc9949756 Mon Sep 17 00:00:00 2001 +From 60434d58353db516e795e12817e1953700f9e5e4 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 10:46:36 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-nspr-prtime --- - src/3rdparty/chromium/base/BUILD.gn | 2 -- - src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- - src/3rdparty/chromium/base/time/time.cc | 2 +- - src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py | 4 ++++ - 4 files changed, 6 insertions(+), 4 deletions(-) + src/3rdparty/chromium/base/BUILD.gn | 2 -- + src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- + src/3rdparty/chromium/base/time/time.cc | 2 +- + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn index f2672cba7..66f2be1ff 100644 @@ -50,21 +49,6 @@ index 4e942015f..29fde71dd 100644 #include "build/build_config.h" namespace base { -diff --git a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -index 43d252b43..fc7efd80a 100755 ---- a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -+++ b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -@@ -576,6 +576,10 @@ def write_gn_ninja(path, root_gen_dir, options): - - if is_linux: - libs.extend(['-lrt']) -+ libs.extend(['-lplds4']) -+ libs.extend(['-lplc4']) -+ libs.extend(['-lnspr4']) -+ - ldflags.extend(['-pthread']) - - static_libraries['xdg_user_dirs'] = { -- 2.13.0 diff --git a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch index 4d6034d..c7fc67f 100644 --- a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -1,27 +1,26 @@ -From dff1d03d1c4936183c46ff13f2bbd65901cf4ebb Mon Sep 17 00:00:00 2001 +From 63abd7883643841941505c82d42589d8d6814478 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 11:16:12 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-icu-utf --- - src/3rdparty/chromium/base/BUILD.gn | 4 +-- + src/3rdparty/chromium/base/BUILD.gn | 2 -- src/3rdparty/chromium/base/files/file_path.cc | 6 ++--- src/3rdparty/chromium/base/json/json_parser.cc | 28 ++++++++++---------- src/3rdparty/chromium/base/json/string_escape.cc | 2 +- - src/3rdparty/chromium/base/strings/pattern.cc | 21 ++++++++------- + src/3rdparty/chromium/base/strings/pattern.cc | 9 +++---- src/3rdparty/chromium/base/strings/string_split.cc | 2 +- - src/3rdparty/chromium/base/strings/string_util.cc | 12 ++++----- + src/3rdparty/chromium/base/strings/string_util.cc | 10 ++++---- .../base/strings/utf_string_conversion_utils.cc | 28 ++++++++++---------- .../chromium/base/third_party/icu/icu_utf.cc | 30 +++++++++++----------- .../browser/devtools/devtools_io_context.cc | 4 +-- .../chromium/net/cert/internal/parse_name.cc | 6 ++--- - .../chromium/tools/gn/bootstrap/bootstrap.py | 3 +++ .../chromium/ui/base/ime/input_method_chromeos.cc | 2 +- src/3rdparty/chromium/ui/gfx/utf16_indexing.cc | 4 +-- - 14 files changed, 77 insertions(+), 75 deletions(-) + 13 files changed, 65 insertions(+), 68 deletions(-) diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn -index 66f2be1ff..a7d384ca4 100644 +index 66f2be1ff..51faf08ad 100644 --- a/src/3rdparty/chromium/base/BUILD.gn +++ b/src/3rdparty/chromium/base/BUILD.gn @@ -831,8 +831,6 @@ component("base") { @@ -33,15 +32,6 @@ index 66f2be1ff..a7d384ca4 100644 "third_party/superfasthash/superfasthash.c", "threading/non_thread_safe.h", "threading/non_thread_safe_impl.cc", -@@ -1357,6 +1355,8 @@ component("base") { - linux_configs += [ "//build/config/linux:glib" ] - } - -+ libs += [ "icu18n" ] -+ - defines += [ "USE_SYMBOLIZE" ] - - configs += linux_configs diff --git a/src/3rdparty/chromium/base/files/file_path.cc b/src/3rdparty/chromium/base/files/file_path.cc index cff862ae1..b17b46e5f 100644 --- a/src/3rdparty/chromium/base/files/file_path.cc @@ -175,10 +165,10 @@ index f67fa93bf..907b80a73 100644 namespace base { diff --git a/src/3rdparty/chromium/base/strings/pattern.cc b/src/3rdparty/chromium/base/strings/pattern.cc -index af30aab86..c4ce6fc86 100644 +index af30aab86..7df8f7255 100644 --- a/src/3rdparty/chromium/base/strings/pattern.cc +++ b/src/3rdparty/chromium/base/strings/pattern.cc -@@ -3,14 +3,13 @@ +@@ -3,8 +3,7 @@ // found in the LICENSE file. #include "base/strings/pattern.h" @@ -188,46 +178,27 @@ index af30aab86..c4ce6fc86 100644 namespace base { - namespace { - --static bool IsWildcard(base_icu::UChar32 character) { -+static bool IsWildcard(UChar32 character) { - return character == '*' || character == '?'; - } - -@@ -37,9 +36,9 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, - // Check if the chars match, if so, increment the ptrs. - const CHAR* pattern_next = *pattern; +@@ -39,7 +38,7 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, const CHAR* string_next = *string; -- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); -+ UChar32 pattern_char = next(&pattern_next, pattern_end); + base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); if (pattern_char == next(&string_next, string_end) && - pattern_char != CBU_SENTINEL) { + pattern_char != U_SENTINEL) { *pattern = pattern_next; *string = string_next; } else { -@@ -133,20 +132,20 @@ static bool MatchPatternT(const CHAR* eval, const CHAR* eval_end, - } - - struct NextCharUTF8 { -- base_icu::UChar32 operator()(const char** p, const char* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char** p, const char* end) { -+ UChar32 c; +@@ -136,7 +135,7 @@ struct NextCharUTF8 { + base_icu::UChar32 operator()(const char** p, const char* end) { + base_icu::UChar32 c; int offset = 0; - CBU8_NEXT(*p, offset, end - *p, c); + U8_NEXT(*p, offset, end - *p, c); *p += offset; return c; } - }; - - struct NextCharUTF16 { -- base_icu::UChar32 operator()(const char16** p, const char16* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char16** p, const char16* end) { -+ UChar32 c; +@@ -146,7 +145,7 @@ struct NextCharUTF16 { + base_icu::UChar32 operator()(const char16** p, const char16* end) { + base_icu::UChar32 c; int offset = 0; - CBU16_NEXT(*p, offset, end - *p, c); + U16_NEXT(*p, offset, end - *p, c); @@ -248,7 +219,7 @@ index a8180b24d..ac771a0f0 100644 namespace base { diff --git a/src/3rdparty/chromium/base/strings/string_util.cc b/src/3rdparty/chromium/base/strings/string_util.cc -index cb668ed7f..c57ccf391 100644 +index cb668ed7f..542f12819 100644 --- a/src/3rdparty/chromium/base/strings/string_util.cc +++ b/src/3rdparty/chromium/base/strings/string_util.cc @@ -25,7 +25,7 @@ @@ -277,9 +248,8 @@ index cb668ed7f..c57ccf391 100644 // truncate the string to the end of that character. while (char_index >= 0) { int32_t prev = char_index; -- base_icu::UChar32 code_point = 0; + base_icu::UChar32 code_point = 0; - CBU8_NEXT(data, char_index, truncation_length, code_point); -+ UChar32 code_point = 0; + U8_NEXT(data, char_index, truncation_length, code_point); if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { @@ -544,20 +514,6 @@ index bb9b64051..5eaeb52d0 100644 return false; base::WriteUnicodeCharacter(codepoint, out); -diff --git a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -index fc7efd80a..6dcec7f0e 100755 ---- a/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -+++ b/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py -@@ -579,6 +579,9 @@ def write_gn_ninja(path, root_gen_dir, options): - libs.extend(['-lplds4']) - libs.extend(['-lplc4']) - libs.extend(['-lnspr4']) -+ libs.extend(['-licui18n']) -+ libs.extend(['-licuuc']) -+ libs.extend(['-licudata']) - - ldflags.extend(['-pthread']) - diff --git a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc index a8ac9028f..8fa5d2a64 100644 --- a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc diff --git a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch index 0671b2c..5df622b 100644 --- a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1,4 +1,4 @@ -From 6b733561c390650c11f8e570f59374dde04bed5e Mon Sep 17 00:00:00 2001 +From 844246bd10971ec348f044bc7a13acb17b9ce033 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 14:38:20 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-sse2 diff --git a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch index e3edcd2..732be1a 100644 --- a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch +++ b/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch @@ -1,4 +1,4 @@ -From 707210834b559d54fc7d9dd39a087041d668c9b8 Mon Sep 17 00:00:00 2001 +From 8bad8aac82444a9e1feda3f1a8b214b81be8a8fc Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:02:52 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.-openmax-dl-neon diff --git a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch index f45a7c1..92c12de 100644 --- a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch +++ b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch @@ -1,4 +1,4 @@ -From c509c48670c74b4b29be32f9d6d8ca7687ffd340 Mon Sep 17 00:00:00 2001 +From a7885b823a2d3fc853f532fb5ae3a43a3e9967c0 Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:13:15 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-linux-pri diff --git a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch index 883e3f1..bf97a76 100644 --- a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch +++ b/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch @@ -1,4 +1,4 @@ -From 3edff809547a66830834ed687f138c37f912ee70 Mon Sep 17 00:00:00 2001 +From 99294d646e58bcbedc5987a1816fed592290566f Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 31 May 2017 15:16:56 +0200 Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-icudtl-dat diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 949c3db..ddc64fc 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -368,7 +368,7 @@ export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug use_system_icu force_debug_info" \ +%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" \ WEBENGINE_CONFIG+="use_system_icu use_system_protobuf use_spellchecker" .. # if we keep these set here, gyp picks up duplicate flags From 968c8c053a942ae14ddfa67700b63254f8a58fd9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 6 Jun 2017 00:00:44 +0200 Subject: [PATCH 160/437] Revert "- Proper source" This reverts commit 024052080f87f20df7b3cd6f411f2f3d91a0e518. I already told you last time (5.8) that this way of maintaining patches (importing them all into git and reexporting them from there each time) is not how I work (I want only those patches rebased and renamed that actually need rebasing) and that you are only causing me more work. Please keep your hands off my package from now on. --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ddc64fc..b039a74 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -49,9 +49,9 @@ Release: 1%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz +# wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz # ./clean_qtwebengine.sh 5.8.0 -Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz +Source0: https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh From c8151228d073a702ceb0fb1b97bcca2d9256bfb0 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 6 Jun 2017 00:00:55 +0200 Subject: [PATCH 161/437] Revert "Prep webengine 5.9.0" This reverts commit 7816e88f62f2da31954d17cc5c755d88ebe1625f. I already told you last time (5.8) that this way of maintaining patches (importing them all into git and reexporting them from there each time) is not how I work (I want only those patches rebased and renamed that actually need rebasing) and that you are only causing me more work. Please keep your hands off my package from now on. --- .gitignore | 1 - ...nsource-src-5.9.0-webrtc-neon-detect.patch | 27 - ...nsource-src-5.9.0-system-nspr-prtime.patch | 54 - ...-opensource-src-5.9.0-system-icu-utf.patch | 552 ------ ...ngine-opensource-src-5.9.0-linux-pri.patch | 33 - qt5-qtwebengine.spec | 91 +- ...urce-src-5.6.0-beta-fix-extractcflag.patch | 12 + ...e-opensource-src-5.6.0-no-icudtl-dat.patch | 21 +- ...ngine-opensource-src-5.7.0-linux-pri.patch | 26 + ...opensource-src-5.7.1-openmax-dl-neon.patch | 29 +- ...ngine-opensource-src-5.7.1-skia-neon.patch | 15 + ...e-opensource-src-5.8.0-fix-dead-keys.patch | 40 + ...source-src-5.8.0-fix-open-in-new-tab.patch | 46 + ...bengine-opensource-src-5.8.0-no-sse2.patch | 1700 ++++++++++------- ...ine-opensource-src-5.8.0-pdfium-gcc7.patch | 600 ++++++ qtwebengine-opensource-src-5.8.0-qt57.patch | 12 + ...-opensource-src-5.8.0-system-icu-utf.patch | 362 ++++ ...nsource-src-5.8.0-system-nspr-prtime.patch | 48 + ...bengine-opensource-src-5.8.0-v8-gcc7.patch | 71 + ...nsource-src-5.8.0-webrtc-neon-detect.patch | 32 + ...engine-opensource-src-5.8.0-wtf-gcc7.patch | 12 + sources | 2 +- 22 files changed, 2372 insertions(+), 1414 deletions(-) delete mode 100644 0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch delete mode 100644 0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch delete mode 100644 0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch delete mode 100644 0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch create mode 100644 qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch rename 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch => qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch (69%) create mode 100644 qtwebengine-opensource-src-5.7.0-linux-pri.patch rename 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch => qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch (72%) create mode 100644 qtwebengine-opensource-src-5.7.1-skia-neon.patch create mode 100644 qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch create mode 100644 qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch rename 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch => qtwebengine-opensource-src-5.8.0-no-sse2.patch (73%) create mode 100644 qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch create mode 100644 qtwebengine-opensource-src-5.8.0-qt57.patch create mode 100644 qtwebengine-opensource-src-5.8.0-system-icu-utf.patch create mode 100644 qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch create mode 100644 qtwebengine-opensource-src-5.8.0-v8-gcc7.patch create mode 100644 qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch create mode 100644 qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch diff --git a/.gitignore b/.gitignore index 3eee6b2..0983a72 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ /qtwebengine-opensource-src-5.7.0-clean.tar.xz /qtwebengine-opensource-src-5.7.1-clean.tar.xz /qtwebengine-opensource-src-5.8.0-clean.tar.xz -/qtwebengine-opensource-src-5.9.0-clean.tar.xz diff --git a/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch b/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch deleted file mode 100644 index 7c48a10..0000000 --- a/0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch +++ /dev/null @@ -1,27 +0,0 @@ -From bef192680ca3c78493c064d7b4a21b79afa92c3e Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 10:41:10 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-webrtc-neon-detect - ---- - src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn -index 8bed25e27..b0cc2a5e3 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn -@@ -93,9 +93,7 @@ rtc_static_library("system_wrappers") { - if (is_linux) { - defines += [ "WEBRTC_THREAD_RR" ] - -- if (!build_with_chromium) { -- deps += [ ":cpu_features_linux" ] -- } -+ deps += [ ":cpu_features_linux" ] - - libs += [ "rt" ] - } --- -2.13.0 - diff --git a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch deleted file mode 100644 index 5bc39ee..0000000 --- a/0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 60434d58353db516e795e12817e1953700f9e5e4 Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 10:46:36 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-nspr-prtime - ---- - src/3rdparty/chromium/base/BUILD.gn | 2 -- - src/3rdparty/chromium/base/time/pr_time_unittest.cc | 2 +- - src/3rdparty/chromium/base/time/time.cc | 2 +- - 3 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn -index f2672cba7..66f2be1ff 100644 ---- a/src/3rdparty/chromium/base/BUILD.gn -+++ b/src/3rdparty/chromium/base/BUILD.gn -@@ -833,8 +833,6 @@ component("base") { - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff --git a/src/3rdparty/chromium/base/time/pr_time_unittest.cc b/src/3rdparty/chromium/base/time/pr_time_unittest.cc -index 3f1a348ae..8f1a11e51 100644 ---- a/src/3rdparty/chromium/base/time/pr_time_unittest.cc -+++ b/src/3rdparty/chromium/base/time/pr_time_unittest.cc -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff --git a/src/3rdparty/chromium/base/time/time.cc b/src/3rdparty/chromium/base/time/time.cc -index 4e942015f..29fde71dd 100644 ---- a/src/3rdparty/chromium/base/time/time.cc -+++ b/src/3rdparty/chromium/base/time/time.cc -@@ -13,8 +13,8 @@ - #include "base/lazy_instance.h" - #include "base/logging.h" - #include "base/macros.h" -+#include - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" - #include "build/build_config.h" - - namespace base { --- -2.13.0 - diff --git a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch deleted file mode 100644 index c7fc67f..0000000 --- a/0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ /dev/null @@ -1,552 +0,0 @@ -From 63abd7883643841941505c82d42589d8d6814478 Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 11:16:12 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-system-icu-utf - ---- - src/3rdparty/chromium/base/BUILD.gn | 2 -- - src/3rdparty/chromium/base/files/file_path.cc | 6 ++--- - src/3rdparty/chromium/base/json/json_parser.cc | 28 ++++++++++---------- - src/3rdparty/chromium/base/json/string_escape.cc | 2 +- - src/3rdparty/chromium/base/strings/pattern.cc | 9 +++---- - src/3rdparty/chromium/base/strings/string_split.cc | 2 +- - src/3rdparty/chromium/base/strings/string_util.cc | 10 ++++---- - .../base/strings/utf_string_conversion_utils.cc | 28 ++++++++++---------- - .../chromium/base/third_party/icu/icu_utf.cc | 30 +++++++++++----------- - .../browser/devtools/devtools_io_context.cc | 4 +-- - .../chromium/net/cert/internal/parse_name.cc | 6 ++--- - .../chromium/ui/base/ime/input_method_chromeos.cc | 2 +- - src/3rdparty/chromium/ui/gfx/utf16_indexing.cc | 4 +-- - 13 files changed, 65 insertions(+), 68 deletions(-) - -diff --git a/src/3rdparty/chromium/base/BUILD.gn b/src/3rdparty/chromium/base/BUILD.gn -index 66f2be1ff..51faf08ad 100644 ---- a/src/3rdparty/chromium/base/BUILD.gn -+++ b/src/3rdparty/chromium/base/BUILD.gn -@@ -831,8 +831,6 @@ component("base") { - "third_party/dmg_fp/dmg_fp.h", - "third_party/dmg_fp/dtoa_wrapper.cc", - "third_party/dmg_fp/g_fmt.cc", -- "third_party/icu/icu_utf.cc", -- "third_party/icu/icu_utf.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff --git a/src/3rdparty/chromium/base/files/file_path.cc b/src/3rdparty/chromium/base/files/file_path.cc -index cff862ae1..b17b46e5f 100644 ---- a/src/3rdparty/chromium/base/files/file_path.cc -+++ b/src/3rdparty/chromium/base/files/file_path.cc -@@ -18,7 +18,7 @@ - - #if defined(OS_MACOSX) - #include "base/mac/scoped_cftyperef.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #endif - - #if defined(OS_WIN) -@@ -1156,9 +1156,9 @@ inline int HFSReadNextNonIgnorableCodepoint(const char* string, - int* index) { - int codepoint = 0; - while (*index < length && codepoint == 0) { -- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string -+ // U8_NEXT returns a value < 0 in error cases. For purposes of string - // comparison, we just use that value and flag it with DCHECK. -- CBU8_NEXT(string, *index, length, codepoint); -+ U8_NEXT(string, *index, length, codepoint); - DCHECK_GT(codepoint, 0); - if (codepoint > 0) { - // Check if there is a subtable for this upper byte. -diff --git a/src/3rdparty/chromium/base/json/json_parser.cc b/src/3rdparty/chromium/base/json/json_parser.cc -index cd427da9e..82ff9773c 100644 ---- a/src/3rdparty/chromium/base/json/json_parser.cc -+++ b/src/3rdparty/chromium/base/json/json_parser.cc -@@ -16,7 +16,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "base/values.h" - - namespace base { -@@ -630,21 +630,21 @@ bool JSONParser::ConsumeStringRaw(StringBuilder* out) { - - while (CanConsume(1)) { - int start_index = index_; -- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. -- CBU8_NEXT(start_pos_, index_, length, next_char); -+ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. -+ U8_NEXT(start_pos_, index_, length, next_char); - if (next_char < 0 || !IsValidCharacter(next_char)) { - if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { - ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); - return false; - } -- CBU8_NEXT(start_pos_, start_index, length, next_char); -+ U8_NEXT(start_pos_, start_index, length, next_char); - string.Convert(); - string.AppendString(kUnicodeReplacementString); - continue; - } - - if (next_char == '"') { -- --index_; // Rewind by one because of CBU8_NEXT. -+ --index_; // Rewind by one because of U8_NEXT. - out->Swap(&string); - return true; - } -@@ -774,10 +774,10 @@ bool JSONParser::DecodeUTF16(std::string* dest_string) { - - // If this is a high surrogate, consume the next code unit to get the - // low surrogate. -- if (CBU16_IS_SURROGATE(code_unit16_high)) { -+ if (U16_IS_SURROGATE(code_unit16_high)) { - // Make sure this is the high surrogate. If not, it's an encoding - // error. -- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) -+ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) - return false; - - // Make sure that the token has more characters to consume the -@@ -794,24 +794,24 @@ bool JSONParser::DecodeUTF16(std::string* dest_string) { - - NextNChars(3); - -- if (!CBU16_IS_TRAIL(code_unit16_low)) { -+ if (!U16_IS_TRAIL(code_unit16_low)) { - return false; - } - - uint32_t code_point = -- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); -+ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); - if (!IsValidCharacter(code_point)) - return false; - - offset = 0; -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_point); - } else { - // Not a surrogate. -- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); -+ DCHECK(U16_IS_SINGLE(code_unit16_high)); - if (!IsValidCharacter(code_unit16_high)) - return false; - -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); - } - - dest_string->append(code_unit8); -@@ -828,9 +828,9 @@ void JSONParser::DecodeUTF8(const int32_t& point, StringBuilder* dest) { - } else { - char utf8_units[4] = { 0 }; - int offset = 0; -- CBU8_APPEND_UNSAFE(utf8_units, offset, point); -+ U8_APPEND_UNSAFE(utf8_units, offset, point); - dest->Convert(); -- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be -+ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be - // zero terminated at this point. |offset| contains the correct length. - dest->AppendString(std::string(utf8_units, offset)); - } -diff --git a/src/3rdparty/chromium/base/json/string_escape.cc b/src/3rdparty/chromium/base/json/string_escape.cc -index f67fa93bf..907b80a73 100644 ---- a/src/3rdparty/chromium/base/json/string_escape.cc -+++ b/src/3rdparty/chromium/base/json/string_escape.cc -@@ -14,7 +14,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -diff --git a/src/3rdparty/chromium/base/strings/pattern.cc b/src/3rdparty/chromium/base/strings/pattern.cc -index af30aab86..7df8f7255 100644 ---- a/src/3rdparty/chromium/base/strings/pattern.cc -+++ b/src/3rdparty/chromium/base/strings/pattern.cc -@@ -3,8 +3,7 @@ - // found in the LICENSE file. - - #include "base/strings/pattern.h" -- --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -@@ -39,7 +38,7 @@ static void EatSameChars(const CHAR** pattern, const CHAR* pattern_end, - const CHAR* string_next = *string; - base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); - if (pattern_char == next(&string_next, string_end) && -- pattern_char != CBU_SENTINEL) { -+ pattern_char != U_SENTINEL) { - *pattern = pattern_next; - *string = string_next; - } else { -@@ -136,7 +135,7 @@ struct NextCharUTF8 { - base_icu::UChar32 operator()(const char** p, const char* end) { - base_icu::UChar32 c; - int offset = 0; -- CBU8_NEXT(*p, offset, end - *p, c); -+ U8_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } -@@ -146,7 +145,7 @@ struct NextCharUTF16 { - base_icu::UChar32 operator()(const char16** p, const char16* end) { - base_icu::UChar32 c; - int offset = 0; -- CBU16_NEXT(*p, offset, end - *p, c); -+ U16_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } -diff --git a/src/3rdparty/chromium/base/strings/string_split.cc b/src/3rdparty/chromium/base/strings/string_split.cc -index a8180b24d..ac771a0f0 100644 ---- a/src/3rdparty/chromium/base/strings/string_split.cc -+++ b/src/3rdparty/chromium/base/strings/string_split.cc -@@ -8,7 +8,7 @@ - - #include "base/logging.h" - #include "base/strings/string_util.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -diff --git a/src/3rdparty/chromium/base/strings/string_util.cc b/src/3rdparty/chromium/base/strings/string_util.cc -index cb668ed7f..542f12819 100644 ---- a/src/3rdparty/chromium/base/strings/string_util.cc -+++ b/src/3rdparty/chromium/base/strings/string_util.cc -@@ -25,7 +25,7 @@ - #include "base/memory/singleton.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "build/build_config.h" - - namespace base { -@@ -357,19 +357,19 @@ void TruncateUTF8ToByteSize(const std::string& input, - } - DCHECK_LE(byte_size, - static_cast(std::numeric_limits::max())); -- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. -+ // Note: This cast is necessary because U8_NEXT uses int32_ts. - int32_t truncation_length = static_cast(byte_size); - int32_t char_index = truncation_length - 1; - const char* data = input.data(); - -- // Using CBU8, we will move backwards from the truncation point -+ // Using U8, we will move backwards from the truncation point - // to the beginning of the string looking for a valid UTF8 - // character. Once a full UTF8 character is found, we will - // truncate the string to the end of that character. - while (char_index >= 0) { - int32_t prev = char_index; - base_icu::UChar32 code_point = 0; -- CBU8_NEXT(data, char_index, truncation_length, code_point); -+ U8_NEXT(data, char_index, truncation_length, code_point); - if (!IsValidCharacter(code_point) || - !IsValidCodepoint(code_point)) { - char_index = prev - 1; -@@ -522,7 +522,7 @@ bool IsStringUTF8(const StringPiece& str) { - - while (char_index < src_len) { - int32_t code_point; -- CBU8_NEXT(src, char_index, src_len, code_point); -+ U8_NEXT(src, char_index, src_len, code_point); - if (!IsValidCharacter(code_point)) - return false; - } -diff --git a/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc b/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc -index 3101a6028..7f7d84b3c 100644 ---- a/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc -+++ b/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc -@@ -4,7 +4,7 @@ - - #include "base/strings/utf_string_conversion_utils.h" - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -@@ -18,7 +18,7 @@ bool ReadUnicodeCharacter(const char* src, - // use a signed type for code_point. But this function returns false - // on error anyway, so code_point_out is unsigned. - int32_t code_point; -- CBU8_NEXT(src, *char_index, src_len, code_point); -+ U8_NEXT(src, *char_index, src_len, code_point); - *code_point_out = static_cast(code_point); - - // The ICU macro above moves to the next char, we want to point to the last -@@ -33,16 +33,16 @@ bool ReadUnicodeCharacter(const char16* src, - int32_t src_len, - int32_t* char_index, - uint32_t* code_point) { -- if (CBU16_IS_SURROGATE(src[*char_index])) { -- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || -+ if (U16_IS_SURROGATE(src[*char_index])) { -+ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || - *char_index + 1 >= src_len || -- !CBU16_IS_TRAIL(src[*char_index + 1])) { -+ !U16_IS_TRAIL(src[*char_index + 1])) { - // Invalid surrogate pair. - return false; - } - - // Valid surrogate pair. -- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], -+ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], - src[*char_index + 1]); - (*char_index)++; - } else { -@@ -76,30 +76,30 @@ size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output) { - } - - -- // CBU8_APPEND_UNSAFE can append up to 4 bytes. -+ // U8_APPEND_UNSAFE can append up to 4 bytes. - size_t char_offset = output->length(); - size_t original_char_offset = char_offset; -- output->resize(char_offset + CBU8_MAX_LENGTH); -+ output->resize(char_offset + U8_MAX_LENGTH); - -- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); - -- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so -+ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so - // it will represent the new length of the string. - output->resize(char_offset); - return char_offset - original_char_offset; - } - - size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { -- if (CBU16_LENGTH(code_point) == 1) { -+ if (U16_LENGTH(code_point) == 1) { - // Thie code point is in the Basic Multilingual Plane (BMP). - output->push_back(static_cast(code_point)); - return 1; - } - // Non-BMP characters use a double-character encoding. - size_t char_offset = output->length(); -- output->resize(char_offset + CBU16_MAX_LENGTH); -- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -- return CBU16_MAX_LENGTH; -+ output->resize(char_offset + U16_MAX_LENGTH); -+ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ return U16_MAX_LENGTH; - } - - // Generalized Unicode converter ----------------------------------------------- -diff --git a/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc b/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc -index 2b67c5d9c..7ca6a6e0f 100644 ---- a/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc -+++ b/src/3rdparty/chromium/base/third_party/icu/icu_utf.cc -@@ -17,7 +17,7 @@ - * that would otherwise be too long as macros. - */ - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base_icu { - -@@ -35,14 +35,14 @@ namespace base_icu { - * - * @deprecated ICU 2.4. Obsolete, see utf_old.h. - */ --#define CBUTF8_ERROR_VALUE_1 0x15 -+#define UTF8_ERROR_VALUE_1 0x15 - - /** - * See documentation on UTF8_ERROR_VALUE_1 for details. - * - * @deprecated ICU 2.4. Obsolete, see utf_old.h. - */ --#define CBUTF8_ERROR_VALUE_2 0x9f -+#define UTF8_ERROR_VALUE_2 0x9f - - - /** -@@ -51,7 +51,7 @@ namespace base_icu { - * - * @deprecated ICU 2.4. Obsolete, see utf_old.h. - */ --#define CBUTF_ERROR_VALUE 0xffff -+#define UTF_ERROR_VALUE 0xffff - - /* - * This table could be replaced on many machines by -@@ -103,7 +103,7 @@ utf8_minLegal[4]={ 0, 0x80, 0x800, 0x10000 }; - - static const UChar32 - utf8_errorValue[6]={ -- CBUTF8_ERROR_VALUE_1, CBUTF8_ERROR_VALUE_2, CBUTF_ERROR_VALUE, 0x10ffff, -+ UTF8_ERROR_VALUE_1, UTF8_ERROR_VALUE_2, UTF_ERROR_VALUE, 0x10ffff, - 0x3ffffff, 0x7fffffff - }; - -@@ -135,11 +135,11 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, - UChar32 c, - UBool strict) { - int32_t i = *pi; -- uint8_t count = CBU8_COUNT_TRAIL_BYTES(c); -+ uint8_t count = U8_COUNT_TRAIL_BYTES(c); - if((i)+count<=(length)) { - uint8_t trail, illegal = 0; - -- CBU8_MASK_LEAD_BYTE((c), count); -+ U8_MASK_LEAD_BYTE((c), count); - /* count==0 for illegally leading trail bytes and the illegal bytes 0xfe and 0xff */ - switch(count) { - /* each branch falls through to the next one */ -@@ -169,9 +169,9 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, - break; - case 0: - if(strict>=0) { -- return CBUTF8_ERROR_VALUE_1; -+ return UTF8_ERROR_VALUE_1; - } else { -- return CBU_SENTINEL; -+ return U_SENTINEL; - } - /* no default branch to optimize switch() - all values are covered */ - } -@@ -189,21 +189,21 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, - - /* correct sequence - all trail bytes have (b7..b6)==(10)? */ - /* illegal is also set if count>=4 */ -- if(illegal || (c)0 && CBU8_IS_TRAIL(s[i])) { -+ while(count>0 && U8_IS_TRAIL(s[i])) { - ++(i); - --count; - } - if(strict>=0) { - c=utf8_errorValue[errorCount-count]; - } else { -- c=CBU_SENTINEL; -+ c=U_SENTINEL; - } -- } else if((strict)>0 && CBU_IS_UNICODE_NONCHAR(c)) { -+ } else if((strict)>0 && U_IS_UNICODE_NONCHAR(c)) { - /* strict: forbid non-characters like U+fffe */ - c=utf8_errorValue[count]; - } -@@ -211,13 +211,13 @@ UChar32 utf8_nextCharSafeBody(const uint8_t* s, - /* error handling */ - int32_t i0 = i; - /* don't just set (i)=(length) in case there is an illegal sequence */ -- while((i)<(length) && CBU8_IS_TRAIL(s[i])) { -+ while((i)<(length) && U8_IS_TRAIL(s[i])) { - ++(i); - } - if(strict>=0) { - c=utf8_errorValue[i-i0]; - } else { -- c=CBU_SENTINEL; -+ c=U_SENTINEL; - } - } - *pi=i; -diff --git a/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc b/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc -index 55f65f8c3..a7d616115 100644 ---- a/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc -+++ b/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc -@@ -8,7 +8,7 @@ - #include "base/files/file_util.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "content/public/browser/browser_thread.h" - - namespace content { -@@ -87,7 +87,7 @@ void Stream::ReadOnFileThread(off_t position, size_t max_size, - } else { - // Provided client has requested sufficient large block, make their - // life easier by not truncating in the middle of a UTF-8 character. -- if (size_got > 6 && !CBU8_IS_SINGLE(buffer[size_got - 1])) { -+ if (size_got > 6 && !U8_IS_SINGLE(buffer[size_got - 1])) { - base::TruncateUTF8ToByteSize(buffer, size_got, &buffer); - size_got = buffer.size(); - } else { -diff --git a/src/3rdparty/chromium/net/cert/internal/parse_name.cc b/src/3rdparty/chromium/net/cert/internal/parse_name.cc -index bb9b64051..5eaeb52d0 100644 ---- a/src/3rdparty/chromium/net/cert/internal/parse_name.cc -+++ b/src/3rdparty/chromium/net/cert/internal/parse_name.cc -@@ -10,7 +10,7 @@ - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" - #include "base/sys_byteorder.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace net { - -@@ -35,7 +35,7 @@ bool ConvertBmpStringValue(const der::Input& in, std::string* out) { - - // BMPString only supports codepoints in the Basic Multilingual Plane; - // surrogates are not allowed. -- if (CBU_IS_SURROGATE(c)) -+ if (U_IS_SURROGATE(c)) - return false; - } - return base::UTF16ToUTF8(in_16bit.data(), in_16bit.size(), out); -@@ -55,7 +55,7 @@ bool ConvertUniversalStringValue(const der::Input& in, std::string* out) { - for (const uint32_t c : in_32bit) { - // UniversalString is UCS-4 in big-endian order. - uint32_t codepoint = base::NetToHost32(c); -- if (!CBU_IS_UNICODE_CHAR(codepoint)) -+ if (!U_IS_UNICODE_CHAR(codepoint)) - return false; - - base::WriteUnicodeCharacter(codepoint, out); -diff --git a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc -index a8ac9028f..8fa5d2a64 100644 ---- a/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc -+++ b/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc -@@ -17,7 +17,7 @@ - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" - #include "base/sys_info.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "ui/base/ime/chromeos/ime_keyboard.h" - #include "ui/base/ime/chromeos/input_method_manager.h" - #include "ui/base/ime/composition_text.h" -diff --git a/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc b/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc -index c7f38de0d..08a0ff5fb 100644 ---- a/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc -+++ b/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc -@@ -5,13 +5,13 @@ - #include "ui/gfx/utf16_indexing.h" - - #include "base/logging.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace gfx { - - bool IsValidCodePointIndex(const base::string16& s, size_t index) { - return index == 0 || index == s.length() || -- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); -+ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); - } - - ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { --- -2.13.0 - diff --git a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch b/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch deleted file mode 100644 index 92c12de..0000000 --- a/0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a7885b823a2d3fc853f532fb5ae3a43a3e9967c0 Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 15:13:15 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-linux-pri - ---- - src/core/config/linux.pri | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri -index 24951cd07..c28e3b312 100644 ---- a/src/core/config/linux.pri -+++ b/src/core/config/linux.pri -@@ -147,4 +147,16 @@ host_build { - use?(system_icu): gn_args += use_system_icu=true icu_use_data_file=false - use?(system_ffmpeg): gn_args += use_system_ffmpeg=true - #use?(system_protobuf): gn_args += use_system_protobuf=true -+ -+ # some more system packages, that are not checked for for some reason -+ gn_args += use_system_re2=true -+ -+ # yasm is only used on x86, and passing use_system_yasm makes the build fail on -+ # other architectures (e.g., ARM), so make it conditional on the architecture -+ contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+ gn_args += use_system_yasm=true -+ } -+ -+ #link libpci instead of dlopening it, our Qt packaging depends on it anyway -+ gn_args += linux_link_libpci=true - } --- -2.13.0 - diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b039a74..5ddbf65 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -40,8 +40,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.9.0 -Release: 1%{?dist} +Version: 5.8.0 +Release: 14%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -51,40 +51,68 @@ URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg # wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz # ./clean_qtwebengine.sh 5.8.0 -Source0: https://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz +Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine -# webrtc: enable the CPU feature detection for ARM Linux also for Chromium -Patch0: 0001-qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch +# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch +# quick hack to avoid checking for the nonexistent icudtl.dat and silence the +# resulting warnings - not upstreamable as is because it removes the fallback +# mechanism for the ICU data directory (which is not used in our builds because +# we use the system ICU, which embeds the data statically) completely +Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch +# fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the +# ARM flags with our %%qmake_qt5 macro, including for the next patch +Patch2: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch +# disable NEON vector instructions on ARM where the NEON code FTBFS due to +# GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 +# otherwise, we use the arm-fpu-fix below instead (which this patch contains) +Patch3: qtwebengine-opensource-src-5.7.1-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch1: 0002-qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +Patch4: qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch5. -Patch2: 0003-qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +Patch5: qtwebengine-opensource-src-5.8.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) # TODO: For 5.9, we will need the GN files updated (where not done yet), too. -Patch3: 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch +Patch6: qtwebengine-opensource-src-5.8.0-no-sse2.patch +# fix ARM NEON handling in webrtc gyp files +# Fix video_processing.gypi to only build NEON files when actually requested +# (i.e., not if arm_neon=0 arm_neon_optional=0). +Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch +# fix missing ARM -mfpu setting (see the comment in the no-neon patch above) +Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) -Patch4: 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch -# some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch5: 0006-qtwebengine-opensource-src-5.9.0-linux-pri.patch -# quick hack to avoid checking for the nonexistent icudtl.dat and silence the -# resulting warnings - not upstreamable as is because it removes the fallback -# mechanism for the ICU data directory (which is not used in our builds because -# we use the system ICU, which embeds the data statically) completely -Patch6: 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch +Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch +# chromium-skia: build SkUtilsArm.cpp also on non-Android ARM +Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch +# webrtc: enable the CPU feature detection for ARM Linux also for Chromium +Patch12: qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch +# fix FTBFS in V8 with GCC 7 (by Ben Noordhuis, backported from Chromium RPM) +Patch13: qtwebengine-opensource-src-5.8.0-v8-gcc7.patch +# fix FTBFS in PDFium with GCC 7: backport upstream cleanup removing that code +# https://codereview.chromium.org/2154503002 +Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch +# fix FTBFS in the WTF part of Blink/WebKit with GCC 7 +Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch +# FTBFS using qt < 5.8 +Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch +# upstream fix for blank pages when a link opens in a new tab +Patch100: qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch +# upstream fix for non-functional dead keys in text fields +Patch101: qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -312,16 +340,28 @@ BuildArch: noarch %prep -%setup -q -n %{qt_module}-opensource-src-%{version} +%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} +%patch0 -p1 -b .linux-pri +%patch1 -p1 -b .no-icudtl-dat +%patch2 -p1 -b .fix-extractcflag %if 0%{?arm_neon} -%patch0 -p1 -b .webrtc-neon-detect +%patch9 -p1 -b .arm-fpu-fix +%else +%patch3 -p1 -b .no-neon %endif -%patch1 -p1 -b .system-nspr-prtime -%patch2 -p1 -b .system-icu-utf -%patch3 -p1 -b .no-sse2 -%patch4 -p1 -b .openmax-dl-neon -%patch5 -p1 -b .linux-pri -%patch6 -p1 -b .no-icudtl +%patch4 -p1 -b .system-nspr-prtime +%patch5 -p1 -b .system-icu-utf +%patch6 -p1 -b .no-sse2 +%patch7 -p1 -b .webrtc-neon +%patch10 -p1 -b .openmax-dl-neon +%patch11 -p1 -b .skia-neon +%patch12 -p1 -b .webrtc-neon-detect +%patch13 -p1 -b .v8-gcc7 +%patch14 -p1 -b .pdfium-gcc7 +%patch15 -p1 -b .wtf-gcc7 +%patch20 -p1 -b .qt57 +%patch100 -p1 -b .fix-open-in-new-tab +%patch101 -p1 -b .fix-dead-keys # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -532,9 +572,6 @@ done %changelog -* Wed May 31 2017 Helio Chissini de Castro - 5.9.0-1 -- Upstream official release - * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch new file mode 100644 index 0000000..8beae69 --- /dev/null +++ b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf +--- qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf 2015-12-14 16:27:24.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf 2016-01-10 18:15:23.942032985 +0100 +@@ -87,7 +87,7 @@ + } + + defineReplace(extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + return ($$member(OPTION, 1)) diff --git a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch b/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch similarity index 69% rename from 0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch rename to qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch index bf97a76..00cbfc2 100644 --- a/0007-qtwebengine-opensource-src-5.9.0-no-icudtl-dat.patch +++ b/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch @@ -1,17 +1,7 @@ -From 99294d646e58bcbedc5987a1816fed592290566f Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 15:16:56 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-icudtl-dat - ---- - src/core/web_engine_library_info.cpp | 17 ----------------- - 1 file changed, 17 deletions(-) - -diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp -index f46f8f425..96cd48ac4 100644 ---- a/src/core/web_engine_library_info.cpp -+++ b/src/core/web_engine_library_info.cpp -@@ -254,24 +254,7 @@ QString icuDataPath() +diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp +--- qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp 2016-03-03 17:02:28.000000000 +0100 ++++ qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp 2016-03-18 03:08:24.385444415 +0100 +@@ -207,24 +207,7 @@ #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) return getResourcesPath(frameworkBundle()); #else @@ -36,6 +26,3 @@ index f46f8f425..96cd48ac4 100644 return potentialResourcesPath; #endif } --- -2.13.0 - diff --git a/qtwebengine-opensource-src-5.7.0-linux-pri.patch b/qtwebengine-opensource-src-5.7.0-linux-pri.patch new file mode 100644 index 0000000..321a1d7 --- /dev/null +++ b/qtwebengine-opensource-src-5.7.0-linux-pri.patch @@ -0,0 +1,26 @@ +diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri 2016-06-07 06:20:06.000000000 +0200 ++++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 22:18:17.312471202 +0200 +@@ -46,3 +46,22 @@ + use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 + use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 + use?(system_protobuf): GYP_CONFIG += use_system_protobuf=1 ++ ++# some more system packages, that are not checked for for some reason ++GYP_CONFIG += use_system_re2=1 ++ ++# yasm is only used on x86, and passing use_system_yasm makes the build fail on ++# other architectures (e.g., ARM), so make it conditional on the architecture ++contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ GYP_CONFIG += use_system_yasm=1 ++} ++ ++# link libpci instead of dlopening it, our Qt packaging depends on it anyway ++GYP_CONFIG += linux_link_libpci=1 ++ ++# run the unbundling script Chromium provides ++CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" ++R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" ++R_G_F_PY_ARGS = "-D use_system_re2=1" ++log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch similarity index 72% rename from 0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch rename to qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch index 732be1a..08ff6e5 100644 --- a/0005-qtwebengine-opensource-src-5.9.-openmax-dl-neon.patch +++ b/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch @@ -1,17 +1,6 @@ -From 8bad8aac82444a9e1feda3f1a8b214b81be8a8fc Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 15:02:52 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.-openmax-dl-neon - ---- - .../chromium/third_party/openmax_dl/dl/dl.gyp | 9 ---- - .../third_party/openmax_dl/dl/sp/src/arm/detect.c | 56 ++++++++++++++++++---- - 2 files changed, 48 insertions(+), 17 deletions(-) - -diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp b/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp -index 2b0826fe1..20b4b1f35 100644 ---- a/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp -+++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-12-03 22:50:19.369158276 +0100 @@ -219,15 +219,6 @@ 'conditions': [ ['arm_neon_optional==1', { @@ -28,10 +17,9 @@ index 2b0826fe1..20b4b1f35 100644 'sources': [ # Detection routine 'sp/src/arm/detect.c', -diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c -index 57bfe4089..94a3f7ddc 100644 ---- a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c -+++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-12-03 22:48:13.745095083 +0100 @@ -9,13 +9,57 @@ * */ @@ -94,7 +82,7 @@ index 57bfe4089..94a3f7ddc 100644 } static void SetFFTRoutines() { -@@ -24,13 +68,9 @@ static void SetFFTRoutines() { +@@ -24,13 +68,9 @@ * forward and inverse FFTs */ if (omxSP_HasArmNeon()) { @@ -108,6 +96,3 @@ index 57bfe4089..94a3f7ddc 100644 omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp; omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp; } --- -2.13.0 - diff --git a/qtwebengine-opensource-src-5.7.1-skia-neon.patch b/qtwebengine-opensource-src-5.7.1-skia-neon.patch new file mode 100644 index 0000000..c9b385b --- /dev/null +++ b/qtwebengine-opensource-src-5.7.1-skia-neon.patch @@ -0,0 +1,15 @@ +diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi +--- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi 2016-11-07 15:46:18.000000000 +0100 ++++ qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi 2016-12-04 14:34:12.531877529 +0100 +@@ -159,6 +159,11 @@ + '../build/android/ndk.gyp:cpu_features', + ], + }], ++ [ 'OS != "android" and target_arch == "arm"', { ++ 'sources': [ ++ '../third_party/skia/src/core/SkUtilsArm.cpp', ++ ], ++ }], + [ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', { + 'dependencies': [ + '../build/linux/system.gyp:fontconfig', diff --git a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch new file mode 100644 index 0000000..a0cf81c --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch @@ -0,0 +1,40 @@ +From 31374ba98829e984c7600419c0e5fa71b96fc530 Mon Sep 17 00:00:00 2001 +From: Peter Varga +Date: Fri, 24 Mar 2017 14:31:02 +0100 +Subject: Forward input method events to RWHV in widget + +Task-number: QTBUG-58362 +Change-Id: Id4cf57c60da17538b224bb9bc91277c324c6a55d +Reviewed-by: Viktor Engelmann +Reviewed-by: Allan Sandfeld Jensen +--- + .../render_widget_host_view_qt_delegate_widget.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +index 14c4d72..fd58a07 100644 +--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp ++++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +@@ -84,10 +84,19 @@ protected: + { + m_client->forwardEvent(event); + } ++ void inputMethodEvent(QInputMethodEvent *event) override ++ { ++ m_client->forwardEvent(event); ++ } + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override + { + return m_client->updatePaintNode(oldNode); + } ++ ++ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override ++ { ++ return m_client->inputMethodQuery(query); ++ } + private: + RenderWidgetHostViewQtDelegateClient *m_client; + }; +-- +cgit v1.0-4-g1e03 + diff --git a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch new file mode 100644 index 0000000..c95a712 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch @@ -0,0 +1,46 @@ +From 8e147ed3be7740092de233a2a7c67ec890069649 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20Br=C3=BCning?= +Date: Mon, 13 Mar 2017 11:13:56 +0100 +Subject: Remove stale parent connection when initializing delegate as a child + +When clicking on a blank link target, the constructor of the +RenderWidgetHostViewQtDelegateWidget instance for the newly created +view is called with the originating QWebEngineView as its parent +and will connect its removeParentBeforeParentDelete slot to the +originating view's destroyed signal. + +This leads to the situation where the delegate's parent will be set to +null when the originating view is closed, causing the view to display +only an empty widget with the actual web contents remaining live in +the background. + +This patch removes the connection to the old view when initializing +the delegate as a child of the QWebEnginePagePrivate instance. The +addition to the layout updates the parent and child relationship +between the view and the delegate internally. + +Task-number: QTBUG-58381 +Change-Id: I448380478c2bcfcfbddaee8a35caf46010e57972 +Reviewed-by: Florian Bruhin +Reviewed-by: Joerg Bornemann +--- + src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +index e7ad5b1..14c4d72 100644 +--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp ++++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +@@ -163,6 +163,9 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* + + QWebEnginePagePrivate *pagePrivate = static_cast(container); + if (pagePrivate->view) { ++ if (parentWidget()) ++ disconnect(parentWidget(), &QObject::destroyed, ++ this, &RenderWidgetHostViewQtDelegateWidget::removeParentBeforeParentDelete); + pagePrivate->view->layout()->addWidget(this); + pagePrivate->view->setFocusProxy(this); + show(); +-- +cgit v1.0-4-g1e03 + diff --git a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch similarity index 73% rename from 0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch rename to qtwebengine-opensource-src-5.8.0-no-sse2.patch index 5df622b..ee15329 100644 --- a/0004-qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.8.0-no-sse2.patch @@ -1,64 +1,6 @@ -From 844246bd10971ec348f044bc7a13acb17b9ce033 Mon Sep 17 00:00:00 2001 -From: Helio Chissini de Castro -Date: Wed, 31 May 2017 14:38:20 +0200 -Subject: [PATCH] qtwebengine-opensource-src-5.9.0-no-sse2 - ---- - .../chromium/breakpad/src/build/common.gypi | 8 +- - src/3rdparty/chromium/cc/BUILD.gn | 39 +- - src/3rdparty/chromium/media/BUILD.gn | 20 + - src/3rdparty/chromium/media/base/BUILD.gn | 48 +- - src/3rdparty/chromium/media/base/media.cc | 4 + - .../chromium/media/base/simd/convert_yuv_to_rgb.h | 34 + - .../media/base/simd/convert_yuv_to_rgb_mmx.asm | 24 + - .../media/base/simd/convert_yuv_to_rgb_x86.cc | 56 + - src/3rdparty/chromium/media/base/simd/filter_yuv.h | 6 + - .../chromium/media/base/simd/filter_yuv_mmx.cc | 79 + - .../chromium/media/base/simd/sinc_resampler_sse.cc | 50 + - .../chromium/media/base/simd/vector_math_sse.cc | 118 + - src/3rdparty/chromium/media/base/sinc_resampler.cc | 81 +- - src/3rdparty/chromium/media/base/sinc_resampler.h | 4 + - .../chromium/media/base/sinc_resampler_perftest.cc | 4 + - .../chromium/media/base/sinc_resampler_unittest.cc | 5 + - src/3rdparty/chromium/media/base/vector_math.cc | 150 +- - src/3rdparty/chromium/media/base/vector_math.h | 5 + - .../chromium/media/base/vector_math_perftest.cc | 35 +- - .../chromium/media/base/vector_math_testing.h | 2 +- - .../chromium/media/base/vector_math_unittest.cc | 4 + - src/3rdparty/chromium/media/base/yuv_convert.cc | 50 +- - .../chromium/media/base/yuv_convert_perftest.cc | 79 +- - .../chromium/media/base/yuv_convert_unittest.cc | 159 +- - src/3rdparty/chromium/skia/BUILD.gn | 52 +- - src/3rdparty/chromium/skia/ext/convolver.cc | 11 +- - src/3rdparty/chromium/skia/ext/convolver.h | 1 + - .../Source/modules/webaudio/AudioParamTimeline.cpp | 8 +- - .../Source/platform/audio/DirectConvolver.cpp | 40 +- - .../WebKit/Source/platform/audio/DirectConvolver.h | 7 + - .../WebKit/Source/platform/audio/SincResampler.cpp | 31 +- - .../WebKit/Source/platform/audio/SincResampler.h | 7 + - .../WebKit/Source/platform/audio/VectorMath.cpp | 97 +- - .../WebKit/Source/platform/audio/VectorMath.h | 23 + - .../graphics/cpu/x86/WebGLImageConversionSSE.h | 2 +- - .../platform/graphics/gpu/WebGLImageConversion.cpp | 12 +- - src/3rdparty/chromium/third_party/qcms/BUILD.gn | 17 +- - .../webrtc/common_audio/real_fourier.cc | 9 + - src/3rdparty/chromium/v8/BUILD.gn | 72 +- - src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh | 56 + - src/3rdparty/chromium/v8/src/v8.gyp | 12 +- - src/3rdparty/chromium/v8/src/v8_sse2.gyp | 2313 ++++++++++++++++++++ - src/core/core_module.pro | 30 +- - 43 files changed, 3537 insertions(+), 327 deletions(-) - create mode 100644 src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm - create mode 100644 src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc - create mode 100644 src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc - create mode 100644 src/3rdparty/chromium/media/base/simd/vector_math_sse.cc - create mode 100644 src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh - create mode 100644 src/3rdparty/chromium/v8/src/v8_sse2.gyp - -diff --git a/src/3rdparty/chromium/breakpad/src/build/common.gypi b/src/3rdparty/chromium/breakpad/src/build/common.gypi -index b9466a325..8ad78e24f 100644 ---- a/src/3rdparty/chromium/breakpad/src/build/common.gypi -+++ b/src/3rdparty/chromium/breakpad/src/build/common.gypi +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-03-05 17:26:14.507159420 +0100 @@ -80,8 +80,8 @@ # The system root for cross-compiles. Default: none. 'sysroot%': '', @@ -66,7 +8,7 @@ index b9466a325..8ad78e24f 100644 - # On Linux, we build with sse2 for Chromium builds. - 'disable_sse2%': 0, + # Do not assume SSE2 by default (Fedora patch). -+ 'disable_sse2%': 1, ++ 'disable_sse2%': 1 }, 'target_arch%': '<(target_arch)', @@ -88,11 +30,29 @@ index b9466a325..8ad78e24f 100644 ], 'ldflags': [ '-m32', -diff --git a/src/3rdparty/chromium/cc/BUILD.gn b/src/3rdparty/chromium/cc/BUILD.gn -index e461a898d..b50659b89 100644 ---- a/src/3rdparty/chromium/cc/BUILD.gn -+++ b/src/3rdparty/chromium/cc/BUILD.gn -@@ -567,13 +567,6 @@ component("cc") { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2017-03-05 17:26:14.612157862 +0100 +@@ -3861,15 +3861,7 @@ + # value used during computation does not change depending on + # how the compiler optimized the code, since the value is + # always kept in its specified precision. +- # +- # Refer to http://crbug.com/348761 for rationale behind SSE2 +- # being a minimum requirement for 32-bit Linux builds and +- # http://crbug.com/313032 for an example where this has "bit" +- # us in the past. + 'cflags': [ +- '-msse2', +- '-mfpmath=sse', +- '-mmmx', # Allows mmintrin.h for MMX intrinsics. + '-m32', + ], + 'ldflags': [ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-03-05 17:38:41.416050535 +0100 +@@ -537,13 +537,6 @@ "trees/tree_synchronizer.h", ] @@ -106,7 +66,7 @@ index e461a898d..b50659b89 100644 configs += [ "//build/config:precompiled_headers" ] public_deps = [ -@@ -583,6 +576,7 @@ component("cc") { +@@ -553,6 +546,7 @@ deps = [ "//base", "//base/third_party/dynamic_annotations", @@ -114,7 +74,7 @@ index e461a898d..b50659b89 100644 "//cc/proto", "//cc/surfaces:surface_id", "//gpu", -@@ -612,6 +606,37 @@ component("cc") { +@@ -581,6 +575,36 @@ } } @@ -148,46 +108,81 @@ index e461a898d..b50659b89 100644 + } +} + -+ - static_library("test_support") { + source_set("test_support") { testonly = true sources = [ -diff --git a/src/3rdparty/chromium/media/BUILD.gn b/src/3rdparty/chromium/media/BUILD.gn -index 652aad4d9..063254830 100644 ---- a/src/3rdparty/chromium/media/BUILD.gn -+++ b/src/3rdparty/chromium/media/BUILD.gn -@@ -832,6 +832,26 @@ component("shared_memory_support") { - "//base", - "//ui/gfx/geometry", - ] -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":shared_memory_support_sse", -+ ] -+ } -+} -+ -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("shared_memory_support_sse") { -+ sources = [ -+ "base/simd/vector_math_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2017-03-05 17:26:26.081987615 +0100 +@@ -602,14 +602,6 @@ + 'includes': [ + '../build/android/increase_size_for_speed.gypi', + ], +- 'conditions': [ +- ['target_arch == "ia32" or target_arch == "x64"', { +- 'sources': [ +- 'raster/texture_compressor_etc1_sse.cc', +- 'raster/texture_compressor_etc1_sse.h', +- ], +- }], +- ], + }, + { + # GN version: "//cc/proto" +@@ -678,6 +670,7 @@ + '<(DEPTH)/ui/events/events.gyp:events_base', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx', + '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', ++ 'cc_opts', + ], + 'defines': [ + 'CC_SURFACES_IMPLEMENTATION=1', +@@ -714,5 +707,41 @@ + '../build/android/increase_size_for_speed.gypi', + ], + }, ++ { ++ 'target_name': 'cc_opts', ++ 'type': 'static_library', ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'CC_IMPLEMENTATION=1', ++ ], ++ 'dependencies': [ ++ 'cc_opts_sse', ++ ] ++ }], ++ ], ++ }, ++ { ++ 'target_name': 'cc_opts_sse', ++ 'type': 'static_library', ++ 'dependencies': [ ++ '<(DEPTH)/base/base.gyp:base', ++ ], ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'CC_IMPLEMENTATION=1', ++ ], ++ 'sources': [ ++ # Conditional compilation for SSE2 code on x86 and x64 machines ++ 'raster/texture_compressor_etc1_sse.cc', ++ 'raster/texture_compressor_etc1_sse.h', ++ ], ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ ], ++ }, + ], } - - # TODO(watk): Refactor tests that could be made to run on Android. See -diff --git a/src/3rdparty/chromium/media/base/BUILD.gn b/src/3rdparty/chromium/media/base/BUILD.gn -index d288ec787..fac712c00 100644 ---- a/src/3rdparty/chromium/media/base/BUILD.gn -+++ b/src/3rdparty/chromium/media/base/BUILD.gn -@@ -336,11 +336,12 @@ target(link_target_type, "base") { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-03-05 17:26:26.082987600 +0100 +@@ -312,13 +312,13 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -203,9 +198,11 @@ index d288ec787..fac712c00 100644 + ":media_sse", + ":media_sse2", ] - deps += [ ":media_yasm" ] +- deps += [ ":media_yasm" ] } -@@ -539,10 +540,47 @@ source_set("perftests") { + + if (is_linux || is_win) { +@@ -534,10 +534,47 @@ } if (current_cpu == "x86" || current_cpu == "x64") { @@ -253,10 +250,9 @@ index d288ec787..fac712c00 100644 "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff --git a/src/3rdparty/chromium/media/base/media.cc b/src/3rdparty/chromium/media/base/media.cc -index 38daf05b8..bb43b405f 100644 ---- a/src/3rdparty/chromium/media/base/media.cc -+++ b/src/3rdparty/chromium/media/base/media.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-03-05 17:44:02.063267153 +0100 @@ -10,6 +10,8 @@ #include "base/metrics/field_trial.h" #include "base/trace_event/trace_event.h" @@ -266,7 +262,7 @@ index 38daf05b8..bb43b405f 100644 #include "media/base/yuv_convert.h" #if defined(OS_ANDROID) -@@ -40,6 +42,8 @@ class MediaInitializer { +@@ -40,6 +42,8 @@ TRACE_EVENT_WARMUP_CATEGORY("media"); // Perform initialization of libraries which require runtime CPU detection. @@ -275,11 +271,10 @@ index 38daf05b8..bb43b405f 100644 InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h -index a421ff566..8373fde90 100644 ---- a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h -+++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h -@@ -65,6 +65,17 @@ MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8_t* yplane, +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-03-05 17:26:26.083987585 +0100 +@@ -65,6 +65,17 @@ int rgbstride, YUVType yuv_type); @@ -297,9 +292,9 @@ index a421ff566..8373fde90 100644 MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -@@ -86,6 +97,13 @@ MEDIA_EXPORT void ScaleYUVToRGB32Row_C(const uint8_t* y_buf, - ptrdiff_t source_dx, - const int16_t* convert_table); +@@ -124,6 +135,13 @@ + ptrdiff_t width, + const int16_t* convert_table); +MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, + const uint8_t* uplane, @@ -308,12 +303,12 @@ index a421ff566..8373fde90 100644 + ptrdiff_t width, + const int16_t* convert_table); + - MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -94,6 +112,14 @@ MEDIA_EXPORT void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf, - ptrdiff_t source_dx, - const int16_t* convert_table); + MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +@@ -131,6 +149,14 @@ + ptrdiff_t width, + const int16_t* convert_table); +MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, + const uint8_t* u_buf, @@ -323,12 +318,12 @@ index a421ff566..8373fde90 100644 + ptrdiff_t source_dx, + const int16_t* convert_table); + - MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( - const uint8_t* y_buf, - const uint8_t* u_buf, -@@ -104,6 +130,14 @@ MEDIA_EXPORT void LinearScaleYUVToRGB32RowWithRange_C( - int source_dx, - const int16_t* convert_table); + MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -147,6 +173,14 @@ + ptrdiff_t source_dx, + const int16_t* convert_table); +MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, + const uint8_t* u_buf, @@ -338,15 +333,13 @@ index a421ff566..8373fde90 100644 + ptrdiff_t source_dx, + const int16_t* convert_table); + - } // namespace media - - // Assembly functions are declared without namespace. -diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm -new file mode 100644 -index 000000000..3650c9f73 ---- /dev/null -+++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm -@@ -0,0 +1,24 @@ + MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-03-05 17:26:26.167986340 +0100 +@@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be +; found in the LICENSE file. @@ -370,43 +363,13 @@ index 000000000..3650c9f73 +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -+ -diff --git a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc -index a06799bfd..819bb60a8 100644 ---- a/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc -+++ b/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc -@@ -47,6 +47,62 @@ void ConvertYUVAToARGB_MMX(const uint8_t* yplane, +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-03-05 17:26:26.167986340 +0100 +@@ -47,6 +47,34 @@ EmptyRegisterState(); } -+void ConvertYUVToRGB32_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type) { -+ unsigned int y_shift = GetVerticalShift(yuv_type); -+ for (int y = 0; y < height; ++y) { -+ uint8_t* rgb_row = rgbframe + y * rgbstride; -+ const uint8_t* y_ptr = yplane + y * ystride; -+ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; -+ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; -+ -+ ConvertYUVToRGB32Row_MMX(y_ptr, -+ u_ptr, -+ v_ptr, -+ rgb_row, -+ width, -+ GetLookupTable(yuv_type)); -+ } -+ -+ EmptyRegisterState(); -+} -+ +void ConvertYUVToRGB32_MMX(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, @@ -438,11 +401,10 @@ index a06799bfd..819bb60a8 100644 void ConvertYUVToRGB32_SSE(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -diff --git a/src/3rdparty/chromium/media/base/simd/filter_yuv.h b/src/3rdparty/chromium/media/base/simd/filter_yuv.h -index af30bd133..206fb7f11 100644 ---- a/src/3rdparty/chromium/media/base/simd/filter_yuv.h -+++ b/src/3rdparty/chromium/media/base/simd/filter_yuv.h -@@ -20,6 +20,12 @@ MEDIA_EXPORT void FilterYUVRows_C(uint8_t* ybuf, +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-03-05 17:26:26.167986340 +0100 +@@ -20,6 +20,12 @@ int source_width, uint8_t source_y_fraction); @@ -455,11 +417,9 @@ index af30bd133..206fb7f11 100644 MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr, -diff --git a/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc b/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc -new file mode 100644 -index 000000000..416aca699 ---- /dev/null -+++ b/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-03-05 17:26:26.167986340 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -540,11 +500,9 @@ index 000000000..416aca699 +#endif + +} // namespace media -diff --git a/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc b/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc -new file mode 100644 -index 000000000..c5d03dc48 ---- /dev/null -+++ b/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-03-05 17:26:26.168986325 +0100 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -596,11 +554,9 @@ index 000000000..c5d03dc48 +} + +} // namespace media -diff --git a/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc b/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc -new file mode 100644 -index 000000000..c2121225c ---- /dev/null -+++ b/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-03-05 17:26:26.168986325 +0100 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -720,10 +676,9 @@ index 000000000..c2121225c + +} // namespace vector_math +} // namespace media -diff --git a/src/3rdparty/chromium/media/base/sinc_resampler.cc b/src/3rdparty/chromium/media/base/sinc_resampler.cc -index cffb0c9d6..010775544 100644 ---- a/src/3rdparty/chromium/media/base/sinc_resampler.cc -+++ b/src/3rdparty/chromium/media/base/sinc_resampler.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-03-05 17:26:26.168986325 +0100 @@ -81,17 +81,12 @@ #include #include @@ -744,7 +699,7 @@ index cffb0c9d6..010775544 100644 #endif namespace media { -@@ -112,10 +107,41 @@ static double SincScaleFactor(double io_ratio) { +@@ -112,10 +107,41 @@ return sinc_scale_factor; } @@ -786,7 +741,7 @@ index cffb0c9d6..010775544 100644 SincResampler::SincResampler(double io_sample_rate_ratio, int request_frames, const ReadCB& read_cb) -@@ -328,46 +354,7 @@ float SincResampler::Convolve_C(const float* input_ptr, const float* k1, +@@ -343,46 +369,7 @@ kernel_interpolation_factor * sum2); } @@ -834,11 +789,10 @@ index cffb0c9d6..010775544 100644 float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff --git a/src/3rdparty/chromium/media/base/sinc_resampler.h b/src/3rdparty/chromium/media/base/sinc_resampler.h -index afbd2abc9..9e3df2c55 100644 ---- a/src/3rdparty/chromium/media/base/sinc_resampler.h -+++ b/src/3rdparty/chromium/media/base/sinc_resampler.h -@@ -36,6 +36,10 @@ class MEDIA_EXPORT SincResampler { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-03-05 17:26:26.169986310 +0100 +@@ -36,6 +36,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -849,10 +803,9 @@ index afbd2abc9..9e3df2c55 100644 // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff --git a/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc b/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc -index 9cb7f4f2e..285382490 100644 ---- a/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc -+++ b/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-03-05 17:26:26.169986310 +0100 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -861,7 +814,7 @@ index 9cb7f4f2e..285382490 100644 #include "base/time/time.h" #include "build/build_config.h" #include "media/base/sinc_resampler.h" -@@ -61,6 +62,9 @@ TEST(SincResamplerPerfTest, Convolve) { +@@ -61,6 +62,9 @@ &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); #if defined(CONVOLVE_FUNC) @@ -871,10 +824,9 @@ index 9cb7f4f2e..285382490 100644 RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff --git a/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc b/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc -index 8dd346ee4..7401eee96 100644 ---- a/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc -+++ b/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-03-05 17:26:26.169986310 +0100 @@ -10,6 +10,7 @@ #include "base/bind.h" @@ -883,7 +835,7 @@ index 8dd346ee4..7401eee96 100644 #include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" -@@ -166,6 +167,10 @@ TEST(SincResamplerTest, DISABLED_SetRatioBench) { +@@ -166,6 +167,10 @@ static const double kKernelInterpolationFactor = 0.5; TEST(SincResamplerTest, Convolve) { @@ -894,10 +846,9 @@ index 8dd346ee4..7401eee96 100644 // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff --git a/src/3rdparty/chromium/media/base/vector_math.cc b/src/3rdparty/chromium/media/base/vector_math.cc -index 578290538..e041d8d4c 100644 ---- a/src/3rdparty/chromium/media/base/vector_math.cc -+++ b/src/3rdparty/chromium/media/base/vector_math.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-03-05 17:26:26.170986295 +0100 @@ -7,12 +7,17 @@ #include @@ -973,7 +924,7 @@ index 578290538..e041d8d4c 100644 void FMAC(const float src[], float scale, int len, float dest[]) { // Ensure |src| and |dest| are 16-byte aligned. DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); -@@ -89,111 +126,6 @@ std::pair EWMAAndMaxPower_C( +@@ -89,111 +126,6 @@ return result; } @@ -1085,11 +1036,10 @@ index 578290538..e041d8d4c 100644 #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff --git a/src/3rdparty/chromium/media/base/vector_math.h b/src/3rdparty/chromium/media/base/vector_math.h -index a148ca050..0a2cb06f6 100644 ---- a/src/3rdparty/chromium/media/base/vector_math.h -+++ b/src/3rdparty/chromium/media/base/vector_math.h -@@ -15,6 +15,11 @@ namespace vector_math { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-03-05 17:26:26.170986295 +0100 +@@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1101,10 +1051,9 @@ index a148ca050..0a2cb06f6 100644 // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff --git a/src/3rdparty/chromium/media/base/vector_math_perftest.cc b/src/3rdparty/chromium/media/base/vector_math_perftest.cc -index 59b259dc2..c4c89a3b5 100644 ---- a/src/3rdparty/chromium/media/base/vector_math_perftest.cc -+++ b/src/3rdparty/chromium/media/base/vector_math_perftest.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-03-05 17:26:26.171986280 +0100 @@ -5,6 +5,7 @@ #include @@ -1113,7 +1062,7 @@ index 59b259dc2..c4c89a3b5 100644 #include "base/memory/aligned_memory.h" #include "base/time/time.h" #include "build/build_config.h" -@@ -82,15 +83,11 @@ class VectorMathPerfTest : public testing::Test { +@@ -82,15 +83,11 @@ DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); }; @@ -1130,7 +1079,7 @@ index 59b259dc2..c4c89a3b5 100644 #endif // Benchmark for each optimized vector_math::FMAC() method. -@@ -99,6 +96,9 @@ TEST_F(VectorMathPerfTest, FMAC) { +@@ -99,6 +96,9 @@ RunBenchmark( vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); #if defined(FMAC_FUNC) @@ -1140,7 +1089,7 @@ index 59b259dc2..c4c89a3b5 100644 // Benchmark FMAC_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -112,12 +112,24 @@ TEST_F(VectorMathPerfTest, FMAC) { +@@ -112,12 +112,24 @@ #endif } @@ -1165,7 +1114,7 @@ index 59b259dc2..c4c89a3b5 100644 // Benchmark FMUL_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -131,6 +143,14 @@ TEST_F(VectorMathPerfTest, FMUL) { +@@ -131,6 +143,14 @@ #endif } @@ -1180,7 +1129,7 @@ index 59b259dc2..c4c89a3b5 100644 // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { // Benchmark EWMAAndMaxPower_C(). -@@ -139,6 +159,9 @@ TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { +@@ -139,6 +159,9 @@ "vector_math_ewma_and_max_power", "unoptimized"); #if defined(EWMAAndMaxPower_FUNC) @@ -1190,18 +1139,17 @@ index 59b259dc2..c4c89a3b5 100644 // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / sizeof(float)), 0U); -@@ -156,4 +179,6 @@ TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { +@@ -156,4 +179,6 @@ #endif } +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff --git a/src/3rdparty/chromium/media/base/vector_math_testing.h b/src/3rdparty/chromium/media/base/vector_math_testing.h -index 9240fbf54..b0b304409 100644 ---- a/src/3rdparty/chromium/media/base/vector_math_testing.h -+++ b/src/3rdparty/chromium/media/base/vector_math_testing.h -@@ -19,7 +19,7 @@ MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]); +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-03-05 17:26:26.171986280 +0100 +@@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1210,10 +1158,9 @@ index 9240fbf54..b0b304409 100644 MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff --git a/src/3rdparty/chromium/media/base/vector_math_unittest.cc b/src/3rdparty/chromium/media/base/vector_math_unittest.cc -index 3fcb3fad4..c4e8586aa 100644 ---- a/src/3rdparty/chromium/media/base/vector_math_unittest.cc -+++ b/src/3rdparty/chromium/media/base/vector_math_unittest.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-03-05 17:26:26.172986265 +0100 @@ -9,6 +9,7 @@ #include @@ -1222,7 +1169,7 @@ index 3fcb3fad4..c4e8586aa 100644 #include "base/memory/aligned_memory.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringize_macros.h" -@@ -78,6 +79,7 @@ TEST_F(VectorMathTest, FMAC) { +@@ -78,6 +79,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1230,7 +1177,7 @@ index 3fcb3fad4..c4e8586aa 100644 SCOPED_TRACE("FMAC_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMAC_SSE( -@@ -119,6 +121,7 @@ TEST_F(VectorMathTest, FMUL) { +@@ -119,6 +121,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1238,7 +1185,7 @@ index 3fcb3fad4..c4e8586aa 100644 SCOPED_TRACE("FMUL_SSE"); FillTestVectors(kInputFillValue, kOutputFillValue); vector_math::FMUL_SSE( -@@ -227,6 +230,7 @@ class EWMATestScenario { +@@ -227,6 +230,7 @@ #if defined(ARCH_CPU_X86_FAMILY) { @@ -1246,10 +1193,9 @@ index 3fcb3fad4..c4e8586aa 100644 SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff --git a/src/3rdparty/chromium/media/base/yuv_convert.cc b/src/3rdparty/chromium/media/base/yuv_convert.cc -index 2cdd9b1fd..2fc643416 100644 ---- a/src/3rdparty/chromium/media/base/yuv_convert.cc -+++ b/src/3rdparty/chromium/media/base/yuv_convert.cc +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-03-05 17:26:26.173986250 +0100 @@ -32,7 +32,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1259,7 +1205,7 @@ index 2cdd9b1fd..2fc643416 100644 #if defined(COMPILER_MSVC) #include #else -@@ -133,7 +133,7 @@ static const int16_t* g_table_rec709_ptr = NULL; +@@ -133,7 +133,7 @@ // Empty SIMD registers state after using them. void EmptyRegisterStateStub() {} @@ -1268,7 +1214,7 @@ index 2cdd9b1fd..2fc643416 100644 void EmptyRegisterStateIntrinsic() { _mm_empty(); } #endif typedef void (*EmptyRegisterStateProc)(); -@@ -247,34 +247,46 @@ void InitializeCPUSpecificYUVConversions() { +@@ -247,34 +247,46 @@ // Assembly code confuses MemorySanitizer. Also not available in iOS builds. #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ !defined(OS_IOS) @@ -1332,11 +1278,10 @@ index 2cdd9b1fd..2fc643416 100644 if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff --git a/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc b/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc -index ddf777cf3..f5520fd58 100644 ---- a/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc -+++ b/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc -@@ -71,6 +71,29 @@ class YUVConvertPerfTest : public testing::Test { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-03-05 17:26:26.173986250 +0100 +@@ -71,6 +71,29 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1366,7 +1311,7 @@ index ddf777cf3..f5520fd58 100644 TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -161,9 +184,32 @@ TEST_F(YUVConvertPerfTest, I422AlphaToARGBRow_SSSE3) { +@@ -161,9 +184,32 @@ } #endif @@ -1402,7 +1347,7 @@ index ddf777cf3..f5520fd58 100644 TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -190,6 +236,32 @@ TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { +@@ -190,6 +236,32 @@ kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1435,7 +1380,7 @@ index ddf777cf3..f5520fd58 100644 TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { ASSERT_TRUE(base::CPU().has_sse()); -@@ -215,7 +287,6 @@ TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { +@@ -215,7 +287,6 @@ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", kPerfTestIterations / total_time_seconds, "runs/s", true); } @@ -1443,11 +1388,10 @@ index ddf777cf3..f5520fd58 100644 #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff --git a/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc b/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc -index ec872c89b..801466add 100644 ---- a/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc -+++ b/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc -@@ -643,6 +643,37 @@ TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-03-05 17:26:26.174986235 +0100 +@@ -643,6 +643,37 @@ EXPECT_EQ(0, error); } @@ -1485,7 +1429,7 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -674,9 +705,40 @@ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { +@@ -674,9 +705,40 @@ kWidth * kBpp)); } @@ -1529,7 +1473,7 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -711,6 +773,40 @@ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { +@@ -711,6 +773,40 @@ kWidth * kBpp)); } @@ -1570,7 +1514,7 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { base::CPU cpu; if (!cpu.has_sse()) { -@@ -744,7 +840,6 @@ TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { +@@ -744,7 +840,6 @@ rgb_bytes_converted.get(), kWidth * kBpp)); } @@ -1578,7 +1522,7 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { std::unique_ptr src(new uint8_t[16]); -@@ -761,6 +856,30 @@ TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { +@@ -761,6 +856,30 @@ } } @@ -1609,7 +1553,7 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { base::CPU cpu; if (!cpu.has_sse2()) { -@@ -782,6 +901,38 @@ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { +@@ -782,6 +901,38 @@ } } @@ -1648,55 +1592,172 @@ index ec872c89b..801466add 100644 TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff --git a/src/3rdparty/chromium/skia/BUILD.gn b/src/3rdparty/chromium/skia/BUILD.gn -index 55854ffe6..9a1d4ec0f 100644 ---- a/src/3rdparty/chromium/skia/BUILD.gn -+++ b/src/3rdparty/chromium/skia/BUILD.gn -@@ -1,38 +1,3 @@ --# Copyright (c) 2013 The Chromium Authors. All rights reserved. --# Use of this source code is governed by a BSD-style license that can be --# found in the LICENSE file. -- --import("//build/config/features.gni") --import("//build/config/ui.gni") --import("//printing/features/features.gni") --import("//testing/test.gni") --import("//third_party/skia/gn/shared_sources.gni") -- --if (current_cpu == "arm") { -- import("//build/config/arm.gni") --} --if (current_cpu == "mipsel" || current_cpu == "mips64el") { -- import("//build/config/mips.gni") --} -- --skia_support_gpu = !is_ios --skia_support_pdf = !is_ios && (enable_basic_printing || enable_print_preview) -- --# When building Chrome for iOS with GYP, the target cpu is not known during --# the invocation of gyp. This cause the iOS build to use non-optimised skia. --# Replicate this with GN to avoid introducing regression as recommended by --# the OWNERS of skia. -- --declare_args() { -- skia_whitelist_serialized_typefaces = false -- -- # TODO(crbug.com/607933): Once GYP is no longer supported, port iOS to use -- # optimised skia. -- skia_build_no_opts = is_ios --} -- --# External-facing config for dependent code. --config("skia_config") { - include_dirs = [ - "config", - "ext", -@@ -608,7 +573,15 @@ source_set("skia_opts") { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-03-05 17:26:26.175986220 +0100 +@@ -805,6 +805,26 @@ + "//base", + "//ui/gfx/geometry", + ] ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":shared_memory_support_sse", ++ ] ++ } ++} ++ ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("shared_memory_support_sse") { ++ sources = [ ++ "base/simd/vector_math_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } + } + + # TODO(watk): Refactor tests that could be made to run on Android. See +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2017-03-05 17:51:56.424188330 +0100 +@@ -1020,12 +1020,12 @@ + ['target_arch=="ia32" or target_arch=="x64"', { + 'dependencies': [ + 'media_asm', ++ 'media_mmx', ++ 'media_sse', ++ 'media_sse2', + ], + 'sources': [ +- 'base/simd/convert_rgb_to_yuv_sse2.cc', +- 'base/simd/convert_rgb_to_yuv_ssse3.cc', + 'base/simd/convert_yuv_to_rgb_x86.cc', +- 'base/simd/filter_yuv_sse2.cc', + ], + }], + ['OS!="linux" and OS!="win"', { +@@ -1616,6 +1616,11 @@ + 'USE_NEON' + ], + }], ++ ['target_arch=="ia32" or target_arch=="x64"', { ++ 'dependencies': [ ++ 'shared_memory_support_sse' ++ ], ++ }], + ], + }, + { +@@ -1633,6 +1638,7 @@ + 'type': 'static_library', + 'sources': [ + 'base/simd/convert_rgb_to_yuv_ssse3.asm', ++ 'base/simd/convert_yuv_to_rgb_mmx.asm', + 'base/simd/convert_yuv_to_rgb_sse.asm', + 'base/simd/convert_yuva_to_argb_mmx.asm', + 'base/simd/empty_register_state_mmx.asm', +@@ -1713,6 +1719,75 @@ + '../third_party/yasm/yasm_compile.gypi', + ], + }, ++ { ++ # GN version: //media/base:media_mmx ++ 'target_name': 'media_mmx', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-mmmx', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/filter_yuv_mmx.cc', ++ ], ++ }, ++ { ++ # GN version: //media/base:media_sse ++ 'target_name': 'media_sse', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/sinc_resampler_sse.cc', ++ ], ++ }, ++ { ++ # GN version: //media/base:media_sse2 ++ 'target_name': 'media_sse2', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse2', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/convert_rgb_to_yuv_sse2.cc', ++ 'base/simd/convert_rgb_to_yuv_ssse3.cc', ++ 'base/simd/filter_yuv_sse2.cc', ++ ], ++ }, ++ { ++ 'target_name': 'shared_memory_support_sse', ++ 'type': 'static_library', ++ 'cflags': [ ++ '-msse', ++ ], ++ 'defines': [ ++ 'MEDIA_IMPLEMENTATION', ++ ], ++ 'include_dirs': [ ++ '..', ++ ], ++ 'sources': [ ++ 'base/simd/vector_math_sse.cc', ++ ], ++ }, + ], # targets + }], + ['OS=="win"', { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-03-05 17:56:08.829413581 +0100 +@@ -329,11 +329,6 @@ + if (!is_ios) { + sources += [ "ext/platform_canvas.cc" ] + } +- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { +- sources += [ "ext/convolver_SSE2.cc" ] +- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { +- sources += [ "ext/convolver_mips_dspr2.cc" ] +- } + + # The skia gypi values are relative to the skia_dir, so we need to rebase. + sources += gypi_skia_core.sources +@@ -642,7 +637,15 @@ if (skia_build_no_opts) { - sources = skia_opts.none_sources + sources = gypi_skia_opts.none_sources } else if (current_cpu == "x86" || current_cpu == "x64") { -- sources = skia_opts.sse2_sources -+ sources = skia_opts.sse2_sources + +- sources = gypi_skia_opts.sse2_sources ++ sources = gypi_skia_opts.sse2_sources + + [ + # Chrome-specific. + "ext/convolver_SSE2.cc", @@ -1707,11 +1768,11 @@ index 55854ffe6..9a1d4ec0f 100644 + } deps += [ ":skia_opts_avx", - ":skia_opts_hsw", -@@ -644,6 +617,13 @@ source_set("skia_opts") { + ":skia_opts_avx2", +@@ -677,6 +680,13 @@ if (mips_dsp_rev >= 1) { - sources = skia_opts.mips_dsp_sources + sources = gypi_skia_opts.mips_dsp_sources + if (mips_dsp_rev >= 2) { + sources += [ + # Chrome-specific. @@ -1720,13 +1781,12 @@ index 55854ffe6..9a1d4ec0f 100644 + ] + } } else { - sources = skia_opts.none_sources + sources = gypi_skia_opts.none_sources } -diff --git a/src/3rdparty/chromium/skia/ext/convolver.cc b/src/3rdparty/chromium/skia/ext/convolver.cc -index 092fefaa9..4b40ffd2c 100644 ---- a/src/3rdparty/chromium/skia/ext/convolver.cc -+++ b/src/3rdparty/chromium/skia/ext/convolver.cc -@@ -362,10 +362,13 @@ struct ConvolveProcs { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-03-05 17:26:26.176986205 +0100 +@@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { #ifdef SIMD_SSE2 @@ -1744,10 +1804,9 @@ index 092fefaa9..4b40ffd2c 100644 #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff --git a/src/3rdparty/chromium/skia/ext/convolver.h b/src/3rdparty/chromium/skia/ext/convolver.h -index 1f33d4c0f..f7cd4770a 100644 ---- a/src/3rdparty/chromium/skia/ext/convolver.h -+++ b/src/3rdparty/chromium/skia/ext/convolver.h +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-03-05 17:26:26.239985269 +0100 @@ -11,6 +11,7 @@ #include @@ -1756,11 +1815,215 @@ index 1f33d4c0f..f7cd4770a 100644 #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp -index 8e558f439..20ba17688 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp -@@ -31,7 +31,7 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-03-05 17:26:26.239985269 +0100 +@@ -9,6 +9,7 @@ + { + 'dependencies': [ + 'skia_library', ++ 'skia_chrome_opts', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + ], +@@ -67,22 +68,16 @@ + 'ext/skia_utils_base.cc', + ], + }], ++ ['OS == "ios"', { ++ 'dependencies!': [ ++ 'skia_chrome_opts', ++ ], ++ }], + [ 'OS != "android" and (OS != "linux" or use_cairo==1)', { + 'sources!': [ + 'ext/bitmap_platform_device_skia.cc', + ], + }], +- [ 'OS != "ios" and target_arch != "arm" and target_arch != "mipsel" and \ +- target_arch != "arm64" and target_arch != "mips64el"', { +- 'sources': [ +- 'ext/convolver_SSE2.cc', +- ], +- }], +- [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ +- 'sources': [ +- 'ext/convolver_mips_dspr2.cc', +- ], +- }], + ], + + 'target_conditions': [ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2017-03-05 17:26:26.239985269 +0100 +@@ -128,6 +128,37 @@ + # targets that are not dependent upon the component type + 'targets': [ + { ++ 'target_name': 'skia_chrome_opts', ++ 'type': 'static_library', ++ 'include_dirs': [ ++ '..', ++ 'config', ++ '../third_party/skia/include/core', ++ ], ++ 'conditions': [ ++ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ ++ target_arch != "arm" and target_arch != "mipsel" and \ ++ target_arch != "arm64" and target_arch != "mips64el"', { ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ [ 'target_arch != "arm" and target_arch != "mipsel" and \ ++ target_arch != "arm64" and target_arch != "mips64el"', { ++ 'sources': [ ++ 'ext/convolver_SSE2.cc', ++ 'ext/convolver_SSE2.h', ++ ], ++ }], ++ [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ ++ 'sources': [ ++ 'ext/convolver_mips_dspr2.cc', ++ 'ext/convolver_mips_dspr2.h', ++ ], ++ }], ++ ], ++ }, ++ { + 'target_name': 'image_operations_bench', + # The optimize: 'max' scattered throughout are particularly + # important when compiled by MSVC 2013, which seems +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-03-05 17:26:26.239985269 +0100 +@@ -19,10 +19,22 @@ + }, + + 'targets': [ +- # SSE files have to be built in a separate target, because gcc needs +- # different -msse flags for different SSE levels which enable use of SSE +- # intrinsics but also allow emission of SSE2 instructions for scalar code. +- # gyp does not allow per-file compiler flags. ++ # Due to an unfortunate intersection of lameness between gcc and gyp, ++ # we have to build the *_SSE2.cpp files in a separate target. The ++ # gcc lameness is that, in order to compile SSE2 intrinsics code, it ++ # must be passed the -msse2 flag. However, with this flag, it may ++ # emit SSE2 instructions even for scalar code, such as the CPUID ++ # test used to test for the presence of SSE2. So that, and all other ++ # code must be compiled *without* -msse2. The gyp lameness is that it ++ # does not allow file-specific CFLAGS, so we must create this extra ++ # target for those files to be compiled with -msse2. ++ # ++ # This is actually only a problem on 32-bit Linux (all Intel Macs have ++ # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit ++ # SSE2 from instrinsics, which generating plain ol' 386 for everything ++ # else). However, to keep the .gyp file simple and avoid platform-specific ++ # build breakage, we do this on all platforms. ++ + # For about the same reason, we need to compile the ARM opts files + # separately as well. + { +@@ -45,12 +57,13 @@ + ], + 'include_dirs': [ '<@(include_dirs)' ], + 'conditions': [ ++ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ ++ target_arch != "arm" and target_arch != "arm64" and \ ++ target_arch != "mipsel" and target_arch != "mips64el"', { ++ 'cflags': [ '-msse2' ], ++ }], + [ 'target_arch != "arm" and target_arch != "mipsel" and \ + target_arch != "arm64" and target_arch != "mips64el"', { +- # Chrome builds with -msse2 locally, so sse2_sources could in theory +- # be in the regular skia target. But we need skia_opts for arm +- # anyway, so putting sse2_sources here is simpler than making this +- # conditionally a type none target on x86. + 'sources': [ '<@(sse2_sources)' ], + 'dependencies': [ + 'skia_opts_ssse3', +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-03-05 17:26:26.240985255 +0100 +@@ -31,8 +31,8 @@ + ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- defines = [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines = [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ "qcms_sse2" ] + } + } + +@@ -75,3 +75,15 @@ + public_configs = [ ":qcms_config" ] + } + } ++ ++source_set("qcms_sse2") { ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] ++ public_configs = [ ":qcms_config" ] ++ ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ defines = [ "SSE2_ENABLE" ] ++ sources = [ "src/transform-sse2.c" ] ++ cflags = [ "-msse2" ] ++ } ++} +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-03-05 18:01:48.843328633 +0100 +@@ -52,10 +52,10 @@ + 'conditions': [ + ['target_arch=="ia32" or target_arch=="x64"', { + 'defines': [ +- 'SSE2_ENABLE', ++ 'SSE2_ENABLE', # runtime detection + ], +- 'sources': [ +- 'src/transform-sse2.c', ++ 'dependencies': [ ++ 'qcms_sse2', + ], + }], + ], +@@ -68,6 +68,29 @@ + }], + ], + }, ++ { ++ 'target_name': 'qcms_sse2', ++ 'type': 'static_library', ++ 'conditions': [ ++ ['target_arch == "ia32" or target_arch == "x64"', { ++ 'defines': [ ++ 'SSE2_ENABLE', ++ ], ++ 'sources': [ ++ # Conditional compilation for SSE2 code on x86 and x64 machines ++ 'src/transform-sse2.c', ++ ], ++ 'cflags': [ ++ '-msse2', ++ ], ++ }], ++ ], ++ 'direct_dependent_settings': { ++ 'include_dirs': [ ++ './src', ++ ], ++ }, ++ }, + ], + 'conditions': [ + ['disable_qcms == 0', { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-03-05 17:26:26.240985255 +0100 +@@ -32,7 +32,7 @@ #include "wtf/MathExtras.h" #include @@ -1769,37 +2032,36 @@ index 8e558f439..20ba17688 100644 #include #endif -@@ -662,7 +662,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, - // the next event. - if (nextEventType == ParamEvent::LinearRampToValue) { - const float valueDelta = value2 - value1; +@@ -575,7 +575,7 @@ + // First handle linear and exponential ramps which require looking ahead to the next event. + if (nextEventType == ParamEvent::LinearRampToValue) { + const float valueDelta = value2 - value1; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - // Minimize in-loop operations. Calculate starting value and increment. - // Next step: value += inc. -@@ -841,7 +841,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, - for (; writeIndex < fillToFrame; ++writeIndex) - values[writeIndex] = target; - } else { + // Minimize in-loop operations. Calculate starting value and increment. Next step: value += inc. + // value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1); + // inc = 4 / sampleRate * k * (value2 - value1); +@@ -738,7 +738,7 @@ + for (; writeIndex < fillToFrame; ++writeIndex) + values[writeIndex] = target; + } else { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - // Resolve recursion by expanding constants to achieve a 4-step - // loop unrolling. -@@ -959,7 +959,7 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, - // Oversampled curve data can be provided if sharp discontinuities are - // desired. - unsigned k = 0; + // Resolve recursion by expanding constants to achieve a 4-step loop unrolling. + // v1 = v0 + (t - v0) * c + // v2 = v1 + (t - v1) * c +@@ -843,7 +843,7 @@ + // Render the stretched curve data using linear interpolation. Oversampled + // curve data can be provided if sharp discontinuities are desired. + unsigned k = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); - const __m128 vCurvePointsPerFrame = -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp -index a77ec195c..d76c2d015 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp + const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); + const __m128 vCurvePointsPerFrame = _mm_set_ps1(curvePointsPerFrame); + const __m128 vNumberOfCurvePointsM1 = _mm_set_ps1(numberOfCurvePoints - 1); +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-03-05 18:09:17.132624414 +0100 @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -1810,7 +2072,7 @@ index a77ec195c..d76c2d015 100644 #include "platform/audio/DirectConvolver.h" #if OS(MACOSX) -@@ -35,21 +38,45 @@ +@@ -35,22 +38,44 @@ #include "platform/audio/VectorMath.h" #include "wtf/CPU.h" @@ -1830,68 +2092,68 @@ index a77ec195c..d76c2d015 100644 +#ifndef BUILD_ONLY_THE_SSE2_PARTS + DirectConvolver::DirectConvolver(size_t inputBlockSize) -- : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) {} -+ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) -+{ + : m_inputBlockSize(inputBlockSize) + , m_buffer(inputBlockSize * 2) + { +#if CPU(X86) + base::CPU cpu; + m_haveSSE2 = cpu.has_sse2(); +#endif -+} -+#endif + } ++#endif ++ +#ifdef BUILD_ONLY_THE_SSE2_PARTS +void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) +#else - void DirectConvolver::process(AudioFloatArray* convolutionKernel, - const float* sourceP, - float* destP, -- size_t framesToProcess) { -+ size_t framesToProcess) + void DirectConvolver::process(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) +#endif -+{ -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + { ++#if CPU(X86) && !defined(__SSE2__) + if (m_haveSSE2) { + m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); + return; + } +#endif - ASSERT(framesToProcess == m_inputBlockSize); - if (framesToProcess != m_inputBlockSize) - return; -@@ -83,7 +110,7 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, - #endif // CPU(X86) + ASSERT(framesToProcess == m_inputBlockSize); + if (framesToProcess != m_inputBlockSize) + return; +@@ -82,7 +107,7 @@ + #endif // CPU(X86) #else - size_t i = 0; + size_t i = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Convolution using SSE2. Currently only do this if both |kernelSize| and - // |framesToProcess| are multiples of 4. If not, use the straightforward loop - // below. -@@ -397,7 +424,7 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, - } - destP[i++] = sum; + // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| + // are multiples of 4. If not, use the straightforward loop below. + +@@ -392,7 +417,7 @@ + } + destP[i++] = sum; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif - #endif // OS(MACOSX) -@@ -406,8 +433,9 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, - memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); + #endif // OS(MACOSX) +@@ -401,10 +426,14 @@ + memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); } +#ifndef BUILD_ONLY_THE_SSE2_PARTS - void DirectConvolver::reset() { - m_buffer.zero(); ++ + void DirectConvolver::reset() + { + m_buffer.zero(); } -- + +#endif - } // namespace blink -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h -index 848f6aa73..78ea0d84c 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ++ + } // namespace blink + +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-03-05 17:26:26.241985240 +0100 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -1900,23 +2162,27 @@ index 848f6aa73..78ea0d84c 100644 #include "wtf/Noncopyable.h" namespace blink { -@@ -54,6 +55,12 @@ class PLATFORM_EXPORT DirectConvolver { - size_t m_inputBlockSize; +@@ -50,6 +51,11 @@ + size_t m_inputBlockSize; - AudioFloatArray m_buffer; + AudioFloatArray m_buffer; + +#if CPU(X86) + bool m_haveSSE2; + void m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess); +#endif -+ }; - } // namespace blink -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp -index e7ca2c77d..a0ad93953 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-03-05 17:26:26.242985225 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "DirectConvolver.cpp" +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-03-05 17:26:26.242985225 +0100 @@ -26,15 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -1940,64 +2206,60 @@ index e7ca2c77d..a0ad93953 100644 + // Input buffer layout, dividing the total buffer into regions (r0 - r5): // - // |----------------|-----------------------------------------|----------------| -@@ -66,6 +73,8 @@ + // |----------------|----------------------------------------------------------------|----------------| +@@ -64,6 +71,8 @@ namespace blink { +#ifndef BUILD_ONLY_THE_SSE2_PARTS + - SincResampler::SincResampler(double scaleFactor, - unsigned kernelSize, - unsigned numberOfKernelOffsets) -@@ -81,6 +90,10 @@ SincResampler::SincResampler(double scaleFactor, - m_sourceFramesAvailable(0), - m_sourceProvider(nullptr), - m_isBufferPrimed(false) { + SincResampler::SincResampler(double scaleFactor, unsigned kernelSize, unsigned numberOfKernelOffsets) + : m_scaleFactor(scaleFactor) + , m_kernelSize(kernelSize) +@@ -77,6 +86,10 @@ + , m_sourceProvider(nullptr) + , m_isBufferPrimed(false) + { +#if CPU(X86) + base::CPU cpu; + m_haveSSE2 = cpu.has_sse2(); +#endif - initializeKernel(); + initializeKernel(); } -@@ -200,10 +213,22 @@ void SincResampler::process(const float* source, - remaining -= framesThisTime; - } +@@ -193,8 +206,20 @@ + } } -+#endif //BUILD_ONLY_THE_SSE2_PARTS ++#endif ++ +#ifdef BUILD_ONLY_THE_SSE2_PARTS +void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) +#else - void SincResampler::process(AudioSourceProvider* sourceProvider, - float* destination, -- size_t framesToProcess) { -+ size_t framesToProcess) + void SincResampler::process(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) +#endif -+{ + { +#if CPU(X86) && !defined(__SSE2__) + if (m_haveSSE2) { + m_processSSE2(sourceProvider, destination, framesToProcess); + return; + } +#endif - bool isGood = sourceProvider && m_blockSize > m_kernelSize && - m_inputBuffer.size() >= m_blockSize + m_kernelSize && - !(m_kernelSize % 2); -@@ -269,7 +294,7 @@ void SincResampler::process(AudioSourceProvider* sourceProvider, - { - float input; + bool isGood = sourceProvider && m_blockSize > m_kernelSize && m_inputBuffer.size() >= m_blockSize + m_kernelSize && !(m_kernelSize % 2); + ASSERT(isGood); + if (!isGood) +@@ -256,7 +281,7 @@ + { + float input; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // If the sourceP address is not 16-byte aligned, the first several - // frames (at most three) should be processed seperately. - while ((reinterpret_cast(inputP) & 0x0F) && n) { -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h -index b96ec94cf..4b6b3293e 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. + while ((reinterpret_cast(inputP) & 0x0F) && n) { + CONVOLVE_ONE_SAMPLE +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-03-05 17:26:26.305984290 +0100 @@ -33,6 +33,7 @@ #include "platform/audio/AudioArray.h" #include "platform/audio/AudioSourceProvider.h" @@ -2006,25 +2268,29 @@ index b96ec94cf..4b6b3293e 100644 #include "wtf/Noncopyable.h" namespace blink { -@@ -96,6 +97,12 @@ class PLATFORM_EXPORT SincResampler { +@@ -84,6 +85,11 @@ - // The buffer is primed once at the very beginning of processing. - bool m_isBufferPrimed; + // The buffer is primed once at the very beginning of processing. + bool m_isBufferPrimed; + +#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); ++ bool m_haveSSE2; ++ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); +#endif -+ }; }; - } // namespace blink -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp -index 8f3592cd7..ba9fc1a73 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp -@@ -23,6 +23,9 @@ - * DAMAGE. + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-03-05 17:26:26.305984290 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "SincResampler.cpp" +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-03-05 17:26:26.306984275 +0100 +@@ -22,6 +22,9 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// include this first to get it before the CPU() function-like macro @@ -2033,7 +2299,7 @@ index 8f3592cd7..ba9fc1a73 100644 #include "platform/audio/VectorMath.h" #include "wtf/Assertions.h" #include "wtf/CPU.h" -@@ -33,10 +36,14 @@ +@@ -32,10 +35,14 @@ #include #endif @@ -2049,7 +2315,7 @@ index 8f3592cd7..ba9fc1a73 100644 #if HAVE(ARM_NEON_INTRINSICS) #include #endif -@@ -165,15 +172,30 @@ void vclip(const float* sourceP, +@@ -118,11 +125,25 @@ } #else @@ -2061,181 +2327,167 @@ index 8f3592cd7..ba9fc1a73 100644 +static base::CPU cpu; +#endif + - void vsma(const float* sourceP, - int sourceStride, - const float* scale, - float* destP, - int destStride, - size_t framesToProcess) { -- int n = framesToProcess; + void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, destStride, framesToProcess); + return; + } +#endif -+ -+int n = framesToProcess; + int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; + +@@ -193,9 +214,15 @@ -@@ -269,9 +291,16 @@ void vsmul(const float* sourceP, - float* destP, - int destStride, - size_t framesToProcess) { + void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess); + return; + } +#endif -+ - int n = framesToProcess; + int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; -@@ -360,7 +389,7 @@ void vsmul(const float* sourceP, - sourceP += sourceStride; - destP += destStride; +@@ -266,16 +293,22 @@ + sourceP += sourceStride; + destP += destStride; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif } -@@ -372,9 +401,16 @@ void vadd(const float* source1P, - float* destP, - int destStride, - size_t framesToProcess) { -- int n = framesToProcess; + + void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); + return; + } +#endif + int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) -+ int n = framesToProcess; -+ +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -501,7 +537,7 @@ void vadd(const float* source1P, - source2P += sourceStride2; - destP += destStride; + if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(source1P) & 0x0F) && n) { +@@ -378,17 +411,23 @@ + source2P += sourceStride2; + destP += destStride; } -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } + } #endif } -@@ -513,9 +549,16 @@ void vmul(const float* source1P, - float* destP, - int destStride, - size_t framesToProcess) { -- int n = framesToProcess; + + void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); + return; + } +#endif -+ -+int n = framesToProcess; + + int n = framesToProcess; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the source1P address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -614,8 +657,15 @@ void zvmul(const float* real1P, - float* realDestP, - float* imagDestP, - size_t framesToProcess) { + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(source1P) & 0x0F) && n) { +@@ -460,8 +499,14 @@ + + void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, imagDestP, framesToProcess); + return; + } +#endif -+ - unsigned i = 0; + unsigned i = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Only use the SSE optimization in the very common case that all addresses - // are 16-byte aligned. Otherwise, fall through to the scalar code below. - if (!(reinterpret_cast(real1P) & 0x0F) && -@@ -671,10 +721,17 @@ void vsvesq(const float* sourceP, - int sourceStride, - float* sumP, - size_t framesToProcess) { -- int n = framesToProcess; + // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. + // Otherwise, fall through to the scalar code below. + if (!(reinterpret_cast(real1P) & 0x0F) +@@ -516,10 +561,16 @@ + + void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, framesToProcess); + return; + } +#endif -+ -+ int n = framesToProcess; - float sum = 0; + int n = framesToProcess; + float sum = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -740,10 +797,16 @@ void vmaxmgv(const float* sourceP, - int sourceStride, - float* maxP, - size_t framesToProcess) { + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(sourceP) & 0x0F) && n) { +@@ -581,10 +632,16 @@ + + void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess) + { +#if CPU(X86) && !defined(__SSE2__) + if (cpu.has_sse2()) { + blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, framesToProcess); + return; + } +#endif - int n = framesToProcess; - float max = 0; + int n = framesToProcess; + float max = 0; -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -839,6 +902,7 @@ void vclip(const float* sourceP, - float* destP, - int destStride, - size_t framesToProcess) { + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. + while ((reinterpret_cast(sourceP) & 0x0F) && n) { +@@ -648,6 +705,8 @@ + *maxP = max; + } + +#ifndef BUILD_ONLY_THE_SSE2_PARTS - int n = framesToProcess; - float lowThreshold = *lowThresholdP; - float highThreshold = *highThresholdP; -@@ -888,6 +952,11 @@ void vclip(const float* sourceP, - destP += destStride; - } ++ + void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess) + { + int n = framesToProcess; +@@ -678,6 +737,12 @@ + } } + +#endif + +#ifdef BUILD_ONLY_THE_SSE2_PARTS +} // namespace SSE2 +#endif ++ + #endif // OS(MACOSX) - #endif // OS(MACOSX) - -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h -index 8f375071c..d92e5b85e 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h -@@ -27,6 +27,7 @@ + } // namespace VectorMath +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-03-05 17:26:26.306984275 +0100 +@@ -26,6 +26,7 @@ #define VectorMath_h #include "platform/PlatformExport.h" @@ -2243,9 +2495,9 @@ index 8f375071c..d92e5b85e 100644 #include "wtf/build_config.h" #include -@@ -97,6 +98,28 @@ PLATFORM_EXPORT void vclip(const float* sourceP, - int destStride, - size_t framesToProcess); +@@ -55,6 +56,28 @@ + // Copies elements while clipping values to the threshold inputs. + PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); +#if CPU(X86) +namespace SSE2 { @@ -2269,13 +2521,70 @@ index 8f375071c..d92e5b85e 100644 +} +#endif + - } // namespace VectorMath - } // namespace blink - -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h -index e30fcb464..4b3437057 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h + } // namespace VectorMath + } // namespace blink + +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-03-05 17:26:26.307984260 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "VectorMath.cpp" +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-03-05 17:26:26.307984260 +0100 +@@ -392,6 +392,11 @@ + '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', + ], + }], ++ ['target_arch == "ia32"', { ++ 'dependencies': [ ++ 'blink_sse2', ++ ], ++ }], + ['target_arch=="arm"', { + 'dependencies': [ + 'blink_arm_neon', +@@ -406,6 +411,36 @@ + }], + ], + }, ++ { ++ 'target_name': 'blink_sse2', ++ 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'type': 'static_library', ++ 'dependencies': [ ++ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', ++ '../config.gyp:config', ++ '../wtf/wtf.gyp:wtf', ++ 'blink_common', ++ 'blink_heap_asm_stubs', ++ ], ++ 'defines': [ ++ 'BLINK_PLATFORM_IMPLEMENTATION=1', ++ 'INSIDE_BLINK', ++ ], ++ 'sources': [ ++ 'audio/DirectConvolverSSE2.cpp', ++ 'audio/SincResamplerSSE2.cpp', ++ 'audio/VectorMathSSE2.cpp', ++ ], ++ 'cflags': [ ++ '-msse2', ++ '-mfpmath=sse', ++ ], ++ },{ # target_arch != "ia32" ++ 'type': 'none', ++ }], ++ ], ++ }, + # The *NEON.cpp files fail to compile when -mthumb is passed. Force + # them to build in ARM mode. + # See https://bugs.webkit.org/show_bug.cgi?id=62916. +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-03-05 17:26:26.308984245 +0100 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2285,100 +2594,66 @@ index e30fcb464..4b3437057 100644 #include -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp -index be417ea88..e79034424 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp -@@ -441,7 +441,7 @@ void unpack( - const uint32_t* source32 = reinterpret_cast_ptr(source); - uint32_t* destination32 = reinterpret_cast_ptr(destination); +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-03-05 17:26:26.309984231 +0100 +@@ -423,7 +423,7 @@ + const uint32_t* source32 = reinterpret_cast_ptr(source); + uint32_t* destination32 = reinterpret_cast_ptr(destination); -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); + SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -467,7 +467,7 @@ void unpack( - const uint16_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { + for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -442,7 +442,7 @@ + + template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) + { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); + SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -496,7 +496,7 @@ void unpack( - const uint16_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { +@@ -464,7 +464,7 @@ + + template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) + { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); + SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(ARM_NEON_INTRINSICS) -@@ -711,7 +711,7 @@ void pack(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { +@@ -630,7 +630,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); + SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -768,7 +768,7 @@ void pack(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { + for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -667,7 +667,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); + SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -880,7 +880,7 @@ void pack(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { + for (unsigned i = 0; i < pixelsPerRow; ++i) { +@@ -741,7 +741,7 @@ + // FIXME: this routine is lossy and must be removed. + template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) + { -#if CPU(X86) || CPU(X86_64) +#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -diff --git a/src/3rdparty/chromium/third_party/qcms/BUILD.gn b/src/3rdparty/chromium/third_party/qcms/BUILD.gn -index 1183569be..771dd02c8 100644 ---- a/src/3rdparty/chromium/third_party/qcms/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/qcms/BUILD.gn -@@ -30,8 +30,8 @@ static_library("qcms") { - ] - - if (current_cpu == "x86" || current_cpu == "x64") { -- defines = [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ "qcms_sse2" ] - } - } - -@@ -74,3 +74,16 @@ if (!disable_qcms) { - public_configs = [ ":qcms_config" ] - } - } -+ -+source_set("qcms_sse2") { -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ public_configs = [ ":qcms_config" ] -+ -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ defines = [ "SSE2_ENABLE" ] -+ sources = [ "src/transform-sse2.c" ] -+ cflags = [ "-msse2" ] -+ } -+} -+ -diff --git a/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc b/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc -index e721346f3..ef5a4e4a7 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc -+++ b/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc + SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); + #else + for (unsigned i = 0; i < pixelsPerRow; ++i) { +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-03-05 18:14:44.694725685 +0100 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2387,7 +2662,7 @@ index e721346f3..ef5a4e4a7 100644 namespace webrtc { -@@ -23,7 +24,15 @@ const size_t RealFourier::kFftBufferAlignment = 32; +@@ -23,7 +24,15 @@ std::unique_ptr RealFourier::Create(int fft_order) { #if defined(RTC_USE_OPENMAX_DL) @@ -2403,15 +2678,34 @@ index e721346f3..ef5a4e4a7 100644 #else return std::unique_ptr(new RealFourierOoura(fft_order)); #endif -diff --git a/src/3rdparty/chromium/v8/BUILD.gn b/src/3rdparty/chromium/v8/BUILD.gn -index 9b209dfff..d88261d53 100644 ---- a/src/3rdparty/chromium/v8/BUILD.gn -+++ b/src/3rdparty/chromium/v8/BUILD.gn -@@ -1769,43 +1769,41 @@ v8_static_library("v8_base") { - - if (v8_current_cpu == "x86") { - sources += [ ### gcmole(arch:ia32) ### -- "src/builtins/ia32/builtins-ia32.cc", +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-03-05 17:26:26.310984216 +0100 +@@ -1345,6 +1345,8 @@ + # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. + prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] + prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] ++ if len(solibs): ++ prefixed_solibs = ['$$PWD/' + so for so in toAbsPaths(solibs)] + + pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) + pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) +@@ -1353,6 +1355,8 @@ + pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) + else: + pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) ++ if len(solibs): ++ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_solibs))) + # External libs have to come after objects/archives, the linker resolve them in order. + pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) + # Make sure that if ninja modifies one of the inputs, qmake/make will link again. +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-03-05 18:22:29.296777508 +0100 +@@ -1523,41 +1523,41 @@ + + if (v8_target_cpu == "x86") { + sources += [ - "src/compiler/ia32/code-generator-ia32.cc", - "src/compiler/ia32/instruction-codes-ia32.h", - "src/compiler/ia32/instruction-scheduler-ia32.cc", @@ -2427,6 +2721,7 @@ index 9b209dfff..d88261d53 100644 - "src/ia32/assembler-ia32-inl.h", - "src/ia32/assembler-ia32.cc", - "src/ia32/assembler-ia32.h", +- "src/ia32/builtins-ia32.cc", - "src/ia32/code-stubs-ia32.cc", - "src/ia32/code-stubs-ia32.h", - "src/ia32/codegen-ia32.cc", @@ -2439,8 +2734,6 @@ index 9b209dfff..d88261d53 100644 - "src/ia32/interface-descriptors-ia32.cc", - "src/ia32/macro-assembler-ia32.cc", - "src/ia32/macro-assembler-ia32.h", -- "src/ia32/simulator-ia32.cc", -- "src/ia32/simulator-ia32.h", - "src/ic/ia32/access-compiler-ia32.cc", - "src/ic/ia32/handler-compiler-ia32.cc", - "src/ic/ia32/ic-compiler-ia32.cc", @@ -2484,13 +2777,37 @@ index 9b209dfff..d88261d53 100644 + "src/regexp/x87/regexp-macro-assembler-x87.cc", + "src/regexp/x87/regexp-macro-assembler-x87.h", ] - } else if (v8_current_cpu == "x64") { - sources += [ ### gcmole(arch:x64) ### -diff --git a/src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh b/src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh -new file mode 100644 -index 000000000..0e7ec1621 ---- /dev/null -+++ b/src/3rdparty/chromium/v8/src/make-v8-sse2-gyp.sh + } else if (v8_target_cpu == "x64") { + sources += [ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-03-05 18:20:24.988636550 +0100 +@@ -159,6 +159,9 @@ + }, { + 'gomadir': '>v8_sse2.gyp -diff --git a/src/3rdparty/chromium/v8/src/v8.gyp b/src/3rdparty/chromium/v8/src/v8.gyp -index 020ec0928..2add932fc 100644 ---- a/src/3rdparty/chromium/v8/src/v8.gyp -+++ b/src/3rdparty/chromium/v8/src/v8.gyp -@@ -51,8 +51,8 @@ +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-03-05 17:30:17.500552662 +0100 +@@ -36,6 +36,14 @@ + 'v8_experimental_extra_library_files%': [], + 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', + 'remove_v8base_debug_symbols%': 0, ++ 'conditions': [ ++ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds ++ ['target_arch == "ia32"', { ++ 'v8_component%': 'shared_library', ++ }, { ++ 'v8_component%': '<(component)', ++ }], ++ ], + }, + 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], + 'targets': [ +@@ -49,8 +57,8 @@ }, { 'toolsets': ['target'], }], @@ -2563,16 +2894,16 @@ index 020ec0928..2add932fc 100644 'sources': [ # Note: on non-Windows we still build this file so that gyp # has some sources to link into the component. -@@ -151,7 +151,7 @@ +@@ -161,7 +169,7 @@ 'js2c', ], }], - ['component=="shared_library"', { + ['v8_component=="shared_library"', { 'defines': [ + 'V8_SHARED', 'BUILDING_V8_SHARED', - ], -@@ -243,7 +243,7 @@ +@@ -253,7 +261,7 @@ 'toolsets': ['target'], 'dependencies': ['js2c'], }], @@ -2580,17 +2911,17 @@ index 020ec0928..2add932fc 100644 + ['v8_component=="shared_library"', { 'defines': [ 'BUILDING_V8_SHARED', - ], -@@ -270,7 +270,7 @@ + 'V8_SHARED', +@@ -281,7 +289,7 @@ 'natives_blob', ], }], - ['component=="shared_library"', { + ['v8_component=="shared_library"', { 'defines': [ + 'V8_SHARED', 'BUILDING_V8_SHARED', - ], -@@ -1727,7 +1727,7 @@ +@@ -1608,7 +1616,7 @@ # See http://crbug.com/485155. 'msvs_shard': 4, }], @@ -2598,12 +2929,10 @@ index 020ec0928..2add932fc 100644 + ['v8_component=="shared_library"', { 'defines': [ 'BUILDING_V8_SHARED', - ], -diff --git a/src/3rdparty/chromium/v8/src/v8_sse2.gyp b/src/3rdparty/chromium/v8/src/v8_sse2.gyp -new file mode 100644 -index 000000000..140b071a6 ---- /dev/null -+++ b/src/3rdparty/chromium/v8/src/v8_sse2.gyp + 'V8_SHARED', +diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 @@ -0,0 +1,2313 @@ +# Generated from v8.gyp by make-v8-sse2-gyp.sh +# Copyright 2012 the V8 project authors. All rights reserved. @@ -4918,12 +5247,11 @@ index 000000000..140b071a6 + }, + ], +} -diff --git a/src/core/core_module.pro b/src/core/core_module.pro -index 44e8ac613..7fe1a49e9 100644 ---- a/src/core/core_module.pro -+++ b/src/core/core_module.pro -@@ -10,6 +10,29 @@ linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri - error("Could not find the linking information that gn should have generated.") +diff -Nur qtwebengine-opensource-src-5.8.0/src/core/core_module.pro qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.8.0/src/core/core_module.pro 2017-01-03 11:35:11.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/core_module.pro 2017-03-05 17:30:17.502552632 +0100 +@@ -9,6 +9,29 @@ + error("Could not find the linking information that gyp should have generated.") } +# find the shared libraries in the link line @@ -4952,7 +5280,7 @@ index 44e8ac613..7fe1a49e9 100644 load(qt_module) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() -@@ -100,7 +123,12 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat +@@ -74,7 +97,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -4966,6 +5294,18 @@ index 44e8ac613..7fe1a49e9 100644 !use?(system_icu) { icu.CONFIG += no_check_exist --- -2.13.0 - +diff -Nur qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi +--- qtwebengine-opensource-src-5.8.0/src/core/qtwebengine.gypi 2017-01-03 11:35:11.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-no-sse2/src/core/qtwebengine.gypi 2017-03-05 17:30:17.503552617 +0100 +@@ -63,6 +63,11 @@ + }, + }, + 'conditions': [ ++ ['target_arch=="ia32"', { ++ 'dependencies': [ ++ '<(chromium_src_dir)/v8/src/v8_sse2.gyp:v8_sse2', ++ ], ++ }], + ['OS=="win" and win_use_allocator_shim==1', { + 'dependencies': [ + '<(chromium_src_dir)/base/allocator/allocator.gyp:allocator', diff --git a/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch b/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch new file mode 100644 index 0000000..ce2c180 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch @@ -0,0 +1,600 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/app.cpp 2017-03-06 13:04:01.784297561 +0100 +@@ -454,7 +454,7 @@ + } + + void app::ClearTimerCommon(const CJS_Value& param) { +- if (param.GetType() != CJS_Value::VT_fxobject) ++ if (param.GetType() != CJS_Value::VT_object) + return; + + v8::Local pObj = param.ToV8Object(); +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-03-06 13:04:01.783297575 +0100 +@@ -411,22 +411,20 @@ + + int nlength = params.size(); + if (nlength == 9) { +- if (params[8].GetType() == CJS_Value::VT_fxobject) { ++ if (params[8].GetType() == CJS_Value::VT_object) { + v8::Local pObj = params[8].ToV8Object(); +- { +- if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { +- if (CJS_Object* pJSObj = params[8].ToCJSObject()) { +- if (PrintParamsObj* pprintparamsObj = +- (PrintParamsObj*)pJSObj->GetEmbedObject()) { +- bUI = pprintparamsObj->bUI; +- nStart = pprintparamsObj->nStart; +- nEnd = pprintparamsObj->nEnd; +- bSilent = pprintparamsObj->bSilent; +- bShrinkToFit = pprintparamsObj->bShrinkToFit; +- bPrintAsImage = pprintparamsObj->bPrintAsImage; +- bReverse = pprintparamsObj->bReverse; +- bAnnotations = pprintparamsObj->bAnnotations; +- } ++ if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { ++ if (CJS_Object* pJSObj = params[8].ToCJSObject()) { ++ if (PrintParamsObj* pprintparamsObj = ++ static_cast(pJSObj->GetEmbedObject())) { ++ bUI = pprintparamsObj->bUI; ++ nStart = pprintparamsObj->nStart; ++ nEnd = pprintparamsObj->nEnd; ++ bSilent = pprintparamsObj->bSilent; ++ bShrinkToFit = pprintparamsObj->bShrinkToFit; ++ bPrintAsImage = pprintparamsObj->bPrintAsImage; ++ bReverse = pprintparamsObj->bReverse; ++ bAnnotations = pprintparamsObj->bAnnotations; + } + } + } +@@ -597,18 +595,16 @@ + v8::Local pObj = params[0].ToV8Object(); + v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"cURL"); + if (!pValue.IsEmpty()) +- strURL = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ strURL = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"bFDF"); +- bFDF = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); ++ bFDF = CJS_Value(pRuntime, pValue).ToBool(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"bEmpty"); +- bEmpty = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); ++ bEmpty = CJS_Value(pRuntime, pValue).ToBool(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"aFields"); +- aFields.Attach( +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array()); ++ aFields.Attach(CJS_Value(pRuntime, pValue).ToV8Array()); + } + + CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); +@@ -691,25 +687,22 @@ + v8::Local pObj = params[0].ToV8Object(); + + v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"bUI"); +- bUI = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToInt(); ++ bUI = CJS_Value(pRuntime, pValue).ToInt(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cTo"); +- cTo = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cTo = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cCc"); +- cCc = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cCc = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cBcc"); +- cBcc = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cBcc = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cSubject"); +- cSubject = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cSubject = CJS_Value(pRuntime, pValue).ToCFXWideString(); + + pValue = FXJS_GetObjectElement(isolate, pObj, L"cMsg"); +- cMsg = +- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); ++ cMsg = CJS_Value(pRuntime, pValue).ToCFXWideString(); + } + + pRuntime->BeginBlock(); +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-03-06 13:04:01.785297546 +0100 +@@ -17,63 +17,6 @@ + #include "fpdfsdk/javascript/cjs_context.h" + #include "fpdfsdk/javascript/resource.h" + +-// Helper class for compile-time calculation of hash values in order to +-// avoid having global object initializers. +-template +-struct CHash; +- +-// Only needed to hash single-character strings. +-template +-struct CHash { +- static const unsigned value = N; +-}; +- +-template +-struct CHash { +- static const unsigned value = (ACC * 1313LLU + N) & 0xFFFFFFFF; +-}; +- +-template +-struct CHash { +- static const unsigned value = CHash::value, Ns...>::value; +-}; +- +-const unsigned int JSCONST_nStringHash = +- CHash<'s', 't', 'r', 'i', 'n', 'g'>::value; +-const unsigned int JSCONST_nNumberHash = +- CHash<'n', 'u', 'm', 'b', 'e', 'r'>::value; +-const unsigned int JSCONST_nBoolHash = +- CHash<'b', 'o', 'o', 'l', 'e', 'a', 'n'>::value; +-const unsigned int JSCONST_nDateHash = CHash<'d', 'a', 't', 'e'>::value; +-const unsigned int JSCONST_nObjectHash = +- CHash<'o', 'b', 'j', 'e', 'c', 't'>::value; +-const unsigned int JSCONST_nFXobjHash = CHash<'f', 'x', 'o', 'b', 'j'>::value; +-const unsigned int JSCONST_nNullHash = CHash<'n', 'u', 'l', 'l'>::value; +-const unsigned int JSCONST_nUndefHash = +- CHash<'u', 'n', 'd', 'e', 'f', 'i', 'n', 'e', 'd'>::value; +- +-static unsigned JS_CalcHash(const wchar_t* main) { +- return (unsigned)FX_HashCode_GetW(CFX_WideStringC(main), false); +-} +- +-#ifndef NDEBUG +-class HashVerify { +- public: +- HashVerify(); +-} g_hashVerify; +- +-HashVerify::HashVerify() { +- ASSERT(JSCONST_nStringHash == JS_CalcHash(kFXJSValueNameString)); +- ASSERT(JSCONST_nNumberHash == JS_CalcHash(kFXJSValueNameNumber)); +- ASSERT(JSCONST_nBoolHash == JS_CalcHash(kFXJSValueNameBoolean)); +- ASSERT(JSCONST_nDateHash == JS_CalcHash(kFXJSValueNameDate)); +- ASSERT(JSCONST_nObjectHash == JS_CalcHash(kFXJSValueNameObject)); +- ASSERT(JSCONST_nFXobjHash == JS_CalcHash(kFXJSValueNameFxobj)); +- ASSERT(JSCONST_nNullHash == JS_CalcHash(kFXJSValueNameNull)); +- ASSERT(JSCONST_nUndefHash == JS_CalcHash(kFXJSValueNameUndefined)); +-} +-#endif +- + BEGIN_JS_STATIC_CONST(CJS_Global) + END_JS_STATIC_CONST() + +@@ -335,9 +278,8 @@ + CFX_WideString ws = + FXJS_ToString(isolate, FXJS_GetArrayElement(isolate, pKeyList, i)); + CFX_ByteString sKey = ws.UTF8Encode(); +- + v8::Local v = FXJS_GetObjectElement(isolate, pObj, ws); +- switch (GET_VALUE_TYPE(v)) { ++ switch (CJS_Value::GetValueType(v)) { + case CJS_Value::VT_number: { + CJS_KeyValue* pObjElement = new CJS_KeyValue; + pObjElement->nType = JS_GLOBALDATA_TYPE_NUMBER; +@@ -353,8 +295,7 @@ + array.Add(pObjElement); + } break; + case CJS_Value::VT_string: { +- CFX_ByteString sValue = +- CJS_Value(pRuntime, v, CJS_Value::VT_string).ToCFXByteString(); ++ CFX_ByteString sValue = CJS_Value(pRuntime, v).ToCFXByteString(); + CJS_KeyValue* pObjElement = new CJS_KeyValue; + pObjElement->nType = JS_GLOBALDATA_TYPE_STRING; + pObjElement->sKey = sKey; +@@ -500,26 +441,3 @@ + m_mapGlobal[propname] = pNewData; + return TRUE; + } +- +-CJS_Value::Type GET_VALUE_TYPE(v8::Local p) { +- const unsigned int nHash = JS_CalcHash(FXJS_GetTypeof(p)); +- +- if (nHash == JSCONST_nUndefHash) +- return CJS_Value::VT_undefined; +- if (nHash == JSCONST_nNullHash) +- return CJS_Value::VT_null; +- if (nHash == JSCONST_nStringHash) +- return CJS_Value::VT_string; +- if (nHash == JSCONST_nNumberHash) +- return CJS_Value::VT_number; +- if (nHash == JSCONST_nBoolHash) +- return CJS_Value::VT_boolean; +- if (nHash == JSCONST_nDateHash) +- return CJS_Value::VT_date; +- if (nHash == JSCONST_nObjectHash) +- return CJS_Value::VT_object; +- if (nHash == JSCONST_nFXobjHash) +- return CJS_Value::VT_fxobject; +- +- return CJS_Value::VT_unknown; +-} +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-03-06 13:04:01.783297575 +0100 +@@ -111,7 +111,7 @@ + CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); + C* pObj = reinterpret_cast(pJSObj->GetEmbedObject()); + CFX_WideString sError; +- CJS_PropValue propValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); ++ CJS_PropValue propValue(CJS_Value(pRuntime, value)); + propValue.StartSetting(); + if (!(pObj->*M)(pContext, propValue, sError)) { + FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string, +@@ -149,7 +149,7 @@ + IJS_Context* pContext = pRuntime->GetCurrentContext(); + std::vector parameters; + for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { +- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); ++ parameters.push_back(CJS_Value(pRuntime, info[i])); + } + CJS_Value valueRes(pRuntime); + CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); +@@ -404,7 +404,7 @@ + CFX_WideString propname = CFX_WideString::FromUTF8( + CFX_ByteStringC(*utf8_value, utf8_value.length())); + CFX_WideString sError; +- CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); ++ CJS_PropValue PropValue(CJS_Value(pRuntime, value)); + PropValue.StartSetting(); + if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) { + FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError)); +@@ -447,7 +447,7 @@ + IJS_Context* pContext = pRuntime->GetCurrentContext(); + std::vector parameters; + for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { +- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); ++ parameters.push_back(CJS_Value(pRuntime, info[i])); + } + CJS_Value valueRes(pRuntime); + CFX_WideString sError; +@@ -485,6 +485,4 @@ + } \ + } + +-CJS_Value::Type GET_VALUE_TYPE(v8::Local p); +- + #endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-03-06 13:10:30.896809956 +0100 +@@ -22,11 +22,10 @@ + return *(double*)g_nan; + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime) +- : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {} ++CJS_Value::CJS_Value(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {} + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t) +- : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {} ++CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue) ++ : m_pValue(pValue), m_pJSRuntime(pRuntime) {} + + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const int& iValue) + : m_pJSRuntime(pRuntime) { +@@ -48,23 +47,11 @@ + operator=(dValue); + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pJsObj) +- : m_pJSRuntime(pRuntime) { +- operator=(pJsObj); +-} +- + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pJsObj) + : m_pJSRuntime(pRuntime) { + operator=(pJsObj); + } + +-CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Document* pJsDoc) +- : m_pJSRuntime(pRuntime) { +- m_eType = VT_object; +- if (pJsDoc) +- m_pValue = pJsDoc->ToV8Object(); +-} +- + CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr) + : m_pJSRuntime(pRuntime) { + operator=(pWstr); +@@ -84,19 +71,17 @@ + + CJS_Value::CJS_Value(const CJS_Value& other) = default; + +-void CJS_Value::Attach(v8::Local pValue, Type t) { ++void CJS_Value::Attach(v8::Local pValue) { + m_pValue = pValue; +- m_eType = t; + } + + void CJS_Value::Attach(CJS_Value* pValue) { + if (pValue) +- Attach(pValue->ToV8Value(), pValue->GetType()); ++ Attach(pValue->ToV8Value()); + } + + void CJS_Value::Detach() { + m_pValue = v8::Local(); +- m_eType = VT_unknown; + } + + int CJS_Value::ToInt() const { +@@ -146,7 +131,7 @@ + + void CJS_Value::MaybeCoerceToNumber() { + bool bAllowNaN = false; +- if (m_eType == VT_string) { ++ if (GetType() == VT_string) { + CFX_ByteString bstr = ToCFXByteString(); + if (bstr.GetLength() == 0) + return; +@@ -162,32 +147,26 @@ + if (std::isnan(num->Value()) && !bAllowNaN) + return; + m_pValue = num; +- m_eType = VT_number; + } + + void CJS_Value::operator=(int iValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), iValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(bool bValue) { + m_pValue = FXJS_NewBoolean(m_pJSRuntime->GetIsolate(), bValue); +- m_eType = VT_boolean; + } + + void CJS_Value::operator=(double dValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), dValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(float fValue) { + m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), fValue); +- m_eType = VT_number; + } + + void CJS_Value::operator=(v8::Local pObj) { + m_pValue = FXJS_NewObject(m_pJSRuntime->GetIsolate(), pObj); +- m_eType = VT_fxobject; + } + + void CJS_Value::operator=(CJS_Object* pObj) { +@@ -195,21 +174,12 @@ + operator=(pObj->ToV8Object()); + } + +-void CJS_Value::operator=(CJS_Document* pJsDoc) { +- m_eType = VT_object; +- if (pJsDoc) { +- m_pValue = pJsDoc->ToV8Object(); +- } +-} +- + void CJS_Value::operator=(const FX_WCHAR* pWstr) { + m_pValue = FXJS_NewString(m_pJSRuntime->GetIsolate(), (wchar_t*)pWstr); +- m_eType = VT_string; + } + + void CJS_Value::SetNull() { + m_pValue = FXJS_NewNull(); +- m_eType = VT_null; + } + + void CJS_Value::operator=(const FX_CHAR* pStr) { +@@ -219,36 +189,34 @@ + void CJS_Value::operator=(CJS_Array& array) { + m_pValue = + FXJS_NewObject2(m_pJSRuntime->GetIsolate(), (v8::Local)array); +- m_eType = VT_object; + } + + void CJS_Value::operator=(CJS_Date& date) { + m_pValue = FXJS_NewDate(m_pJSRuntime->GetIsolate(), (double)date); +- m_eType = VT_date; + } + + void CJS_Value::operator=(CJS_Value value) { + m_pValue = value.ToV8Value(); +- m_eType = value.m_eType; + m_pJSRuntime = value.m_pJSRuntime; + } + +-CJS_Value::Type CJS_Value::GetType() const { +- if (m_pValue.IsEmpty()) ++// static ++CJS_Value::Type CJS_Value::GetValueType(v8::Local value) { ++ if (value.IsEmpty()) + return VT_unknown; +- if (m_pValue->IsString()) ++ if (value->IsString()) + return VT_string; +- if (m_pValue->IsNumber()) ++ if (value->IsNumber()) + return VT_number; +- if (m_pValue->IsBoolean()) ++ if (value->IsBoolean()) + return VT_boolean; +- if (m_pValue->IsDate()) ++ if (value->IsDate()) + return VT_date; +- if (m_pValue->IsObject()) ++ if (value->IsObject()) + return VT_object; +- if (m_pValue->IsNull()) ++ if (value->IsNull()) + return VT_null; +- if (m_pValue->IsUndefined()) ++ if (value->IsUndefined()) + return VT_undefined; + return VT_unknown; + } +@@ -427,7 +395,7 @@ + return; + v8::Local p = + FXJS_GetArrayElement(m_pJSRuntime->GetIsolate(), m_pArray, index); +- value.Attach(p, CJS_Value::VT_object); ++ value.Attach(p); + } + + void CJS_Array::SetElement(unsigned index, CJS_Value value) { +@@ -899,7 +867,7 @@ + v8::Local v8Value = + FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); + if (!v8Value->IsUndefined()) +- result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); ++ result[i] = CJS_Value(pRuntime, v8Value); + } + va_end(ap); + return result; +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-03-06 13:04:01.784297561 +0100 +@@ -27,20 +27,17 @@ + VT_boolean, + VT_date, + VT_object, +- VT_fxobject, + VT_null, + VT_undefined + }; + + CJS_Value(CJS_Runtime* pRuntime); +- CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t); ++ CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue); + CJS_Value(CJS_Runtime* pRuntime, const int& iValue); + CJS_Value(CJS_Runtime* pRuntime, const double& dValue); + CJS_Value(CJS_Runtime* pRuntime, const float& fValue); + CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); +- CJS_Value(CJS_Runtime* pRuntime, v8::Local); +- CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); +- CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); ++ CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); + CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); + CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); + CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); +@@ -49,11 +46,12 @@ + CJS_Value(const CJS_Value& other); + + void SetNull(); +- void Attach(v8::Local pValue, Type t); ++ void Attach(v8::Local pValue); + void Attach(CJS_Value* pValue); + void Detach(); + +- Type GetType() const; ++ static Type GetValueType(v8::Local value); ++ Type GetType() const { return GetValueType(m_pValue); } + int ToInt() const; + bool ToBool() const; + double ToDouble() const; +@@ -66,8 +64,7 @@ + v8::Local ToV8Value() const; + + // Replace the current |m_pValue| with a v8::Number if possible +- // to make one from the current |m_pValue|, updating |m_eType| +- // as appropriate to indicate the result. ++ // to make one from the current |m_pValue|. + void MaybeCoerceToNumber(); + + void operator=(int iValue); +@@ -75,7 +72,6 @@ + void operator=(double val); + void operator=(float val); + void operator=(CJS_Object* val); +- void operator=(CJS_Document* val); + void operator=(v8::Local val); + void operator=(CJS_Array& val); + void operator=(CJS_Date& val); +@@ -91,7 +87,6 @@ + CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } + + protected: +- Type m_eType; + v8::Local m_pValue; + CJS_Runtime* m_pJSRuntime; + }; +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-03-06 13:06:10.884476877 +0100 +@@ -10,15 +10,6 @@ + + #include "core/fxcrt/include/fx_basic.h" + +-const wchar_t kFXJSValueNameString[] = L"string"; +-const wchar_t kFXJSValueNameNumber[] = L"number"; +-const wchar_t kFXJSValueNameBoolean[] = L"boolean"; +-const wchar_t kFXJSValueNameDate[] = L"date"; +-const wchar_t kFXJSValueNameObject[] = L"object"; +-const wchar_t kFXJSValueNameFxobj[] = L"fxobj"; +-const wchar_t kFXJSValueNameNull[] = L"null"; +-const wchar_t kFXJSValueNameUndefined[] = L"undefined"; +- + // Keep this consistent with the values defined in gin/public/context_holder.h + // (without actually requiring a dependency on gin itself for the standalone + // embedders of PDFIum). The value we want to use is: +@@ -540,26 +531,6 @@ + .ToLocalChecked()); + } + +-const wchar_t* FXJS_GetTypeof(v8::Local pObj) { +- if (pObj.IsEmpty()) +- return nullptr; +- if (pObj->IsString()) +- return kFXJSValueNameString; +- if (pObj->IsNumber()) +- return kFXJSValueNameNumber; +- if (pObj->IsBoolean()) +- return kFXJSValueNameBoolean; +- if (pObj->IsDate()) +- return kFXJSValueNameDate; +- if (pObj->IsObject()) +- return kFXJSValueNameObject; +- if (pObj->IsNull()) +- return kFXJSValueNameNull; +- if (pObj->IsUndefined()) +- return kFXJSValueNameUndefined; +- return nullptr; +-} +- + void FXJS_SetPrivate(v8::Isolate* pIsolate, + v8::Local pObj, + void* p) { +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-03-06 13:06:40.283062272 +0100 +@@ -118,15 +118,6 @@ + FXJS_PerIsolateData(); + }; + +-extern const wchar_t kFXJSValueNameString[]; +-extern const wchar_t kFXJSValueNameNumber[]; +-extern const wchar_t kFXJSValueNameBoolean[]; +-extern const wchar_t kFXJSValueNameDate[]; +-extern const wchar_t kFXJSValueNameObject[]; +-extern const wchar_t kFXJSValueNameFxobj[]; +-extern const wchar_t kFXJSValueNameNull[]; +-extern const wchar_t kFXJSValueNameUndefined[]; +- + class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { + void* Allocate(size_t length) override; + void* AllocateUninitialized(size_t length) override; +@@ -209,7 +200,6 @@ + bool bStatic = false); + v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate); + int FXJS_GetObjDefnID(v8::Local pObj); +-const wchar_t* FXJS_GetTypeof(v8::Local pObj); + + void FXJS_SetPrivate(v8::Isolate* pIsolate, + v8::Local pObj, diff --git a/qtwebengine-opensource-src-5.8.0-qt57.patch b/qtwebengine-opensource-src-5.8.0-qt57.patch new file mode 100644 index 0000000..480ae11 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-qt57.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp +--- qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 2017-01-03 04:35:11.000000000 -0600 ++++ qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp 2017-03-24 14:43:55.120363292 -0500 +@@ -109,7 +109,7 @@ net::ProxyConfigService::ConfigAvailabil + } + m_qtApplicationProxy = qtProxy; + m_qtProxyConfig = net::ProxyConfig(); +-#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) ++#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) + if (qtProxy.type() == QNetworkProxy::NoProxy + && QNetworkProxyFactory::usesSystemConfiguration()) { + *config = systemConfig; diff --git a/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch new file mode 100644 index 0000000..dff88b5 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch @@ -0,0 +1,362 @@ +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:50:49.266714740 +0100 +@@ -674,8 +674,6 @@ + 'third_party/dmg_fp/dmg_fp.h', + 'third_party/dmg_fp/dtoa_wrapper.cc', + 'third_party/dmg_fp/g_fmt.cc', +- 'third_party/icu/icu_utf.cc', +- 'third_party/icu/icu_utf.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'threading/non_thread_safe.h', +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:50:49.267714725 +0100 +@@ -801,8 +801,6 @@ + "third_party/dmg_fp/dmg_fp.h", + "third_party/dmg_fp/dtoa_wrapper.cc", + "third_party/dmg_fp/g_fmt.cc", +- "third_party/icu/icu_utf.cc", +- "third_party/icu/icu_utf.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-03-05 16:50:49.267714725 +0100 +@@ -18,7 +18,7 @@ + + #if defined(OS_MACOSX) + #include "base/mac/scoped_cftyperef.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #endif + + #if defined(OS_WIN) +@@ -1150,9 +1150,9 @@ + int* index) { + int codepoint = 0; + while (*index < length && codepoint == 0) { +- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string ++ // U8_NEXT returns a value < 0 in error cases. For purposes of string + // comparison, we just use that value and flag it with DCHECK. +- CBU8_NEXT(string, *index, length, codepoint); ++ U8_NEXT(string, *index, length, codepoint); + DCHECK_GT(codepoint, 0); + if (codepoint > 0) { + // Check if there is a subtable for this upper byte. +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-03-05 16:50:49.268714710 +0100 +@@ -16,7 +16,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "base/values.h" + + namespace base { +@@ -631,8 +631,8 @@ + int32_t next_char = 0; + + while (CanConsume(1)) { +- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. +- CBU8_NEXT(start_pos_, index_, length, next_char); ++ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. ++ U8_NEXT(start_pos_, index_, length, next_char); + if (next_char < 0 || !IsValidCharacter(next_char)) { + ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); + return false; +@@ -725,7 +725,7 @@ + return false; + } + } else if (next_char == '"') { +- --index_; // Rewind by one because of CBU8_NEXT. ++ --index_; // Rewind by one because of U8_NEXT. + out->Swap(&string); + return true; + } else { +@@ -765,10 +765,10 @@ + + // If this is a high surrogate, consume the next code unit to get the + // low surrogate. +- if (CBU16_IS_SURROGATE(code_unit16_high)) { ++ if (U16_IS_SURROGATE(code_unit16_high)) { + // Make sure this is the high surrogate. If not, it's an encoding + // error. +- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) ++ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) + return false; + + // Make sure that the token has more characters to consume the +@@ -785,24 +785,24 @@ + + NextNChars(3); + +- if (!CBU16_IS_TRAIL(code_unit16_low)) { ++ if (!U16_IS_TRAIL(code_unit16_low)) { + return false; + } + + uint32_t code_point = +- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); ++ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); + if (!IsValidCharacter(code_point)) + return false; + + offset = 0; +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_point); + } else { + // Not a surrogate. +- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); ++ DCHECK(U16_IS_SINGLE(code_unit16_high)); + if (!IsValidCharacter(code_unit16_high)) + return false; + +- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); ++ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); + } + + dest_string->append(code_unit8); +@@ -819,9 +819,9 @@ + } else { + char utf8_units[4] = { 0 }; + int offset = 0; +- CBU8_APPEND_UNSAFE(utf8_units, offset, point); ++ U8_APPEND_UNSAFE(utf8_units, offset, point); + dest->Convert(); +- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be ++ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be + // zero terminated at this point. |offset| contains the correct length. + dest->AppendString(std::string(utf8_units, offset)); + } +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-03-05 16:50:49.268714710 +0100 +@@ -14,7 +14,7 @@ + #include "base/strings/stringprintf.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-03-05 16:50:49.404712681 +0100 +@@ -4,13 +4,13 @@ + + #include "base/strings/pattern.h" + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + + namespace { + +-static bool IsWildcard(base_icu::UChar32 character) { ++static bool IsWildcard(UChar32 character) { + return character == '*' || character == '?'; + } + +@@ -37,9 +37,9 @@ + // Check if the chars match, if so, increment the ptrs. + const CHAR* pattern_next = *pattern; + const CHAR* string_next = *string; +- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); ++ UChar32 pattern_char = next(&pattern_next, pattern_end); + if (pattern_char == next(&string_next, string_end) && +- pattern_char != CBU_SENTINEL) { ++ pattern_char != U_SENTINEL) { + *pattern = pattern_next; + *string = string_next; + } else { +@@ -133,20 +133,20 @@ + } + + struct NextCharUTF8 { +- base_icu::UChar32 operator()(const char** p, const char* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char** p, const char* end) { ++ UChar32 c; + int offset = 0; +- CBU8_NEXT(*p, offset, end - *p, c); ++ U8_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } + }; + + struct NextCharUTF16 { +- base_icu::UChar32 operator()(const char16** p, const char16* end) { +- base_icu::UChar32 c; ++ UChar32 operator()(const char16** p, const char16* end) { ++ UChar32 c; + int offset = 0; +- CBU16_NEXT(*p, offset, end - *p, c); ++ U16_NEXT(*p, offset, end - *p, c); + *p += offset; + return c; + } +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-03-05 16:50:49.404712681 +0100 +@@ -8,7 +8,7 @@ + + #include "base/logging.h" + #include "base/strings/string_util.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-03-05 16:50:49.404712681 +0100 +@@ -25,7 +25,7 @@ + #include "base/memory/singleton.h" + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "build/build_config.h" + + namespace base { +@@ -357,19 +357,19 @@ + } + DCHECK_LE(byte_size, + static_cast(std::numeric_limits::max())); +- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. ++ // Note: This cast is necessary because U8_NEXT uses int32_ts. + int32_t truncation_length = static_cast(byte_size); + int32_t char_index = truncation_length - 1; + const char* data = input.data(); + +- // Using CBU8, we will move backwards from the truncation point ++ // Using U8, we will move backwards from the truncation point + // to the beginning of the string looking for a valid UTF8 + // character. Once a full UTF8 character is found, we will + // truncate the string to the end of that character. + while (char_index >= 0) { + int32_t prev = char_index; +- base_icu::UChar32 code_point = 0; +- CBU8_NEXT(data, char_index, truncation_length, code_point); ++ UChar32 code_point = 0; ++ U8_NEXT(data, char_index, truncation_length, code_point); + if (!IsValidCharacter(code_point) || + !IsValidCodepoint(code_point)) { + char_index = prev - 1; +@@ -522,7 +522,7 @@ + + while (char_index < src_len) { + int32_t code_point; +- CBU8_NEXT(src, char_index, src_len, code_point); ++ U8_NEXT(src, char_index, src_len, code_point); + if (!IsValidCharacter(code_point)) + return false; + } +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-03-05 16:50:49.404712681 +0100 +@@ -4,7 +4,7 @@ + + #include "base/strings/utf_string_conversion_utils.h" + +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace base { + +@@ -18,7 +18,7 @@ + // use a signed type for code_point. But this function returns false + // on error anyway, so code_point_out is unsigned. + int32_t code_point; +- CBU8_NEXT(src, *char_index, src_len, code_point); ++ U8_NEXT(src, *char_index, src_len, code_point); + *code_point_out = static_cast(code_point); + + // The ICU macro above moves to the next char, we want to point to the last +@@ -33,16 +33,16 @@ + int32_t src_len, + int32_t* char_index, + uint32_t* code_point) { +- if (CBU16_IS_SURROGATE(src[*char_index])) { +- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || ++ if (U16_IS_SURROGATE(src[*char_index])) { ++ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || + *char_index + 1 >= src_len || +- !CBU16_IS_TRAIL(src[*char_index + 1])) { ++ !U16_IS_TRAIL(src[*char_index + 1])) { + // Invalid surrogate pair. + return false; + } + + // Valid surrogate pair. +- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], ++ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], + src[*char_index + 1]); + (*char_index)++; + } else { +@@ -76,30 +76,30 @@ + } + + +- // CBU8_APPEND_UNSAFE can append up to 4 bytes. ++ // U8_APPEND_UNSAFE can append up to 4 bytes. + size_t char_offset = output->length(); + size_t original_char_offset = char_offset; +- output->resize(char_offset + CBU8_MAX_LENGTH); ++ output->resize(char_offset + U8_MAX_LENGTH); + +- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); + +- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so ++ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so + // it will represent the new length of the string. + output->resize(char_offset); + return char_offset - original_char_offset; + } + + size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { +- if (CBU16_LENGTH(code_point) == 1) { ++ if (U16_LENGTH(code_point) == 1) { + // Thie code point is in the Basic Multilingual Plane (BMP). + output->push_back(static_cast(code_point)); + return 1; + } + // Non-BMP characters use a double-character encoding. + size_t char_offset = output->length(); +- output->resize(char_offset + CBU16_MAX_LENGTH); +- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); +- return CBU16_MAX_LENGTH; ++ output->resize(char_offset + U16_MAX_LENGTH); ++ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); ++ return U16_MAX_LENGTH; + } + + // Generalized Unicode converter ----------------------------------------------- +diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-03-05 16:50:49.405712666 +0100 +@@ -5,13 +5,13 @@ + #include "ui/gfx/utf16_indexing.h" + + #include "base/logging.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + namespace gfx { + + bool IsValidCodePointIndex(const base::string16& s, size_t index) { + return index == 0 || index == s.length() || +- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); ++ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); + } + + ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { diff --git a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch new file mode 100644 index 0000000..4f17325 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch @@ -0,0 +1,48 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 +@@ -676,8 +676,6 @@ + 'third_party/dmg_fp/g_fmt.cc', + 'third_party/icu/icu_utf.cc', + 'third_party/icu/icu_utf.h', +- 'third_party/nspr/prtime.cc', +- 'third_party/nspr/prtime.h', + 'third_party/superfasthash/superfasthash.c', + 'third_party/xdg_mime/xdgmime.h', + 'threading/non_thread_safe.h', +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 +@@ -803,8 +803,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-03-05 16:48:14.208027199 +0100 +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-03-05 16:48:14.298025856 +0100 +@@ -14,7 +14,7 @@ + #include "base/logging.h" + #include "base/macros.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "build/build_config.h" + + namespace base { diff --git a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch new file mode 100644 index 0000000..8a87503 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch @@ -0,0 +1,71 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-03-06 02:05:57.848394582 +0100 +@@ -99,7 +99,7 @@ + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h 2017-03-06 02:05:57.990392454 +0100 +@@ -3193,22 +3193,10 @@ + public: + typedef Shape ShapeT; + +- // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } +- +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ // Wrapper methods. Defined in src/objects-inl.h ++ // to break a cycle with src/heap/heap.h. ++ inline uint32_t Hash(Key key); ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h 2017-03-06 02:05:57.992392424 +0100 +@@ -38,6 +38,25 @@ + namespace v8 { + namespace internal { + ++template ++uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++uint32_t HashTable::HashForObject(Key key, ++ Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ + PropertyDetails::PropertyDetails(Smi* smi) { + value_ = smi->value(); + } diff --git a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch new file mode 100644 index 0000000..8e26dbe --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch @@ -0,0 +1,32 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-03-05 17:08:43.547748044 +0100 +@@ -108,9 +108,7 @@ + if (is_linux) { + defines += [ "WEBRTC_THREAD_RR" ] + +- if (!build_with_chromium) { +- deps += [ ":cpu_features_linux" ] +- } ++ deps += [ ":cpu_features_linux" ] + + libs += [ "rt" ] + } +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-03-05 17:07:01.869254856 +0100 +@@ -112,12 +112,8 @@ + 'defines': [ + 'WEBRTC_THREAD_RR', + ], +- 'conditions': [ +- ['build_with_chromium==0', { +- 'dependencies': [ +- 'cpu_features_webrtc.gyp:cpu_features_linux', +- ], +- }], ++ 'dependencies': [ ++ 'cpu_features_webrtc.gyp:cpu_features_linux', + ], + 'link_settings': { + 'libraries': [ '-lrt', ], diff --git a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch new file mode 100644 index 0000000..f679530 --- /dev/null +++ b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +--- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100 ++++ qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-03-07 03:00:44.783316233 +0100 +@@ -542,6 +542,8 @@ + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::swap(LinkedHashSet& other) + { diff --git a/sources b/sources index fb92ca3..805aa50 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = b80070b267bffb29a17f8fbf9da8c9f9fe6d59c12bccb3710370b1c830f0f162199341266da6c24563e75f17f6f9d850fd762f58ab1fafc2535f432d6180c98c +SHA512 (qtwebengine-opensource-src-5.8.0-clean.tar.xz) = 18a49156da8d2e21fb0fe4781646c753c82d616964dd14b0651a1097b2a79a5ddb852dbdcc838d1e9e9a4ec460dd77fbab78a03672f5e827ab061fdf97db4a25 From be68fdf87b4bc25b77832b6868efda4d89dd2b36 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 7 Jun 2017 19:33:48 +0200 Subject: [PATCH 162/437] Update get_free_ffmpeg_source_files.py from Chromium dist-git There are no longer 'ffmpeg_branding == "Chromium"' conditionals, we need to key on the absence of 'ffmpeg_branding == "Chrome"' or 'ffmpeg_branding == "ChromeOS"' conditionals instead. --- get_free_ffmpeg_source_files.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/get_free_ffmpeg_source_files.py b/get_free_ffmpeg_source_files.py index e659d63..5a0e421 100755 --- a/get_free_ffmpeg_source_files.py +++ b/get_free_ffmpeg_source_files.py @@ -50,19 +50,24 @@ def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): # Get all the sections. sections = re.findall(r"if (.*?})", content, re.DOTALL) for section in sections: - # Get all the conditions (first group) and sources (second group)for the + # Get all the conditions (first group) and sources (second group) for the # current section. blocks = re.findall(r"(\(.*?\))\s\{(.*?)\}", section, re.DOTALL) for block in blocks: conditions = re.findall(r"\(?\((.*?)\)", block[0]) + inserted = False for condition in conditions: - limitations = ['is_linux', 'ffmpeg_branding == "Chromium"'] - if all(limitation in condition for limitation in limitations): + if inserted: + break + limitations = ['ffmpeg_branding == "Chrome"', 'ffmpeg_branding == "ChromeOS"'] + if ('is_linux' in condition) and not any(limitation in condition for limitation in limitations): if (arch_not_arm): if ('x64' in condition) or ('x86' in condition): parse_sources (block[1], output_sources, arch_not_arm) + inserted = True else: parse_sources (block[1], output_sources, arch_not_arm) + inserted = True print ' '.join(output_sources) From bf7ab1afddf6e87a6fd10a02c07b8ff752ff5627 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 7 Jun 2017 19:36:42 +0200 Subject: [PATCH 163/437] clean_ffmpeg.sh: Remove obsolete sed hack The problematic unused #include was removed from the upstream libavcodec/arm/fft_init_arm.c. --- clean_ffmpeg.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index af4c3ef..6b33ac9 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -270,9 +270,6 @@ done mkdir -p ../tmp_ffmpeg/chromium cp -pr chromium/config ../tmp_ffmpeg/chromium/ -# unused include -sed -i -e '/synth_filter\.h/d' ../tmp_ffmpeg/libavcodec/arm/fft_init_arm.c - cd .. rm -rf ffmpeg mv tmp_ffmpeg ffmpeg From c87d486b0024c40d9ecb66f76d518aadb53deb92 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 15:09:01 +0200 Subject: [PATCH 164/437] Update to 5.9.0 * Sat Jun 10 2017 Kevin Kofler - 5.9.0-1 - Update to 5.9.0 - Update version numbers of bundled stuff - Use bundled libsrtp and protobuf, Chromium dropped unbundling support for them - Add missing Provides: bundled(hunspell) for the spellchecking added in 5.8 - Rebase linux-pri, no-neon, system-icu-utf, no-sse2, arm-fpu-fix, openmax-dl-neon and webrtc-neon-detect patches (port to GN) - Sync system-nspr-prtime patch with Debian (they ported it to GN) - Rebase fix-extractcflag patch - Restore NEON runtime detection in Skia, drop old skia-neon patch (rewritten) - Drop webrtc-neon, v8-gcc7, pdfium-gcc7, wtf-gcc7, fix-open-in-new-tab and fix-dead-keys patches, fixed upstream - Update system libvpx/libwebp version requirements (libvpx now F25+ only) - Drop the flag hacks (-g1 -fno-delete-null-pointer-checks) that are fixed upstream, force -g2 on x86_64 instead --- .gitignore | 1 + qt5-qtwebengine.spec | 150 +- ...urce-src-5.6.0-beta-fix-extractcflag.patch | 12 - ...ngine-opensource-src-5.7.0-linux-pri.patch | 26 - ...ine-opensource-src-5.7.0-webrtc-neon.patch | 21 - ...ine-opensource-src-5.7.1-arm-fpu-fix.patch | 12 - ...bengine-opensource-src-5.7.1-no-neon.patch | 15 - ...ngine-opensource-src-5.7.1-skia-neon.patch | 15 - ...e-opensource-src-5.8.0-fix-dead-keys.patch | 40 - ...source-src-5.8.0-fix-open-in-new-tab.patch | 46 - ...bengine-opensource-src-5.8.0-no-sse2.patch | 5311 ----------------- ...ine-opensource-src-5.8.0-pdfium-gcc7.patch | 600 -- ...nsource-src-5.8.0-system-nspr-prtime.patch | 48 - ...bengine-opensource-src-5.8.0-v8-gcc7.patch | 71 - ...nsource-src-5.8.0-webrtc-neon-detect.patch | 32 - ...engine-opensource-src-5.8.0-wtf-gcc7.patch | 12 - ...ine-opensource-src-5.9.0-arm-fpu-fix.patch | 11 + ...pensource-src-5.9.0-fix-extractcflag.patch | 12 + ...ngine-opensource-src-5.9.0-linux-pri.patch | 26 + ...bengine-opensource-src-5.9.0-no-neon.patch | 14 + ...bengine-opensource-src-5.9.0-no-sse2.patch | 2601 ++++++++ ...opensource-src-5.9.0-openmax-dl-neon.patch | 38 +- ...ngine-opensource-src-5.9.0-skia-neon.patch | 392 ++ ...-opensource-src-5.9.0-system-icu-utf.patch | 118 +- ...nsource-src-5.9.0-system-nspr-prtime.patch | 66 + ...nsource-src-5.9.0-webrtc-neon-detect.patch | 14 + sources | 2 +- 27 files changed, 3284 insertions(+), 6422 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch delete mode 100644 qtwebengine-opensource-src-5.7.0-linux-pri.patch delete mode 100644 qtwebengine-opensource-src-5.7.0-webrtc-neon.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-no-neon.patch delete mode 100644 qtwebengine-opensource-src-5.7.1-skia-neon.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-no-sse2.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-v8-gcc7.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch delete mode 100644 qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch create mode 100644 qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch create mode 100644 qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch create mode 100644 qtwebengine-opensource-src-5.9.0-linux-pri.patch create mode 100644 qtwebengine-opensource-src-5.9.0-no-neon.patch create mode 100644 qtwebengine-opensource-src-5.9.0-no-sse2.patch rename qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch => qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch (62%) create mode 100644 qtwebengine-opensource-src-5.9.0-skia-neon.patch rename qtwebengine-opensource-src-5.8.0-system-icu-utf.patch => qtwebengine-opensource-src-5.9.0-system-icu-utf.patch (68%) create mode 100644 qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch create mode 100644 qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch diff --git a/.gitignore b/.gitignore index 0983a72..3eee6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /qtwebengine-opensource-src-5.7.0-clean.tar.xz /qtwebengine-opensource-src-5.7.1-clean.tar.xz /qtwebengine-opensource-src-5.8.0-clean.tar.xz +/qtwebengine-opensource-src-5.9.0-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5ddbf65..15a0a20 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,12 +10,12 @@ %global docs 1 %endif -%if 0%{?fedora} > 23 -# need libvpx >= 1.5.0 +%if 0%{?fedora} > 24 +# need libvpx >= 1.6.0 %global use_system_libvpx 1 %endif %if 0%{?fedora} > 23 -# need libwebp >= 0.5.0 +# need libwebp >= 0.5.1 %global use_system_libwebp 1 %endif @@ -40,8 +40,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.8.0 -Release: 14%{?dist} +Version: 5.9.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -49,8 +49,8 @@ Release: 14%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz -# ./clean_qtwebengine.sh 5.8.0 +# wget http://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz +# ./clean_qtwebengine.sh 5.9.0 Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -59,7 +59,7 @@ Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine # some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch +Patch0: qtwebengine-opensource-src-5.9.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -67,52 +67,37 @@ Patch0: qtwebengine-opensource-src-5.7.0-linux-pri.patch Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch -Patch2: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch +Patch2: qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch # disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -# otherwise, we use the arm-fpu-fix below instead (which this patch contains) -Patch3: qtwebengine-opensource-src-5.7.1-no-neon.patch +Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch4: qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch +Patch4: qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am -# undoing, there were no modifications at all. Must be applied after Patch5. -Patch5: qtwebengine-opensource-src-5.8.0-system-icu-utf.patch +# undoing, there were no modifications at all. Must be applied after Patch4. +Patch5: qtwebengine-opensource-src-5.9.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -# TODO: For 5.9, we will need the GN files updated (where not done yet), too. -Patch6: qtwebengine-opensource-src-5.8.0-no-sse2.patch -# fix ARM NEON handling in webrtc gyp files -# Fix video_processing.gypi to only build NEON files when actually requested -# (i.e., not if arm_neon=0 arm_neon_optional=0). -Patch7: qtwebengine-opensource-src-5.7.0-webrtc-neon.patch -# fix missing ARM -mfpu setting (see the comment in the no-neon patch above) -Patch9: qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch +Patch6: qtwebengine-opensource-src-5.9.0-no-sse2.patch +# fix missing ARM -mfpu setting +Patch9: qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) -Patch10: qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch -# chromium-skia: build SkUtilsArm.cpp also on non-Android ARM -Patch11: qtwebengine-opensource-src-5.7.1-skia-neon.patch +Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch +# restore NEON runtime detection in Skia: revert upstream review 1952953004, +# restore the non-Android Linux NEON runtime detection code lost in upstream +# review 1890483002, also add VFPv4 runtime detection +Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch # webrtc: enable the CPU feature detection for ARM Linux also for Chromium -Patch12: qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch -# fix FTBFS in V8 with GCC 7 (by Ben Noordhuis, backported from Chromium RPM) -Patch13: qtwebengine-opensource-src-5.8.0-v8-gcc7.patch -# fix FTBFS in PDFium with GCC 7: backport upstream cleanup removing that code -# https://codereview.chromium.org/2154503002 -Patch14: qtwebengine-opensource-src-5.8.0-pdfium-gcc7.patch -# fix FTBFS in the WTF part of Blink/WebKit with GCC 7 -Patch15: qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch +Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # FTBFS using qt < 5.8 Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch -# upstream fix for blank pages when a link opens in a new tab -Patch100: qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch -# upstream fix for non-functional dead keys in text fields -Patch101: qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -154,11 +139,9 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) %if 0%{?use_system_libwebp} -BuildRequires: pkgconfig(libwebp) >= 0.5.0 +BuildRequires: pkgconfig(libwebp) >= 0.5.1 %endif BuildRequires: pkgconfig(harfbuzz) -BuildRequires: pkgconfig(jsoncpp) -BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) @@ -183,11 +166,10 @@ BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) -BuildRequires: pkgconfig(libsrtp) BuildRequires: perl BuildRequires: python %if 0%{?use_system_libvpx} -BuildRequires: pkgconfig(vpx) >= 1.5.0 +BuildRequires: pkgconfig(vpx) >= 1.6.0 %endif # extra (non-upstream) functions needed, see @@ -207,11 +189,11 @@ BuildRequires: pkgconfig(vpx) >= 1.5.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 55.0.2883.75) are backported, see: -# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=53-based -# see dist/changes-5.8.0 for the version numbers (base, security fixes) and for +# Some security fixes (up to version 58.0.3029.96) are backported, see: +# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=56-based +# see dist/changes-5.9.0 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports -Provides: bundled(chromium) = 53.0.2785.148 +Provides: bundled(chromium) = 56.0.2924.122 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, @@ -231,37 +213,38 @@ Provides: bundled(brotli) # out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and # get_free_ffmpeg_source_files.py. # see src/3rdparty/chromium/third_party/ffmpeg/Changelog for the version number -Provides: bundled(ffmpeg) = 2.8 +Provides: bundled(ffmpeg) = 3.1 +Provides: bundled(hunspell) = 1.3.2 Provides: bundled(iccjpeg) # bundled as "khronos", headers only Provides: bundled(khronos_headers) # bundled as "leveldatabase" Provides: bundled(leveldb) Provides: bundled(libjingle) = 12750 +# see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number +Provides: bundled(libsrtp) = 1.5.2 %if !0%{?use_system_libvpx} -# bundled as "libvpx_new" -# the version in README.chromium is wrong, see -# src/3rdparty/chromium/third_party/libvpx_new/source/libvpx/CHANGELOG for the -# real version number -Provides: bundled(libvpx) = 1.5.0 +Provides: bundled(libvpx) = 1.6.0 %endif %if !0%{?use_system_libwebp} -Provides: bundled(libwebp) = 0.5.0 +Provides: bundled(libwebp) = 0.5.1 %endif Provides: bundled(libXNVCtrl) = 302.17 -Provides: bundled(libyuv) = 1579 +Provides: bundled(libyuv) = 1634 Provides: bundled(modp_b64) Provides: bundled(mojo) # headers only Provides: bundled(npapi) Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) +# see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version +Provides: bundled(protobuf) = 3.0.0-0.1.beta3 Provides: bundled(qcms) = 4 Provides: bundled(sfntly) Provides: bundled(skia) # bundled as "smhasher" Provides: bundled(SMHasher) = 0-0.1.svn147 -Provides: bundled(sqlite) = 3.8.7.4 +Provides: bundled(sqlite) = 3.10.2 Provides: bundled(usrsctp) Provides: bundled(webrtc) = 90 %ifarch %{ix86} x86_64 @@ -296,9 +279,10 @@ Provides: bundled(nsURLParsers) # Bundled outside of third_party, apparently not considered as such by Chromium: # see src/3rdparty/chromium/v8/include/v8_version.h for the version number -Provides: bundled(v8) = 5.3.332.47 -# bundled by v8 (src/3rdparty/chromium/v8/src/third_party/fdlibm) -# see src/3rdparty/chromium/v8/src/third_party/fdlibm/README.v8 for the version +Provides: bundled(v8) = 5.6.326.55 +# bundled by v8 (src/3rdparty/chromium/v8/src/base/ieee754.cc) +# The version number is 5.3, the last version that upstream released, years ago: +# http://www.netlib.org/fdlibm/readme Provides: bundled(fdlibm) = 5.3 %{?_qt5_version:Requires: qt5-qtbase%{?_isa} = %{_qt5_version}} @@ -344,24 +328,17 @@ BuildArch: noarch %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat %patch2 -p1 -b .fix-extractcflag -%if 0%{?arm_neon} -%patch9 -p1 -b .arm-fpu-fix -%else +%if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif %patch4 -p1 -b .system-nspr-prtime %patch5 -p1 -b .system-icu-utf %patch6 -p1 -b .no-sse2 -%patch7 -p1 -b .webrtc-neon +%patch9 -p1 -b .arm-fpu-fix %patch10 -p1 -b .openmax-dl-neon %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect -%patch13 -p1 -b .v8-gcc7 -%patch14 -p1 -b .pdfium-gcc7 -%patch15 -p1 -b .wtf-gcc7 %patch20 -p1 -b .qt57 -%patch100 -p1 -b .fix-open-in-new-tab -%patch101 -p1 -b .fix-dead-keys # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -374,9 +351,10 @@ sed -i -e 's!\./!!g' \ # can't just delete, but we'll overwrite with system headers to be on the safe side cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ -%ifnarch x86_64 +%ifarch x86_64 # most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 -sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro +# (which is now the upstream default), force -g2 on x86_64 +sed -i -e 's/symbol_level=1/symbol_level=2/g' src/core/config/common.pri %endif # generate qtwebengine-3rdparty.qdoc, it is missing from the tarball @@ -394,28 +372,12 @@ cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium export STRIP=strip export NINJAFLAGS="-v %{_smp_mflags}" export NINJA_PATH=%{_bindir}/ninja-build -export CFLAGS="%{optflags}" -%ifnarch x86_64 -# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 -export CFLAGS=`echo "$CFLAGS" | sed -e 's/ -g / -g1 /g'` -%endif -export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" -%ifnarch x86_64 -# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 -export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` -%endif mkdir %{_target_platform} pushd %{_target_platform} %{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" \ - WEBENGINE_CONFIG+="use_system_icu use_system_protobuf use_spellchecker" .. - -# if we keep these set here, gyp picks up duplicate flags -unset CFLAGS -export CFLAGS -unset CXXFLAGS -export CXXFLAGS + WEBENGINE_CONFIG+="use_system_icu use_spellchecker" .. make %{?_smp_mflags} @@ -572,6 +534,22 @@ done %changelog +* Sat Jun 10 2017 Kevin Kofler - 5.9.0-1 +- Update to 5.9.0 +- Update version numbers of bundled stuff +- Use bundled libsrtp and protobuf, Chromium dropped unbundling support for them +- Add missing Provides: bundled(hunspell) for the spellchecking added in 5.8 +- Rebase linux-pri, no-neon, system-icu-utf, no-sse2, arm-fpu-fix, + openmax-dl-neon and webrtc-neon-detect patches (port to GN) +- Sync system-nspr-prtime patch with Debian (they ported it to GN) +- Rebase fix-extractcflag patch +- Restore NEON runtime detection in Skia, drop old skia-neon patch (rewritten) +- Drop webrtc-neon, v8-gcc7, pdfium-gcc7, wtf-gcc7, fix-open-in-new-tab and + fix-dead-keys patches, fixed upstream +- Update system libvpx/libwebp version requirements (libvpx now F25+ only) +- Drop the flag hacks (-g1 -fno-delete-null-pointer-checks) that are fixed + upstream, force -g2 on x86_64 instead + * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch b/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch deleted file mode 100644 index 8beae69..0000000 --- a/qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf ---- qtwebengine-opensource-src-5.6.0-beta/tools/qmake/mkspecs/features/functions.prf 2015-12-14 16:27:24.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag/tools/qmake/mkspecs/features/functions.prf 2016-01-10 18:15:23.942032985 +0100 -@@ -87,7 +87,7 @@ - } - - defineReplace(extractCFlag) { -- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS -+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE - OPTION = $$find(CFLAGS, $$1) - OPTION = $$split(OPTION, =) - return ($$member(OPTION, 1)) diff --git a/qtwebengine-opensource-src-5.7.0-linux-pri.patch b/qtwebengine-opensource-src-5.7.0-linux-pri.patch deleted file mode 100644 index 321a1d7..0000000 --- a/qtwebengine-opensource-src-5.7.0-linux-pri.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.7.0/src/core/config/linux.pri 2016-06-07 06:20:06.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-linux-pri/src/core/config/linux.pri 2016-07-17 22:18:17.312471202 +0200 -@@ -46,3 +46,22 @@ - use?(system_icu): GYP_CONFIG += use_system_icu=1 icu_use_data_file_flag=0 - use?(system_ffmpeg): GYP_CONFIG += use_system_ffmpeg=1 - use?(system_protobuf): GYP_CONFIG += use_system_protobuf=1 -+ -+# some more system packages, that are not checked for for some reason -+GYP_CONFIG += use_system_re2=1 -+ -+# yasm is only used on x86, and passing use_system_yasm makes the build fail on -+# other architectures (e.g., ARM), so make it conditional on the architecture -+contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+ GYP_CONFIG += use_system_yasm=1 -+} -+ -+# link libpci instead of dlopening it, our Qt packaging depends on it anyway -+GYP_CONFIG += linux_link_libpci=1 -+ -+# run the unbundling script Chromium provides -+CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" -+R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gyp_files.py" -+R_G_F_PY_ARGS = "-D use_system_re2=1" -+log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch b/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch deleted file mode 100644 index 33e0df9..0000000 --- a/qtwebengine-opensource-src-5.7.0-webrtc-neon.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi ---- qtwebengine-opensource-src-5.7.0/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-05-26 15:53:47.000000000 +0200 -+++ qtwebengine-opensource-src-5.7.0-webrtc-neon/src/3rdparty/chromium/third_party/webrtc/modules/video_processing/video_processing.gypi 2016-07-18 14:29:24.841980563 +0200 -@@ -47,7 +47,7 @@ - ['target_arch=="ia32" or target_arch=="x64"', { - 'dependencies': [ 'video_processing_sse2', ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'dependencies': [ 'video_processing_neon', ], - }], - ], -@@ -77,7 +77,7 @@ - }, - ], - }], -- ['target_arch=="arm" or target_arch == "arm64"', { -+ ['build_with_neon==1', { - 'targets': [ - { - 'target_name': 'video_processing_neon', diff --git a/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch deleted file mode 100644 index 04ae6e2..0000000 --- a/qtwebengine-opensource-src-5.7.1-arm-fpu-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro qtwebengine-opensource-src-5.7.1-arm-fpu-fix/src/core/gyp_run.pro ---- qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro 2016-11-09 06:28:31.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-arm-fpu-fix/src/core/gyp_run.pro 2016-12-03 16:38:33.531711958 +0100 -@@ -80,7 +80,7 @@ - # we use arm_neon_optional for ARMv7 and newer and let chromium decide - # about the mfpu option. - contains(MFPU, ".*neon.*"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 -- else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1 -+ else:!lessThan(MARMV, 7): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=1 - else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0 - } else { - # Chromium defaults to arm_neon=1, Qt does not. diff --git a/qtwebengine-opensource-src-5.7.1-no-neon.patch b/qtwebengine-opensource-src-5.7.1-no-neon.patch deleted file mode 100644 index d520694..0000000 --- a/qtwebengine-opensource-src-5.7.1-no-neon.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro qtwebengine-opensource-src-5.7.1-no-neon/src/core/gyp_run.pro ---- qtwebengine-opensource-src-5.7.1/src/core/gyp_run.pro 2016-11-09 06:28:31.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-no-neon/src/core/gyp_run.pro 2016-12-03 16:36:39.039443117 +0100 -@@ -80,7 +80,10 @@ - # we use arm_neon_optional for ARMv7 and newer and let chromium decide - # about the mfpu option. - contains(MFPU, ".*neon.*"): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=1 -- else:!lessThan(MARMV, 7): GYP_CONFIG += arm_neon=0 arm_neon_optional=1 -+ # Disable NEON entirely for now, because it fails to build: -+ # https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -+ # (This line was also missing the required arm_fpu flag, which I added.) -+ # else:!lessThan(MARMV, 7): GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=1 - else: GYP_CONFIG += arm_fpu=\"$$MFPU\" arm_neon=0 arm_neon_optional=0 - } else { - # Chromium defaults to arm_neon=1, Qt does not. diff --git a/qtwebengine-opensource-src-5.7.1-skia-neon.patch b/qtwebengine-opensource-src-5.7.1-skia-neon.patch deleted file mode 100644 index c9b385b..0000000 --- a/qtwebengine-opensource-src-5.7.1-skia-neon.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/skia/skia_library.gypi 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-skia-neon/src/3rdparty/chromium/skia/skia_library.gypi 2016-12-04 14:34:12.531877529 +0100 -@@ -159,6 +159,11 @@ - '../build/android/ndk.gyp:cpu_features', - ], - }], -+ [ 'OS != "android" and target_arch == "arm"', { -+ 'sources': [ -+ '../third_party/skia/src/core/SkUtilsArm.cpp', -+ ], -+ }], - [ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', { - 'dependencies': [ - '../build/linux/system.gyp:fontconfig', diff --git a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch b/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch deleted file mode 100644 index a0cf81c..0000000 --- a/qtwebengine-opensource-src-5.8.0-fix-dead-keys.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 31374ba98829e984c7600419c0e5fa71b96fc530 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 24 Mar 2017 14:31:02 +0100 -Subject: Forward input method events to RWHV in widget - -Task-number: QTBUG-58362 -Change-Id: Id4cf57c60da17538b224bb9bc91277c324c6a55d -Reviewed-by: Viktor Engelmann -Reviewed-by: Allan Sandfeld Jensen ---- - .../render_widget_host_view_qt_delegate_widget.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -index 14c4d72..fd58a07 100644 ---- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -@@ -84,10 +84,19 @@ protected: - { - m_client->forwardEvent(event); - } -+ void inputMethodEvent(QInputMethodEvent *event) override -+ { -+ m_client->forwardEvent(event); -+ } - QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override - { - return m_client->updatePaintNode(oldNode); - } -+ -+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override -+ { -+ return m_client->inputMethodQuery(query); -+ } - private: - RenderWidgetHostViewQtDelegateClient *m_client; - }; --- -cgit v1.0-4-g1e03 - diff --git a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch b/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch deleted file mode 100644 index c95a712..0000000 --- a/qtwebengine-opensource-src-5.8.0-fix-open-in-new-tab.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8e147ed3be7740092de233a2a7c67ec890069649 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20Br=C3=BCning?= -Date: Mon, 13 Mar 2017 11:13:56 +0100 -Subject: Remove stale parent connection when initializing delegate as a child - -When clicking on a blank link target, the constructor of the -RenderWidgetHostViewQtDelegateWidget instance for the newly created -view is called with the originating QWebEngineView as its parent -and will connect its removeParentBeforeParentDelete slot to the -originating view's destroyed signal. - -This leads to the situation where the delegate's parent will be set to -null when the originating view is closed, causing the view to display -only an empty widget with the actual web contents remaining live in -the background. - -This patch removes the connection to the old view when initializing -the delegate as a child of the QWebEnginePagePrivate instance. The -addition to the layout updates the parent and child relationship -between the view and the delegate internally. - -Task-number: QTBUG-58381 -Change-Id: I448380478c2bcfcfbddaee8a35caf46010e57972 -Reviewed-by: Florian Bruhin -Reviewed-by: Joerg Bornemann ---- - src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -index e7ad5b1..14c4d72 100644 ---- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp -@@ -163,6 +163,9 @@ void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* - - QWebEnginePagePrivate *pagePrivate = static_cast(container); - if (pagePrivate->view) { -+ if (parentWidget()) -+ disconnect(parentWidget(), &QObject::destroyed, -+ this, &RenderWidgetHostViewQtDelegateWidget::removeParentBeforeParentDelete); - pagePrivate->view->layout()->addWidget(this); - pagePrivate->view->setFocusProxy(this); - show(); --- -cgit v1.0-4-g1e03 - diff --git a/qtwebengine-opensource-src-5.8.0-no-sse2.patch b/qtwebengine-opensource-src-5.8.0-no-sse2.patch deleted file mode 100644 index ee15329..0000000 --- a/qtwebengine-opensource-src-5.8.0-no-sse2.patch +++ /dev/null @@ -1,5311 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/breakpad/src/build/common.gypi 2017-03-05 17:26:14.507159420 +0100 -@@ -80,8 +80,8 @@ - # The system root for cross-compiles. Default: none. - 'sysroot%': '', - -- # On Linux, we build with sse2 for Chromium builds. -- 'disable_sse2%': 0, -+ # Do not assume SSE2 by default (Fedora patch). -+ 'disable_sse2%': 1 - }, - - 'target_arch%': '<(target_arch)', -@@ -725,17 +725,13 @@ - 'conditions': [ - ['disable_sse2==0', { - 'cflags': [ -- '-march=pentium4', - '-msse2', - '-mfpmath=sse', - ], - }], - ], -- # -mmmx allows mmintrin.h to be used for mmx intrinsics. -- # video playback is mmx and sse2 optimized. - 'cflags': [ - '-m32', -- '-mmmx', - ], - 'ldflags': [ - '-m32', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/build/common.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/build/common.gypi 2017-03-05 17:26:14.612157862 +0100 -@@ -3861,15 +3861,7 @@ - # value used during computation does not change depending on - # how the compiler optimized the code, since the value is - # always kept in its specified precision. -- # -- # Refer to http://crbug.com/348761 for rationale behind SSE2 -- # being a minimum requirement for 32-bit Linux builds and -- # http://crbug.com/313032 for an example where this has "bit" -- # us in the past. - 'cflags': [ -- '-msse2', -- '-mfpmath=sse', -- '-mmmx', # Allows mmintrin.h for MMX intrinsics. - '-m32', - ], - 'ldflags': [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-03-05 17:38:41.416050535 +0100 -@@ -537,13 +537,6 @@ - "trees/tree_synchronizer.h", - ] - -- if (current_cpu == "x86" || current_cpu == "x64") { -- sources += [ -- "raster/texture_compressor_etc1_sse.cc", -- "raster/texture_compressor_etc1_sse.h", -- ] -- } -- - configs += [ "//build/config:precompiled_headers" ] - - public_deps = [ -@@ -553,6 +546,7 @@ - deps = [ - "//base", - "//base/third_party/dynamic_annotations", -+ "//cc:cc_opts", - "//cc/proto", - "//cc/surfaces:surface_id", - "//gpu", -@@ -581,6 +575,36 @@ - } - } - -+source_set("cc_opts") { -+ public_deps = [ -+ "//cc:cc_opts_sse", -+ ] -+} -+ -+source_set("cc_opts_sse") { -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps = [ -+ "//base", -+ ] -+ -+ defines = [ "CC_IMPLEMENTATION=1" ] -+ -+ if (!is_debug && (is_win || is_android)) { -+ configs -= [ "//build/config/compiler:optimize" ] -+ configs += [ "//build/config/compiler:optimize_max" ] -+ } -+ -+ sources = [ -+ "raster/texture_compressor.h", -+ "raster/texture_compressor_etc1.h", -+ "raster/texture_compressor_etc1_sse.cc", -+ "raster/texture_compressor_etc1_sse.h", -+ ] -+ -+ cflags = [ "-msse2" ] -+ } -+} -+ - source_set("test_support") { - testonly = true - sources = [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/cc/cc.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/cc/cc.gyp 2017-03-05 17:26:26.081987615 +0100 -@@ -602,14 +602,6 @@ - 'includes': [ - '../build/android/increase_size_for_speed.gypi', - ], -- 'conditions': [ -- ['target_arch == "ia32" or target_arch == "x64"', { -- 'sources': [ -- 'raster/texture_compressor_etc1_sse.cc', -- 'raster/texture_compressor_etc1_sse.h', -- ], -- }], -- ], - }, - { - # GN version: "//cc/proto" -@@ -678,6 +670,7 @@ - '<(DEPTH)/ui/events/events.gyp:events_base', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry', -+ 'cc_opts', - ], - 'defines': [ - 'CC_SURFACES_IMPLEMENTATION=1', -@@ -714,5 +707,41 @@ - '../build/android/increase_size_for_speed.gypi', - ], - }, -+ { -+ 'target_name': 'cc_opts', -+ 'type': 'static_library', -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'CC_IMPLEMENTATION=1', -+ ], -+ 'dependencies': [ -+ 'cc_opts_sse', -+ ] -+ }], -+ ], -+ }, -+ { -+ 'target_name': 'cc_opts_sse', -+ 'type': 'static_library', -+ 'dependencies': [ -+ '<(DEPTH)/base/base.gyp:base', -+ ], -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'CC_IMPLEMENTATION=1', -+ ], -+ 'sources': [ -+ # Conditional compilation for SSE2 code on x86 and x64 machines -+ 'raster/texture_compressor_etc1_sse.cc', -+ 'raster/texture_compressor_etc1_sse.h', -+ ], -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ ], -+ }, - ], - } -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-03-05 17:26:26.082987600 +0100 -@@ -312,13 +312,13 @@ - } - - if (current_cpu == "x86" || current_cpu == "x64") { -- sources += [ -- "simd/convert_rgb_to_yuv_sse2.cc", -- "simd/convert_rgb_to_yuv_ssse3.cc", -- "simd/convert_yuv_to_rgb_x86.cc", -- "simd/filter_yuv_sse2.cc", -+ sources += [ "simd/convert_yuv_to_rgb_x86.cc" ] -+ deps += [ -+ ":media_yasm", -+ ":media_mmx", -+ ":media_sse", -+ ":media_sse2", - ] -- deps += [ ":media_yasm" ] - } - - if (is_linux || is_win) { -@@ -534,10 +534,47 @@ - } - - if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("media_mmx") { -+ sources = [ "simd/filter_yuv_mmx.cc" ] -+ configs += [ "//media:media_config" ] -+ if (!is_win) { -+ cflags = [ "-mmmx" ] -+ } -+ } -+ -+ source_set("media_sse") { -+ sources = [ -+ "simd/sinc_resampler_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } -+ -+ source_set("media_sse2") { -+ sources = [ -+ "simd/convert_rgb_to_yuv_sse2.cc", -+ "simd/convert_rgb_to_yuv_ssse3.cc", -+ "simd/filter_yuv_sse2.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse2" ] -+ } -+ } -+ - import("//third_party/yasm/yasm_assemble.gni") - yasm_assemble("media_yasm") { - sources = [ - "simd/convert_rgb_to_yuv_ssse3.asm", -+ "simd/convert_yuv_to_rgb_mmx.asm", - "simd/convert_yuv_to_rgb_sse.asm", - "simd/convert_yuva_to_argb_mmx.asm", - "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/media.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-03-05 17:44:02.063267153 +0100 -@@ -10,6 +10,8 @@ - #include "base/metrics/field_trial.h" - #include "base/trace_event/trace_event.h" - #include "media/base/media_switches.h" -+#include "media/base/sinc_resampler.h" -+#include "media/base/vector_math.h" - #include "media/base/yuv_convert.h" - - #if defined(OS_ANDROID) -@@ -40,6 +42,8 @@ - TRACE_EVENT_WARMUP_CATEGORY("media"); - - // Perform initialization of libraries which require runtime CPU detection. -+ vector_math::Initialize(); -+ SincResampler::InitializeCPUSpecificFeatures(); - InitializeCPUSpecificYUVConversions(); - - #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-03-05 17:26:26.083987585 +0100 -@@ -65,6 +65,17 @@ - int rgbstride, - YUVType yuv_type); - -+MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type); -+ - MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -@@ -124,6 +135,13 @@ - ptrdiff_t width, - const int16_t* convert_table); - -+MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ ptrdiff_t width, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -@@ -131,6 +149,14 @@ - ptrdiff_t width, - const int16_t* convert_table); - -+MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, -+ const uint8_t* u_buf, -+ const uint8_t* v_buf, -+ uint8_t* rgb_buf, -+ ptrdiff_t width, -+ ptrdiff_t source_dx, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -147,6 +173,14 @@ - ptrdiff_t source_dx, - const int16_t* convert_table); - -+MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, -+ const uint8_t* u_buf, -+ const uint8_t* v_buf, -+ uint8_t* rgb_buf, -+ ptrdiff_t width, -+ ptrdiff_t source_dx, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-03-05 17:26:26.167986340 +0100 -@@ -0,0 +1,23 @@ -+; Copyright (c) 2011 The Chromium Authors. All rights reserved. -+; Use of this source code is governed by a BSD-style license that can be -+; found in the LICENSE file. -+ -+%include "third_party/x86inc/x86inc.asm" -+ -+; -+; This file uses MMX instructions. -+; -+ SECTION_TEXT -+ CPU MMX -+ -+; Use movq to save the output. -+%define MOVQ movq -+ -+; extern "C" void ConvertYUVToRGB32Row_MMX(const uint8* y_buf, -+; const uint8* u_buf, -+; const uint8* v_buf, -+; uint8* rgb_buf, -+; ptrdiff_t width, -+; const int16* convert_table); -+%define SYMBOL ConvertYUVToRGB32Row_MMX -+%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-03-05 17:26:26.167986340 +0100 -@@ -47,6 +47,34 @@ - EmptyRegisterState(); - } - -+void ConvertYUVToRGB32_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type) { -+ unsigned int y_shift = GetVerticalShift(yuv_type); -+ for (int y = 0; y < height; ++y) { -+ uint8_t* rgb_row = rgbframe + y * rgbstride; -+ const uint8_t* y_ptr = yplane + y * ystride; -+ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; -+ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; -+ -+ ConvertYUVToRGB32Row_MMX(y_ptr, -+ u_ptr, -+ v_ptr, -+ rgb_row, -+ width, -+ GetLookupTable(yuv_type)); -+ } -+ -+ EmptyRegisterState(); -+} -+ - void ConvertYUVToRGB32_SSE(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-03-05 17:26:26.167986340 +0100 -@@ -20,6 +20,12 @@ - int source_width, - uint8_t source_y_fraction); - -+MEDIA_EXPORT void FilterYUVRows_MMX(uint8_t* ybuf, -+ const uint8_t* y0_ptr, -+ const uint8_t* y1_ptr, -+ int source_width, -+ uint8_t source_y_fraction); -+ - MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, - const uint8_t* y0_ptr, - const uint8_t* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-03-05 17:26:26.167986340 +0100 -@@ -0,0 +1,79 @@ -+// Copyright (c) 2011 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if defined(_MSC_VER) -+#include -+#else -+#include -+#endif -+ -+#include "build/build_config.h" -+#include "media/base/simd/filter_yuv.h" -+ -+namespace media { -+ -+#if defined(COMPILER_MSVC) -+// Warning 4799 is about calling emms before the function exits. -+// We calls emms in a frame level so suppress this warning. -+#pragma warning(push) -+#pragma warning(disable: 4799) -+#endif -+ -+void FilterYUVRows_MMX(uint8_t* dest, -+ const uint8_t* src0, -+ const uint8_t* src1, -+ int width, -+ uint8_t fraction) { -+ int pixel = 0; -+ -+ // Process the unaligned bytes first. -+ int unaligned_width = -+ (8 - (reinterpret_cast(dest) & 7)) & 7; -+ while (pixel < width && pixel < unaligned_width) { -+ dest[pixel] = (src0[pixel] * (256 - fraction) + -+ src1[pixel] * fraction) >> 8; -+ ++pixel; -+ } -+ -+ __m64 zero = _mm_setzero_si64(); -+ __m64 src1_fraction = _mm_set1_pi16(fraction); -+ __m64 src0_fraction = _mm_set1_pi16(256 - fraction); -+ const __m64* src0_64 = reinterpret_cast(src0 + pixel); -+ const __m64* src1_64 = reinterpret_cast(src1 + pixel); -+ __m64* dest64 = reinterpret_cast<__m64*>(dest + pixel); -+ __m64* end64 = reinterpret_cast<__m64*>( -+ reinterpret_cast(dest + width) & ~7); -+ -+ while (dest64 < end64) { -+ __m64 src0 = *src0_64++; -+ __m64 src1 = *src1_64++; -+ __m64 src2 = _mm_unpackhi_pi8(src0, zero); -+ __m64 src3 = _mm_unpackhi_pi8(src1, zero); -+ src0 = _mm_unpacklo_pi8(src0, zero); -+ src1 = _mm_unpacklo_pi8(src1, zero); -+ src0 = _mm_mullo_pi16(src0, src0_fraction); -+ src1 = _mm_mullo_pi16(src1, src1_fraction); -+ src2 = _mm_mullo_pi16(src2, src0_fraction); -+ src3 = _mm_mullo_pi16(src3, src1_fraction); -+ src0 = _mm_add_pi16(src0, src1); -+ src2 = _mm_add_pi16(src2, src3); -+ src0 = _mm_srli_pi16(src0, 8); -+ src2 = _mm_srli_pi16(src2, 8); -+ src0 = _mm_packs_pu16(src0, src2); -+ *dest64++ = src0; -+ pixel += 8; -+ } -+ -+ while (pixel < width) { -+ dest[pixel] = (src0[pixel] * (256 - fraction) + -+ src1[pixel] * fraction) >> 8; -+ ++pixel; -+ } -+} -+ -+#if defined(COMPILER_MSVC) -+#pragma warning(pop) -+#endif -+ -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-03-05 17:26:26.168986325 +0100 -@@ -0,0 +1,50 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/sinc_resampler.h" -+ -+#include -+ -+namespace media { -+ -+float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -+ const float* k2, -+ double kernel_interpolation_factor) { -+ __m128 m_input; -+ __m128 m_sums1 = _mm_setzero_ps(); -+ __m128 m_sums2 = _mm_setzero_ps(); -+ -+ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -+ // these loops hurt performance in local testing. -+ if (reinterpret_cast(input_ptr) & 0x0F) { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_loadu_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } else { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_load_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } -+ -+ // Linearly interpolate the two "convolutions". -+ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -+ static_cast(1.0 - kernel_interpolation_factor))); -+ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -+ static_cast(kernel_interpolation_factor))); -+ m_sums1 = _mm_add_ps(m_sums1, m_sums2); -+ -+ // Sum components together. -+ float result; -+ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -+ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -+ m_sums2, m_sums2, 1))); -+ -+ return result; -+} -+ -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-03-05 17:26:26.168986325 +0100 -@@ -0,0 +1,118 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/vector_math_testing.h" -+ -+#include -+ -+#include // NOLINT -+ -+namespace media { -+namespace vector_math { -+ -+void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) -+ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] = src[i] * scale; -+} -+ -+void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) { -+ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -+ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -+ } -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] += src[i] * scale; -+} -+ -+// Convenience macro to extract float 0 through 3 from the vector |a|. This is -+// needed because compilers other than clang don't support access via -+// operator[](). -+#define EXTRACT_FLOAT(a, i) \ -+ (i == 0 ? \ -+ _mm_cvtss_f32(a) : \ -+ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -+ -+std::pair EWMAAndMaxPower_SSE( -+ float initial_value, const float src[], int len, float smoothing_factor) { -+ // When the recurrence is unrolled, we see that we can split it into 4 -+ // separate lanes of evaluation: -+ // -+ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -+ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -+ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ // -+ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -+ // -+ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -+ // each of the 4 lanes, and then combine them to give y[n]. -+ -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ -+ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -+ const float weight_prev = 1.0f - smoothing_factor; -+ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -+ const __m128 weight_prev_squared_x4 = -+ _mm_mul_ps(weight_prev_x4, weight_prev_x4); -+ const __m128 weight_prev_4th_x4 = -+ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -+ -+ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -+ // 0, respectively. -+ __m128 max_x4 = _mm_setzero_ps(); -+ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -+ int i; -+ for (i = 0; i < last_index; i += 4) { -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -+ const __m128 sample_x4 = _mm_load_ps(src + i); -+ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -+ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -+ // Note: The compiler optimizes this to a single multiply-and-accumulate -+ // instruction: -+ ewma_x4 = _mm_add_ps(ewma_x4, -+ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -+ } -+ -+ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ float ewma = EXTRACT_FLOAT(ewma_x4, 3); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 2); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 1); -+ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 0); -+ -+ // Fold the maximums together to get the overall maximum. -+ max_x4 = _mm_max_ps(max_x4, -+ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -+ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -+ -+ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -+ -+ // Handle remaining values at the end of |src|. -+ for (; i < len; ++i) { -+ result.first *= weight_prev; -+ const float sample = src[i]; -+ const float sample_squared = sample * sample; -+ result.first += sample_squared * smoothing_factor; -+ result.second = std::max(result.second, sample_squared); -+ } -+ -+ return result; -+} -+ -+} // namespace vector_math -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-03-05 17:26:26.168986325 +0100 -@@ -81,17 +81,12 @@ - #include - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - --#if defined(ARCH_CPU_X86_FAMILY) --#include --#define CONVOLVE_FUNC Convolve_SSE --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include --#define CONVOLVE_FUNC Convolve_NEON --#else --#define CONVOLVE_FUNC Convolve_C - #endif - - namespace media { -@@ -112,10 +107,41 @@ - return sinc_scale_factor; - } - -+#undef CONVOLVE_FUNC -+ - static int CalculateChunkSize(int block_size_, double io_ratio) { - return block_size_ / io_ratio; - } - -+// If we know the minimum architecture at compile time, avoid CPU detection. -+// Force NaCl code to use C routines since (at present) nothing there uses these -+// methods and plumbing the -msse built library is non-trivial. -+#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(__SSE__) -+#define CONVOLVE_FUNC Convolve_SSE -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// X86 CPU detection required. Functions will be set by -+// InitializeCPUSpecificFeatures(). -+#define CONVOLVE_FUNC g_convolve_proc_ -+ -+typedef float (*ConvolveProc)(const float*, const float*, const float*, double); -+static ConvolveProc g_convolve_proc_ = NULL; -+ -+void SincResampler::InitializeCPUSpecificFeatures() { -+ CHECK(!g_convolve_proc_); -+ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; -+} -+#endif -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define CONVOLVE_FUNC Convolve_NEON -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// Unknown architecture. -+#define CONVOLVE_FUNC Convolve_C -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#endif -+ - SincResampler::SincResampler(double io_sample_rate_ratio, - int request_frames, - const ReadCB& read_cb) -@@ -343,46 +369,7 @@ - kernel_interpolation_factor * sum2); - } - --#if defined(ARCH_CPU_X86_FAMILY) --float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -- const float* k2, -- double kernel_interpolation_factor) { -- __m128 m_input; -- __m128 m_sums1 = _mm_setzero_ps(); -- __m128 m_sums2 = _mm_setzero_ps(); -- -- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -- // these loops hurt performance in local testing. -- if (reinterpret_cast(input_ptr) & 0x0F) { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_loadu_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } else { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_load_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } -- -- // Linearly interpolate the two "convolutions". -- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -- static_cast(1.0 - kernel_interpolation_factor))); -- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -- static_cast(kernel_interpolation_factor))); -- m_sums1 = _mm_add_ps(m_sums1, m_sums2); -- -- // Sum components together. -- float result; -- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -- m_sums2, m_sums2, 1))); -- -- return result; --} --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, - const float* k2, - double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-03-05 17:26:26.169986310 +0100 -@@ -36,6 +36,10 @@ - kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), - }; - -+ // Selects runtime specific CPU features like SSE. Must be called before -+ // using SincResampler. -+ static void InitializeCPUSpecificFeatures(); -+ - // Callback type for providing more data into the resampler. Expects |frames| - // of data to be rendered into |destination|; zero padded if not enough frames - // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-03-05 17:26:26.169986310 +0100 -@@ -4,6 +4,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/time/time.h" - #include "build/build_config.h" - #include "media/base/sinc_resampler.h" -@@ -61,6 +62,9 @@ - &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); - - #if defined(CONVOLVE_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - RunConvolveBenchmark( - &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); - RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-03-05 17:26:26.169986310 +0100 -@@ -10,6 +10,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/macros.h" - #include "base/strings/string_number_conversions.h" - #include "base/time/time.h" -@@ -166,6 +167,10 @@ - static const double kKernelInterpolationFactor = 0.5; - - TEST(SincResamplerTest, Convolve) { -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif -+ - // Initialize a dummy resampler. - MockSource mock_source; - SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-03-05 17:26:26.170986295 +0100 -@@ -7,12 +7,17 @@ - - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - -+namespace media { -+namespace vector_math { -+ -+// If we know the minimum architecture at compile time, avoid CPU detection. - // NaCl does not allow intrinsics. - #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --#include -+#if defined(__SSE__) - // Don't use custom SSE versions where the auto-vectorized C version performs - // better, which is anywhere clang is used. - #if !defined(__clang__) -@@ -23,20 +28,52 @@ - #define FMUL_FUNC FMUL_C - #endif - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+void Initialize() {} -+#else -+// X86 CPU detection required. Functions will be set by Initialize(). -+#if !defined(__clang__) -+#define FMAC_FUNC g_fmac_proc_ -+#define FMUL_FUNC g_fmul_proc_ -+#else -+#define FMAC_FUNC FMAC_C -+#define FMUL_FUNC FMUL_C -+#endif -+#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ -+ -+#if !defined(__clang__) -+typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); -+static MathProc g_fmac_proc_ = NULL; -+static MathProc g_fmul_proc_ = NULL; -+#endif -+typedef std::pair (*EWMAAndMaxPowerProc)( -+ float initial_value, const float src[], int len, float smoothing_factor); -+static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; -+ -+void Initialize() { -+ CHECK(!g_fmac_proc_); -+ CHECK(!g_fmul_proc_); -+ CHECK(!g_ewma_power_proc_); -+ const bool kUseSSE = base::CPU().has_sse(); -+#if !defined(__clang__) -+ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; -+ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; -+#endif -+ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; -+} -+#endif - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include - #define FMAC_FUNC FMAC_NEON - #define FMUL_FUNC FMUL_NEON - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+void Initialize() {} - #else - #define FMAC_FUNC FMAC_C - #define FMUL_FUNC FMUL_C - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C -+void Initialize() {} - #endif - --namespace media { --namespace vector_math { -- - void FMAC(const float src[], float scale, int len, float dest[]) { - // Ensure |src| and |dest| are 16-byte aligned. - DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); -@@ -89,111 +126,6 @@ - return result; - } - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) -- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] = src[i] * scale; --} -- --void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) { -- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -- } -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] += src[i] * scale; --} -- --// Convenience macro to extract float 0 through 3 from the vector |a|. This is --// needed because compilers other than clang don't support access via --// operator[](). --#define EXTRACT_FLOAT(a, i) \ -- (i == 0 ? \ -- _mm_cvtss_f32(a) : \ -- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -- --std::pair EWMAAndMaxPower_SSE( -- float initial_value, const float src[], int len, float smoothing_factor) { -- // When the recurrence is unrolled, we see that we can split it into 4 -- // separate lanes of evaluation: -- // -- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- // -- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -- // -- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -- // each of the 4 lanes, and then combine them to give y[n]. -- -- const int rem = len % 4; -- const int last_index = len - rem; -- -- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -- const float weight_prev = 1.0f - smoothing_factor; -- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -- const __m128 weight_prev_squared_x4 = -- _mm_mul_ps(weight_prev_x4, weight_prev_x4); -- const __m128 weight_prev_4th_x4 = -- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -- -- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -- // 0, respectively. -- __m128 max_x4 = _mm_setzero_ps(); -- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -- int i; -- for (i = 0; i < last_index; i += 4) { -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -- const __m128 sample_x4 = _mm_load_ps(src + i); -- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -- // Note: The compiler optimizes this to a single multiply-and-accumulate -- // instruction: -- ewma_x4 = _mm_add_ps(ewma_x4, -- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -- } -- -- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- float ewma = EXTRACT_FLOAT(ewma_x4, 3); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 2); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 1); -- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 0); -- -- // Fold the maximums together to get the overall maximum. -- max_x4 = _mm_max_ps(max_x4, -- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -- -- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -- -- // Handle remaining values at the end of |src|. -- for (; i < len; ++i) { -- result.first *= weight_prev; -- const float sample = src[i]; -- const float sample_squared = sample * sample; -- result.first += sample_squared * smoothing_factor; -- result.second = std::max(result.second, sample_squared); -- } -- -- return result; --} --#endif -- - #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - void FMAC_NEON(const float src[], float scale, int len, float dest[]) { - const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-03-05 17:26:26.170986295 +0100 -@@ -15,6 +15,11 @@ - // Required alignment for inputs and outputs to all vector math functions - enum { kRequiredAlignment = 16 }; - -+// Selects runtime specific optimizations such as SSE. Must be called prior to -+// calling FMAC() or FMUL(). Called during media library initialization; most -+// users should never have to call this. -+MEDIA_EXPORT void Initialize(); -+ - // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. - // |src| and |dest| must be aligned by kRequiredAlignment. - MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-03-05 17:26:26.171986280 +0100 -@@ -5,6 +5,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/time/time.h" - #include "build/build_config.h" -@@ -82,15 +83,11 @@ - DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); - }; - --// Define platform dependent function names for SIMD optimized methods. -+// Define platform independent function name for FMAC* perf tests. - #if defined(ARCH_CPU_X86_FAMILY) - #define FMAC_FUNC FMAC_SSE --#define FMUL_FUNC FMUL_SSE --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #define FMAC_FUNC FMAC_NEON --#define FMUL_FUNC FMUL_NEON --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON - #endif - - // Benchmark for each optimized vector_math::FMAC() method. -@@ -99,6 +96,9 @@ - RunBenchmark( - vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); - #if defined(FMAC_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMAC_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -112,12 +112,24 @@ - #endif - } - -+#undef FMAC_FUNC -+ -+// Define platform independent function name for FMULBenchmark* tests. -+#if defined(ARCH_CPU_X86_FAMILY) -+#define FMUL_FUNC FMUL_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define FMUL_FUNC FMUL_NEON -+#endif -+ - // Benchmark for each optimized vector_math::FMUL() method. - TEST_F(VectorMathPerfTest, FMUL) { - // Benchmark FMUL_C(). - RunBenchmark( - vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); - #if defined(FMUL_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMUL_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -131,6 +143,14 @@ - #endif - } - -+#undef FMUL_FUNC -+ -+#if defined(ARCH_CPU_X86_FAMILY) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+#endif -+ - // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. - TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { - // Benchmark EWMAAndMaxPower_C(). -@@ -139,6 +159,9 @@ - "vector_math_ewma_and_max_power", - "unoptimized"); - #if defined(EWMAAndMaxPower_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -156,4 +179,6 @@ - #endif - } - -+#undef EWMAAndMaxPower_FUNC -+ - } // namespace media -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-03-05 17:26:26.171986280 +0100 -@@ -19,7 +19,7 @@ - MEDIA_EXPORT std::pair EWMAAndMaxPower_C( - float initial_value, const float src[], int len, float smoothing_factor); - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(ARCH_CPU_X86_FAMILY) - MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, - float dest[]); - MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-03-05 17:26:26.172986265 +0100 -@@ -9,6 +9,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/stringize_macros.h" -@@ -78,6 +79,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMAC_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMAC_SSE( -@@ -119,6 +121,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMUL_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMUL_SSE( -@@ -227,6 +230,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("EWMAAndMaxPower_SSE"); - const std::pair& result = vector_math::EWMAAndMaxPower_SSE( - initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-03-05 17:26:26.173986250 +0100 -@@ -32,7 +32,7 @@ - #include "media/base/simd/convert_yuv_to_rgb.h" - #include "media/base/simd/filter_yuv.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if defined(ARCH_CPU_X86_FAMILY) && defined(__MMX__) - #if defined(COMPILER_MSVC) - #include - #else -@@ -133,7 +133,7 @@ - - // Empty SIMD registers state after using them. - void EmptyRegisterStateStub() {} --#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) - void EmptyRegisterStateIntrinsic() { _mm_empty(); } - #endif - typedef void (*EmptyRegisterStateProc)(); -@@ -247,34 +247,46 @@ - // Assembly code confuses MemorySanitizer. Also not available in iOS builds. - #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ - !defined(OS_IOS) -- g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; -+ base::CPU cpu; -+ if (cpu.has_mmx()) { -+ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; -+ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; -+ g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; - - #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -- g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; -+ g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; -+#endif -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) -+ g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; - #else -- g_empty_register_state_proc_ = EmptyRegisterState_MMX; -+ g_empty_register_state_proc_ = EmptyRegisterState_MMX; - #endif -+ } - -- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; -- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; -+ if (cpu.has_sse()) { -+ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; -+ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; -+ } - -- g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; -- g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; -+ if (cpu.has_sse2()) { -+ g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; -+ g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; - - #if defined(ARCH_CPU_X86_64) -- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; - -- // Technically this should be in the MMX section, but MSVC will optimize out -- // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit -- // tests, if that decision can be made at compile time. Since all X64 CPUs -- // have SSE2, we can hack around this by making the selection here. -- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; --#else -- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; -- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; -+ // Technically this should be in the MMX section, but MSVC will optimize out -+ // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit -+ // tests, if that decision can be made at compile time. Since all X64 CPUs -+ // have SSE2, we can hack around this by making the selection here. -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; - #endif -+ } - -- base::CPU cpu; - if (cpu.has_ssse3()) { - g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-03-05 17:26:26.173986250 +0100 -@@ -71,6 +71,29 @@ - DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); - }; - -+TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ ConvertYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -161,9 +184,32 @@ - } - #endif - --// 64-bit release + component builds on Windows are too smart and optimizes --// away the function being tested. --#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) -+TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ const int kSourceDx = 80000; // This value means a scale down. -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ ScaleYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -190,6 +236,32 @@ - kPerfTestIterations / total_time_seconds, "runs/s", true); - } - -+TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ const int kSourceDx = 80000; // This value means a scale down. -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ LinearScaleYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -215,7 +287,6 @@ - "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", - kPerfTestIterations / total_time_seconds, "runs/s", true); - } --#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) - - #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-03-05 17:26:26.174986235 +0100 -@@ -643,6 +643,37 @@ - EXPECT_EQ(0, error); - } - -+TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ ConvertYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ ConvertYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -674,9 +705,40 @@ - kWidth * kBpp)); - } - --// 64-bit release + component builds on Windows are too smart and optimizes --// away the function being tested. --#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) -+TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ const int kSourceDx = 80000; // This value means a scale down. -+ ScaleYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ ScaleYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -711,6 +773,40 @@ - kWidth * kBpp)); - } - -+TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ const int kSourceDx = 80000; // This value means a scale down. -+ LinearScaleYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -744,7 +840,6 @@ - rgb_bytes_converted.get(), - kWidth * kBpp)); - } --#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) - - TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { - std::unique_ptr src(new uint8_t[16]); -@@ -761,6 +856,30 @@ - } - } - -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr src(new uint8[16]); -+ scoped_ptr dst(new uint8[16]); -+ -+ memset(src.get(), 0xff, 16); -+ memset(dst.get(), 0, 16); -+ -+ media::FilterYUVRows_MMX(dst.get(), src.get(), src.get(), 1, 255); -+ media::EmptyRegisterState(); -+ -+ EXPECT_EQ(255u, dst[0]); -+ for (int i = 1; i < 16; ++i) { -+ EXPECT_EQ(0u, dst[i]); -+ } -+} -+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+ - TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { - base::CPU cpu; - if (!cpu.has_sse2()) { -@@ -782,6 +901,38 @@ - } - } - -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ const int kSize = 32; -+ scoped_ptr src(new uint8[kSize]); -+ scoped_ptr dst_sample(new uint8[kSize]); -+ scoped_ptr dst(new uint8[kSize]); -+ -+ memset(dst_sample.get(), 0, kSize); -+ memset(dst.get(), 0, kSize); -+ for (int i = 0; i < kSize; ++i) -+ src[i] = 100 + i; -+ -+ media::FilterYUVRows_C(dst_sample.get(), -+ src.get(), src.get(), 17, 128); -+ -+ // Generate an unaligned output address. -+ uint8* dst_ptr = -+ reinterpret_cast( -+ (reinterpret_cast(dst.get() + 8) & ~7) + 1); -+ media::FilterYUVRows_MMX(dst_ptr, src.get(), src.get(), 17, 128); -+ media::EmptyRegisterState(); -+ -+ EXPECT_EQ(0, memcmp(dst_sample.get(), dst_ptr, 17)); -+} -+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+ - TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { - base::CPU cpu; - if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-03-05 17:26:26.175986220 +0100 -@@ -805,6 +805,26 @@ - "//base", - "//ui/gfx/geometry", - ] -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":shared_memory_support_sse", -+ ] -+ } -+} -+ -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("shared_memory_support_sse") { -+ sources = [ -+ "base/simd/vector_math_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } - } - - # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/media/media.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/media/media.gyp 2017-03-05 17:51:56.424188330 +0100 -@@ -1020,12 +1020,12 @@ - ['target_arch=="ia32" or target_arch=="x64"', { - 'dependencies': [ - 'media_asm', -+ 'media_mmx', -+ 'media_sse', -+ 'media_sse2', - ], - 'sources': [ -- 'base/simd/convert_rgb_to_yuv_sse2.cc', -- 'base/simd/convert_rgb_to_yuv_ssse3.cc', - 'base/simd/convert_yuv_to_rgb_x86.cc', -- 'base/simd/filter_yuv_sse2.cc', - ], - }], - ['OS!="linux" and OS!="win"', { -@@ -1616,6 +1616,11 @@ - 'USE_NEON' - ], - }], -+ ['target_arch=="ia32" or target_arch=="x64"', { -+ 'dependencies': [ -+ 'shared_memory_support_sse' -+ ], -+ }], - ], - }, - { -@@ -1633,6 +1638,7 @@ - 'type': 'static_library', - 'sources': [ - 'base/simd/convert_rgb_to_yuv_ssse3.asm', -+ 'base/simd/convert_yuv_to_rgb_mmx.asm', - 'base/simd/convert_yuv_to_rgb_sse.asm', - 'base/simd/convert_yuva_to_argb_mmx.asm', - 'base/simd/empty_register_state_mmx.asm', -@@ -1713,6 +1719,75 @@ - '../third_party/yasm/yasm_compile.gypi', - ], - }, -+ { -+ # GN version: //media/base:media_mmx -+ 'target_name': 'media_mmx', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-mmmx', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/filter_yuv_mmx.cc', -+ ], -+ }, -+ { -+ # GN version: //media/base:media_sse -+ 'target_name': 'media_sse', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/sinc_resampler_sse.cc', -+ ], -+ }, -+ { -+ # GN version: //media/base:media_sse2 -+ 'target_name': 'media_sse2', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse2', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/convert_rgb_to_yuv_sse2.cc', -+ 'base/simd/convert_rgb_to_yuv_ssse3.cc', -+ 'base/simd/filter_yuv_sse2.cc', -+ ], -+ }, -+ { -+ 'target_name': 'shared_memory_support_sse', -+ 'type': 'static_library', -+ 'cflags': [ -+ '-msse', -+ ], -+ 'defines': [ -+ 'MEDIA_IMPLEMENTATION', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'sources': [ -+ 'base/simd/vector_math_sse.cc', -+ ], -+ }, - ], # targets - }], - ['OS=="win"', { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-03-05 17:56:08.829413581 +0100 -@@ -329,11 +329,6 @@ - if (!is_ios) { - sources += [ "ext/platform_canvas.cc" ] - } -- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { -- sources += [ "ext/convolver_SSE2.cc" ] -- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { -- sources += [ "ext/convolver_mips_dspr2.cc" ] -- } - - # The skia gypi values are relative to the skia_dir, so we need to rebase. - sources += gypi_skia_core.sources -@@ -642,7 +637,15 @@ - if (skia_build_no_opts) { - sources = gypi_skia_opts.none_sources - } else if (current_cpu == "x86" || current_cpu == "x64") { -- sources = gypi_skia_opts.sse2_sources -+ sources = gypi_skia_opts.sse2_sources + -+ [ -+ # Chrome-specific. -+ "ext/convolver_SSE2.cc", -+ "ext/convolver_SSE2.h", -+ ] -+ if (!is_win || is_clang) { -+ cflags += [ "-msse2" ] -+ } - deps += [ - ":skia_opts_avx", - ":skia_opts_avx2", -@@ -677,6 +680,13 @@ - - if (mips_dsp_rev >= 1) { - sources = gypi_skia_opts.mips_dsp_sources -+ if (mips_dsp_rev >= 2) { -+ sources += [ -+ # Chrome-specific. -+ "ext/convolver_mips_dspr2.cc", -+ "ext/convolver_mips_dspr2.h", -+ ] -+ } - } else { - sources = gypi_skia_opts.none_sources - } -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-03-05 17:26:26.176986205 +0100 -@@ -362,10 +362,13 @@ - - void SetupSIMD(ConvolveProcs *procs) { - #ifdef SIMD_SSE2 -- procs->extra_horizontal_reads = 3; -- procs->convolve_vertically = &ConvolveVertically_SSE2; -- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ base::CPU cpu; -+ if (cpu.has_sse2()) { -+ procs->extra_horizontal_reads = 3; -+ procs->convolve_vertically = &ConvolveVertically_SSE2; -+ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -+ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ } - #elif defined SIMD_MIPS_DSPR2 - procs->extra_horizontal_reads = 3; - procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-03-05 17:26:26.239985269 +0100 -@@ -11,6 +11,7 @@ - #include - - #include "build/build_config.h" -+#include "base/cpu.h" - #include "third_party/skia/include/core/SkSize.h" - #include "third_party/skia/include/core/SkTypes.h" - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_chrome.gypi 2017-03-05 17:26:26.239985269 +0100 -@@ -9,6 +9,7 @@ - { - 'dependencies': [ - 'skia_library', -+ 'skia_chrome_opts', - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - ], -@@ -67,22 +68,16 @@ - 'ext/skia_utils_base.cc', - ], - }], -+ ['OS == "ios"', { -+ 'dependencies!': [ -+ 'skia_chrome_opts', -+ ], -+ }], - [ 'OS != "android" and (OS != "linux" or use_cairo==1)', { - 'sources!': [ - 'ext/bitmap_platform_device_skia.cc', - ], - }], -- [ 'OS != "ios" and target_arch != "arm" and target_arch != "mipsel" and \ -- target_arch != "arm64" and target_arch != "mips64el"', { -- 'sources': [ -- 'ext/convolver_SSE2.cc', -- ], -- }], -- [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ -- 'sources': [ -- 'ext/convolver_mips_dspr2.cc', -- ], -- }], - ], - - 'target_conditions': [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia.gyp 2017-03-05 17:26:26.239985269 +0100 -@@ -128,6 +128,37 @@ - # targets that are not dependent upon the component type - 'targets': [ - { -+ 'target_name': 'skia_chrome_opts', -+ 'type': 'static_library', -+ 'include_dirs': [ -+ '..', -+ 'config', -+ '../third_party/skia/include/core', -+ ], -+ 'conditions': [ -+ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ -+ target_arch != "arm" and target_arch != "mipsel" and \ -+ target_arch != "arm64" and target_arch != "mips64el"', { -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ [ 'target_arch != "arm" and target_arch != "mipsel" and \ -+ target_arch != "arm64" and target_arch != "mips64el"', { -+ 'sources': [ -+ 'ext/convolver_SSE2.cc', -+ 'ext/convolver_SSE2.h', -+ ], -+ }], -+ [ 'target_arch == "mipsel" and mips_dsp_rev >= 2',{ -+ 'sources': [ -+ 'ext/convolver_mips_dspr2.cc', -+ 'ext/convolver_mips_dspr2.h', -+ ], -+ }], -+ ], -+ }, -+ { - 'target_name': 'image_operations_bench', - # The optimize: 'max' scattered throughout are particularly - # important when compiled by MSVC 2013, which seems -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/skia/skia_library_opts.gyp 2017-03-05 17:26:26.239985269 +0100 -@@ -19,10 +19,22 @@ - }, - - 'targets': [ -- # SSE files have to be built in a separate target, because gcc needs -- # different -msse flags for different SSE levels which enable use of SSE -- # intrinsics but also allow emission of SSE2 instructions for scalar code. -- # gyp does not allow per-file compiler flags. -+ # Due to an unfortunate intersection of lameness between gcc and gyp, -+ # we have to build the *_SSE2.cpp files in a separate target. The -+ # gcc lameness is that, in order to compile SSE2 intrinsics code, it -+ # must be passed the -msse2 flag. However, with this flag, it may -+ # emit SSE2 instructions even for scalar code, such as the CPUID -+ # test used to test for the presence of SSE2. So that, and all other -+ # code must be compiled *without* -msse2. The gyp lameness is that it -+ # does not allow file-specific CFLAGS, so we must create this extra -+ # target for those files to be compiled with -msse2. -+ # -+ # This is actually only a problem on 32-bit Linux (all Intel Macs have -+ # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit -+ # SSE2 from instrinsics, which generating plain ol' 386 for everything -+ # else). However, to keep the .gyp file simple and avoid platform-specific -+ # build breakage, we do this on all platforms. -+ - # For about the same reason, we need to compile the ARM opts files - # separately as well. - { -@@ -45,12 +57,13 @@ - ], - 'include_dirs': [ '<@(include_dirs)' ], - 'conditions': [ -+ [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ -+ target_arch != "arm" and target_arch != "arm64" and \ -+ target_arch != "mipsel" and target_arch != "mips64el"', { -+ 'cflags': [ '-msse2' ], -+ }], - [ 'target_arch != "arm" and target_arch != "mipsel" and \ - target_arch != "arm64" and target_arch != "mips64el"', { -- # Chrome builds with -msse2 locally, so sse2_sources could in theory -- # be in the regular skia target. But we need skia_opts for arm -- # anyway, so putting sse2_sources here is simpler than making this -- # conditionally a type none target on x86. - 'sources': [ '<@(sse2_sources)' ], - 'dependencies': [ - 'skia_opts_ssse3', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-03-05 17:26:26.240985255 +0100 -@@ -31,8 +31,8 @@ - ] - - if (current_cpu == "x86" || current_cpu == "x64") { -- defines = [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ "qcms_sse2" ] - } - } - -@@ -75,3 +75,15 @@ - public_configs = [ ":qcms_config" ] - } - } -+ -+source_set("qcms_sse2") { -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ public_configs = [ ":qcms_config" ] -+ -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ defines = [ "SSE2_ENABLE" ] -+ sources = [ "src/transform-sse2.c" ] -+ cflags = [ "-msse2" ] -+ } -+} -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/qcms/qcms.gyp 2017-03-05 18:01:48.843328633 +0100 -@@ -52,10 +52,10 @@ - 'conditions': [ - ['target_arch=="ia32" or target_arch=="x64"', { - 'defines': [ -- 'SSE2_ENABLE', -+ 'SSE2_ENABLE', # runtime detection - ], -- 'sources': [ -- 'src/transform-sse2.c', -+ 'dependencies': [ -+ 'qcms_sse2', - ], - }], - ], -@@ -68,6 +68,29 @@ - }], - ], - }, -+ { -+ 'target_name': 'qcms_sse2', -+ 'type': 'static_library', -+ 'conditions': [ -+ ['target_arch == "ia32" or target_arch == "x64"', { -+ 'defines': [ -+ 'SSE2_ENABLE', -+ ], -+ 'sources': [ -+ # Conditional compilation for SSE2 code on x86 and x64 machines -+ 'src/transform-sse2.c', -+ ], -+ 'cflags': [ -+ '-msse2', -+ ], -+ }], -+ ], -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ './src', -+ ], -+ }, -+ }, - ], - 'conditions': [ - ['disable_qcms == 0', { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-03-05 17:26:26.240985255 +0100 -@@ -32,7 +32,7 @@ - #include "wtf/MathExtras.h" - #include - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -@@ -575,7 +575,7 @@ - // First handle linear and exponential ramps which require looking ahead to the next event. - if (nextEventType == ParamEvent::LinearRampToValue) { - const float valueDelta = value2 - value1; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Minimize in-loop operations. Calculate starting value and increment. Next step: value += inc. - // value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1); - // inc = 4 / sampleRate * k * (value2 - value1); -@@ -738,7 +738,7 @@ - for (; writeIndex < fillToFrame; ++writeIndex) - values[writeIndex] = target; - } else { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Resolve recursion by expanding constants to achieve a 4-step loop unrolling. - // v1 = v0 + (t - v0) * c - // v2 = v1 + (t - v1) * c -@@ -843,7 +843,7 @@ - // Render the stretched curve data using linear interpolation. Oversampled - // curve data can be provided if sharp discontinuities are desired. - unsigned k = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); - const __m128 vCurvePointsPerFrame = _mm_set_ps1(curvePointsPerFrame); - const __m128 vNumberOfCurvePointsM1 = _mm_set_ps1(numberOfCurvePoints - 1); -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-03-05 18:09:17.132624414 +0100 -@@ -26,6 +26,9 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/DirectConvolver.h" - - #if OS(MACOSX) -@@ -35,22 +38,44 @@ - #include "platform/audio/VectorMath.h" - #include "wtf/CPU.h" - --#if (CPU(X86) || CPU(X86_64)) && !OS(MACOSX) -+#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !OS(MACOSX) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - namespace blink { - - using namespace VectorMath; - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - DirectConvolver::DirectConvolver(size_t inputBlockSize) - : m_inputBlockSize(inputBlockSize) - , m_buffer(inputBlockSize * 2) - { -+#if CPU(X86) -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) -+#else - void DirectConvolver::process(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess) -+#endif - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); -+ return; -+ } -+#endif - ASSERT(framesToProcess == m_inputBlockSize); - if (framesToProcess != m_inputBlockSize) - return; -@@ -82,7 +107,7 @@ - #endif // CPU(X86) - #else - size_t i = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Convolution using SSE2. Currently only do this if both |kernelSize| and |framesToProcess| - // are multiples of 4. If not, use the straightforward loop below. - -@@ -392,7 +417,7 @@ - } - destP[i++] = sum; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - #endif // OS(MACOSX) -@@ -401,10 +426,14 @@ - memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void DirectConvolver::reset() - { - m_buffer.zero(); - } - -+#endif -+ - } // namespace blink - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-03-05 17:26:26.241985240 +0100 -@@ -32,6 +32,7 @@ - #include "platform/PlatformExport.h" - #include "platform/audio/AudioArray.h" - #include "wtf/Allocator.h" -+#include "wtf/CPU.h" - #include "wtf/Noncopyable.h" - - namespace blink { -@@ -50,6 +51,11 @@ - size_t m_inputBlockSize; - - AudioFloatArray m_buffer; -+ -+#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioFloatArray* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-03-05 17:26:26.242985225 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-03-05 17:26:26.242985225 +0100 -@@ -26,15 +26,22 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/SincResampler.h" - #include "platform/audio/AudioBus.h" - #include "wtf/CPU.h" - #include "wtf/MathExtras.h" - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - // Input buffer layout, dividing the total buffer into regions (r0 - r5): - // - // |----------------|----------------------------------------------------------------|----------------| -@@ -64,6 +71,8 @@ - - namespace blink { - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - SincResampler::SincResampler(double scaleFactor, unsigned kernelSize, unsigned numberOfKernelOffsets) - : m_scaleFactor(scaleFactor) - , m_kernelSize(kernelSize) -@@ -77,6 +86,10 @@ - , m_sourceProvider(nullptr) - , m_isBufferPrimed(false) - { -+#if CPU(X86) -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif - initializeKernel(); - } - -@@ -193,8 +206,20 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) -+#else - void SincResampler::process(AudioSourceProvider* sourceProvider, float* destination, size_t framesToProcess) -+#endif - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_processSSE2(sourceProvider, destination, framesToProcess); -+ return; -+ } -+#endif - bool isGood = sourceProvider && m_blockSize > m_kernelSize && m_inputBuffer.size() >= m_blockSize + m_kernelSize && !(m_kernelSize % 2); - ASSERT(isGood); - if (!isGood) -@@ -256,7 +281,7 @@ - { - float input; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately. - while ((reinterpret_cast(inputP) & 0x0F) && n) { - CONVOLVE_ONE_SAMPLE -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-03-05 17:26:26.305984290 +0100 -@@ -33,6 +33,7 @@ - #include "platform/audio/AudioArray.h" - #include "platform/audio/AudioSourceProvider.h" - #include "wtf/Allocator.h" -+#include "wtf/CPU.h" - #include "wtf/Noncopyable.h" - - namespace blink { -@@ -84,6 +85,11 @@ - - // The buffer is primed once at the very beginning of processing. - bool m_isBufferPrimed; -+ -+#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioSourceProvider*, float* destination, size_t framesToProcess); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-03-05 17:26:26.305984290 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-03-05 17:26:26.306984275 +0100 -@@ -22,6 +22,9 @@ - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/VectorMath.h" - #include "wtf/Assertions.h" - #include "wtf/CPU.h" -@@ -32,10 +35,14 @@ - #include - #endif - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - #if HAVE(ARM_NEON_INTRINSICS) - #include - #endif -@@ -118,11 +125,25 @@ - } - #else - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+namespace SSE2 { -+#endif -+ -+#if CPU(X86) && !defined(__SSE2__) -+static base::CPU cpu; -+#endif -+ - void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, destStride, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; - -@@ -193,9 +214,15 @@ - - void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; - -@@ -266,16 +293,22 @@ - sourceP += sourceStride; - destP += destStride; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - } - - void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 ==1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -378,17 +411,23 @@ - source2P += sourceStride2; - destP += destStride; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - } - - void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess); -+ return; -+ } -+#endif - - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the source1P address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(source1P) & 0x0F) && n) { -@@ -460,8 +499,14 @@ - - void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, imagDestP, framesToProcess); -+ return; -+ } -+#endif - unsigned i = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Only use the SSE optimization in the very common case that all addresses are 16-byte aligned. - // Otherwise, fall through to the scalar code below. - if (!(reinterpret_cast(real1P) & 0x0F) -@@ -516,10 +561,16 @@ - - void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - float sum = 0; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -581,10 +632,16 @@ - - void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess) - { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - float max = 0; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed separately. - while ((reinterpret_cast(sourceP) & 0x0F) && n) { -@@ -648,6 +705,8 @@ - *maxP = max; - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess) - { - int n = framesToProcess; -@@ -678,6 +737,12 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+} // namespace SSE2 -+#endif -+ - #endif // OS(MACOSX) - - } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-03-05 17:26:26.306984275 +0100 -@@ -26,6 +26,7 @@ - #define VectorMath_h - - #include "platform/PlatformExport.h" -+#include "wtf/CPU.h" - #include "wtf/build_config.h" - #include - -@@ -55,6 +56,28 @@ - // Copies elements while clipping values to the threshold inputs. - PLATFORM_EXPORT void vclip(const float* sourceP, int sourceStride, const float* lowThresholdP, const float* highThresholdP, float* destP, int destStride, size_t framesToProcess); - -+#if CPU(X86) -+namespace SSE2 { -+// Vector scalar multiply and then add. -+PLATFORM_EXPORT void vsma(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess); -+ -+PLATFORM_EXPORT void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess); -+PLATFORM_EXPORT void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess); -+ -+// Finds the maximum magnitude of a float vector. -+PLATFORM_EXPORT void vmaxmgv(const float* sourceP, int sourceStride, float* maxP, size_t framesToProcess); -+ -+// Sums the squares of a float vector's elements. -+PLATFORM_EXPORT void vsvesq(const float* sourceP, int sourceStride, float* sumP, size_t framesToProcess); -+ -+// For an element-by-element multiply of two float vectors. -+PLATFORM_EXPORT void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess); -+ -+// Multiplies two complex vectors. -+PLATFORM_EXPORT void zvmul(const float* real1P, const float* imag1P, const float* real2P, const float* imag2P, float* realDestP, float* imagDestP, size_t framesToProcess); -+} -+#endif -+ - } // namespace VectorMath - } // namespace blink - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-03-05 17:26:26.307984260 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/blink_platform.gyp 2017-03-05 17:26:26.307984260 +0100 -@@ -392,6 +392,11 @@ - '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl', - ], - }], -+ ['target_arch == "ia32"', { -+ 'dependencies': [ -+ 'blink_sse2', -+ ], -+ }], - ['target_arch=="arm"', { - 'dependencies': [ - 'blink_arm_neon', -@@ -406,6 +411,36 @@ - }], - ], - }, -+ { -+ 'target_name': 'blink_sse2', -+ 'conditions': [ -+ ['target_arch=="ia32"', { -+ 'type': 'static_library', -+ 'dependencies': [ -+ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', -+ '../config.gyp:config', -+ '../wtf/wtf.gyp:wtf', -+ 'blink_common', -+ 'blink_heap_asm_stubs', -+ ], -+ 'defines': [ -+ 'BLINK_PLATFORM_IMPLEMENTATION=1', -+ 'INSIDE_BLINK', -+ ], -+ 'sources': [ -+ 'audio/DirectConvolverSSE2.cpp', -+ 'audio/SincResamplerSSE2.cpp', -+ 'audio/VectorMathSSE2.cpp', -+ ], -+ 'cflags': [ -+ '-msse2', -+ '-mfpmath=sse', -+ ], -+ },{ # target_arch != "ia32" -+ 'type': 'none', -+ }], -+ ], -+ }, - # The *NEON.cpp files fail to compile when -mthumb is passed. Force - # them to build in ARM mode. - # See https://bugs.webkit.org/show_bug.cgi?id=62916. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-03-05 17:26:26.308984245 +0100 -@@ -5,7 +5,7 @@ - #ifndef WebGLImageConversionSSE_h - #define WebGLImageConversionSSE_h - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - - #include - -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-03-05 17:26:26.309984231 +0100 -@@ -423,7 +423,7 @@ - const uint32_t* source32 = reinterpret_cast_ptr(source); - uint32_t* destination32 = reinterpret_cast_ptr(destination); - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); - #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -442,7 +442,7 @@ - - template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) - { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(ARM_NEON_INTRINSICS) -@@ -464,7 +464,7 @@ - - template<> void unpack(const uint16_t* source, uint8_t* destination, unsigned pixelsPerRow) - { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(ARM_NEON_INTRINSICS) -@@ -630,7 +630,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); - #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -667,7 +667,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); - #endif - for (unsigned i = 0; i < pixelsPerRow; ++i) { -@@ -741,7 +741,7 @@ - // FIXME: this routine is lossy and must be removed. - template<> void pack(const uint8_t* source, uint8_t* destination, unsigned pixelsPerRow) - { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); - #else - for (unsigned i = 0; i < pixelsPerRow; ++i) { -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-03-05 18:14:44.694725685 +0100 -@@ -14,6 +14,7 @@ - #include "webrtc/common_audio/real_fourier_ooura.h" - #include "webrtc/common_audio/real_fourier_openmax.h" - #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -+#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" - - namespace webrtc { - -@@ -23,7 +24,15 @@ - - std::unique_ptr RealFourier::Create(int fft_order) { - #if defined(RTC_USE_OPENMAX_DL) -+#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) -+ // x86 CPU detection required. -+ if (WebRtc_GetCPUInfo(kSSE2)) -+ return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+ else -+ return std::unique_ptr(new RealFourierOoura(fft_order)); -+#else - return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+#endif - #else - return std::unique_ptr(new RealFourierOoura(fft_order)); - #endif -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/tools/gyp/pylib/gyp/generator/ninja.py 2017-03-05 17:26:26.310984216 +0100 -@@ -1345,6 +1345,8 @@ - # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. - prefixed_objects = ['$$PWD/' + o for o in toAbsPaths(objects)] - prefixed_archives = ['$$PWD/' + o for o in toAbsPaths(libs)] -+ if len(solibs): -+ prefixed_solibs = ['$$PWD/' + so for so in toAbsPaths(solibs)] - - pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) - pri_file.write("OBJECTS += %s\n" % qmakeLiteral(' '.join(prefixed_objects))) -@@ -1353,6 +1355,8 @@ - pri_file.write("LIBS_PRIVATE += -Wl,--start-group %s -Wl,--end-group\n" % qmakeLiteral(' '.join(prefixed_archives))) - else: - pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_archives))) -+ if len(solibs): -+ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_solibs))) - # External libs have to come after objects/archives, the linker resolve them in order. - pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) - # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-03-05 18:22:29.296777508 +0100 -@@ -1523,41 +1523,41 @@ - - if (v8_target_cpu == "x86") { - sources += [ -- "src/compiler/ia32/code-generator-ia32.cc", -- "src/compiler/ia32/instruction-codes-ia32.h", -- "src/compiler/ia32/instruction-scheduler-ia32.cc", -- "src/compiler/ia32/instruction-selector-ia32.cc", -- "src/crankshaft/ia32/lithium-codegen-ia32.cc", -- "src/crankshaft/ia32/lithium-codegen-ia32.h", -- "src/crankshaft/ia32/lithium-gap-resolver-ia32.cc", -- "src/crankshaft/ia32/lithium-gap-resolver-ia32.h", -- "src/crankshaft/ia32/lithium-ia32.cc", -- "src/crankshaft/ia32/lithium-ia32.h", -- "src/debug/ia32/debug-ia32.cc", -- "src/full-codegen/ia32/full-codegen-ia32.cc", -- "src/ia32/assembler-ia32-inl.h", -- "src/ia32/assembler-ia32.cc", -- "src/ia32/assembler-ia32.h", -- "src/ia32/builtins-ia32.cc", -- "src/ia32/code-stubs-ia32.cc", -- "src/ia32/code-stubs-ia32.h", -- "src/ia32/codegen-ia32.cc", -- "src/ia32/codegen-ia32.h", -- "src/ia32/cpu-ia32.cc", -- "src/ia32/deoptimizer-ia32.cc", -- "src/ia32/disasm-ia32.cc", -- "src/ia32/frames-ia32.cc", -- "src/ia32/frames-ia32.h", -- "src/ia32/interface-descriptors-ia32.cc", -- "src/ia32/macro-assembler-ia32.cc", -- "src/ia32/macro-assembler-ia32.h", -- "src/ic/ia32/access-compiler-ia32.cc", -- "src/ic/ia32/handler-compiler-ia32.cc", -- "src/ic/ia32/ic-compiler-ia32.cc", -- "src/ic/ia32/ic-ia32.cc", -- "src/ic/ia32/stub-cache-ia32.cc", -- "src/regexp/ia32/regexp-macro-assembler-ia32.cc", -- "src/regexp/ia32/regexp-macro-assembler-ia32.h", -+ "src/compiler/x87/code-generator-x87.cc", -+ "src/compiler/x87/instruction-codes-x87.h", -+ "src/compiler/x87/instruction-scheduler-x87.cc", -+ "src/compiler/x87/instruction-selector-x87.cc", -+ "src/crankshaft/x87/lithium-codegen-x87.cc", -+ "src/crankshaft/x87/lithium-codegen-x87.h", -+ "src/crankshaft/x87/lithium-gap-resolver-x87.cc", -+ "src/crankshaft/x87/lithium-gap-resolver-x87.h", -+ "src/crankshaft/x87/lithium-x87.cc", -+ "src/crankshaft/x87/lithium-x87.h", -+ "src/debug/x87/debug-x87.cc", -+ "src/full-codegen/x87/full-codegen-x87.cc", -+ "src/x87/assembler-x87-inl.h", -+ "src/x87/assembler-x87.cc", -+ "src/x87/assembler-x87.h", -+ "src/x87/builtins-x87.cc", -+ "src/x87/code-stubs-x87.cc", -+ "src/x87/code-stubs-x87.h", -+ "src/x87/codegen-x87.cc", -+ "src/x87/codegen-x87.h", -+ "src/x87/cpu-x87.cc", -+ "src/x87/deoptimizer-x87.cc", -+ "src/x87/disasm-x87.cc", -+ "src/x87/frames-x87.cc", -+ "src/x87/frames-x87.h", -+ "src/x87/interface-descriptors-x87.cc", -+ "src/x87/macro-assembler-x87.cc", -+ "src/x87/macro-assembler-x87.h", -+ "src/ic/x87/access-compiler-x87.cc", -+ "src/ic/x87/handler-compiler-x87.cc", -+ "src/ic/x87/ic-compiler-x87.cc", -+ "src/ic/x87/ic-x87.cc", -+ "src/ic/x87/stub-cache-x87.cc", -+ "src/regexp/x87/regexp-macro-assembler-x87.cc", -+ "src/regexp/x87/regexp-macro-assembler-x87.h", - ] - } else if (v8_target_cpu == "x64") { - sources += [ -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-03-05 18:20:24.988636550 +0100 -@@ -159,6 +159,9 @@ - }, { - 'gomadir': 'v8_sse2.gyp -+# rename all target names -+SUBTARGETS=`grep "'target_name': '" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"` -+SEDS= -+for SUBTARGET in $SUBTARGETS ; do -+ SEDS=$SEDS\ -e\ "s/'$SUBTARGET\(['#]\)/'${SUBTARGET}_sse2\1/g" -+done -+# in addition: -+# * set v8_target_arch to "ia32" (instead of "x87") -+# * rename all actions -+# * fix mksnapshot_exec to match the renamed target -+# * rename the generated snapshot.cc (but not mksnapshot.cc) to snapshot_sse2.cc -+# * rename the generated *libraries.cc to *libraries_sse2.cc -+# * rename the generated *.bin to *_sse2.bin -+# * set product_name and product_dir for the v8_sse2 target -+sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ -+ -e "s/\('action_name': '\)/\1v8_sse2_/g" \ -+ $SEDS \ -+ -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ -+ -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ -+ -e "s/libraries\.cc/libraries_sse2.cc/g" \ -+ -e "s/\.bin/_sse2.bin/g" \ -+ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ -+ v8.gyp >>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-03-05 17:30:17.500552662 +0100 -@@ -36,6 +36,14 @@ - 'v8_experimental_extra_library_files%': [], - 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', - 'remove_v8base_debug_symbols%': 0, -+ 'conditions': [ -+ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds -+ ['target_arch == "ia32"', { -+ 'v8_component%': 'shared_library', -+ }, { -+ 'v8_component%': '<(component)', -+ }], -+ ], - }, - 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], - 'targets': [ -@@ -49,8 +57,8 @@ - }, { - 'toolsets': ['target'], - }], -- ['component=="shared_library"', { -- 'type': '<(component)', -+ ['v8_component=="shared_library"', { -+ 'type': '<(v8_component)', - 'sources': [ - # Note: on non-Windows we still build this file so that gyp - # has some sources to link into the component. -@@ -161,7 +169,7 @@ - 'js2c', - ], - }], -- ['component=="shared_library"', { -+ ['v8_component=="shared_library"', { - 'defines': [ - 'V8_SHARED', - 'BUILDING_V8_SHARED', -@@ -253,7 +261,7 @@ - 'toolsets': ['target'], - 'dependencies': ['js2c'], - }], -- ['component=="shared_library"', { -+ ['v8_component=="shared_library"', { - 'defines': [ - 'BUILDING_V8_SHARED', - 'V8_SHARED', -@@ -281,7 +289,7 @@ - 'natives_blob', - ], - }], -- ['component=="shared_library"', { -+ ['v8_component=="shared_library"', { - 'defines': [ - 'V8_SHARED', - 'BUILDING_V8_SHARED', -@@ -1608,7 +1616,7 @@ - # See http://crbug.com/485155. - 'msvs_shard': 4, - }], -- ['component=="shared_library"', { -+ ['v8_component=="shared_library"', { - 'defines': [ - 'BUILDING_V8_SHARED', - 'V8_SHARED', -diff -Nur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/v8_sse2.gyp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-no-sse2/src/3rdparty/chromium/v8/src/v8_sse2.gyp 2017-03-05 18:25:37.781958850 +0100 -@@ -0,0 +1,2313 @@ -+# Generated from v8.gyp by make-v8-sse2-gyp.sh -+# Copyright 2012 the V8 project authors. All rights reserved. -+# Redistribution and use in source and binary forms, with or without -+# modification, are permitted provided that the following conditions are -+# met: -+# -+# * Redistributions of source code must retain the above copyright -+# notice, this list of conditions and the following disclaimer. -+# * Redistributions in binary form must reproduce the above -+# copyright 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. -+ -+{ -+ 'variables': { -+ 'v8_target_arch': 'ia32', -+ 'v8_code': 1, -+ 'v8_random_seed%': 314159265, -+ 'v8_vector_stores%': 0, -+ 'embed_script%': "", -+ 'warmup_script%': "", -+ 'v8_extra_library_files%': [], -+ 'v8_experimental_extra_library_files%': [], -+ 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot_sse2<(EXECUTABLE_SUFFIX)', -+ 'remove_v8base_debug_symbols%': 0, -+ 'conditions': [ -+ # build V8 shared on ia32 so we can swap x87 vs. SSE2 builds -+ ['target_arch == "ia32"', { -+ 'v8_component%': 'shared_library', -+ }, { -+ 'v8_component%': '<(component)', -+ }], -+ ], -+ }, -+ 'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'], -+ 'targets': [ -+ { -+ 'target_name': 'v8_sse2', -+ 'product_name': 'v8', -+ 'product_dir': '<(PRODUCT_DIR)/lib/sse2', -+ 'dependencies_traverse': 1, -+ 'dependencies': ['v8_maybe_snapshot_sse2'], -+ 'conditions': [ -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ }, { -+ 'toolsets': ['target'], -+ }], -+ ['v8_component=="shared_library"', { -+ 'type': '<(v8_component)', -+ 'sources': [ -+ # Note: on non-Windows we still build this file so that gyp -+ # has some sources to link into the component. -+ 'v8dll-main.cc', -+ ], -+ 'include_dirs': [ -+ '..', -+ ], -+ 'defines': [ -+ 'V8_SHARED', -+ 'BUILDING_V8_SHARED', -+ ], -+ 'direct_dependent_settings': { -+ 'defines': [ -+ 'V8_SHARED', -+ 'USING_V8_SHARED', -+ ], -+ }, -+ 'target_conditions': [ -+ ['OS=="android" and _toolset=="target"', { -+ 'libraries': [ -+ '-llog', -+ ], -+ 'include_dirs': [ -+ 'src/common/android/include', -+ ], -+ }], -+ ], -+ 'conditions': [ -+ ['OS=="mac"', { -+ 'xcode_settings': { -+ 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load'] -+ }, -+ }], -+ ['soname_version!=""', { -+ 'product_extension': 'so.<(soname_version)', -+ }], -+ ], -+ }, -+ { -+ 'type': 'none', -+ }], -+ ], -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ '../include', -+ ], -+ }, -+ }, -+ { -+ # This rule delegates to either v8_snapshot, v8_nosnapshot, or -+ # v8_external_snapshot, depending on the current variables. -+ # The intention is to make the 'calling' rules a bit simpler. -+ 'target_name': 'v8_maybe_snapshot_sse2', -+ 'type': 'none', -+ 'conditions': [ -+ ['v8_use_snapshot!="true"', { -+ # The dependency on v8_base should come from a transitive -+ # dependency however the Android toolchain requires libv8_base.a -+ # to appear before libv8_snapshot.a so it's listed explicitly. -+ 'dependencies': ['v8_base_sse2', 'v8_nosnapshot_sse2'], -+ }], -+ ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', { -+ # The dependency on v8_base should come from a transitive -+ # dependency however the Android toolchain requires libv8_base.a -+ # to appear before libv8_snapshot.a so it's listed explicitly. -+ 'dependencies': ['v8_base_sse2', 'v8_snapshot_sse2'], -+ }], -+ ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', { -+ 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], -+ 'inputs': [ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', ], -+ }], -+ ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', { -+ 'dependencies': ['v8_base_sse2', 'v8_external_snapshot_sse2'], -+ 'target_conditions': [ -+ ['_toolset=="host"', { -+ 'inputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', -+ ], -+ }, { -+ 'inputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', -+ ], -+ }], -+ ], -+ }], -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ }, { -+ 'toolsets': ['target'], -+ }], -+ ] -+ }, -+ { -+ 'target_name': 'v8_snapshot_sse2', -+ 'type': 'static_library', -+ 'conditions': [ -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ 'dependencies': [ -+ 'mksnapshot_sse2#host', -+ 'js2c_sse2#host', -+ ], -+ }, { -+ 'toolsets': ['target'], -+ 'dependencies': [ -+ 'mksnapshot_sse2', -+ 'js2c_sse2', -+ ], -+ }], -+ ['v8_component=="shared_library"', { -+ 'defines': [ -+ 'V8_SHARED', -+ 'BUILDING_V8_SHARED', -+ ], -+ 'direct_dependent_settings': { -+ 'defines': [ -+ 'V8_SHARED', -+ 'USING_V8_SHARED', -+ ], -+ }, -+ }], -+ ], -+ 'dependencies': [ -+ 'v8_base_sse2', -+ ], -+ 'include_dirs+': [ -+ '..', -+ ], -+ 'sources': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', -+ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ ], -+ 'actions': [ -+ { -+ 'action_name': 'v8_sse2_run_mksnapshot', -+ 'inputs': [ -+ '<(mksnapshot_exec)', -+ ], -+ 'conditions': [ -+ ['embed_script!=""', { -+ 'inputs': [ -+ '<(embed_script)', -+ ], -+ }], -+ ['warmup_script!=""', { -+ 'inputs': [ -+ '<(warmup_script)', -+ ], -+ }], -+ ], -+ 'outputs': [ -+ '<(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ ], -+ 'variables': { -+ 'mksnapshot_flags': [], -+ 'conditions': [ -+ ['v8_random_seed!=0', { -+ 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], -+ }], -+ ['v8_vector_stores!=0', { -+ 'mksnapshot_flags': ['--vector-stores'], -+ }], -+ ], -+ }, -+ 'action': [ -+ '<(mksnapshot_exec)', -+ '<@(mksnapshot_flags)', -+ '--startup_src', '<@(INTERMEDIATE_DIR)/snapshot_sse2.cc', -+ '<(embed_script)', -+ '<(warmup_script)', -+ ], -+ }, -+ ], -+ }, -+ { -+ 'target_name': 'v8_nosnapshot_sse2', -+ 'type': 'static_library', -+ 'dependencies': [ -+ 'v8_base_sse2', -+ ], -+ 'include_dirs+': [ -+ '..', -+ ], -+ 'sources': [ -+ '<(SHARED_INTERMEDIATE_DIR)/libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/extras-libraries_sse2.cc', -+ '<(SHARED_INTERMEDIATE_DIR)/experimental-extras-libraries_sse2.cc', -+ 'snapshot/snapshot-empty.cc', -+ ], -+ 'conditions': [ -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ 'dependencies': ['js2c_sse2#host'], -+ }, { -+ 'toolsets': ['target'], -+ 'dependencies': ['js2c_sse2'], -+ }], -+ ['v8_component=="shared_library"', { -+ 'defines': [ -+ 'BUILDING_V8_SHARED', -+ 'V8_SHARED', -+ ], -+ }], -+ ] -+ }, -+ { -+ 'target_name': 'v8_external_snapshot_sse2', -+ 'type': 'static_library', -+ 'conditions': [ -+ [ 'v8_use_external_startup_data==1', { -+ 'conditions': [ -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ 'dependencies': [ -+ 'mksnapshot_sse2#host', -+ 'js2c_sse2#host', -+ 'natives_blob_sse2', -+ ]}, { -+ 'toolsets': ['target'], -+ 'dependencies': [ -+ 'mksnapshot_sse2', -+ 'js2c_sse2', -+ 'natives_blob_sse2', -+ ], -+ }], -+ ['v8_component=="shared_library"', { -+ 'defines': [ -+ 'V8_SHARED', -+ 'BUILDING_V8_SHARED', -+ ], -+ 'direct_dependent_settings': { -+ 'defines': [ -+ 'V8_SHARED', -+ 'USING_V8_SHARED', -+ ], -+ }, -+ }], -+ ], -+ 'dependencies': [ -+ 'v8_base_sse2', -+ ], -+ 'include_dirs+': [ -+ '..', -+ ], -+ 'sources': [ -+ 'snapshot/natives-external.cc', -+ 'snapshot/snapshot-external.cc', -+ ], -+ 'actions': [ -+ { -+ 'action_name': 'v8_sse2_run_mksnapshot (external)', -+ 'inputs': [ -+ '<(mksnapshot_exec)', -+ ], -+ 'variables': { -+ 'mksnapshot_flags': [], -+ 'conditions': [ -+ ['v8_random_seed!=0', { -+ 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], -+ }], -+ ['v8_vector_stores!=0', { -+ 'mksnapshot_flags': ['--vector-stores'], -+ }], -+ ], -+ }, -+ 'conditions': [ -+ ['embed_script!=""', { -+ 'inputs': [ -+ '<(embed_script)', -+ ], -+ }], -+ ['warmup_script!=""', { -+ 'inputs': [ -+ '<(warmup_script)', -+ ], -+ }], -+ ['want_separate_host_toolset==1', { -+ 'target_conditions': [ -+ ['_toolset=="host"', { -+ 'outputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', -+ ], -+ 'action': [ -+ '<(mksnapshot_exec)', -+ '<@(mksnapshot_flags)', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_host_sse2.bin', -+ '<(embed_script)', -+ '<(warmup_script)', -+ ], -+ }, { -+ 'outputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', -+ ], -+ 'action': [ -+ '<(mksnapshot_exec)', -+ '<@(mksnapshot_flags)', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', -+ '<(embed_script)', -+ '<(warmup_script)', -+ ], -+ }], -+ ], -+ }, { -+ 'outputs': [ -+ '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', -+ ], -+ 'action': [ -+ '<(mksnapshot_exec)', -+ '<@(mksnapshot_flags)', -+ '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_sse2.bin', -+ '<(embed_script)', -+ '<(warmup_script)', -+ ], -+ }], -+ ], -+ }, -+ ], -+ }], -+ ], -+ }, -+ { -+ 'target_name': 'v8_base_sse2', -+ 'type': 'static_library', -+ 'dependencies': [ -+ 'v8_libbase_sse2', -+ 'v8_libsampler_sse2', -+ ], -+ 'variables': { -+ 'optimize': 'max', -+ }, -+ 'include_dirs+': [ -+ '..', -+ '<(DEPTH)', -+ ], -+ 'sources': [ ### gcmole(all) ### -+ '../include/v8-debug.h', -+ '../include/v8-experimental.h', -+ '../include/v8-platform.h', -+ '../include/v8-profiler.h', -+ '../include/v8-testing.h', -+ '../include/v8-util.h', -+ '../include/v8-version.h', -+ '../include/v8.h', -+ '../include/v8config.h', -+ 'accessors.cc', -+ 'accessors.h', -+ 'address-map.cc', -+ 'address-map.h', -+ 'allocation.cc', -+ 'allocation.h', -+ 'allocation-site-scopes.cc', -+ 'allocation-site-scopes.h', -+ 'api-experimental.cc', -+ 'api-experimental.h', -+ 'api.cc', -+ 'api.h', -+ 'api-arguments-inl.h', -+ 'api-arguments.cc', -+ 'api-arguments.h', -+ 'api-natives.cc', -+ 'api-natives.h', -+ 'arguments.cc', -+ 'arguments.h', -+ 'assembler.cc', -+ 'assembler.h', -+ 'assert-scope.h', -+ 'assert-scope.cc', -+ 'ast/ast-expression-rewriter.cc', -+ 'ast/ast-expression-rewriter.h', -+ 'ast/ast-expression-visitor.cc', -+ 'ast/ast-expression-visitor.h', -+ 'ast/ast-literal-reindexer.cc', -+ 'ast/ast-literal-reindexer.h', -+ 'ast/ast-numbering.cc', -+ 'ast/ast-numbering.h', -+ 'ast/ast-type-bounds.h', -+ 'ast/ast-value-factory.cc', -+ 'ast/ast-value-factory.h', -+ 'ast/ast.cc', -+ 'ast/ast.h', -+ 'ast/modules.cc', -+ 'ast/modules.h', -+ 'ast/prettyprinter.cc', -+ 'ast/prettyprinter.h', -+ 'ast/scopeinfo.cc', -+ 'ast/scopeinfo.h', -+ 'ast/scopes.cc', -+ 'ast/scopes.h', -+ 'ast/variables.cc', -+ 'ast/variables.h', -+ 'background-parsing-task.cc', -+ 'background-parsing-task.h', -+ 'bailout-reason.cc', -+ 'bailout-reason.h', -+ 'basic-block-profiler.cc', -+ 'basic-block-profiler.h', -+ 'bignum-dtoa.cc', -+ 'bignum-dtoa.h', -+ 'bignum.cc', -+ 'bignum.h', -+ 'bit-vector.cc', -+ 'bit-vector.h', -+ 'bootstrapper.cc', -+ 'bootstrapper.h', -+ 'builtins.cc', -+ 'builtins.h', -+ 'cached-powers.cc', -+ 'cached-powers.h', -+ 'cancelable-task.cc', -+ 'cancelable-task.h', -+ 'char-predicates.cc', -+ 'char-predicates-inl.h', -+ 'char-predicates.h', -+ 'checks.h', -+ 'code-events.h', -+ 'code-factory.cc', -+ 'code-factory.h', -+ 'code-stub-assembler.cc', -+ 'code-stub-assembler.h', -+ 'code-stubs.cc', -+ 'code-stubs.h', -+ 'code-stubs-hydrogen.cc', -+ 'codegen.cc', -+ 'codegen.h', -+ 'collector.h', -+ 'compilation-cache.cc', -+ 'compilation-cache.h', -+ 'compilation-dependencies.cc', -+ 'compilation-dependencies.h', -+ 'compilation-statistics.cc', -+ 'compilation-statistics.h', -+ 'compiler/access-builder.cc', -+ 'compiler/access-builder.h', -+ 'compiler/access-info.cc', -+ 'compiler/access-info.h', -+ 'compiler/all-nodes.cc', -+ 'compiler/all-nodes.h', -+ 'compiler/ast-graph-builder.cc', -+ 'compiler/ast-graph-builder.h', -+ 'compiler/ast-loop-assignment-analyzer.cc', -+ 'compiler/ast-loop-assignment-analyzer.h', -+ 'compiler/basic-block-instrumentor.cc', -+ 'compiler/basic-block-instrumentor.h', -+ 'compiler/branch-elimination.cc', -+ 'compiler/branch-elimination.h', -+ 'compiler/bytecode-branch-analysis.cc', -+ 'compiler/bytecode-branch-analysis.h', -+ 'compiler/bytecode-graph-builder.cc', -+ 'compiler/bytecode-graph-builder.h', -+ 'compiler/c-linkage.cc', -+ 'compiler/checkpoint-elimination.cc', -+ 'compiler/checkpoint-elimination.h', -+ 'compiler/code-generator-impl.h', -+ 'compiler/code-generator.cc', -+ 'compiler/code-generator.h', -+ 'compiler/code-assembler.cc', -+ 'compiler/code-assembler.h', -+ 'compiler/common-node-cache.cc', -+ 'compiler/common-node-cache.h', -+ 'compiler/common-operator-reducer.cc', -+ 'compiler/common-operator-reducer.h', -+ 'compiler/common-operator.cc', -+ 'compiler/common-operator.h', -+ 'compiler/control-builders.cc', -+ 'compiler/control-builders.h', -+ 'compiler/control-equivalence.cc', -+ 'compiler/control-equivalence.h', -+ 'compiler/control-flow-optimizer.cc', -+ 'compiler/control-flow-optimizer.h', -+ 'compiler/dead-code-elimination.cc', -+ 'compiler/dead-code-elimination.h', -+ 'compiler/diamond.h', -+ 'compiler/effect-control-linearizer.cc', -+ 'compiler/effect-control-linearizer.h', -+ 'compiler/escape-analysis.cc', -+ 'compiler/escape-analysis.h', -+ "compiler/escape-analysis-reducer.cc", -+ "compiler/escape-analysis-reducer.h", -+ 'compiler/frame.cc', -+ 'compiler/frame.h', -+ 'compiler/frame-elider.cc', -+ 'compiler/frame-elider.h', -+ "compiler/frame-states.cc", -+ "compiler/frame-states.h", -+ 'compiler/gap-resolver.cc', -+ 'compiler/gap-resolver.h', -+ 'compiler/graph-reducer.cc', -+ 'compiler/graph-reducer.h', -+ 'compiler/graph-replay.cc', -+ 'compiler/graph-replay.h', -+ 'compiler/graph-trimmer.cc', -+ 'compiler/graph-trimmer.h', -+ 'compiler/graph-visualizer.cc', -+ 'compiler/graph-visualizer.h', -+ 'compiler/graph.cc', -+ 'compiler/graph.h', -+ 'compiler/instruction-codes.h', -+ 'compiler/instruction-selector-impl.h', -+ 'compiler/instruction-selector.cc', -+ 'compiler/instruction-selector.h', -+ 'compiler/instruction-scheduler.cc', -+ 'compiler/instruction-scheduler.h', -+ 'compiler/instruction.cc', -+ 'compiler/instruction.h', -+ 'compiler/int64-lowering.cc', -+ 'compiler/int64-lowering.h', -+ 'compiler/js-builtin-reducer.cc', -+ 'compiler/js-builtin-reducer.h', -+ 'compiler/js-call-reducer.cc', -+ 'compiler/js-call-reducer.h', -+ 'compiler/js-context-specialization.cc', -+ 'compiler/js-context-specialization.h', -+ 'compiler/js-create-lowering.cc', -+ 'compiler/js-create-lowering.h', -+ 'compiler/js-frame-specialization.cc', -+ 'compiler/js-frame-specialization.h', -+ 'compiler/js-generic-lowering.cc', -+ 'compiler/js-generic-lowering.h', -+ 'compiler/js-global-object-specialization.cc', -+ 'compiler/js-global-object-specialization.h', -+ 'compiler/js-graph.cc', -+ 'compiler/js-graph.h', -+ 'compiler/js-inlining.cc', -+ 'compiler/js-inlining.h', -+ 'compiler/js-inlining-heuristic.cc', -+ 'compiler/js-inlining-heuristic.h', -+ 'compiler/js-intrinsic-lowering.cc', -+ 'compiler/js-intrinsic-lowering.h', -+ 'compiler/js-native-context-specialization.cc', -+ 'compiler/js-native-context-specialization.h', -+ 'compiler/js-operator.cc', -+ 'compiler/js-operator.h', -+ 'compiler/js-typed-lowering.cc', -+ 'compiler/js-typed-lowering.h', -+ 'compiler/jump-threading.cc', -+ 'compiler/jump-threading.h', -+ 'compiler/linkage.cc', -+ 'compiler/linkage.h', -+ 'compiler/liveness-analyzer.cc', -+ 'compiler/liveness-analyzer.h', -+ 'compiler/live-range-separator.cc', -+ 'compiler/live-range-separator.h', -+ 'compiler/load-elimination.cc', -+ 'compiler/load-elimination.h', -+ 'compiler/loop-analysis.cc', -+ 'compiler/loop-analysis.h', -+ 'compiler/loop-peeling.cc', -+ 'compiler/loop-peeling.h', -+ 'compiler/machine-operator-reducer.cc', -+ 'compiler/machine-operator-reducer.h', -+ 'compiler/machine-operator.cc', -+ 'compiler/machine-operator.h', -+ 'compiler/memory-optimizer.cc', -+ 'compiler/memory-optimizer.h', -+ 'compiler/move-optimizer.cc', -+ 'compiler/move-optimizer.h', -+ 'compiler/node-aux-data.h', -+ 'compiler/node-cache.cc', -+ 'compiler/node-cache.h', -+ 'compiler/node-marker.cc', -+ 'compiler/node-marker.h', -+ 'compiler/node-matchers.cc', -+ 'compiler/node-matchers.h', -+ 'compiler/node-properties.cc', -+ 'compiler/node-properties.h', -+ 'compiler/node.cc', -+ 'compiler/node.h', -+ 'compiler/opcodes.cc', -+ 'compiler/opcodes.h', -+ 'compiler/operation-typer.cc', -+ 'compiler/operation-typer.h', -+ 'compiler/operator-properties.cc', -+ 'compiler/operator-properties.h', -+ 'compiler/operator.cc', -+ 'compiler/operator.h', -+ 'compiler/osr.cc', -+ 'compiler/osr.h', -+ 'compiler/pipeline.cc', -+ 'compiler/pipeline.h', -+ 'compiler/pipeline-statistics.cc', -+ 'compiler/pipeline-statistics.h', -+ 'compiler/raw-machine-assembler.cc', -+ 'compiler/raw-machine-assembler.h', -+ 'compiler/redundancy-elimination.cc', -+ 'compiler/redundancy-elimination.h', -+ 'compiler/register-allocator.cc', -+ 'compiler/register-allocator.h', -+ 'compiler/register-allocator-verifier.cc', -+ 'compiler/register-allocator-verifier.h', -+ 'compiler/representation-change.cc', -+ 'compiler/representation-change.h', -+ 'compiler/schedule.cc', -+ 'compiler/schedule.h', -+ 'compiler/scheduler.cc', -+ 'compiler/scheduler.h', -+ 'compiler/select-lowering.cc', -+ 'compiler/select-lowering.h', -+ 'compiler/simplified-lowering.cc', -+ 'compiler/simplified-lowering.h', -+ 'compiler/simplified-operator-reducer.cc', -+ 'compiler/simplified-operator-reducer.h', -+ 'compiler/simplified-operator.cc', -+ 'compiler/simplified-operator.h', -+ 'compiler/source-position.cc', -+ 'compiler/source-position.h', -+ 'compiler/state-values-utils.cc', -+ 'compiler/state-values-utils.h', -+ 'compiler/store-store-elimination.cc', -+ 'compiler/store-store-elimination.h', -+ 'compiler/tail-call-optimization.cc', -+ 'compiler/tail-call-optimization.h', -+ 'compiler/type-hint-analyzer.cc', -+ 'compiler/type-hint-analyzer.h', -+ 'compiler/type-hints.cc', -+ 'compiler/type-hints.h', -+ 'compiler/typer.cc', -+ 'compiler/typer.h', -+ 'compiler/value-numbering-reducer.cc', -+ 'compiler/value-numbering-reducer.h', -+ 'compiler/verifier.cc', -+ 'compiler/verifier.h', -+ 'compiler/wasm-compiler.cc', -+ 'compiler/wasm-compiler.h', -+ 'compiler/wasm-linkage.cc', -+ 'compiler/zone-pool.cc', -+ 'compiler/zone-pool.h', -+ 'compiler.cc', -+ 'compiler.h', -+ 'context-measure.cc', -+ 'context-measure.h', -+ 'contexts-inl.h', -+ 'contexts.cc', -+ 'contexts.h', -+ 'conversions-inl.h', -+ 'conversions.cc', -+ 'conversions.h', -+ 'counters-inl.h', -+ 'counters.cc', -+ 'counters.h', -+ 'crankshaft/compilation-phase.cc', -+ 'crankshaft/compilation-phase.h', -+ 'crankshaft/hydrogen-alias-analysis.h', -+ 'crankshaft/hydrogen-bce.cc', -+ 'crankshaft/hydrogen-bce.h', -+ 'crankshaft/hydrogen-canonicalize.cc', -+ 'crankshaft/hydrogen-canonicalize.h', -+ 'crankshaft/hydrogen-check-elimination.cc', -+ 'crankshaft/hydrogen-check-elimination.h', -+ 'crankshaft/hydrogen-dce.cc', -+ 'crankshaft/hydrogen-dce.h', -+ 'crankshaft/hydrogen-dehoist.cc', -+ 'crankshaft/hydrogen-dehoist.h', -+ 'crankshaft/hydrogen-environment-liveness.cc', -+ 'crankshaft/hydrogen-environment-liveness.h', -+ 'crankshaft/hydrogen-escape-analysis.cc', -+ 'crankshaft/hydrogen-escape-analysis.h', -+ 'crankshaft/hydrogen-flow-engine.h', -+ 'crankshaft/hydrogen-gvn.cc', -+ 'crankshaft/hydrogen-gvn.h', -+ 'crankshaft/hydrogen-infer-representation.cc', -+ 'crankshaft/hydrogen-infer-representation.h', -+ 'crankshaft/hydrogen-infer-types.cc', -+ 'crankshaft/hydrogen-infer-types.h', -+ 'crankshaft/hydrogen-instructions.cc', -+ 'crankshaft/hydrogen-instructions.h', -+ 'crankshaft/hydrogen-load-elimination.cc', -+ 'crankshaft/hydrogen-load-elimination.h', -+ 'crankshaft/hydrogen-mark-deoptimize.cc', -+ 'crankshaft/hydrogen-mark-deoptimize.h', -+ 'crankshaft/hydrogen-mark-unreachable.cc', -+ 'crankshaft/hydrogen-mark-unreachable.h', -+ 'crankshaft/hydrogen-osr.cc', -+ 'crankshaft/hydrogen-osr.h', -+ 'crankshaft/hydrogen-range-analysis.cc', -+ 'crankshaft/hydrogen-range-analysis.h', -+ 'crankshaft/hydrogen-redundant-phi.cc', -+ 'crankshaft/hydrogen-redundant-phi.h', -+ 'crankshaft/hydrogen-removable-simulates.cc', -+ 'crankshaft/hydrogen-removable-simulates.h', -+ 'crankshaft/hydrogen-representation-changes.cc', -+ 'crankshaft/hydrogen-representation-changes.h', -+ 'crankshaft/hydrogen-sce.cc', -+ 'crankshaft/hydrogen-sce.h', -+ 'crankshaft/hydrogen-store-elimination.cc', -+ 'crankshaft/hydrogen-store-elimination.h', -+ 'crankshaft/hydrogen-types.cc', -+ 'crankshaft/hydrogen-types.h', -+ 'crankshaft/hydrogen-uint32-analysis.cc', -+ 'crankshaft/hydrogen-uint32-analysis.h', -+ 'crankshaft/hydrogen.cc', -+ 'crankshaft/hydrogen.h', -+ 'crankshaft/lithium-allocator-inl.h', -+ 'crankshaft/lithium-allocator.cc', -+ 'crankshaft/lithium-allocator.h', -+ 'crankshaft/lithium-codegen.cc', -+ 'crankshaft/lithium-codegen.h', -+ 'crankshaft/lithium.cc', -+ 'crankshaft/lithium.h', -+ 'crankshaft/lithium-inl.h', -+ 'crankshaft/typing.cc', -+ 'crankshaft/typing.h', -+ 'crankshaft/unique.h', -+ 'date.cc', -+ 'date.h', -+ 'dateparser-inl.h', -+ 'dateparser.cc', -+ 'dateparser.h', -+ 'debug/debug-evaluate.cc', -+ 'debug/debug-evaluate.h', -+ 'debug/debug-frames.cc', -+ 'debug/debug-frames.h', -+ 'debug/debug-scopes.cc', -+ 'debug/debug-scopes.h', -+ 'debug/debug.cc', -+ 'debug/debug.h', -+ 'debug/liveedit.cc', -+ 'debug/liveedit.h', -+ 'deoptimizer.cc', -+ 'deoptimizer.h', -+ 'disasm.h', -+ 'disassembler.cc', -+ 'disassembler.h', -+ 'diy-fp.cc', -+ 'diy-fp.h', -+ 'double.h', -+ 'dtoa.cc', -+ 'dtoa.h', -+ 'effects.h', -+ 'eh-frame.cc', -+ 'eh-frame.h', -+ 'elements-kind.cc', -+ 'elements-kind.h', -+ 'elements.cc', -+ 'elements.h', -+ 'execution.cc', -+ 'execution.h', -+ 'extensions/externalize-string-extension.cc', -+ 'extensions/externalize-string-extension.h', -+ 'extensions/free-buffer-extension.cc', -+ 'extensions/free-buffer-extension.h', -+ 'extensions/gc-extension.cc', -+ 'extensions/gc-extension.h', -+ 'extensions/ignition-statistics-extension.cc', -+ 'extensions/ignition-statistics-extension.h', -+ 'extensions/statistics-extension.cc', -+ 'extensions/statistics-extension.h', -+ 'extensions/trigger-failure-extension.cc', -+ 'extensions/trigger-failure-extension.h', -+ 'external-reference-table.cc', -+ 'external-reference-table.h', -+ 'factory.cc', -+ 'factory.h', -+ 'fast-accessor-assembler.cc', -+ 'fast-accessor-assembler.h', -+ 'fast-dtoa.cc', -+ 'fast-dtoa.h', -+ 'field-index.h', -+ 'field-index-inl.h', -+ 'field-type.cc', -+ 'field-type.h', -+ 'fixed-dtoa.cc', -+ 'fixed-dtoa.h', -+ 'flag-definitions.h', -+ 'flags.cc', -+ 'flags.h', -+ 'frames-inl.h', -+ 'frames.cc', -+ 'frames.h', -+ 'full-codegen/full-codegen.cc', -+ 'full-codegen/full-codegen.h', -+ 'futex-emulation.cc', -+ 'futex-emulation.h', -+ 'gdb-jit.cc', -+ 'gdb-jit.h', -+ 'global-handles.cc', -+ 'global-handles.h', -+ 'globals.h', -+ 'handles-inl.h', -+ 'handles.cc', -+ 'handles.h', -+ 'heap-symbols.h', -+ 'heap/array-buffer-tracker-inl.h', -+ 'heap/array-buffer-tracker.cc', -+ 'heap/array-buffer-tracker.h', -+ 'heap/memory-reducer.cc', -+ 'heap/memory-reducer.h', -+ 'heap/gc-idle-time-handler.cc', -+ 'heap/gc-idle-time-handler.h', -+ 'heap/gc-tracer.cc', -+ 'heap/gc-tracer.h', -+ 'heap/heap-inl.h', -+ 'heap/heap.cc', -+ 'heap/heap.h', -+ 'heap/incremental-marking-inl.h', -+ 'heap/incremental-marking-job.cc', -+ 'heap/incremental-marking-job.h', -+ 'heap/incremental-marking.cc', -+ 'heap/incremental-marking.h', -+ 'heap/mark-compact-inl.h', -+ 'heap/mark-compact.cc', -+ 'heap/mark-compact.h', -+ 'heap/object-stats.cc', -+ 'heap/object-stats.h', -+ 'heap/objects-visiting-inl.h', -+ 'heap/objects-visiting.cc', -+ 'heap/objects-visiting.h', -+ 'heap/page-parallel-job.h', -+ 'heap/remembered-set.cc', -+ 'heap/remembered-set.h', -+ 'heap/scavenge-job.h', -+ 'heap/scavenge-job.cc', -+ 'heap/scavenger-inl.h', -+ 'heap/scavenger.cc', -+ 'heap/scavenger.h', -+ 'heap/slot-set.h', -+ 'heap/spaces-inl.h', -+ 'heap/spaces.cc', -+ 'heap/spaces.h', -+ 'heap/store-buffer.cc', -+ 'heap/store-buffer.h', -+ 'i18n.cc', -+ 'i18n.h', -+ 'icu_util.cc', -+ 'icu_util.h', -+ 'ic/access-compiler.cc', -+ 'ic/access-compiler.h', -+ 'ic/call-optimization.cc', -+ 'ic/call-optimization.h', -+ 'ic/handler-compiler.cc', -+ 'ic/handler-compiler.h', -+ 'ic/ic-inl.h', -+ 'ic/ic-state.cc', -+ 'ic/ic-state.h', -+ 'ic/ic.cc', -+ 'ic/ic.h', -+ 'ic/ic-compiler.cc', -+ 'ic/ic-compiler.h', -+ 'identity-map.cc', -+ 'identity-map.h', -+ 'interface-descriptors.cc', -+ 'interface-descriptors.h', -+ 'interpreter/bytecodes.cc', -+ 'interpreter/bytecodes.h', -+ 'interpreter/bytecode-array-builder.cc', -+ 'interpreter/bytecode-array-builder.h', -+ 'interpreter/bytecode-array-iterator.cc', -+ 'interpreter/bytecode-array-iterator.h', -+ 'interpreter/bytecode-array-writer.cc', -+ 'interpreter/bytecode-array-writer.h', -+ 'interpreter/bytecode-dead-code-optimizer.cc', -+ 'interpreter/bytecode-dead-code-optimizer.h', -+ 'interpreter/bytecode-label.h', -+ 'interpreter/bytecode-generator.cc', -+ 'interpreter/bytecode-generator.h', -+ 'interpreter/bytecode-peephole-optimizer.cc', -+ 'interpreter/bytecode-peephole-optimizer.h', -+ 'interpreter/bytecode-pipeline.cc', -+ 'interpreter/bytecode-pipeline.h', -+ 'interpreter/bytecode-register-allocator.cc', -+ 'interpreter/bytecode-register-allocator.h', -+ 'interpreter/bytecode-register-optimizer.cc', -+ 'interpreter/bytecode-register-optimizer.h', -+ 'interpreter/bytecode-traits.h', -+ 'interpreter/constant-array-builder.cc', -+ 'interpreter/constant-array-builder.h', -+ 'interpreter/control-flow-builders.cc', -+ 'interpreter/control-flow-builders.h', -+ 'interpreter/handler-table-builder.cc', -+ 'interpreter/handler-table-builder.h', -+ 'interpreter/interpreter.cc', -+ 'interpreter/interpreter.h', -+ 'interpreter/interpreter-assembler.cc', -+ 'interpreter/interpreter-assembler.h', -+ 'interpreter/interpreter-intrinsics.cc', -+ 'interpreter/interpreter-intrinsics.h', -+ 'interpreter/source-position-table.cc', -+ 'interpreter/source-position-table.h', -+ 'isolate-inl.h', -+ 'isolate.cc', -+ 'isolate.h', -+ 'json-parser.cc', -+ 'json-parser.h', -+ 'json-stringifier.cc', -+ 'json-stringifier.h', -+ 'keys.h', -+ 'keys.cc', -+ 'layout-descriptor-inl.h', -+ 'layout-descriptor.cc', -+ 'layout-descriptor.h', -+ 'list-inl.h', -+ 'list.h', -+ 'locked-queue-inl.h', -+ 'locked-queue.h', -+ 'log-inl.h', -+ 'log-utils.cc', -+ 'log-utils.h', -+ 'log.cc', -+ 'log.h', -+ 'lookup.cc', -+ 'lookup.h', -+ 'macro-assembler.h', -+ 'machine-type.cc', -+ 'machine-type.h', -+ 'messages.cc', -+ 'messages.h', -+ 'msan.h', -+ 'objects-body-descriptors-inl.h', -+ 'objects-body-descriptors.h', -+ 'objects-debug.cc', -+ 'objects-inl.h', -+ 'objects-printer.cc', -+ 'objects.cc', -+ 'objects.h', -+ 'optimizing-compile-dispatcher.cc', -+ 'optimizing-compile-dispatcher.h', -+ 'ostreams.cc', -+ 'ostreams.h', -+ 'parsing/expression-classifier.h', -+ 'parsing/func-name-inferrer.cc', -+ 'parsing/func-name-inferrer.h', -+ 'parsing/parameter-initializer-rewriter.cc', -+ 'parsing/parameter-initializer-rewriter.h', -+ 'parsing/parser-base.h', -+ 'parsing/parser.cc', -+ 'parsing/parser.h', -+ 'parsing/pattern-rewriter.cc', -+ 'parsing/preparse-data-format.h', -+ 'parsing/preparse-data.cc', -+ 'parsing/preparse-data.h', -+ 'parsing/preparser.cc', -+ 'parsing/preparser.h', -+ 'parsing/rewriter.cc', -+ 'parsing/rewriter.h', -+ 'parsing/scanner-character-streams.cc', -+ 'parsing/scanner-character-streams.h', -+ 'parsing/scanner.cc', -+ 'parsing/scanner.h', -+ 'parsing/token.cc', -+ 'parsing/token.h', -+ 'pending-compilation-error-handler.cc', -+ 'pending-compilation-error-handler.h', -+ 'perf-jit.cc', -+ 'perf-jit.h', -+ 'profiler/allocation-tracker.cc', -+ 'profiler/allocation-tracker.h', -+ 'profiler/circular-queue-inl.h', -+ 'profiler/circular-queue.h', -+ 'profiler/cpu-profiler-inl.h', -+ 'profiler/cpu-profiler.cc', -+ 'profiler/cpu-profiler.h', -+ 'profiler/heap-profiler.cc', -+ 'profiler/heap-profiler.h', -+ 'profiler/heap-snapshot-generator-inl.h', -+ 'profiler/heap-snapshot-generator.cc', -+ 'profiler/heap-snapshot-generator.h', -+ 'profiler/profiler-listener.cc', -+ 'profiler/profiler-listener.h', -+ 'profiler/profile-generator-inl.h', -+ 'profiler/profile-generator.cc', -+ 'profiler/profile-generator.h', -+ 'profiler/sampling-heap-profiler.cc', -+ 'profiler/sampling-heap-profiler.h', -+ 'profiler/strings-storage.cc', -+ 'profiler/strings-storage.h', -+ 'profiler/tick-sample.cc', -+ 'profiler/tick-sample.h', -+ 'profiler/unbound-queue-inl.h', -+ 'profiler/unbound-queue.h', -+ 'property-descriptor.cc', -+ 'property-descriptor.h', -+ 'property-details.h', -+ 'property.cc', -+ 'property.h', -+ 'prototype.h', -+ 'regexp/bytecodes-irregexp.h', -+ 'regexp/interpreter-irregexp.cc', -+ 'regexp/interpreter-irregexp.h', -+ 'regexp/jsregexp-inl.h', -+ 'regexp/jsregexp.cc', -+ 'regexp/jsregexp.h', -+ 'regexp/regexp-ast.cc', -+ 'regexp/regexp-ast.h', -+ 'regexp/regexp-macro-assembler-irregexp-inl.h', -+ 'regexp/regexp-macro-assembler-irregexp.cc', -+ 'regexp/regexp-macro-assembler-irregexp.h', -+ 'regexp/regexp-macro-assembler-tracer.cc', -+ 'regexp/regexp-macro-assembler-tracer.h', -+ 'regexp/regexp-macro-assembler.cc', -+ 'regexp/regexp-macro-assembler.h', -+ 'regexp/regexp-parser.cc', -+ 'regexp/regexp-parser.h', -+ 'regexp/regexp-stack.cc', -+ 'regexp/regexp-stack.h', -+ 'register-configuration.cc', -+ 'register-configuration.h', -+ 'runtime-profiler.cc', -+ 'runtime-profiler.h', -+ 'runtime/runtime-array.cc', -+ 'runtime/runtime-atomics.cc', -+ 'runtime/runtime-classes.cc', -+ 'runtime/runtime-collections.cc', -+ 'runtime/runtime-compiler.cc', -+ 'runtime/runtime-date.cc', -+ 'runtime/runtime-debug.cc', -+ 'runtime/runtime-forin.cc', -+ 'runtime/runtime-function.cc', -+ 'runtime/runtime-futex.cc', -+ 'runtime/runtime-generator.cc', -+ 'runtime/runtime-i18n.cc', -+ 'runtime/runtime-internal.cc', -+ 'runtime/runtime-interpreter.cc', -+ 'runtime/runtime-literals.cc', -+ 'runtime/runtime-liveedit.cc', -+ 'runtime/runtime-maths.cc', -+ 'runtime/runtime-numbers.cc', -+ 'runtime/runtime-object.cc', -+ 'runtime/runtime-operators.cc', -+ 'runtime/runtime-proxy.cc', -+ 'runtime/runtime-regexp.cc', -+ 'runtime/runtime-scopes.cc', -+ 'runtime/runtime-simd.cc', -+ 'runtime/runtime-strings.cc', -+ 'runtime/runtime-symbol.cc', -+ 'runtime/runtime-test.cc', -+ 'runtime/runtime-typedarray.cc', -+ 'runtime/runtime-utils.h', -+ 'runtime/runtime.cc', -+ 'runtime/runtime.h', -+ 'safepoint-table.cc', -+ 'safepoint-table.h', -+ 'signature.h', -+ 'simulator.h', -+ 'small-pointer-list.h', -+ 'snapshot/code-serializer.cc', -+ 'snapshot/code-serializer.h', -+ 'snapshot/deserializer.cc', -+ 'snapshot/deserializer.h', -+ 'snapshot/natives.h', -+ 'snapshot/natives-common.cc', -+ 'snapshot/partial-serializer.cc', -+ 'snapshot/partial-serializer.h', -+ 'snapshot/serializer.cc', -+ 'snapshot/serializer.h', -+ 'snapshot/serializer-common.cc', -+ 'snapshot/serializer-common.h', -+ 'snapshot/snapshot.h', -+ 'snapshot/snapshot-common.cc', -+ 'snapshot/snapshot-source-sink.cc', -+ 'snapshot/snapshot-source-sink.h', -+ 'snapshot/startup-serializer.cc', -+ 'snapshot/startup-serializer.h', -+ 'source-position.h', -+ 'splay-tree.h', -+ 'splay-tree-inl.h', -+ 'startup-data-util.cc', -+ 'startup-data-util.h', -+ 'string-builder.cc', -+ 'string-builder.h', -+ 'string-search.h', -+ 'string-stream.cc', -+ 'string-stream.h', -+ 'strtod.cc', -+ 'strtod.h', -+ 'ic/stub-cache.cc', -+ 'ic/stub-cache.h', -+ 'tracing/trace-event.cc', -+ 'tracing/trace-event.h', -+ 'transitions-inl.h', -+ 'transitions.cc', -+ 'transitions.h', -+ 'type-cache.cc', -+ 'type-cache.h', -+ 'type-feedback-vector-inl.h', -+ 'type-feedback-vector.cc', -+ 'type-feedback-vector.h', -+ 'type-info.cc', -+ 'type-info.h', -+ 'types.cc', -+ 'types.h', -+ 'typing-asm.cc', -+ 'typing-asm.h', -+ 'unicode-inl.h', -+ 'unicode.cc', -+ 'unicode.h', -+ 'unicode-cache-inl.h', -+ 'unicode-cache.h', -+ 'unicode-decoder.cc', -+ 'unicode-decoder.h', -+ 'uri.cc', -+ 'uri.h', -+ 'utils-inl.h', -+ 'utils.cc', -+ 'utils.h', -+ 'v8.cc', -+ 'v8.h', -+ 'v8memory.h', -+ 'v8threads.cc', -+ 'v8threads.h', -+ 'vector.h', -+ 'version.cc', -+ 'version.h', -+ 'vm-state-inl.h', -+ 'vm-state.h', -+ 'wasm/asm-types.cc', -+ 'wasm/asm-types.h', -+ 'wasm/asm-wasm-builder.cc', -+ 'wasm/asm-wasm-builder.h', -+ 'wasm/ast-decoder.cc', -+ 'wasm/ast-decoder.h', -+ 'wasm/decoder.h', -+ 'wasm/encoder.cc', -+ 'wasm/encoder.h', -+ 'wasm/leb-helper.h', -+ 'wasm/module-decoder.cc', -+ 'wasm/module-decoder.h', -+ 'wasm/switch-logic.h', -+ 'wasm/switch-logic.cc', -+ 'wasm/wasm-debug.cc', -+ 'wasm/wasm-debug.h', -+ 'wasm/wasm-external-refs.cc', -+ 'wasm/wasm-external-refs.h', -+ 'wasm/wasm-function-name-table.cc', -+ 'wasm/wasm-function-name-table.h', -+ 'wasm/wasm-js.cc', -+ 'wasm/wasm-js.h', -+ 'wasm/wasm-macro-gen.h', -+ 'wasm/wasm-module.cc', -+ 'wasm/wasm-module.h', -+ 'wasm/wasm-interpreter.cc', -+ 'wasm/wasm-interpreter.h', -+ 'wasm/wasm-opcodes.cc', -+ 'wasm/wasm-opcodes.h', -+ 'wasm/wasm-result.cc', -+ 'wasm/wasm-result.h', -+ 'zone.cc', -+ 'zone.h', -+ 'zone-allocator.h', -+ 'zone-containers.h', -+ ], -+ 'conditions': [ -+ ['OS!="win" and remove_v8base_debug_symbols==1', { -+ 'cflags!': ['-g', '-gdwarf-4'], -+ }], -+ ['want_separate_host_toolset==1', { -+ 'toolsets': ['host', 'target'], -+ }, { -+ 'toolsets': ['target'], -+ }], -+ ['v8_target_arch=="arm"', { -+ 'sources': [ ### gcmole(arch:arm) ### -+ 'arm/assembler-arm-inl.h', -+ 'arm/assembler-arm.cc', -+ 'arm/assembler-arm.h', -+ 'arm/builtins-arm.cc', -+ 'arm/code-stubs-arm.cc', -+ 'arm/code-stubs-arm.h', -+ 'arm/codegen-arm.cc', -+ 'arm/codegen-arm.h', -+ 'arm/constants-arm.h', -+ 'arm/constants-arm.cc', -+ 'arm/cpu-arm.cc', -+ 'arm/deoptimizer-arm.cc', -+ 'arm/disasm-arm.cc', -+ 'arm/frames-arm.cc', -+ 'arm/frames-arm.h', -+ 'arm/interface-descriptors-arm.cc', -+ 'arm/interface-descriptors-arm.h', -+ 'arm/macro-assembler-arm.cc', -+ 'arm/macro-assembler-arm.h', -+ 'arm/simulator-arm.cc', -+ 'arm/simulator-arm.h', -+ 'compiler/arm/code-generator-arm.cc', -+ 'compiler/arm/instruction-codes-arm.h', -+ 'compiler/arm/instruction-scheduler-arm.cc', -+ 'compiler/arm/instruction-selector-arm.cc', -+ 'crankshaft/arm/lithium-arm.cc', -+ 'crankshaft/arm/lithium-arm.h', -+ 'crankshaft/arm/lithium-codegen-arm.cc', -+ 'crankshaft/arm/lithium-codegen-arm.h', -+ 'crankshaft/arm/lithium-gap-resolver-arm.cc', -+ 'crankshaft/arm/lithium-gap-resolver-arm.h', -+ 'debug/arm/debug-arm.cc', -+ 'full-codegen/arm/full-codegen-arm.cc', -+ 'ic/arm/access-compiler-arm.cc', -+ 'ic/arm/handler-compiler-arm.cc', -+ 'ic/arm/ic-arm.cc', -+ 'ic/arm/ic-compiler-arm.cc', -+ 'ic/arm/stub-cache-arm.cc', -+ 'regexp/arm/regexp-macro-assembler-arm.cc', -+ 'regexp/arm/regexp-macro-assembler-arm.h', -+ ], -+ }], -+ ['v8_target_arch=="arm64"', { -+ 'sources': [ ### gcmole(arch:arm64) ### -+ 'arm64/assembler-arm64.cc', -+ 'arm64/assembler-arm64.h', -+ 'arm64/assembler-arm64-inl.h', -+ 'arm64/builtins-arm64.cc', -+ 'arm64/codegen-arm64.cc', -+ 'arm64/codegen-arm64.h', -+ 'arm64/code-stubs-arm64.cc', -+ 'arm64/code-stubs-arm64.h', -+ 'arm64/constants-arm64.h', -+ 'arm64/cpu-arm64.cc', -+ 'arm64/decoder-arm64.cc', -+ 'arm64/decoder-arm64.h', -+ 'arm64/decoder-arm64-inl.h', -+ 'arm64/deoptimizer-arm64.cc', -+ 'arm64/disasm-arm64.cc', -+ 'arm64/disasm-arm64.h', -+ 'arm64/frames-arm64.cc', -+ 'arm64/frames-arm64.h', -+ 'arm64/instructions-arm64.cc', -+ 'arm64/instructions-arm64.h', -+ 'arm64/instrument-arm64.cc', -+ 'arm64/instrument-arm64.h', -+ 'arm64/interface-descriptors-arm64.cc', -+ 'arm64/interface-descriptors-arm64.h', -+ 'arm64/macro-assembler-arm64.cc', -+ 'arm64/macro-assembler-arm64.h', -+ 'arm64/macro-assembler-arm64-inl.h', -+ 'arm64/simulator-arm64.cc', -+ 'arm64/simulator-arm64.h', -+ 'arm64/utils-arm64.cc', -+ 'arm64/utils-arm64.h', -+ 'compiler/arm64/code-generator-arm64.cc', -+ 'compiler/arm64/instruction-codes-arm64.h', -+ 'compiler/arm64/instruction-scheduler-arm64.cc', -+ 'compiler/arm64/instruction-selector-arm64.cc', -+ 'crankshaft/arm64/delayed-masm-arm64.cc', -+ 'crankshaft/arm64/delayed-masm-arm64.h', -+ 'crankshaft/arm64/delayed-masm-arm64-inl.h', -+ 'crankshaft/arm64/lithium-arm64.cc', -+ 'crankshaft/arm64/lithium-arm64.h', -+ 'crankshaft/arm64/lithium-codegen-arm64.cc', -+ 'crankshaft/arm64/lithium-codegen-arm64.h', -+ 'crankshaft/arm64/lithium-gap-resolver-arm64.cc', -+ 'crankshaft/arm64/lithium-gap-resolver-arm64.h', -+ 'debug/arm64/debug-arm64.cc', -+ 'full-codegen/arm64/full-codegen-arm64.cc', -+ 'ic/arm64/access-compiler-arm64.cc', -+ 'ic/arm64/handler-compiler-arm64.cc', -+ 'ic/arm64/ic-arm64.cc', -+ 'ic/arm64/ic-compiler-arm64.cc', -+ 'ic/arm64/stub-cache-arm64.cc', -+ 'regexp/arm64/regexp-macro-assembler-arm64.cc', -+ 'regexp/arm64/regexp-macro-assembler-arm64.h', -+ ], -+ }], -+ ['v8_target_arch=="ia32"', { -+ 'sources': [ ### gcmole(arch:ia32) ### -+ 'ia32/assembler-ia32-inl.h', -+ 'ia32/assembler-ia32.cc', -+ 'ia32/assembler-ia32.h', -+ 'ia32/builtins-ia32.cc', -+ 'ia32/code-stubs-ia32.cc', -+ 'ia32/code-stubs-ia32.h', -+ 'ia32/codegen-ia32.cc', -+ 'ia32/codegen-ia32.h', -+ 'ia32/cpu-ia32.cc', -+ 'ia32/deoptimizer-ia32.cc', -+ 'ia32/disasm-ia32.cc', -+ 'ia32/frames-ia32.cc', -+ 'ia32/frames-ia32.h', -+ 'ia32/interface-descriptors-ia32.cc', -+ 'ia32/macro-assembler-ia32.cc', -+ 'ia32/macro-assembler-ia32.h', -+ 'compiler/ia32/code-generator-ia32.cc', -+ 'compiler/ia32/instruction-codes-ia32.h', -+ 'compiler/ia32/instruction-scheduler-ia32.cc', -+ 'compiler/ia32/instruction-selector-ia32.cc', -+ 'crankshaft/ia32/lithium-codegen-ia32.cc', -+ 'crankshaft/ia32/lithium-codegen-ia32.h', -+ 'crankshaft/ia32/lithium-gap-resolver-ia32.cc', -+ 'crankshaft/ia32/lithium-gap-resolver-ia32.h', -+ 'crankshaft/ia32/lithium-ia32.cc', -+ 'crankshaft/ia32/lithium-ia32.h', -+ 'debug/ia32/debug-ia32.cc', -+ 'full-codegen/ia32/full-codegen-ia32.cc', -+ 'ic/ia32/access-compiler-ia32.cc', -+ 'ic/ia32/handler-compiler-ia32.cc', -+ 'ic/ia32/ic-ia32.cc', -+ 'ic/ia32/ic-compiler-ia32.cc', -+ 'ic/ia32/stub-cache-ia32.cc', -+ 'regexp/ia32/regexp-macro-assembler-ia32.cc', -+ 'regexp/ia32/regexp-macro-assembler-ia32.h', -+ ], -+ }], -+ ['v8_target_arch=="x87"', { -+ 'sources': [ ### gcmole(arch:x87) ### -+ 'x87/assembler-x87-inl.h', -+ 'x87/assembler-x87.cc', -+ 'x87/assembler-x87.h', -+ 'x87/builtins-x87.cc', -+ 'x87/code-stubs-x87.cc', -+ 'x87/code-stubs-x87.h', -+ 'x87/codegen-x87.cc', -+ 'x87/codegen-x87.h', -+ 'x87/cpu-x87.cc', -+ 'x87/deoptimizer-x87.cc', -+ 'x87/disasm-x87.cc', -+ 'x87/frames-x87.cc', -+ 'x87/frames-x87.h', -+ 'x87/interface-descriptors-x87.cc', -+ 'x87/macro-assembler-x87.cc', -+ 'x87/macro-assembler-x87.h', -+ 'compiler/x87/code-generator-x87.cc', -+ 'compiler/x87/instruction-codes-x87.h', -+ 'compiler/x87/instruction-scheduler-x87.cc', -+ 'compiler/x87/instruction-selector-x87.cc', -+ 'crankshaft/x87/lithium-codegen-x87.cc', -+ 'crankshaft/x87/lithium-codegen-x87.h', -+ 'crankshaft/x87/lithium-gap-resolver-x87.cc', -+ 'crankshaft/x87/lithium-gap-resolver-x87.h', -+ 'crankshaft/x87/lithium-x87.cc', -+ 'crankshaft/x87/lithium-x87.h', -+ 'debug/x87/debug-x87.cc', -+ 'full-codegen/x87/full-codegen-x87.cc', -+ 'ic/x87/access-compiler-x87.cc', -+ 'ic/x87/handler-compiler-x87.cc', -+ 'ic/x87/ic-x87.cc', -+ 'ic/x87/ic-compiler-x87.cc', -+ 'ic/x87/stub-cache-x87.cc', -+ 'regexp/x87/regexp-macro-assembler-x87.cc', -+ 'regexp/x87/regexp-macro-assembler-x87.h', -+ ], -+ }], -+ ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { -+ 'sources': [ ### gcmole(arch:mipsel) ### -+ 'mips/assembler-mips.cc', -+ 'mips/assembler-mips.h', -+ 'mips/assembler-mips-inl.h', -+ 'mips/builtins-mips.cc', -+ 'mips/codegen-mips.cc', -+ 'mips/codegen-mips.h', -+ 'mips/code-stubs-mips.cc', -+ 'mips/code-stubs-mips.h', -+ 'mips/constants-mips.cc', -+ 'mips/constants-mips.h', -+ 'mips/cpu-mips.cc', -+ 'mips/deoptimizer-mips.cc', -+ 'mips/disasm-mips.cc', -+ 'mips/frames-mips.cc', -+ 'mips/frames-mips.h', -+ 'mips/interface-descriptors-mips.cc', -+ 'mips/macro-assembler-mips.cc', -+ 'mips/macro-assembler-mips.h', -+ 'mips/simulator-mips.cc', -+ 'mips/simulator-mips.h', -+ 'compiler/mips/code-generator-mips.cc', -+ 'compiler/mips/instruction-codes-mips.h', -+ 'compiler/mips/instruction-scheduler-mips.cc', -+ 'compiler/mips/instruction-selector-mips.cc', -+ 'crankshaft/mips/lithium-codegen-mips.cc', -+ 'crankshaft/mips/lithium-codegen-mips.h', -+ 'crankshaft/mips/lithium-gap-resolver-mips.cc', -+ 'crankshaft/mips/lithium-gap-resolver-mips.h', -+ 'crankshaft/mips/lithium-mips.cc', -+ 'crankshaft/mips/lithium-mips.h', -+ 'full-codegen/mips/full-codegen-mips.cc', -+ 'debug/mips/debug-mips.cc', -+ 'ic/mips/access-compiler-mips.cc', -+ 'ic/mips/handler-compiler-mips.cc', -+ 'ic/mips/ic-mips.cc', -+ 'ic/mips/ic-compiler-mips.cc', -+ 'ic/mips/stub-cache-mips.cc', -+ 'regexp/mips/regexp-macro-assembler-mips.cc', -+ 'regexp/mips/regexp-macro-assembler-mips.h', -+ ], -+ }], -+ ['v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { -+ 'sources': [ ### gcmole(arch:mips64el) ### -+ 'mips64/assembler-mips64.cc', -+ 'mips64/assembler-mips64.h', -+ 'mips64/assembler-mips64-inl.h', -+ 'mips64/builtins-mips64.cc', -+ 'mips64/codegen-mips64.cc', -+ 'mips64/codegen-mips64.h', -+ 'mips64/code-stubs-mips64.cc', -+ 'mips64/code-stubs-mips64.h', -+ 'mips64/constants-mips64.cc', -+ 'mips64/constants-mips64.h', -+ 'mips64/cpu-mips64.cc', -+ 'mips64/deoptimizer-mips64.cc', -+ 'mips64/disasm-mips64.cc', -+ 'mips64/frames-mips64.cc', -+ 'mips64/frames-mips64.h', -+ 'mips64/interface-descriptors-mips64.cc', -+ 'mips64/macro-assembler-mips64.cc', -+ 'mips64/macro-assembler-mips64.h', -+ 'mips64/simulator-mips64.cc', -+ 'mips64/simulator-mips64.h', -+ 'compiler/mips64/code-generator-mips64.cc', -+ 'compiler/mips64/instruction-codes-mips64.h', -+ 'compiler/mips64/instruction-scheduler-mips64.cc', -+ 'compiler/mips64/instruction-selector-mips64.cc', -+ 'crankshaft/mips64/lithium-codegen-mips64.cc', -+ 'crankshaft/mips64/lithium-codegen-mips64.h', -+ 'crankshaft/mips64/lithium-gap-resolver-mips64.cc', -+ 'crankshaft/mips64/lithium-gap-resolver-mips64.h', -+ 'crankshaft/mips64/lithium-mips64.cc', -+ 'crankshaft/mips64/lithium-mips64.h', -+ 'debug/mips64/debug-mips64.cc', -+ 'full-codegen/mips64/full-codegen-mips64.cc', -+ 'ic/mips64/access-compiler-mips64.cc', -+ 'ic/mips64/handler-compiler-mips64.cc', -+ 'ic/mips64/ic-mips64.cc', -+ 'ic/mips64/ic-compiler-mips64.cc', -+ 'ic/mips64/stub-cache-mips64.cc', -+ 'regexp/mips64/regexp-macro-assembler-mips64.cc', -+ 'regexp/mips64/regexp-macro-assembler-mips64.h', -+ ], -+ }], -+ ['v8_target_arch=="x64" or v8_target_arch=="x32"', { -+ 'sources': [ ### gcmole(arch:x64) ### -+ 'crankshaft/x64/lithium-codegen-x64.cc', -+ 'crankshaft/x64/lithium-codegen-x64.h', -+ 'crankshaft/x64/lithium-gap-resolver-x64.cc', -+ 'crankshaft/x64/lithium-gap-resolver-x64.h', -+ 'crankshaft/x64/lithium-x64.cc', -+ 'crankshaft/x64/lithium-x64.h', -+ 'x64/assembler-x64-inl.h', -+ 'x64/assembler-x64.cc', -+ 'x64/assembler-x64.h', -+ 'x64/builtins-x64.cc', -+ 'x64/code-stubs-x64.cc', -+ 'x64/code-stubs-x64.h', -+ 'x64/codegen-x64.cc', -+ 'x64/codegen-x64.h', -+ 'x64/cpu-x64.cc', -+ 'x64/deoptimizer-x64.cc', -+ 'x64/disasm-x64.cc', -+ 'x64/frames-x64.cc', -+ 'x64/frames-x64.h', -+ 'x64/interface-descriptors-x64.cc', -+ 'x64/macro-assembler-x64.cc', -+ 'x64/macro-assembler-x64.h', -+ 'debug/x64/debug-x64.cc', -+ 'full-codegen/x64/full-codegen-x64.cc', -+ 'ic/x64/access-compiler-x64.cc', -+ 'ic/x64/handler-compiler-x64.cc', -+ 'ic/x64/ic-x64.cc', -+ 'ic/x64/ic-compiler-x64.cc', -+ 'ic/x64/stub-cache-x64.cc', -+ 'regexp/x64/regexp-macro-assembler-x64.cc', -+ 'regexp/x64/regexp-macro-assembler-x64.h', -+ ], -+ }], -+ ['v8_target_arch=="x64"', { -+ 'sources': [ -+ 'compiler/x64/code-generator-x64.cc', -+ 'compiler/x64/instruction-codes-x64.h', -+ 'compiler/x64/instruction-scheduler-x64.cc', -+ 'compiler/x64/instruction-selector-x64.cc', -+ ], -+ }], -+ ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { -+ 'sources': [ ### gcmole(arch:ppc) ### -+ 'compiler/ppc/code-generator-ppc.cc', -+ 'compiler/ppc/instruction-codes-ppc.h', -+ 'compiler/ppc/instruction-scheduler-ppc.cc', -+ 'compiler/ppc/instruction-selector-ppc.cc', -+ 'crankshaft/ppc/lithium-ppc.cc', -+ 'crankshaft/ppc/lithium-ppc.h', -+ 'crankshaft/ppc/lithium-codegen-ppc.cc', -+ 'crankshaft/ppc/lithium-codegen-ppc.h', -+ 'crankshaft/ppc/lithium-gap-resolver-ppc.cc', -+ 'crankshaft/ppc/lithium-gap-resolver-ppc.h', -+ 'debug/ppc/debug-ppc.cc', -+ 'full-codegen/ppc/full-codegen-ppc.cc', -+ 'ic/ppc/access-compiler-ppc.cc', -+ 'ic/ppc/handler-compiler-ppc.cc', -+ 'ic/ppc/ic-ppc.cc', -+ 'ic/ppc/ic-compiler-ppc.cc', -+ 'ic/ppc/stub-cache-ppc.cc', -+ 'ppc/assembler-ppc-inl.h', -+ 'ppc/assembler-ppc.cc', -+ 'ppc/assembler-ppc.h', -+ 'ppc/builtins-ppc.cc', -+ 'ppc/code-stubs-ppc.cc', -+ 'ppc/code-stubs-ppc.h', -+ 'ppc/codegen-ppc.cc', -+ 'ppc/codegen-ppc.h', -+ 'ppc/constants-ppc.h', -+ 'ppc/constants-ppc.cc', -+ 'ppc/cpu-ppc.cc', -+ 'ppc/deoptimizer-ppc.cc', -+ 'ppc/disasm-ppc.cc', -+ 'ppc/frames-ppc.cc', -+ 'ppc/frames-ppc.h', -+ 'ppc/interface-descriptors-ppc.cc', -+ 'ppc/macro-assembler-ppc.cc', -+ 'ppc/macro-assembler-ppc.h', -+ 'ppc/simulator-ppc.cc', -+ 'ppc/simulator-ppc.h', -+ 'regexp/ppc/regexp-macro-assembler-ppc.cc', -+ 'regexp/ppc/regexp-macro-assembler-ppc.h', -+ ], -+ }], -+ ['v8_target_arch=="s390" or v8_target_arch=="s390x"', { -+ 'sources': [ ### gcmole(arch:s390) ### -+ 'compiler/s390/code-generator-s390.cc', -+ 'compiler/s390/instruction-codes-s390.h', -+ 'compiler/s390/instruction-scheduler-s390.cc', -+ 'compiler/s390/instruction-selector-s390.cc', -+ 'crankshaft/s390/lithium-codegen-s390.cc', -+ 'crankshaft/s390/lithium-codegen-s390.h', -+ 'crankshaft/s390/lithium-gap-resolver-s390.cc', -+ 'crankshaft/s390/lithium-gap-resolver-s390.h', -+ 'crankshaft/s390/lithium-s390.cc', -+ 'crankshaft/s390/lithium-s390.h', -+ 'debug/s390/debug-s390.cc', -+ 'full-codegen/s390/full-codegen-s390.cc', -+ 'ic/s390/access-compiler-s390.cc', -+ 'ic/s390/handler-compiler-s390.cc', -+ 'ic/s390/ic-compiler-s390.cc', -+ 'ic/s390/ic-s390.cc', -+ 'ic/s390/stub-cache-s390.cc', -+ 'regexp/s390/regexp-macro-assembler-s390.cc', -+ 'regexp/s390/regexp-macro-assembler-s390.h', -+ 's390/assembler-s390.cc', -+ 's390/assembler-s390.h', -+ 's390/assembler-s390-inl.h', -+ 's390/builtins-s390.cc', -+ 's390/codegen-s390.cc', -+ 's390/codegen-s390.h', -+ 's390/code-stubs-s390.cc', -+ 's390/code-stubs-s390.h', -+ 's390/constants-s390.cc', -+ 's390/constants-s390.h', -+ 's390/cpu-s390.cc', -+ 's390/deoptimizer-s390.cc', -+ 's390/disasm-s390.cc', -+ 's390/frames-s390.cc', -+ 's390/frames-s390.h', -+ 's390/interface-descriptors-s390.cc', -+ 's390/macro-assembler-s390.cc', -+ 's390/macro-assembler-s390.h', -+ 's390/simulator-s390.cc', -+ 's390/simulator-s390.h', -+ ], -+ }], -+ ['OS=="win"', { -+ 'variables': { -+ 'gyp_generators': ' pObj = param.ToV8Object(); -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/Document.cpp 2017-03-06 13:04:01.783297575 +0100 -@@ -411,22 +411,20 @@ - - int nlength = params.size(); - if (nlength == 9) { -- if (params[8].GetType() == CJS_Value::VT_fxobject) { -+ if (params[8].GetType() == CJS_Value::VT_object) { - v8::Local pObj = params[8].ToV8Object(); -- { -- if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { -- if (CJS_Object* pJSObj = params[8].ToCJSObject()) { -- if (PrintParamsObj* pprintparamsObj = -- (PrintParamsObj*)pJSObj->GetEmbedObject()) { -- bUI = pprintparamsObj->bUI; -- nStart = pprintparamsObj->nStart; -- nEnd = pprintparamsObj->nEnd; -- bSilent = pprintparamsObj->bSilent; -- bShrinkToFit = pprintparamsObj->bShrinkToFit; -- bPrintAsImage = pprintparamsObj->bPrintAsImage; -- bReverse = pprintparamsObj->bReverse; -- bAnnotations = pprintparamsObj->bAnnotations; -- } -+ if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) { -+ if (CJS_Object* pJSObj = params[8].ToCJSObject()) { -+ if (PrintParamsObj* pprintparamsObj = -+ static_cast(pJSObj->GetEmbedObject())) { -+ bUI = pprintparamsObj->bUI; -+ nStart = pprintparamsObj->nStart; -+ nEnd = pprintparamsObj->nEnd; -+ bSilent = pprintparamsObj->bSilent; -+ bShrinkToFit = pprintparamsObj->bShrinkToFit; -+ bPrintAsImage = pprintparamsObj->bPrintAsImage; -+ bReverse = pprintparamsObj->bReverse; -+ bAnnotations = pprintparamsObj->bAnnotations; - } - } - } -@@ -597,18 +595,16 @@ - v8::Local pObj = params[0].ToV8Object(); - v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"cURL"); - if (!pValue.IsEmpty()) -- strURL = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ strURL = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"bFDF"); -- bFDF = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); -+ bFDF = CJS_Value(pRuntime, pValue).ToBool(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"bEmpty"); -- bEmpty = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool(); -+ bEmpty = CJS_Value(pRuntime, pValue).ToBool(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"aFields"); -- aFields.Attach( -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array()); -+ aFields.Attach(CJS_Value(pRuntime, pValue).ToV8Array()); - } - - CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm(); -@@ -691,25 +687,22 @@ - v8::Local pObj = params[0].ToV8Object(); - - v8::Local pValue = FXJS_GetObjectElement(isolate, pObj, L"bUI"); -- bUI = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToInt(); -+ bUI = CJS_Value(pRuntime, pValue).ToInt(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cTo"); -- cTo = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cTo = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cCc"); -- cCc = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cCc = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cBcc"); -- cBcc = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cBcc = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cSubject"); -- cSubject = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cSubject = CJS_Value(pRuntime, pValue).ToCFXWideString(); - - pValue = FXJS_GetObjectElement(isolate, pObj, L"cMsg"); -- cMsg = -- CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString(); -+ cMsg = CJS_Value(pRuntime, pValue).ToCFXWideString(); - } - - pRuntime->BeginBlock(); -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-03-06 13:04:01.785297546 +0100 -@@ -17,63 +17,6 @@ - #include "fpdfsdk/javascript/cjs_context.h" - #include "fpdfsdk/javascript/resource.h" - --// Helper class for compile-time calculation of hash values in order to --// avoid having global object initializers. --template --struct CHash; -- --// Only needed to hash single-character strings. --template --struct CHash { -- static const unsigned value = N; --}; -- --template --struct CHash { -- static const unsigned value = (ACC * 1313LLU + N) & 0xFFFFFFFF; --}; -- --template --struct CHash { -- static const unsigned value = CHash::value, Ns...>::value; --}; -- --const unsigned int JSCONST_nStringHash = -- CHash<'s', 't', 'r', 'i', 'n', 'g'>::value; --const unsigned int JSCONST_nNumberHash = -- CHash<'n', 'u', 'm', 'b', 'e', 'r'>::value; --const unsigned int JSCONST_nBoolHash = -- CHash<'b', 'o', 'o', 'l', 'e', 'a', 'n'>::value; --const unsigned int JSCONST_nDateHash = CHash<'d', 'a', 't', 'e'>::value; --const unsigned int JSCONST_nObjectHash = -- CHash<'o', 'b', 'j', 'e', 'c', 't'>::value; --const unsigned int JSCONST_nFXobjHash = CHash<'f', 'x', 'o', 'b', 'j'>::value; --const unsigned int JSCONST_nNullHash = CHash<'n', 'u', 'l', 'l'>::value; --const unsigned int JSCONST_nUndefHash = -- CHash<'u', 'n', 'd', 'e', 'f', 'i', 'n', 'e', 'd'>::value; -- --static unsigned JS_CalcHash(const wchar_t* main) { -- return (unsigned)FX_HashCode_GetW(CFX_WideStringC(main), false); --} -- --#ifndef NDEBUG --class HashVerify { -- public: -- HashVerify(); --} g_hashVerify; -- --HashVerify::HashVerify() { -- ASSERT(JSCONST_nStringHash == JS_CalcHash(kFXJSValueNameString)); -- ASSERT(JSCONST_nNumberHash == JS_CalcHash(kFXJSValueNameNumber)); -- ASSERT(JSCONST_nBoolHash == JS_CalcHash(kFXJSValueNameBoolean)); -- ASSERT(JSCONST_nDateHash == JS_CalcHash(kFXJSValueNameDate)); -- ASSERT(JSCONST_nObjectHash == JS_CalcHash(kFXJSValueNameObject)); -- ASSERT(JSCONST_nFXobjHash == JS_CalcHash(kFXJSValueNameFxobj)); -- ASSERT(JSCONST_nNullHash == JS_CalcHash(kFXJSValueNameNull)); -- ASSERT(JSCONST_nUndefHash == JS_CalcHash(kFXJSValueNameUndefined)); --} --#endif -- - BEGIN_JS_STATIC_CONST(CJS_Global) - END_JS_STATIC_CONST() - -@@ -335,9 +278,8 @@ - CFX_WideString ws = - FXJS_ToString(isolate, FXJS_GetArrayElement(isolate, pKeyList, i)); - CFX_ByteString sKey = ws.UTF8Encode(); -- - v8::Local v = FXJS_GetObjectElement(isolate, pObj, ws); -- switch (GET_VALUE_TYPE(v)) { -+ switch (CJS_Value::GetValueType(v)) { - case CJS_Value::VT_number: { - CJS_KeyValue* pObjElement = new CJS_KeyValue; - pObjElement->nType = JS_GLOBALDATA_TYPE_NUMBER; -@@ -353,8 +295,7 @@ - array.Add(pObjElement); - } break; - case CJS_Value::VT_string: { -- CFX_ByteString sValue = -- CJS_Value(pRuntime, v, CJS_Value::VT_string).ToCFXByteString(); -+ CFX_ByteString sValue = CJS_Value(pRuntime, v).ToCFXByteString(); - CJS_KeyValue* pObjElement = new CJS_KeyValue; - pObjElement->nType = JS_GLOBALDATA_TYPE_STRING; - pObjElement->sKey = sKey; -@@ -500,26 +441,3 @@ - m_mapGlobal[propname] = pNewData; - return TRUE; - } -- --CJS_Value::Type GET_VALUE_TYPE(v8::Local p) { -- const unsigned int nHash = JS_CalcHash(FXJS_GetTypeof(p)); -- -- if (nHash == JSCONST_nUndefHash) -- return CJS_Value::VT_undefined; -- if (nHash == JSCONST_nNullHash) -- return CJS_Value::VT_null; -- if (nHash == JSCONST_nStringHash) -- return CJS_Value::VT_string; -- if (nHash == JSCONST_nNumberHash) -- return CJS_Value::VT_number; -- if (nHash == JSCONST_nBoolHash) -- return CJS_Value::VT_boolean; -- if (nHash == JSCONST_nDateHash) -- return CJS_Value::VT_date; -- if (nHash == JSCONST_nObjectHash) -- return CJS_Value::VT_object; -- if (nHash == JSCONST_nFXobjHash) -- return CJS_Value::VT_fxobject; -- -- return CJS_Value::VT_unknown; --} -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Define.h 2017-03-06 13:04:01.783297575 +0100 -@@ -111,7 +111,7 @@ - CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); - C* pObj = reinterpret_cast(pJSObj->GetEmbedObject()); - CFX_WideString sError; -- CJS_PropValue propValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); -+ CJS_PropValue propValue(CJS_Value(pRuntime, value)); - propValue.StartSetting(); - if (!(pObj->*M)(pContext, propValue, sError)) { - FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string, -@@ -149,7 +149,7 @@ - IJS_Context* pContext = pRuntime->GetCurrentContext(); - std::vector parameters; - for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { -- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); -+ parameters.push_back(CJS_Value(pRuntime, info[i])); - } - CJS_Value valueRes(pRuntime); - CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); -@@ -404,7 +404,7 @@ - CFX_WideString propname = CFX_WideString::FromUTF8( - CFX_ByteStringC(*utf8_value, utf8_value.length())); - CFX_WideString sError; -- CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); -+ CJS_PropValue PropValue(CJS_Value(pRuntime, value)); - PropValue.StartSetting(); - if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) { - FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError)); -@@ -447,7 +447,7 @@ - IJS_Context* pContext = pRuntime->GetCurrentContext(); - std::vector parameters; - for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { -- parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); -+ parameters.push_back(CJS_Value(pRuntime, info[i])); - } - CJS_Value valueRes(pRuntime); - CFX_WideString sError; -@@ -485,6 +485,4 @@ - } \ - } - --CJS_Value::Type GET_VALUE_TYPE(v8::Local p); -- - #endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp 2017-03-06 13:10:30.896809956 +0100 -@@ -22,11 +22,10 @@ - return *(double*)g_nan; - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime) -- : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {} -+CJS_Value::CJS_Value(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {} - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t) -- : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {} -+CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue) -+ : m_pValue(pValue), m_pJSRuntime(pRuntime) {} - - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const int& iValue) - : m_pJSRuntime(pRuntime) { -@@ -48,23 +47,11 @@ - operator=(dValue); - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local pJsObj) -- : m_pJSRuntime(pRuntime) { -- operator=(pJsObj); --} -- - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pJsObj) - : m_pJSRuntime(pRuntime) { - operator=(pJsObj); - } - --CJS_Value::CJS_Value(CJS_Runtime* pRuntime, CJS_Document* pJsDoc) -- : m_pJSRuntime(pRuntime) { -- m_eType = VT_object; -- if (pJsDoc) -- m_pValue = pJsDoc->ToV8Object(); --} -- - CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr) - : m_pJSRuntime(pRuntime) { - operator=(pWstr); -@@ -84,19 +71,17 @@ - - CJS_Value::CJS_Value(const CJS_Value& other) = default; - --void CJS_Value::Attach(v8::Local pValue, Type t) { -+void CJS_Value::Attach(v8::Local pValue) { - m_pValue = pValue; -- m_eType = t; - } - - void CJS_Value::Attach(CJS_Value* pValue) { - if (pValue) -- Attach(pValue->ToV8Value(), pValue->GetType()); -+ Attach(pValue->ToV8Value()); - } - - void CJS_Value::Detach() { - m_pValue = v8::Local(); -- m_eType = VT_unknown; - } - - int CJS_Value::ToInt() const { -@@ -146,7 +131,7 @@ - - void CJS_Value::MaybeCoerceToNumber() { - bool bAllowNaN = false; -- if (m_eType == VT_string) { -+ if (GetType() == VT_string) { - CFX_ByteString bstr = ToCFXByteString(); - if (bstr.GetLength() == 0) - return; -@@ -162,32 +147,26 @@ - if (std::isnan(num->Value()) && !bAllowNaN) - return; - m_pValue = num; -- m_eType = VT_number; - } - - void CJS_Value::operator=(int iValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), iValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(bool bValue) { - m_pValue = FXJS_NewBoolean(m_pJSRuntime->GetIsolate(), bValue); -- m_eType = VT_boolean; - } - - void CJS_Value::operator=(double dValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), dValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(float fValue) { - m_pValue = FXJS_NewNumber(m_pJSRuntime->GetIsolate(), fValue); -- m_eType = VT_number; - } - - void CJS_Value::operator=(v8::Local pObj) { - m_pValue = FXJS_NewObject(m_pJSRuntime->GetIsolate(), pObj); -- m_eType = VT_fxobject; - } - - void CJS_Value::operator=(CJS_Object* pObj) { -@@ -195,21 +174,12 @@ - operator=(pObj->ToV8Object()); - } - --void CJS_Value::operator=(CJS_Document* pJsDoc) { -- m_eType = VT_object; -- if (pJsDoc) { -- m_pValue = pJsDoc->ToV8Object(); -- } --} -- - void CJS_Value::operator=(const FX_WCHAR* pWstr) { - m_pValue = FXJS_NewString(m_pJSRuntime->GetIsolate(), (wchar_t*)pWstr); -- m_eType = VT_string; - } - - void CJS_Value::SetNull() { - m_pValue = FXJS_NewNull(); -- m_eType = VT_null; - } - - void CJS_Value::operator=(const FX_CHAR* pStr) { -@@ -219,36 +189,34 @@ - void CJS_Value::operator=(CJS_Array& array) { - m_pValue = - FXJS_NewObject2(m_pJSRuntime->GetIsolate(), (v8::Local)array); -- m_eType = VT_object; - } - - void CJS_Value::operator=(CJS_Date& date) { - m_pValue = FXJS_NewDate(m_pJSRuntime->GetIsolate(), (double)date); -- m_eType = VT_date; - } - - void CJS_Value::operator=(CJS_Value value) { - m_pValue = value.ToV8Value(); -- m_eType = value.m_eType; - m_pJSRuntime = value.m_pJSRuntime; - } - --CJS_Value::Type CJS_Value::GetType() const { -- if (m_pValue.IsEmpty()) -+// static -+CJS_Value::Type CJS_Value::GetValueType(v8::Local value) { -+ if (value.IsEmpty()) - return VT_unknown; -- if (m_pValue->IsString()) -+ if (value->IsString()) - return VT_string; -- if (m_pValue->IsNumber()) -+ if (value->IsNumber()) - return VT_number; -- if (m_pValue->IsBoolean()) -+ if (value->IsBoolean()) - return VT_boolean; -- if (m_pValue->IsDate()) -+ if (value->IsDate()) - return VT_date; -- if (m_pValue->IsObject()) -+ if (value->IsObject()) - return VT_object; -- if (m_pValue->IsNull()) -+ if (value->IsNull()) - return VT_null; -- if (m_pValue->IsUndefined()) -+ if (value->IsUndefined()) - return VT_undefined; - return VT_unknown; - } -@@ -427,7 +395,7 @@ - return; - v8::Local p = - FXJS_GetArrayElement(m_pJSRuntime->GetIsolate(), m_pArray, index); -- value.Attach(p, CJS_Value::VT_object); -+ value.Attach(p); - } - - void CJS_Array::SetElement(unsigned index, CJS_Value value) { -@@ -899,7 +867,7 @@ - v8::Local v8Value = - FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); - if (!v8Value->IsUndefined()) -- result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); -+ result[i] = CJS_Value(pRuntime, v8Value); - } - va_end(ap); - return result; -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/JS_Value.h 2017-03-06 13:04:01.784297561 +0100 -@@ -27,20 +27,17 @@ - VT_boolean, - VT_date, - VT_object, -- VT_fxobject, - VT_null, - VT_undefined - }; - - CJS_Value(CJS_Runtime* pRuntime); -- CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue, Type t); -+ CJS_Value(CJS_Runtime* pRuntime, v8::Local pValue); - CJS_Value(CJS_Runtime* pRuntime, const int& iValue); - CJS_Value(CJS_Runtime* pRuntime, const double& dValue); - CJS_Value(CJS_Runtime* pRuntime, const float& fValue); - CJS_Value(CJS_Runtime* pRuntime, const bool& bValue); -- CJS_Value(CJS_Runtime* pRuntime, v8::Local); -- CJS_Value(CJS_Runtime* pRuntime, CJS_Object*); -- CJS_Value(CJS_Runtime* pRuntime, CJS_Document*); -+ CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj); - CJS_Value(CJS_Runtime* pRuntime, const FX_CHAR* pStr); - CJS_Value(CJS_Runtime* pRuntime, const FX_WCHAR* pWstr); - CJS_Value(CJS_Runtime* pRuntime, CJS_Array& array); -@@ -49,11 +46,12 @@ - CJS_Value(const CJS_Value& other); - - void SetNull(); -- void Attach(v8::Local pValue, Type t); -+ void Attach(v8::Local pValue); - void Attach(CJS_Value* pValue); - void Detach(); - -- Type GetType() const; -+ static Type GetValueType(v8::Local value); -+ Type GetType() const { return GetValueType(m_pValue); } - int ToInt() const; - bool ToBool() const; - double ToDouble() const; -@@ -66,8 +64,7 @@ - v8::Local ToV8Value() const; - - // Replace the current |m_pValue| with a v8::Number if possible -- // to make one from the current |m_pValue|, updating |m_eType| -- // as appropriate to indicate the result. -+ // to make one from the current |m_pValue|. - void MaybeCoerceToNumber(); - - void operator=(int iValue); -@@ -75,7 +72,6 @@ - void operator=(double val); - void operator=(float val); - void operator=(CJS_Object* val); -- void operator=(CJS_Document* val); - void operator=(v8::Local val); - void operator=(CJS_Array& val); - void operator=(CJS_Date& val); -@@ -91,7 +87,6 @@ - CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } - - protected: -- Type m_eType; - v8::Local m_pValue; - CJS_Runtime* m_pJSRuntime; - }; -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/fxjs_v8.cpp 2017-03-06 13:06:10.884476877 +0100 -@@ -10,15 +10,6 @@ - - #include "core/fxcrt/include/fx_basic.h" - --const wchar_t kFXJSValueNameString[] = L"string"; --const wchar_t kFXJSValueNameNumber[] = L"number"; --const wchar_t kFXJSValueNameBoolean[] = L"boolean"; --const wchar_t kFXJSValueNameDate[] = L"date"; --const wchar_t kFXJSValueNameObject[] = L"object"; --const wchar_t kFXJSValueNameFxobj[] = L"fxobj"; --const wchar_t kFXJSValueNameNull[] = L"null"; --const wchar_t kFXJSValueNameUndefined[] = L"undefined"; -- - // Keep this consistent with the values defined in gin/public/context_holder.h - // (without actually requiring a dependency on gin itself for the standalone - // embedders of PDFIum). The value we want to use is: -@@ -540,26 +531,6 @@ - .ToLocalChecked()); - } - --const wchar_t* FXJS_GetTypeof(v8::Local pObj) { -- if (pObj.IsEmpty()) -- return nullptr; -- if (pObj->IsString()) -- return kFXJSValueNameString; -- if (pObj->IsNumber()) -- return kFXJSValueNameNumber; -- if (pObj->IsBoolean()) -- return kFXJSValueNameBoolean; -- if (pObj->IsDate()) -- return kFXJSValueNameDate; -- if (pObj->IsObject()) -- return kFXJSValueNameObject; -- if (pObj->IsNull()) -- return kFXJSValueNameNull; -- if (pObj->IsUndefined()) -- return kFXJSValueNameUndefined; -- return nullptr; --} -- - void FXJS_SetPrivate(v8::Isolate* pIsolate, - v8::Local pObj, - void* p) { -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-pdfium-gcc7/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/jsapi/include/fxjs_v8.h 2017-03-06 13:06:40.283062272 +0100 -@@ -118,15 +118,6 @@ - FXJS_PerIsolateData(); - }; - --extern const wchar_t kFXJSValueNameString[]; --extern const wchar_t kFXJSValueNameNumber[]; --extern const wchar_t kFXJSValueNameBoolean[]; --extern const wchar_t kFXJSValueNameDate[]; --extern const wchar_t kFXJSValueNameObject[]; --extern const wchar_t kFXJSValueNameFxobj[]; --extern const wchar_t kFXJSValueNameNull[]; --extern const wchar_t kFXJSValueNameUndefined[]; -- - class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { - void* Allocate(size_t length) override; - void* AllocateUninitialized(size_t length) override; -@@ -209,7 +200,6 @@ - bool bStatic = false); - v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate); - int FXJS_GetObjDefnID(v8::Local pObj); --const wchar_t* FXJS_GetTypeof(v8::Local pObj); - - void FXJS_SetPrivate(v8::Isolate* pIsolate, - v8::Local pObj, diff --git a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch deleted file mode 100644 index 4f17325..0000000 --- a/qtwebengine-opensource-src-5.8.0-system-nspr-prtime.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/base.gypi 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 -@@ -676,8 +676,6 @@ - 'third_party/dmg_fp/g_fmt.cc', - 'third_party/icu/icu_utf.cc', - 'third_party/icu/icu_utf.h', -- 'third_party/nspr/prtime.cc', -- 'third_party/nspr/prtime.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'threading/non_thread_safe.h', -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 -@@ -803,8 +803,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-03-05 16:48:14.208027199 +0100 -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/base/time/time.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-03-05 16:48:14.298025856 +0100 -@@ -14,7 +14,7 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "build/build_config.h" - - namespace base { diff --git a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch b/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch deleted file mode 100644 index 8a87503..0000000 --- a/qtwebengine-opensource-src-5.8.0-v8-gcc7.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-03-06 02:05:57.848394582 +0100 -@@ -99,7 +99,7 @@ - - template - static inline void IterateBody(HeapObject* obj, int object_size) { -- IterateBody(obj); -+ IterateBody(obj); - } - }; - -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects.h 2017-03-06 02:05:57.990392454 +0100 -@@ -3193,22 +3193,10 @@ - public: - typedef Shape ShapeT; - -- // Wrapper methods -- inline uint32_t Hash(Key key) { -- if (Shape::UsesSeed) { -- return Shape::SeededHash(key, GetHeap()->HashSeed()); -- } else { -- return Shape::Hash(key); -- } -- } -- -- inline uint32_t HashForObject(Key key, Object* object) { -- if (Shape::UsesSeed) { -- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -- } else { -- return Shape::HashForObject(key, object); -- } -- } -+ // Wrapper methods. Defined in src/objects-inl.h -+ // to break a cycle with src/heap/heap.h. -+ inline uint32_t Hash(Key key); -+ inline uint32_t HashForObject(Key key, Object* object); - - // Returns a new HashTable object. - MUST_USE_RESULT static Handle New( -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/v8/src/objects-inl.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-gcc7/src/3rdparty/chromium/v8/src/objects-inl.h 2017-03-06 02:05:57.992392424 +0100 -@@ -38,6 +38,25 @@ - namespace v8 { - namespace internal { - -+template -+uint32_t HashTable::Hash(Key key) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHash(key, GetHeap()->HashSeed()); -+ } else { -+ return Shape::Hash(key); -+ } -+} -+ -+template -+uint32_t HashTable::HashForObject(Key key, -+ Object* object) { -+ if (Shape::UsesSeed) { -+ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); -+ } else { -+ return Shape::HashForObject(key, object); -+ } -+} -+ - PropertyDetails::PropertyDetails(Smi* smi) { - value_ = smi->value(); - } diff --git a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch deleted file mode 100644 index 8e26dbe..0000000 --- a/qtwebengine-opensource-src-5.8.0-webrtc-neon-detect.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-03-05 17:08:43.547748044 +0100 -@@ -108,9 +108,7 @@ - if (is_linux) { - defines += [ "WEBRTC_THREAD_RR" ] - -- if (!build_with_chromium) { -- deps += [ ":cpu_features_linux" ] -- } -+ deps += [ ":cpu_features_linux" ] - - libs += [ "rt" ] - } -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/system_wrappers.gyp 2017-03-05 17:07:01.869254856 +0100 -@@ -112,12 +112,8 @@ - 'defines': [ - 'WEBRTC_THREAD_RR', - ], -- 'conditions': [ -- ['build_with_chromium==0', { -- 'dependencies': [ -- 'cpu_features_webrtc.gyp:cpu_features_linux', -- ], -- }], -+ 'dependencies': [ -+ 'cpu_features_webrtc.gyp:cpu_features_linux', - ], - 'link_settings': { - 'libraries': [ '-lrt', ], diff --git a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch b/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch deleted file mode 100644 index f679530..0000000 --- a/qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h ---- qtwebengine-opensource-src-5.8.0/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-wtf-gcc7/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-03-07 03:00:44.783316233 +0100 -@@ -542,6 +542,8 @@ - return *this; - } - -+inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); -+ - template - inline void LinkedHashSet::swap(LinkedHashSet& other) - { diff --git a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch new file mode 100644 index 0000000..ddf8abc --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch @@ -0,0 +1,11 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-10 02:32:09.984692943 +0200 +@@ -64,6 +64,7 @@ + gn_args += arm_use_neon=true + } else { + MFPU = $$extractCFlag("-mfpu=.*") ++ !isEmpty(MFPU): gn_args += arm_fpu=\"$$MFPU\" + !isEmpty(MFPU):contains(MFPU, ".*neon.*") { + gn_args += arm_use_neon=true + } else { diff --git a/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch b/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch new file mode 100644 index 0000000..4fcd592 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf +--- qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf 2017-06-08 00:36:16.303520106 +0200 +@@ -302,7 +302,7 @@ + } + + defineReplace(extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + return ($$member(OPTION, 1)) diff --git a/qtwebengine-opensource-src-5.9.0-linux-pri.patch b/qtwebengine-opensource-src-5.9.0-linux-pri.patch new file mode 100644 index 0000000..c671f6b --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-linux-pri.patch @@ -0,0 +1,26 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-linux-pri/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-linux-pri/src/core/config/linux.pri 2017-06-08 00:20:53.688419747 +0200 +@@ -148,3 +148,22 @@ + use?(system_ffmpeg): gn_args += use_system_ffmpeg=true + #use?(system_protobuf): gn_args += use_system_protobuf=true + } ++ ++# some more system packages, that are not checked for for some reason ++gn_args += use_system_re2=true ++ ++# yasm is only used on x86, and passing use_system_yasm makes the build fail on ++# other architectures (e.g., ARM), so make it conditional on the architecture ++contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ gn_args += use_system_yasm=true ++} ++ ++# link libpci instead of dlopening it, our Qt packaging depends on it anyway ++gn_args += linux_link_libpci=true ++ ++# run the unbundling script Chromium provides ++CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" ++R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" ++R_G_F_PY_ARGS = "--system-libraries re2 yasm" ++log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.9.0-no-neon.patch b/qtwebengine-opensource-src-5.9.0-no-neon.patch new file mode 100644 index 0000000..0fc7395 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-no-neon.patch @@ -0,0 +1,14 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-no-neon/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-neon/src/core/config/linux.pri 2017-06-08 00:55:22.257781563 +0200 +@@ -70,7 +70,9 @@ + gn_args += arm_use_neon=false + # If the toolchain does not explicitly specify to use NEON instructions + # we use arm_neon_optional for ARMv7 +- equals(MARMV, 7): gn_args += arm_optionally_use_neon=true ++ # Disable NEON entirely for now, if set in the specfile, e.g., to ++ # work around some build failure. ++ # equals(MARMV, 7): gn_args += arm_optionally_use_neon=true + } + } + diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch new file mode 100644 index 0000000..5c10ebf --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -0,0 +1,2601 @@ +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-06-08 23:09:28.104582812 +0200 +@@ -533,13 +533,6 @@ + } else if (current_cpu == "x86") { + cflags += [ "-m32" ] + ldflags += [ "-m32" ] +- if (!is_nacl) { +- cflags += [ +- "-msse2", +- "-mfpmath=sse", +- "-mmmx", +- ] +- } + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { + cflags += [ "--target=arm-linux-gnueabihf" ] +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-06-10 01:42:15.216049690 +0200 +@@ -59,3 +59,11 @@ + # It should never be explicitly set by the user. + v8_current_cpu = v8_target_cpu + } ++ ++if (v8_current_cpu == "x86") { ++ # If we are not building for the x86_sse2 toolchain, we actually want to build ++ # the "x87" backend instead. ++ if (current_toolchain != "//build/toolchain/linux:x86_sse2") { ++ v8_current_cpu = "x87" ++ } ++} +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-06-10 02:09:47.874494730 +0200 +@@ -78,6 +78,26 @@ + } + } + ++gcc_toolchain("x86_sse2") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ extra_cflags = "-msse2 -mfpmath=sse" ++ extra_cxxflags = "-msse2 -mfpmath=sse" ++ shlib_subdir = "lib/sse2" ++ ++ toolchain_args = { ++ current_cpu = "x86" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ + clang_toolchain("clang_x64") { + toolchain_args = { + current_cpu = "x64" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-06-08 23:12:50.719511297 +0200 +@@ -567,13 +567,6 @@ + "trees/tree_synchronizer.h", + ] + +- if (current_cpu == "x86" || current_cpu == "x64") { +- sources += [ +- "raster/texture_compressor_etc1_sse.cc", +- "raster/texture_compressor_etc1_sse.h", +- ] +- } +- + configs += [ "//build/config:precompiled_headers" ] + + public_deps = [ +@@ -583,6 +576,7 @@ + deps = [ + "//base", + "//base/third_party/dynamic_annotations", ++ "//cc:cc_opts", + "//cc/proto", + "//cc/surfaces:surface_id", + "//gpu", +@@ -612,6 +606,36 @@ + } + } + ++source_set("cc_opts") { ++ public_deps = [ ++ "//cc:cc_opts_sse", ++ ] ++} ++ ++source_set("cc_opts_sse") { ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps = [ ++ "//base", ++ ] ++ ++ defines = [ "CC_IMPLEMENTATION=1" ] ++ ++ if (!is_debug && (is_win || is_android)) { ++ configs -= [ "//build/config/compiler:optimize" ] ++ configs += [ "//build/config/compiler:optimize_max" ] ++ } ++ ++ sources = [ ++ "raster/texture_compressor.h", ++ "raster/texture_compressor_etc1.h", ++ "raster/texture_compressor_etc1_sse.cc", ++ "raster/texture_compressor_etc1_sse.h", ++ ] ++ ++ cflags = [ "-msse2" ] ++ } ++} ++ + static_library("test_support") { + testonly = true + sources = [ +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/chrome/renderer/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/chrome/renderer/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/chrome/renderer/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/chrome/renderer/BUILD.gn 2017-06-10 02:12:19.472150369 +0200 +@@ -136,6 +136,12 @@ + "//v8:v8", + ] + ++ if (current_cpu == "x86") { ++ deps += [ ++ "//v8:v8(//build/toolchain/linux:x86_sse2)", ++ ] ++ } ++ + configs += [ "//build/config/compiler:wexit_time_destructors" ] + + if (enable_nacl) { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-06-08 22:49:57.484256877 +0200 +@@ -336,13 +336,13 @@ + } + + if (current_cpu == "x86" || current_cpu == "x64") { +- sources += [ +- "simd/convert_rgb_to_yuv_sse2.cc", +- "simd/convert_rgb_to_yuv_ssse3.cc", +- "simd/convert_yuv_to_rgb_x86.cc", +- "simd/filter_yuv_sse2.cc", ++ sources += [ "simd/convert_yuv_to_rgb_x86.cc" ] ++ deps += [ ++ ":media_yasm", ++ ":media_mmx", ++ ":media_sse", ++ ":media_sse2", + ] +- deps += [ ":media_yasm" ] + } + + if (is_linux || is_win) { +@@ -539,10 +539,47 @@ + } + + if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("media_mmx") { ++ sources = [ "simd/filter_yuv_mmx.cc" ] ++ configs += [ "//media:media_config" ] ++ if (!is_win) { ++ cflags = [ "-mmmx" ] ++ } ++ } ++ ++ source_set("media_sse") { ++ sources = [ ++ "simd/sinc_resampler_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } ++ ++ source_set("media_sse2") { ++ sources = [ ++ "simd/convert_rgb_to_yuv_sse2.cc", ++ "simd/convert_rgb_to_yuv_ssse3.cc", ++ "simd/filter_yuv_sse2.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse2" ] ++ } ++ } ++ + import("//third_party/yasm/yasm_assemble.gni") + yasm_assemble("media_yasm") { + sources = [ + "simd/convert_rgb_to_yuv_ssse3.asm", ++ "simd/convert_yuv_to_rgb_mmx.asm", + "simd/convert_yuv_to_rgb_sse.asm", + "simd/convert_yuva_to_argb_mmx.asm", + "simd/empty_register_state_mmx.asm", +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/media.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-06-08 22:49:57.484256877 +0200 +@@ -10,6 +10,8 @@ + #include "base/metrics/field_trial.h" + #include "base/trace_event/trace_event.h" + #include "media/base/media_switches.h" ++#include "media/base/sinc_resampler.h" ++#include "media/base/vector_math.h" + #include "media/base/yuv_convert.h" + + #if defined(OS_ANDROID) +@@ -40,6 +42,8 @@ + TRACE_EVENT_WARMUP_CATEGORY("media"); + + // Perform initialization of libraries which require runtime CPU detection. ++ vector_math::Initialize(); ++ SincResampler::InitializeCPUSpecificFeatures(); + InitializeCPUSpecificYUVConversions(); + + #if !defined(MEDIA_DISABLE_FFMPEG) +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-06-08 22:49:57.643254478 +0200 +@@ -65,6 +65,17 @@ + int rgbstride, + YUVType yuv_type); + ++MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type); ++ + MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +@@ -124,6 +135,13 @@ + ptrdiff_t width, + const int16_t* convert_table); + ++MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, ++ ptrdiff_t width, ++ const int16_t* convert_table); ++ + MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +@@ -131,6 +149,14 @@ + ptrdiff_t width, + const int16_t* convert_table); + ++MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, ++ const uint8_t* u_buf, ++ const uint8_t* v_buf, ++ uint8_t* rgb_buf, ++ ptrdiff_t width, ++ ptrdiff_t source_dx, ++ const int16_t* convert_table); ++ + MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +@@ -147,6 +173,14 @@ + ptrdiff_t source_dx, + const int16_t* convert_table); + ++MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, ++ const uint8_t* u_buf, ++ const uint8_t* v_buf, ++ uint8_t* rgb_buf, ++ ptrdiff_t width, ++ ptrdiff_t source_dx, ++ const int16_t* convert_table); ++ + MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, + const uint8_t* u_buf, + const uint8_t* v_buf, +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-06-08 22:49:57.698253649 +0200 +@@ -0,0 +1,23 @@ ++; Copyright (c) 2011 The Chromium Authors. All rights reserved. ++; Use of this source code is governed by a BSD-style license that can be ++; found in the LICENSE file. ++ ++%include "third_party/x86inc/x86inc.asm" ++ ++; ++; This file uses MMX instructions. ++; ++ SECTION_TEXT ++ CPU MMX ++ ++; Use movq to save the output. ++%define MOVQ movq ++ ++; extern "C" void ConvertYUVToRGB32Row_MMX(const uint8* y_buf, ++; const uint8* u_buf, ++; const uint8* v_buf, ++; uint8* rgb_buf, ++; ptrdiff_t width, ++; const int16* convert_table); ++%define SYMBOL ConvertYUVToRGB32Row_MMX ++%include "convert_yuv_to_rgb_mmx.inc" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-06-08 22:49:57.699253634 +0200 +@@ -47,6 +47,34 @@ + EmptyRegisterState(); + } + ++void ConvertYUVToRGB32_MMX(const uint8_t* yplane, ++ const uint8_t* uplane, ++ const uint8_t* vplane, ++ uint8_t* rgbframe, ++ int width, ++ int height, ++ int ystride, ++ int uvstride, ++ int rgbstride, ++ YUVType yuv_type) { ++ unsigned int y_shift = GetVerticalShift(yuv_type); ++ for (int y = 0; y < height; ++y) { ++ uint8_t* rgb_row = rgbframe + y * rgbstride; ++ const uint8_t* y_ptr = yplane + y * ystride; ++ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; ++ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; ++ ++ ConvertYUVToRGB32Row_MMX(y_ptr, ++ u_ptr, ++ v_ptr, ++ rgb_row, ++ width, ++ GetLookupTable(yuv_type)); ++ } ++ ++ EmptyRegisterState(); ++} ++ + void ConvertYUVToRGB32_SSE(const uint8_t* yplane, + const uint8_t* uplane, + const uint8_t* vplane, +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-06-08 22:49:57.699253634 +0200 +@@ -20,6 +20,12 @@ + int source_width, + uint8_t source_y_fraction); + ++MEDIA_EXPORT void FilterYUVRows_MMX(uint8_t* ybuf, ++ const uint8_t* y0_ptr, ++ const uint8_t* y1_ptr, ++ int source_width, ++ uint8_t source_y_fraction); ++ + MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, + const uint8_t* y0_ptr, + const uint8_t* y1_ptr, +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-06-08 22:49:57.699253634 +0200 +@@ -0,0 +1,79 @@ ++// Copyright (c) 2011 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if defined(_MSC_VER) ++#include ++#else ++#include ++#endif ++ ++#include "build/build_config.h" ++#include "media/base/simd/filter_yuv.h" ++ ++namespace media { ++ ++#if defined(COMPILER_MSVC) ++// Warning 4799 is about calling emms before the function exits. ++// We calls emms in a frame level so suppress this warning. ++#pragma warning(push) ++#pragma warning(disable: 4799) ++#endif ++ ++void FilterYUVRows_MMX(uint8_t* dest, ++ const uint8_t* src0, ++ const uint8_t* src1, ++ int width, ++ uint8_t fraction) { ++ int pixel = 0; ++ ++ // Process the unaligned bytes first. ++ int unaligned_width = ++ (8 - (reinterpret_cast(dest) & 7)) & 7; ++ while (pixel < width && pixel < unaligned_width) { ++ dest[pixel] = (src0[pixel] * (256 - fraction) + ++ src1[pixel] * fraction) >> 8; ++ ++pixel; ++ } ++ ++ __m64 zero = _mm_setzero_si64(); ++ __m64 src1_fraction = _mm_set1_pi16(fraction); ++ __m64 src0_fraction = _mm_set1_pi16(256 - fraction); ++ const __m64* src0_64 = reinterpret_cast(src0 + pixel); ++ const __m64* src1_64 = reinterpret_cast(src1 + pixel); ++ __m64* dest64 = reinterpret_cast<__m64*>(dest + pixel); ++ __m64* end64 = reinterpret_cast<__m64*>( ++ reinterpret_cast(dest + width) & ~7); ++ ++ while (dest64 < end64) { ++ __m64 src0 = *src0_64++; ++ __m64 src1 = *src1_64++; ++ __m64 src2 = _mm_unpackhi_pi8(src0, zero); ++ __m64 src3 = _mm_unpackhi_pi8(src1, zero); ++ src0 = _mm_unpacklo_pi8(src0, zero); ++ src1 = _mm_unpacklo_pi8(src1, zero); ++ src0 = _mm_mullo_pi16(src0, src0_fraction); ++ src1 = _mm_mullo_pi16(src1, src1_fraction); ++ src2 = _mm_mullo_pi16(src2, src0_fraction); ++ src3 = _mm_mullo_pi16(src3, src1_fraction); ++ src0 = _mm_add_pi16(src0, src1); ++ src2 = _mm_add_pi16(src2, src3); ++ src0 = _mm_srli_pi16(src0, 8); ++ src2 = _mm_srli_pi16(src2, 8); ++ src0 = _mm_packs_pu16(src0, src2); ++ *dest64++ = src0; ++ pixel += 8; ++ } ++ ++ while (pixel < width) { ++ dest[pixel] = (src0[pixel] * (256 - fraction) + ++ src1[pixel] * fraction) >> 8; ++ ++pixel; ++ } ++} ++ ++#if defined(COMPILER_MSVC) ++#pragma warning(pop) ++#endif ++ ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-06-08 22:49:57.699253634 +0200 +@@ -0,0 +1,50 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/sinc_resampler.h" ++ ++#include ++ ++namespace media { ++ ++float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, ++ const float* k2, ++ double kernel_interpolation_factor) { ++ __m128 m_input; ++ __m128 m_sums1 = _mm_setzero_ps(); ++ __m128 m_sums2 = _mm_setzero_ps(); ++ ++ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling ++ // these loops hurt performance in local testing. ++ if (reinterpret_cast(input_ptr) & 0x0F) { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_loadu_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } else { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_load_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } ++ ++ // Linearly interpolate the two "convolutions". ++ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( ++ static_cast(1.0 - kernel_interpolation_factor))); ++ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( ++ static_cast(kernel_interpolation_factor))); ++ m_sums1 = _mm_add_ps(m_sums1, m_sums2); ++ ++ // Sum components together. ++ float result; ++ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); ++ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( ++ m_sums2, m_sums2, 1))); ++ ++ return result; ++} ++ ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-06-08 22:49:57.700253619 +0200 +@@ -0,0 +1,118 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/vector_math_testing.h" ++ ++#include ++ ++#include // NOLINT ++ ++namespace media { ++namespace vector_math { ++ ++void FMUL_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) ++ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] = src[i] * scale; ++} ++ ++void FMAC_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) { ++ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), ++ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); ++ } ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] += src[i] * scale; ++} ++ ++// Convenience macro to extract float 0 through 3 from the vector |a|. This is ++// needed because compilers other than clang don't support access via ++// operator[](). ++#define EXTRACT_FLOAT(a, i) \ ++ (i == 0 ? \ ++ _mm_cvtss_f32(a) : \ ++ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) ++ ++std::pair EWMAAndMaxPower_SSE( ++ float initial_value, const float src[], int len, float smoothing_factor) { ++ // When the recurrence is unrolled, we see that we can split it into 4 ++ // separate lanes of evaluation: ++ // ++ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) ++ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... ++ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ // ++ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... ++ // ++ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in ++ // each of the 4 lanes, and then combine them to give y[n]. ++ ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ ++ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); ++ const float weight_prev = 1.0f - smoothing_factor; ++ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); ++ const __m128 weight_prev_squared_x4 = ++ _mm_mul_ps(weight_prev_x4, weight_prev_x4); ++ const __m128 weight_prev_4th_x4 = ++ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); ++ ++ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and ++ // 0, respectively. ++ __m128 max_x4 = _mm_setzero_ps(); ++ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); ++ int i; ++ for (i = 0; i < last_index; i += 4) { ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); ++ const __m128 sample_x4 = _mm_load_ps(src + i); ++ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); ++ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); ++ // Note: The compiler optimizes this to a single multiply-and-accumulate ++ // instruction: ++ ewma_x4 = _mm_add_ps(ewma_x4, ++ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); ++ } ++ ++ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ float ewma = EXTRACT_FLOAT(ewma_x4, 3); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 2); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 1); ++ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 0); ++ ++ // Fold the maximums together to get the overall maximum. ++ max_x4 = _mm_max_ps(max_x4, ++ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); ++ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); ++ ++ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); ++ ++ // Handle remaining values at the end of |src|. ++ for (; i < len; ++i) { ++ result.first *= weight_prev; ++ const float sample = src[i]; ++ const float sample_squared = sample * sample; ++ result.first += sample_squared * smoothing_factor; ++ result.second = std::max(result.second, sample_squared); ++ } ++ ++ return result; ++} ++ ++} // namespace vector_math ++} // namespace media +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-06-08 22:49:57.700253619 +0200 +@@ -81,17 +81,12 @@ + #include + #include + ++#include "base/cpu.h" + #include "base/logging.h" + #include "build/build_config.h" + +-#if defined(ARCH_CPU_X86_FAMILY) +-#include +-#define CONVOLVE_FUNC Convolve_SSE +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include +-#define CONVOLVE_FUNC Convolve_NEON +-#else +-#define CONVOLVE_FUNC Convolve_C + #endif + + namespace media { +@@ -112,10 +107,41 @@ + return sinc_scale_factor; + } + ++#undef CONVOLVE_FUNC ++ + static int CalculateChunkSize(int block_size_, double io_ratio) { + return block_size_ / io_ratio; + } + ++// If we know the minimum architecture at compile time, avoid CPU detection. ++// Force NaCl code to use C routines since (at present) nothing there uses these ++// methods and plumbing the -msse built library is non-trivial. ++#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(__SSE__) ++#define CONVOLVE_FUNC Convolve_SSE ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// X86 CPU detection required. Functions will be set by ++// InitializeCPUSpecificFeatures(). ++#define CONVOLVE_FUNC g_convolve_proc_ ++ ++typedef float (*ConvolveProc)(const float*, const float*, const float*, double); ++static ConvolveProc g_convolve_proc_ = NULL; ++ ++void SincResampler::InitializeCPUSpecificFeatures() { ++ CHECK(!g_convolve_proc_); ++ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; ++} ++#endif ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define CONVOLVE_FUNC Convolve_NEON ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// Unknown architecture. ++#define CONVOLVE_FUNC Convolve_C ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#endif ++ + SincResampler::SincResampler(double io_sample_rate_ratio, + int request_frames, + const ReadCB& read_cb) +@@ -328,46 +354,7 @@ + kernel_interpolation_factor * sum2); + } + +-#if defined(ARCH_CPU_X86_FAMILY) +-float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, +- const float* k2, +- double kernel_interpolation_factor) { +- __m128 m_input; +- __m128 m_sums1 = _mm_setzero_ps(); +- __m128 m_sums2 = _mm_setzero_ps(); +- +- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling +- // these loops hurt performance in local testing. +- if (reinterpret_cast(input_ptr) & 0x0F) { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_loadu_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } else { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_load_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } +- +- // Linearly interpolate the two "convolutions". +- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( +- static_cast(1.0 - kernel_interpolation_factor))); +- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( +- static_cast(kernel_interpolation_factor))); +- m_sums1 = _mm_add_ps(m_sums1, m_sums2); +- +- // Sum components together. +- float result; +- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); +- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( +- m_sums2, m_sums2, 1))); +- +- return result; +-} +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, + const float* k2, + double kernel_interpolation_factor) { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-06-08 22:49:57.700253619 +0200 +@@ -36,6 +36,10 @@ + kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), + }; + ++ // Selects runtime specific CPU features like SSE. Must be called before ++ // using SincResampler. ++ static void InitializeCPUSpecificFeatures(); ++ + // Callback type for providing more data into the resampler. Expects |frames| + // of data to be rendered into |destination|; zero padded if not enough frames + // are available to satisfy the request. +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-06-08 22:49:57.701253604 +0200 +@@ -4,6 +4,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/time/time.h" + #include "build/build_config.h" + #include "media/base/sinc_resampler.h" +@@ -61,6 +62,9 @@ + &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); + + #if defined(CONVOLVE_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + RunConvolveBenchmark( + &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); + RunConvolveBenchmark( +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-06-08 22:49:57.701253604 +0200 +@@ -10,6 +10,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/macros.h" + #include "base/strings/string_number_conversions.h" + #include "base/time/time.h" +@@ -166,6 +167,10 @@ + static const double kKernelInterpolationFactor = 0.5; + + TEST(SincResamplerTest, Convolve) { ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif ++ + // Initialize a dummy resampler. + MockSource mock_source; + SincResampler resampler( +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-06-08 22:49:57.701253604 +0200 +@@ -7,12 +7,17 @@ + + #include + ++#include "base/cpu.h" + #include "base/logging.h" + #include "build/build_config.h" + ++namespace media { ++namespace vector_math { ++ ++// If we know the minimum architecture at compile time, avoid CPU detection. + // NaCl does not allow intrinsics. + #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-#include ++#if defined(__SSE__) + // Don't use custom SSE versions where the auto-vectorized C version performs + // better, which is anywhere clang is used. + #if !defined(__clang__) +@@ -23,20 +28,52 @@ + #define FMUL_FUNC FMUL_C + #endif + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++void Initialize() {} ++#else ++// X86 CPU detection required. Functions will be set by Initialize(). ++#if !defined(__clang__) ++#define FMAC_FUNC g_fmac_proc_ ++#define FMUL_FUNC g_fmul_proc_ ++#else ++#define FMAC_FUNC FMAC_C ++#define FMUL_FUNC FMUL_C ++#endif ++#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ ++ ++#if !defined(__clang__) ++typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); ++static MathProc g_fmac_proc_ = NULL; ++static MathProc g_fmul_proc_ = NULL; ++#endif ++typedef std::pair (*EWMAAndMaxPowerProc)( ++ float initial_value, const float src[], int len, float smoothing_factor); ++static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; ++ ++void Initialize() { ++ CHECK(!g_fmac_proc_); ++ CHECK(!g_fmul_proc_); ++ CHECK(!g_ewma_power_proc_); ++ const bool kUseSSE = base::CPU().has_sse(); ++#if !defined(__clang__) ++ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; ++ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; ++#endif ++ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; ++} ++#endif + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include + #define FMAC_FUNC FMAC_NEON + #define FMUL_FUNC FMUL_NEON + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++void Initialize() {} + #else + #define FMAC_FUNC FMAC_C + #define FMUL_FUNC FMUL_C + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C ++void Initialize() {} + #endif + +-namespace media { +-namespace vector_math { +- + void FMAC(const float src[], float scale, int len, float dest[]) { + // Ensure |src| and |dest| are 16-byte aligned. + DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); +@@ -89,111 +126,6 @@ + return result; + } + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-void FMUL_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) +- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] = src[i] * scale; +-} +- +-void FMAC_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) { +- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), +- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); +- } +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] += src[i] * scale; +-} +- +-// Convenience macro to extract float 0 through 3 from the vector |a|. This is +-// needed because compilers other than clang don't support access via +-// operator[](). +-#define EXTRACT_FLOAT(a, i) \ +- (i == 0 ? \ +- _mm_cvtss_f32(a) : \ +- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) +- +-std::pair EWMAAndMaxPower_SSE( +- float initial_value, const float src[], int len, float smoothing_factor) { +- // When the recurrence is unrolled, we see that we can split it into 4 +- // separate lanes of evaluation: +- // +- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) +- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... +- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- // +- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... +- // +- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in +- // each of the 4 lanes, and then combine them to give y[n]. +- +- const int rem = len % 4; +- const int last_index = len - rem; +- +- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); +- const float weight_prev = 1.0f - smoothing_factor; +- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); +- const __m128 weight_prev_squared_x4 = +- _mm_mul_ps(weight_prev_x4, weight_prev_x4); +- const __m128 weight_prev_4th_x4 = +- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); +- +- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and +- // 0, respectively. +- __m128 max_x4 = _mm_setzero_ps(); +- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); +- int i; +- for (i = 0; i < last_index; i += 4) { +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); +- const __m128 sample_x4 = _mm_load_ps(src + i); +- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); +- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); +- // Note: The compiler optimizes this to a single multiply-and-accumulate +- // instruction: +- ewma_x4 = _mm_add_ps(ewma_x4, +- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); +- } +- +- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- float ewma = EXTRACT_FLOAT(ewma_x4, 3); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 2); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 1); +- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 0); +- +- // Fold the maximums together to get the overall maximum. +- max_x4 = _mm_max_ps(max_x4, +- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); +- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); +- +- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); +- +- // Handle remaining values at the end of |src|. +- for (; i < len; ++i) { +- result.first *= weight_prev; +- const float sample = src[i]; +- const float sample_squared = sample * sample; +- result.first += sample_squared * smoothing_factor; +- result.second = std::max(result.second, sample_squared); +- } +- +- return result; +-} +-#endif +- + #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + void FMAC_NEON(const float src[], float scale, int len, float dest[]) { + const int rem = len % 4; +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-06-08 22:49:57.701253604 +0200 +@@ -15,6 +15,11 @@ + // Required alignment for inputs and outputs to all vector math functions + enum { kRequiredAlignment = 16 }; + ++// Selects runtime specific optimizations such as SSE. Must be called prior to ++// calling FMAC() or FMUL(). Called during media library initialization; most ++// users should never have to call this. ++MEDIA_EXPORT void Initialize(); ++ + // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. + // |src| and |dest| must be aligned by kRequiredAlignment. + MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-06-08 22:49:57.702253589 +0200 +@@ -5,6 +5,7 @@ + #include + + #include "base/macros.h" ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/time/time.h" + #include "build/build_config.h" +@@ -82,15 +83,11 @@ + DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); + }; + +-// Define platform dependent function names for SIMD optimized methods. ++// Define platform independent function name for FMAC* perf tests. + #if defined(ARCH_CPU_X86_FAMILY) + #define FMAC_FUNC FMAC_SSE +-#define FMUL_FUNC FMUL_SSE +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #define FMAC_FUNC FMAC_NEON +-#define FMUL_FUNC FMUL_NEON +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON + #endif + + // Benchmark for each optimized vector_math::FMAC() method. +@@ -99,6 +96,9 @@ + RunBenchmark( + vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); + #if defined(FMAC_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMAC_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -112,12 +112,24 @@ + #endif + } + ++#undef FMAC_FUNC ++ ++// Define platform independent function name for FMULBenchmark* tests. ++#if defined(ARCH_CPU_X86_FAMILY) ++#define FMUL_FUNC FMUL_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define FMUL_FUNC FMUL_NEON ++#endif ++ + // Benchmark for each optimized vector_math::FMUL() method. + TEST_F(VectorMathPerfTest, FMUL) { + // Benchmark FMUL_C(). + RunBenchmark( + vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); + #if defined(FMUL_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMUL_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -131,6 +143,14 @@ + #endif + } + ++#undef FMUL_FUNC ++ ++#if defined(ARCH_CPU_X86_FAMILY) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++#endif ++ + // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. + TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { + // Benchmark EWMAAndMaxPower_C(). +@@ -139,6 +159,9 @@ + "vector_math_ewma_and_max_power", + "unoptimized"); + #if defined(EWMAAndMaxPower_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -156,4 +179,6 @@ + #endif + } + ++#undef EWMAAndMaxPower_FUNC ++ + } // namespace media +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-06-08 22:49:57.702253589 +0200 +@@ -19,7 +19,7 @@ + MEDIA_EXPORT std::pair EWMAAndMaxPower_C( + float initial_value, const float src[], int len, float smoothing_factor); + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(ARCH_CPU_X86_FAMILY) + MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, + float dest[]); + MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-06-08 22:49:57.702253589 +0200 +@@ -9,6 +9,7 @@ + #include + + #include "base/macros.h" ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/strings/string_number_conversions.h" + #include "base/strings/stringize_macros.h" +@@ -78,6 +79,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMAC_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMAC_SSE( +@@ -119,6 +121,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMUL_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMUL_SSE( +@@ -227,6 +230,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("EWMAAndMaxPower_SSE"); + const std::pair& result = vector_math::EWMAAndMaxPower_SSE( + initial_value_, data_.get(), data_len_, smoothing_factor_); +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-06-08 22:49:57.703253573 +0200 +@@ -32,7 +32,7 @@ + #include "media/base/simd/convert_yuv_to_rgb.h" + #include "media/base/simd/filter_yuv.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) && defined(__MMX__) + #if defined(COMPILER_MSVC) + #include + #else +@@ -133,7 +133,7 @@ + + // Empty SIMD registers state after using them. + void EmptyRegisterStateStub() {} +-#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) + void EmptyRegisterStateIntrinsic() { _mm_empty(); } + #endif + typedef void (*EmptyRegisterStateProc)(); +@@ -247,34 +247,46 @@ + // Assembly code confuses MemorySanitizer. Also not available in iOS builds. + #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ + !defined(OS_IOS) +- g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; ++ base::CPU cpu; ++ if (cpu.has_mmx()) { ++ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; ++ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; ++ g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; + + #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) +- g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; ++ g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; ++#endif ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) ++ g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; + #else +- g_empty_register_state_proc_ = EmptyRegisterState_MMX; ++ g_empty_register_state_proc_ = EmptyRegisterState_MMX; + #endif ++ } + +- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; +- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; ++ if (cpu.has_sse()) { ++ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; ++ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; ++ } + +- g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; +- g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; ++ if (cpu.has_sse2()) { ++ g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; ++ g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; + + #if defined(ARCH_CPU_X86_64) +- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; ++ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; + +- // Technically this should be in the MMX section, but MSVC will optimize out +- // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit +- // tests, if that decision can be made at compile time. Since all X64 CPUs +- // have SSE2, we can hack around this by making the selection here. +- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; +-#else +- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; +- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; ++ // Technically this should be in the MMX section, but MSVC will optimize out ++ // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit ++ // tests, if that decision can be made at compile time. Since all X64 CPUs ++ // have SSE2, we can hack around this by making the selection here. ++ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; + #endif ++ } + +- base::CPU cpu; + if (cpu.has_ssse3()) { + g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-06-08 22:49:57.703253573 +0200 +@@ -71,6 +71,29 @@ + DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); + }; + ++TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ base::TimeTicks start = base::TimeTicks::Now(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ ConvertYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ } ++ } ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++} ++ + TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -161,9 +184,32 @@ + } + #endif + +-// 64-bit release + component builds on Windows are too smart and optimizes +-// away the function being tested. +-#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) ++TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ const int kSourceDx = 80000; // This value means a scale down. ++ ++ base::TimeTicks start = base::TimeTicks::Now(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ ScaleYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ } ++ } ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++} ++ + TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -190,6 +236,32 @@ + kPerfTestIterations / total_time_seconds, "runs/s", true); + } + ++TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) { ++ ASSERT_TRUE(base::CPU().has_mmx()); ++ ++ const int kSourceDx = 80000; // This value means a scale down. ++ ++ base::TimeTicks start = base::TimeTicks::Now(); ++ for (int i = 0; i < kPerfTestIterations; ++i) { ++ for (int row = 0; row < kSourceHeight; ++row) { ++ int chroma_row = row / 2; ++ LinearScaleYUVToRGB32Row_MMX( ++ yuv_bytes_.get() + row * kSourceWidth, ++ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), ++ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), ++ rgb_bytes_converted_.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ } ++ } ++ media::EmptyRegisterState(); ++ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); ++ perf_test::PrintResult( ++ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX", ++ kPerfTestIterations / total_time_seconds, "runs/s", true); ++} ++ + TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { + ASSERT_TRUE(base::CPU().has_sse()); + +@@ -215,7 +287,6 @@ + "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", + kPerfTestIterations / total_time_seconds, "runs/s", true); + } +-#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) + + #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-06-08 22:49:57.703253573 +0200 +@@ -643,6 +643,37 @@ + EXPECT_EQ(0, error); + } + ++TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ ConvertYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ ConvertYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -674,9 +705,40 @@ + kWidth * kBpp)); + } + +-// 64-bit release + component builds on Windows are too smart and optimizes +-// away the function being tested. +-#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) ++TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ const int kSourceDx = 80000; // This value means a scale down. ++ ScaleYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ ScaleYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -711,6 +773,40 @@ + kWidth * kBpp)); + } + ++TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); ++ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); ++ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); ++ ReadYV12Data(&yuv_bytes); ++ ++ const int kWidth = 167; ++ const int kSourceDx = 80000; // This value means a scale down. ++ LinearScaleYUVToRGB32Row_C(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_reference.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(), ++ yuv_bytes.get() + kSourceUOffset, ++ yuv_bytes.get() + kSourceVOffset, ++ rgb_bytes_converted.get(), ++ kWidth, ++ kSourceDx, ++ GetLookupTable(YV12)); ++ media::EmptyRegisterState(); ++ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), ++ rgb_bytes_converted.get(), ++ kWidth * kBpp)); ++} ++ + TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { + base::CPU cpu; + if (!cpu.has_sse()) { +@@ -744,7 +840,6 @@ + rgb_bytes_converted.get(), + kWidth * kBpp)); + } +-#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) + + TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { + std::unique_ptr src(new uint8_t[16]); +@@ -761,6 +856,30 @@ + } + } + ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ scoped_ptr src(new uint8[16]); ++ scoped_ptr dst(new uint8[16]); ++ ++ memset(src.get(), 0xff, 16); ++ memset(dst.get(), 0, 16); ++ ++ media::FilterYUVRows_MMX(dst.get(), src.get(), src.get(), 1, 255); ++ media::EmptyRegisterState(); ++ ++ EXPECT_EQ(255u, dst[0]); ++ for (int i = 1; i < 16; ++i) { ++ EXPECT_EQ(0u, dst[i]); ++ } ++} ++#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++ + TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { + base::CPU cpu; + if (!cpu.has_sse2()) { +@@ -782,6 +901,38 @@ + } + } + ++#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) { ++ base::CPU cpu; ++ if (!cpu.has_mmx()) { ++ LOG(WARNING) << "System not supported. Test skipped."; ++ return; ++ } ++ ++ const int kSize = 32; ++ scoped_ptr src(new uint8[kSize]); ++ scoped_ptr dst_sample(new uint8[kSize]); ++ scoped_ptr dst(new uint8[kSize]); ++ ++ memset(dst_sample.get(), 0, kSize); ++ memset(dst.get(), 0, kSize); ++ for (int i = 0; i < kSize; ++i) ++ src[i] = 100 + i; ++ ++ media::FilterYUVRows_C(dst_sample.get(), ++ src.get(), src.get(), 17, 128); ++ ++ // Generate an unaligned output address. ++ uint8* dst_ptr = ++ reinterpret_cast( ++ (reinterpret_cast(dst.get() + 8) & ~7) + 1); ++ media::FilterYUVRows_MMX(dst_ptr, src.get(), src.get(), 17, 128); ++ media::EmptyRegisterState(); ++ ++ EXPECT_EQ(0, memcmp(dst_sample.get(), dst_ptr, 17)); ++} ++#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) ++ + TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { + base::CPU cpu; + if (!cpu.has_sse2()) { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-06-08 22:49:57.704253558 +0200 +@@ -832,6 +832,26 @@ + "//base", + "//ui/gfx/geometry", + ] ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":shared_memory_support_sse", ++ ] ++ } ++} ++ ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("shared_memory_support_sse") { ++ sources = [ ++ "base/simd/vector_math_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } + } + + # TODO(watk): Refactor tests that could be made to run on Android. See +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-06-08 23:34:35.516753817 +0200 +@@ -231,11 +231,6 @@ + if (!is_ios) { + sources += [ "ext/platform_canvas.cc" ] + } +- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { +- sources += [ "ext/convolver_SSE2.cc" ] +- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { +- sources += [ "ext/convolver_mips_dspr2.cc" ] +- } + + # The skia gypi values are relative to the skia_dir, so we need to rebase. + sources += skia_core_sources +@@ -608,7 +603,15 @@ + if (skia_build_no_opts) { + sources = skia_opts.none_sources + } else if (current_cpu == "x86" || current_cpu == "x64") { +- sources = skia_opts.sse2_sources ++ sources = skia_opts.sse2_sources + ++ [ ++ # Chrome-specific. ++ "ext/convolver_SSE2.cc", ++ "ext/convolver_SSE2.h", ++ ] ++ if (!is_win || is_clang) { ++ cflags += [ "-msse2" ] ++ } + deps += [ + ":skia_opts_avx", + ":skia_opts_hsw", +@@ -644,6 +647,13 @@ + + if (mips_dsp_rev >= 1) { + sources = skia_opts.mips_dsp_sources ++ if (mips_dsp_rev >= 2) { ++ sources += [ ++ # Chrome-specific. ++ "ext/convolver_mips_dspr2.cc", ++ "ext/convolver_mips_dspr2.h", ++ ] ++ } + } else { + sources = skia_opts.none_sources + } +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-06-08 22:50:00.933204857 +0200 +@@ -362,10 +362,13 @@ + + void SetupSIMD(ConvolveProcs *procs) { + #ifdef SIMD_SSE2 +- procs->extra_horizontal_reads = 3; +- procs->convolve_vertically = &ConvolveVertically_SSE2; +- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; +- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ base::CPU cpu; ++ if (cpu.has_sse2()) { ++ procs->extra_horizontal_reads = 3; ++ procs->convolve_vertically = &ConvolveVertically_SSE2; ++ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; ++ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ } + #elif defined SIMD_MIPS_DSPR2 + procs->extra_horizontal_reads = 3; + procs->convolve_vertically = &ConvolveVertically_mips_dspr2; +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-06-08 22:50:00.998203877 +0200 +@@ -11,6 +11,7 @@ + #include + + #include "build/build_config.h" ++#include "base/cpu.h" + #include "third_party/skia/include/core/SkSize.h" + #include "third_party/skia/include/core/SkTypes.h" + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-08 22:50:07.147111135 +0200 +@@ -30,8 +30,8 @@ + ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- defines = [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines = [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ "qcms_sse2" ] + } + } + +@@ -74,3 +74,15 @@ + public_configs = [ ":qcms_config" ] + } + } ++ ++source_set("qcms_sse2") { ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] ++ public_configs = [ ":qcms_config" ] ++ ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ defines = [ "SSE2_ENABLE" ] ++ sources = [ "src/transform-sse2.c" ] ++ cflags = [ "-msse2" ] ++ } ++} +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-06-08 23:59:48.897938821 +0200 +@@ -31,7 +31,7 @@ + #include "wtf/MathExtras.h" + #include + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + +@@ -662,7 +662,7 @@ + // the next event. + if (nextEventType == ParamEvent::LinearRampToValue) { + const float valueDelta = value2 - value1; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (fillToFrame > writeIndex) { + // Minimize in-loop operations. Calculate starting value and increment. + // Next step: value += inc. +@@ -841,7 +841,7 @@ + for (; writeIndex < fillToFrame; ++writeIndex) + values[writeIndex] = target; + } else { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (fillToFrame > writeIndex) { + // Resolve recursion by expanding constants to achieve a 4-step + // loop unrolling. +@@ -959,7 +959,7 @@ + // Oversampled curve data can be provided if sharp discontinuities are + // desired. + unsigned k = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (fillToFrame > writeIndex) { + const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); + const __m128 vCurvePointsPerFrame = +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-06-09 00:10:04.104673129 +0200 +@@ -26,6 +26,9 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/DirectConvolver.h" + + #if OS(MACOSX) +@@ -35,21 +38,47 @@ + #include "platform/audio/VectorMath.h" + #include "wtf/CPU.h" + +-#if (CPU(X86) || CPU(X86_64)) && !OS(MACOSX) ++#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !OS(MACOSX) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + namespace blink { + + using namespace VectorMath; + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + DirectConvolver::DirectConvolver(size_t inputBlockSize) +- : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) {} ++ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) { ++#if CPU(X86) ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif ++} ++ ++#endif + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, ++ const float* sourceP, ++ float* destP, ++ size_t framesToProcess) { ++#else + void DirectConvolver::process(AudioFloatArray* convolutionKernel, + const float* sourceP, + float* destP, + size_t framesToProcess) { ++#endif ++#if CPU(X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); ++ return; ++ } ++#endif + ASSERT(framesToProcess == m_inputBlockSize); + if (framesToProcess != m_inputBlockSize) + return; +@@ -83,7 +112,7 @@ + #endif // CPU(X86) + #else + size_t i = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Convolution using SSE2. Currently only do this if both |kernelSize| and + // |framesToProcess| are multiples of 4. If not, use the straightforward loop + // below. +@@ -397,7 +426,7 @@ + } + destP[i++] = sum; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + #endif // OS(MACOSX) +@@ -406,8 +435,12 @@ + memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void DirectConvolver::reset() { + m_buffer.zero(); + } + ++#endif ++ + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-06-09 00:07:03.143398606 +0200 +@@ -32,6 +32,7 @@ + #include "platform/PlatformExport.h" + #include "platform/audio/AudioArray.h" + #include "wtf/Allocator.h" ++#include "wtf/CPU.h" + #include "wtf/Noncopyable.h" + + namespace blink { +@@ -54,6 +55,14 @@ + size_t m_inputBlockSize; + + AudioFloatArray m_buffer; ++ ++#if CPU(X86) ++ bool m_haveSSE2; ++ void m_processSSE2(AudioFloatArray* convolutionKernel, ++ const float* sourceP, ++ float* destP, ++ size_t framesToProcess); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-06-08 22:50:07.966098783 +0200 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "DirectConvolver.cpp" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-06-09 00:12:04.250863595 +0200 +@@ -26,15 +26,22 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/SincResampler.h" + #include "platform/audio/AudioBus.h" + #include "wtf/CPU.h" + #include "wtf/MathExtras.h" + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + // Input buffer layout, dividing the total buffer into regions (r0 - r5): + // + // |----------------|-----------------------------------------|----------------| +@@ -66,6 +73,8 @@ + + namespace blink { + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + SincResampler::SincResampler(double scaleFactor, + unsigned kernelSize, + unsigned numberOfKernelOffsets) +@@ -81,6 +90,10 @@ + m_sourceFramesAvailable(0), + m_sourceProvider(nullptr), + m_isBufferPrimed(false) { ++#if CPU(X86) ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif + initializeKernel(); + } + +@@ -201,9 +214,23 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, ++ float* destination, ++ size_t framesToProcess) { ++#else + void SincResampler::process(AudioSourceProvider* sourceProvider, + float* destination, + size_t framesToProcess) { ++#endif ++#if CPU(X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_processSSE2(sourceProvider, destination, framesToProcess); ++ return; ++ } ++#endif + bool isGood = sourceProvider && m_blockSize > m_kernelSize && + m_inputBuffer.size() >= m_blockSize + m_kernelSize && + !(m_kernelSize % 2); +@@ -269,7 +296,7 @@ + { + float input; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // If the sourceP address is not 16-byte aligned, the first several + // frames (at most three) should be processed seperately. + while ((reinterpret_cast(inputP) & 0x0F) && n) { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-06-09 00:12:54.187111500 +0200 +@@ -33,6 +33,7 @@ + #include "platform/audio/AudioArray.h" + #include "platform/audio/AudioSourceProvider.h" + #include "wtf/Allocator.h" ++#include "wtf/CPU.h" + #include "wtf/Noncopyable.h" + + namespace blink { +@@ -96,6 +97,13 @@ + + // The buffer is primed once at the very beginning of processing. + bool m_isBufferPrimed; ++ ++#if CPU(X86) ++ bool m_haveSSE2; ++ void m_processSSE2(AudioSourceProvider*, ++ float* destination, ++ size_t framesToProcess); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-06-08 22:50:07.967098767 +0200 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "SincResampler.cpp" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-06-09 00:26:26.048970670 +0200 +@@ -23,6 +23,9 @@ + * DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/VectorMath.h" + #include "wtf/Assertions.h" + #include "wtf/CPU.h" +@@ -33,10 +36,14 @@ + #include + #endif + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + #if HAVE(ARM_NEON_INTRINSICS) + #include + #endif +@@ -165,15 +172,30 @@ + } + #else + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++namespace SSE2 { ++#endif ++ ++#if CPU(X86) && !defined(__SSE2__) ++static base::CPU cpu; ++#endif ++ + void vsma(const float* sourceP, + int sourceStride, + const float* scale, + float* destP, + int destStride, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, ++ destStride, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; + +@@ -269,9 +291,16 @@ + float* destP, + int destStride, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, ++ destStride, framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride == 1) && (destStride == 1)) { + float k = *scale; + +@@ -360,7 +389,7 @@ + sourceP += sourceStride; + destP += destStride; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + } +@@ -372,9 +401,17 @@ + float* destP, + int destStride, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, ++ sourceStride2, destP, destStride, ++ framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -501,7 +538,7 @@ + source2P += sourceStride2; + destP += destStride; + } +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + } + #endif + } +@@ -513,9 +550,17 @@ + float* destP, + int destStride, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, ++ sourceStride2, destP, destStride, ++ framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { + // If the source1P address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -614,8 +659,15 @@ + float* realDestP, + float* imagDestP, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, ++ imagDestP, framesToProcess); ++ return; ++ } ++#endif + unsigned i = 0; +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + // Only use the SSE optimization in the very common case that all addresses + // are 16-byte aligned. Otherwise, fall through to the scalar code below. + if (!(reinterpret_cast(real1P) & 0x0F) && +@@ -671,10 +723,17 @@ + int sourceStride, + float* sumP, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, ++ framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + float sum = 0; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -740,10 +799,17 @@ + int sourceStride, + float* maxP, + size_t framesToProcess) { ++#if CPU(X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, ++ framesToProcess); ++ return; ++ } ++#endif + int n = framesToProcess; + float max = 0; + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + if (sourceStride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -832,6 +898,8 @@ + *maxP = max; + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void vclip(const float* sourceP, + int sourceStride, + const float* lowThresholdP, +@@ -889,6 +957,12 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++} // namespace SSE2 ++#endif ++ + #endif // OS(MACOSX) + + } // namespace VectorMath +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-06-09 00:27:58.975582370 +0200 +@@ -27,6 +27,7 @@ + #define VectorMath_h + + #include "platform/PlatformExport.h" ++#include "wtf/CPU.h" + #include "wtf/build_config.h" + #include + +@@ -97,6 +98,62 @@ + int destStride, + size_t framesToProcess); + ++#if CPU(X86) ++namespace SSE2 { ++// Vector scalar multiply and then add. ++PLATFORM_EXPORT void vsma(const float* sourceP, ++ int sourceStride, ++ const float* scale, ++ float* destP, ++ int destStride, ++ size_t framesToProcess); ++ ++PLATFORM_EXPORT void vsmul(const float* sourceP, ++ int sourceStride, ++ const float* scale, ++ float* destP, ++ int destStride, ++ size_t framesToProcess); ++PLATFORM_EXPORT void vadd(const float* source1P, ++ int sourceStride1, ++ const float* source2P, ++ int sourceStride2, ++ float* destP, ++ int destStride, ++ size_t framesToProcess); ++ ++// Finds the maximum magnitude of a float vector. ++PLATFORM_EXPORT void vmaxmgv(const float* sourceP, ++ int sourceStride, ++ float* maxP, ++ size_t framesToProcess); ++ ++// Sums the squares of a float vector's elements. ++PLATFORM_EXPORT void vsvesq(const float* sourceP, ++ int sourceStride, ++ float* sumP, ++ size_t framesToProcess); ++ ++// For an element-by-element multiply of two float vectors. ++PLATFORM_EXPORT void vmul(const float* source1P, ++ int sourceStride1, ++ const float* source2P, ++ int sourceStride2, ++ float* destP, ++ int destStride, ++ size_t framesToProcess); ++ ++// Multiplies two complex vectors. ++PLATFORM_EXPORT void zvmul(const float* real1P, ++ const float* imag1P, ++ const float* real2P, ++ const float* imag2P, ++ float* realDestP, ++ float* imagDestP, ++ size_t framesToProcess); ++} ++#endif ++ + } // namespace VectorMath + } // namespace blink + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-06-08 22:50:07.969098737 +0200 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "VectorMath.cpp" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-09 00:40:12.361601303 +0200 +@@ -1529,6 +1529,10 @@ + deps += [ ":blink_x86_sse" ] + } + ++ if (current_cpu == "x86") { ++ deps += [ ":blink_x86_sse2" ] ++ } ++ + if (use_webaudio_ffmpeg) { + include_dirs += [ "//third_party/ffmpeg" ] + deps += [ "//third_party/ffmpeg" ] +@@ -1912,6 +1916,20 @@ + deps = [ + ":blink_common", + ] ++ } ++} ++ ++if (current_cpu == "x86") { ++ source_set("blink_x86_sse2") { ++ sources = [ ++ "audio/DirectConvolverSSE2.cpp", ++ "audio/SincResamplerSSE2.cpp", ++ "audio/VectorMathSSE2.cpp", ++ ] ++ cflags = [ "-msse2", '-mfpmath=sse' ] ++ deps = [ ++ ":blink_common", ++ ] + } + } + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-06-08 22:50:09.251079402 +0200 +@@ -5,7 +5,7 @@ + #ifndef WebGLImageConversionSSE_h + #define WebGLImageConversionSSE_h + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + + #include + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-06-09 00:33:14.375866479 +0200 +@@ -441,7 +441,7 @@ + const uint32_t* source32 = reinterpret_cast_ptr(source); + uint32_t* destination32 = reinterpret_cast_ptr(destination); + +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -467,7 +467,7 @@ + const uint16_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(ARM_NEON_INTRINSICS) +@@ -496,7 +496,7 @@ + const uint16_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(ARM_NEON_INTRINSICS) +@@ -711,7 +711,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -768,7 +768,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -880,7 +880,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixelsPerRow) { +-#if CPU(X86) || CPU(X86_64) ++#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) + SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-06-08 22:50:09.434076641 +0200 +@@ -14,6 +14,7 @@ + #include "webrtc/common_audio/real_fourier_ooura.h" + #include "webrtc/common_audio/real_fourier_openmax.h" + #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" ++#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" + + namespace webrtc { + +@@ -23,7 +24,15 @@ + + std::unique_ptr RealFourier::Create(int fft_order) { + #if defined(RTC_USE_OPENMAX_DL) ++#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) ++ // x86 CPU detection required. ++ if (WebRtc_GetCPUInfo(kSSE2)) ++ return std::unique_ptr(new RealFourierOpenmax(fft_order)); ++ else ++ return std::unique_ptr(new RealFourierOoura(fft_order)); ++#else + return std::unique_ptr(new RealFourierOpenmax(fft_order)); ++#endif + #else + return std::unique_ptr(new RealFourierOoura(fft_order)); + #endif +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 02:09:29.227782885 +0200 +@@ -73,6 +73,9 @@ + # If true, doesn't compile debug symbols into v8base reducing the + # size of the binary and increasing the speed of gdb. + remove_v8base_debug_symbols = false ++ ++ # Whether to build V8 as a shared library ++ v8_build_shared = false + } + + # Set project-specific defaults for some args if not provided in args.gn. The +@@ -99,6 +102,10 @@ + if (v8_enable_disassembler == "") { + v8_enable_disassembler = is_debug && !v8_optimized_debug + } ++if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { ++ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds ++ v8_build_shared = true ++} + + # Specifies if the target build is a simulator build. Comparing target cpu + # with v8 target cpu to not affect simulator builds for making cross-compile +@@ -117,7 +124,7 @@ + + include_dirs = [ "." ] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_SHARED" ] + } + } +@@ -131,14 +138,14 @@ + # This config should be applied to code using the libplatform. + config("libplatform_config") { + include_dirs = [ "include" ] +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_PLATFORM_SHARED" ] + } + } + + # This config should be applied to code using the libbase. + config("libbase_config") { +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_BASE_SHARED" ] + } + libs = [] +@@ -155,7 +162,7 @@ + # This config should only be applied to code using V8 and not any V8 code + # itself. + config("external_config") { +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_SHARED" ] + } + include_dirs = [ "include" ] +@@ -2274,7 +2281,7 @@ + + defines = [] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_BASE_SHARED" ] + } + +@@ -2364,7 +2371,7 @@ + + configs = [ ":internal_config_base" ] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_PLATFORM_SHARED" ] + } + +@@ -2507,7 +2514,26 @@ + } + } + +-if (is_component_build) { ++if (v8_build_shared) { ++ shared_library("v8") { ++ sources = [ ++ "src/v8dll-main.cc", ++ ] ++ ++ deps = [ ++ ":v8_dump_build_config", ++ ] ++ ++ public_deps = [ ++ ":v8_base", ++ ":v8_maybe_snapshot", ++ ] ++ ++ configs = [ ":internal_config" ] ++ ++ public_configs = [ ":external_config" ] ++ } ++} else if (v8_is_component_build) { + v8_component("v8") { + sources = [ + "src/v8dll-main.cc", +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 2017-06-08 22:50:09.496075706 +0200 +@@ -0,0 +1,56 @@ ++#!/bin/sh ++# This script renames the v8 targets to _sse2 names so that they do not conflict ++# with the non-SSE2 versions. ++ ++# Copyright 2016 Kevin Kofler. All rights reserved. ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# * Redistributions in binary form must reproduce the above ++# copyright 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. ++ ++# add comment noting that the file is generated ++echo "# Generated from v8.gyp by make-v8-sse2-gyp.sh" >v8_sse2.gyp ++# rename all target names ++SUBTARGETS=`grep "'target_name': '" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"` ++SEDS= ++for SUBTARGET in $SUBTARGETS ; do ++ SEDS=$SEDS\ -e\ "s/'$SUBTARGET\(['#]\)/'${SUBTARGET}_sse2\1/g" ++done ++# in addition: ++# * set v8_target_arch to "ia32" (instead of "x87") ++# * rename all actions ++# * fix mksnapshot_exec to match the renamed target ++# * rename the generated snapshot.cc (but not mksnapshot.cc) to snapshot_sse2.cc ++# * rename the generated *libraries.cc to *libraries_sse2.cc ++# * rename the generated *.bin to *_sse2.bin ++# * set product_name and product_dir for the v8_sse2 target ++sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ ++ -e "s/\('action_name': '\)/\1v8_sse2_/g" \ ++ $SEDS \ ++ -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ ++ -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ ++ -e "s/libraries\.cc/libraries_sse2.cc/g" \ ++ -e "s/\.bin/_sse2.bin/g" \ ++ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ ++ v8.gyp >>v8_sse2.gyp +diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.9.0/src/core/core_module.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro 2017-06-09 00:59:19.199411383 +0200 +@@ -41,6 +41,28 @@ + else: QMAKE_LFLAGS += $$NINJA_LFLAGS + POST_TARGETDEPS += $$NINJA_TARGETDEPS + ++# go through the shared libraries that GN wants to link to ++# add the ones NOT in lib/sse2 to LIBS_PRIVATE ++# don't add those in lib/sse2 that are only replacements for the normal ones ++# collect all shared libraries, non-SSE2 and SSE2, so they can be installed ++for(shlib, NINJA_SOLIBS) { ++ contains(shlib, .*/lib/sse2/.*) { ++ shlibs_sse2 += $$shlib ++ } else { ++ LIBS_PRIVATE += $$shlib ++ shlibs += $$shlib ++ } ++} ++ ++# set the shared libraries to be installed ++# add an rpath to their installation location ++shlib_install_path = $$[QT_INSTALL_LIBS]/qtwebengine ++!isEmpty(shlibs) { ++ shlibs.files += $$shlibs ++ shlibs_sse2.files += $$shlibs_sse2 ++ LIBS_PRIVATE += -Wl,--rpath,$$shlib_install_path ++} ++ + + LIBS_PRIVATE += -L$$api_library_path + CONFIG *= no_smart_library_merge +@@ -100,7 +122,12 @@ + locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales + resources.CONFIG += no_check_exist + resources.path = $$[QT_INSTALL_DATA]/resources +- INSTALLS += locales resources ++ # install the shared libraries ++ shlibs.CONFIG += no_check_exist ++ shlibs.path = $$shlib_install_path ++ shlibs_sse2.CONFIG += no_check_exist ++ shlibs_sse2.path = $$shlib_install_path/sse2 ++ INSTALLS += locales resources shlibs shlibs_sse2 + + !use?(system_icu) { + icu.CONFIG += no_check_exist diff --git a/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch similarity index 62% rename from qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch rename to qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch index 08ff6e5..fd11fae 100644 --- a/qtwebengine-opensource-src-5.7.1-openmax-dl-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch @@ -1,25 +1,19 @@ -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/dl.gyp 2016-12-03 22:50:19.369158276 +0100 -@@ -219,15 +219,6 @@ - 'conditions': [ - ['arm_neon_optional==1', { - # Run-time NEON detection. -- 'dependencies': [ -- '../../../build/android/ndk.gyp:cpu_features', -- ], -- 'link_settings' : { -- 'libraries': [ -- # To get the __android_log_print routine -- '-llog', -- ], -- }, - 'sources': [ - # Detection routine - 'sp/src/arm/detect.c', -diff -ur qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c ---- qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-11-07 15:46:18.000000000 +0100 -+++ qtwebengine-opensource-src-5.7.1-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2016-12-03 22:48:13.745095083 +0100 +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-06-10 02:41:10.317340598 +0200 +@@ -196,9 +196,6 @@ + ] + if (arm_optionally_use_neon) { + # Run-time NEON detection. +- deps = [ "//third_party/android_tools:cpu_features" ] +- # To get the __android_log_print routine +- libs = [ "log" ] + # Detection routine + sources += [ "sp/src/arm/detect.c" ] + } +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-06-10 02:38:30.593809570 +0200 @@ -9,13 +9,57 @@ * */ diff --git a/qtwebengine-opensource-src-5.9.0-skia-neon.patch b/qtwebengine-opensource-src-5.9.0-skia-neon.patch new file mode 100644 index 0000000..a9e774a --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-skia-neon.patch @@ -0,0 +1,392 @@ +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-06-10 13:01:07.120762647 +0200 +@@ -23,6 +23,7 @@ + "$_src/opts/SkBitmapProcState_matrixProcs_neon.cpp", + "$_src/opts/SkBlitMask_opts_arm_neon.cpp", + "$_src/opts/SkBlitRow_opts_arm_neon.cpp", ++ "$_src/opts/SkOpts_neon.cpp", + ] + + arm64 = [ +@@ -33,6 +34,7 @@ + "$_src/opts/SkBlitMask_opts_arm_neon.cpp", + "$_src/opts/SkBlitRow_opts_arm.cpp", + "$_src/opts/SkBlitRow_opts_arm_neon.cpp", ++ "$_src/opts/SkOpts_neon.cpp", + ] + + crc32 = [ "$_src/opts/SkOpts_crc32.cpp" ] +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-06-10 12:52:48.259092758 +0200 +@@ -19,7 +19,7 @@ + #include "SkImageEncoder.h" + #include "SkResourceCache.h" + +-#if defined(SK_ARM_HAS_NEON) ++#if !SK_ARM_NEON_IS_NONE + // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp + extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[]; + extern void S16_D16_filter_DX_neon(const SkBitmapProcState&, const uint32_t*, int, uint16_t*); +@@ -280,7 +280,7 @@ + return false; + } + +-#if !defined(SK_ARM_HAS_NEON) ++#if !SK_ARM_NEON_IS_ALWAYS + static const SampleProc32 gSkBitmapProcStateSample32[] = { + S32_opaque_D32_nofilter_DXDY, + S32_alpha_D32_nofilter_DXDY, +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-06-10 12:52:48.259092758 +0200 +@@ -47,16 +47,16 @@ + /////////////////////////////////////////////////////////////////////////////// + + // Compile neon code paths if needed +-#if defined(SK_ARM_HAS_NEON) ++#if !SK_ARM_NEON_IS_NONE + + // These are defined in src/opts/SkBitmapProcState_matrixProcs_neon.cpp + extern const SkBitmapProcState::MatrixProc ClampX_ClampY_Procs_neon[]; + extern const SkBitmapProcState::MatrixProc RepeatX_RepeatY_Procs_neon[]; + +-#endif // defined(SK_ARM_HAS_NEON) ++#endif // !SK_ARM_NEON_IS_NONE + + // Compile non-neon code path if needed +-#if !defined(SK_ARM_HAS_NEON) ++#if !SK_ARM_NEON_IS_ALWAYS + #define MAKENAME(suffix) ClampX_ClampY ## suffix + #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) + #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-06-10 12:52:48.260092743 +0200 +@@ -20,7 +20,7 @@ + uint32_t expanded32, unsigned maskRB); + #endif + +-#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) ++#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) + #include + extern void SkRGB16BlitterBlitV_neon(uint16_t* device, + int height, +@@ -381,7 +381,7 @@ + unsigned maskRB = mask.fRowBytes - width; + uint32_t expanded32 = fExpandedRaw16; + +-#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) ++#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) + #define UNROLL 8 + do { + int w = width; +@@ -475,7 +475,7 @@ + unsigned scale5 = SkAlpha255To256(alpha) >> 3; + uint32_t src32 = fExpandedRaw16 * scale5; + scale5 = 32 - scale5; +-#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) ++#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) + SkRGB16BlitterBlitV_neon(device, height, deviceRB, scale5, src32); + #else + do { +@@ -654,7 +654,7 @@ + unsigned scale5 = SkAlpha255To256(alpha) * fScale >> (8 + 3); + uint32_t src32 = fExpandedRaw16 * scale5; + scale5 = 32 - scale5; +-#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) ++#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) + SkRGB16BlitterBlitV_neon(device, height, deviceRB, scale5, src32); + #else + do { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-06-10 13:10:57.090108380 +0200 +@@ -73,6 +73,124 @@ + return features; + } + ++#elif defined(SK_CPU_ARM32) && \ ++ !defined(SK_BUILD_FOR_ANDROID) ++#include ++#include ++#include ++#include ++#include ++ ++ static uint32_t read_cpu_features() { ++ uint32_t features = 0; ++ ++ // If we fail any of the following, assume we don't have NEON/VFPv4 instructions ++ // This allows us to return immediately in case of error. ++ bool have_neon = false; ++ bool have_vfpv4 = false; ++ ++ // There is no user-accessible CPUID instruction on ARM that we can use. ++ // Instead, we must parse /proc/cpuinfo and look for the 'neon' feature. ++ // For example, here's a typical output (Nexus S running ICS 4.0.3): ++ /* ++ Processor : ARMv7 Processor rev 2 (v7l) ++ BogoMIPS : 994.65 ++ Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 ++ CPU implementer : 0x41 ++ CPU architecture: 7 ++ CPU variant : 0x2 ++ CPU part : 0xc08 ++ CPU revision : 2 ++ ++ Hardware : herring ++ Revision : 000b ++ Serial : 3833c77d6dc000ec ++ */ ++ char buffer[4096]; ++ ++ do { ++ // open /proc/cpuinfo ++ int fd = TEMP_FAILURE_RETRY(open("/proc/cpuinfo", O_RDONLY)); ++ if (fd < 0) { ++ SkDebugf("Could not open /proc/cpuinfo: %s\n", strerror(errno)); ++ break; ++ } ++ ++ // Read the file. To simplify our search, we're going to place two ++ // sentinel '\n' characters: one at the start of the buffer, and one at ++ // the end. This means we reserve the first and last buffer bytes. ++ buffer[0] = '\n'; ++ int size = TEMP_FAILURE_RETRY(read(fd, buffer+1, sizeof(buffer)-2)); ++ close(fd); ++ ++ if (size < 0) { // should not happen ++ SkDebugf("Could not read /proc/cpuinfo: %s\n", strerror(errno)); ++ break; ++ } ++ ++ SkDebugf("START /proc/cpuinfo:\n%.*s\nEND /proc/cpuinfo\n", ++ size, buffer+1); ++ ++ // Compute buffer limit, and place final sentinel ++ char* buffer_end = buffer + 1 + size; ++ buffer_end[0] = '\n'; ++ ++ // Now, find a line that starts with "Features", i.e. look for ++ // '\nFeatures ' in our buffer. ++ const char features[] = "\nFeatures\t"; ++ const size_t features_len = sizeof(features)-1; ++ ++ char* line = (char*) memmem(buffer, buffer_end - buffer, ++ features, features_len); ++ if (line == nullptr) { // Weird, no Features line, bad kernel? ++ SkDebugf("Could not find a line starting with 'Features'" ++ "in /proc/cpuinfo ?\n"); ++ break; ++ } ++ ++ line += features_len; // Skip the "\nFeatures\t" prefix ++ ++ // Find the end of the current line ++ char* line_end = (char*) memchr(line, '\n', buffer_end - line); ++ if (line_end == nullptr) ++ line_end = buffer_end; ++ ++ // Now find an instance of 'neon' in the flags list. We want to ++ // ensure it's only 'neon' and not something fancy like 'noneon' ++ // so check that it follows a space. ++ const char neon[] = " neon"; ++ const size_t neon_len = sizeof(neon)-1; ++ const char* flag = (const char*) memmem(line, line_end - line, ++ neon, neon_len); ++ // Ensure it is followed by a space or a newline. ++ if (flag != nullptr ++ && (flag[neon_len] == ' ' || flag[neon_len] == '\n')) { ++ // Fine, we support Arm NEON ! ++ have_neon = true; ++ } ++ ++ // Now find an instance of 'vfpv4' in the flags list. We want to ++ // ensure it's only 'vfpv4' and not something fancy like 'novfpv4' ++ // so check that it follows a space. ++ const char vfpv4[] = " vfpv4"; ++ const size_t vfpv4_len = sizeof(vfpv4)-1; ++ const char* vflag = (const char*) memmem(line, line_end - line, ++ vfpv4, vfpv4_len); ++ // Ensure it is followed by a space or a newline. ++ if (vflag != nullptr ++ && (vflag[vfpv4_len] == ' ' || vflag[vfpv4_len] == '\n')) { ++ // Fine, we support Arm VFPv4 ! ++ have_vfpv4 = true; ++ } ++ ++ } while (0); ++ ++ if (have_neon) { features |= SkCpu::NEON ; } ++ if (have_neon && have_vfpv4) { features |= SkCpu::NEON_FMA; } ++ if (have_vfpv4) { features |= SkCpu::VFP_FP16; } ++ return features; ++ } ++ + #elif defined(SK_CPU_ARM64) && \ + defined(SK_BUILD_FOR_ANDROID) && \ + !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-06-10 12:56:42.672648362 +0200 +@@ -99,6 +99,7 @@ + void Init_avx(); + void Init_hsw(); + void Init_crc32(); ++ void Init_neon(); + + static void init() { + #if !defined(SK_BUILD_NO_OPTS) +@@ -109,6 +110,9 @@ + if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } + if (SkCpu::Supports(SkCpu::HSW )) { Init_hsw(); } + ++ #elif defined(SK_CPU_ARM32) ++ if (SkCpu::Supports(SkCpu::NEON)) { Init_neon(); } ++ + #elif defined(SK_CPU_ARM64) + if (SkCpu::Supports(SkCpu::CRC32)) { Init_crc32(); } + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-06-10 12:52:48.260092743 +0200 +@@ -8,12 +8,75 @@ + #ifndef SkUtilsArm_DEFINED + #define SkUtilsArm_DEFINED + +-#include "SkTypes.h" ++#include "SkCpu.h" ++#include "SkUtils.h" + +-#if defined(SK_ARM_HAS_NEON) +- #define SK_ARM_NEON_WRAP(x) (x ## _neon) ++// Define SK_ARM_NEON_MODE to one of the following values ++// corresponding respectively to: ++// - No ARM Neon support at all (not targetting ARMv7-A, or don't have NEON) ++// - Full ARM Neon support (i.e. assume the CPU always supports it) ++// - Optional ARM Neon support (i.e. probe CPU at runtime) ++// ++#define SK_ARM_NEON_MODE_NONE 0 ++#define SK_ARM_NEON_MODE_ALWAYS 1 ++#define SK_ARM_NEON_MODE_DYNAMIC 2 ++ ++#if defined(SK_ARM_HAS_OPTIONAL_NEON) ++# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC ++#elif defined(SK_ARM_HAS_NEON) ++# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS ++#else ++# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE ++#endif ++ ++// Convenience test macros, always defined as 0 or 1 ++#define SK_ARM_NEON_IS_NONE (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_NONE) ++#define SK_ARM_NEON_IS_ALWAYS (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_ALWAYS) ++#define SK_ARM_NEON_IS_DYNAMIC (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_DYNAMIC) ++ ++// The sk_cpu_arm_has_neon() function returns true iff the target device ++// is ARMv7-A and supports Neon instructions. In DYNAMIC mode, this actually ++// probes the CPU at runtime (and caches the result). ++ ++static inline bool sk_cpu_arm_has_neon(void) { ++#if SK_ARM_NEON_IS_NONE ++ return false; + #else +- #define SK_ARM_NEON_WRAP(x) (x) ++ return SkCpu::Supports(SkCpu::NEON); ++#endif ++} ++ ++// Use SK_ARM_NEON_WRAP(symbol) to map 'symbol' to a NEON-specific symbol ++// when applicable. This will transform 'symbol' differently depending on ++// the current NEON configuration, i.e.: ++// ++// NONE -> 'symbol' ++// ALWAYS -> 'symbol_neon' ++// DYNAMIC -> 'symbol' or 'symbol_neon' depending on runtime check. ++// ++// The goal is to simplify user code, for example: ++// ++// return SK_ARM_NEON_WRAP(do_something)(params); ++// ++// Replaces the equivalent: ++// ++// #if SK_ARM_NEON_IS_NONE ++// return do_something(params); ++// #elif SK_ARM_NEON_IS_ALWAYS ++// return do_something_neon(params); ++// #elif SK_ARM_NEON_IS_DYNAMIC ++// if (sk_cpu_arm_has_neon()) ++// return do_something_neon(params); ++// else ++// return do_something(params); ++// #endif ++// ++#if SK_ARM_NEON_IS_NONE ++# define SK_ARM_NEON_WRAP(x) (x) ++#elif SK_ARM_NEON_IS_ALWAYS ++# define SK_ARM_NEON_WRAP(x) (x ## _neon) ++#elif SK_ARM_NEON_IS_DYNAMIC ++# define SK_ARM_NEON_WRAP(x) (sk_cpu_arm_has_neon() ? x ## _neon : x) + #endif + + #endif // SkUtilsArm_DEFINED +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-06-10 12:52:48.259092758 +0200 +@@ -0,0 +1,54 @@ ++/* ++ * Copyright 2015 Google Inc. ++ * ++ * Use of this source code is governed by a BSD-style license that can be ++ * found in the LICENSE file. ++ */ ++ ++#include "SkOpts.h" ++ ++#define SK_OPTS_NS sk_neon ++#include "SkBlitMask_opts.h" ++#include "SkBlitRow_opts.h" ++#include "SkBlurImageFilter_opts.h" ++#include "SkColorCubeFilter_opts.h" ++#include "SkMorphologyImageFilter_opts.h" ++#include "SkSwizzler_opts.h" ++#include "SkTextureCompressor_opts.h" ++#include "SkXfermode_opts.h" ++ ++namespace SkOpts { ++ void Init_neon() { ++ create_xfermode = sk_neon::create_xfermode; ++ ++ box_blur_xx = sk_neon::box_blur_xx; ++ box_blur_xy = sk_neon::box_blur_xy; ++ box_blur_yx = sk_neon::box_blur_yx; ++ ++ dilate_x = sk_neon::dilate_x; ++ dilate_y = sk_neon::dilate_y; ++ erode_x = sk_neon::erode_x; ++ erode_y = sk_neon::erode_y; ++ ++ texture_compressor = sk_neon::texture_compressor; ++ fill_block_dimensions = sk_neon::fill_block_dimensions; ++ ++ blit_mask_d32_a8 = sk_neon::blit_mask_d32_a8; ++ ++ blit_row_color32 = sk_neon::blit_row_color32; ++ blit_row_s32a_opaque = sk_neon::blit_row_s32a_opaque; ++ ++ color_cube_filter_span = sk_neon::color_cube_filter_span; ++ ++ RGBA_to_BGRA = sk_neon::RGBA_to_BGRA; ++ RGBA_to_rgbA = sk_neon::RGBA_to_rgbA; ++ RGBA_to_bgrA = sk_neon::RGBA_to_bgrA; ++ RGB_to_RGB1 = sk_neon::RGB_to_RGB1; ++ RGB_to_BGR1 = sk_neon::RGB_to_BGR1; ++ gray_to_RGB1 = sk_neon::gray_to_RGB1; ++ grayA_to_RGBA = sk_neon::grayA_to_RGBA; ++ grayA_to_rgbA = sk_neon::grayA_to_rgbA; ++ inverted_CMYK_to_RGB1 = sk_neon::inverted_CMYK_to_RGB1; ++ inverted_CMYK_to_BGR1 = sk_neon::inverted_CMYK_to_BGR1; ++ } ++} diff --git a/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch similarity index 68% rename from qtwebengine-opensource-src-5.8.0-system-icu-utf.patch rename to qtwebengine-opensource-src-5.9.0-system-icu-utf.patch index dff88b5..d35ba87 100644 --- a/qtwebengine-opensource-src-5.8.0-system-icu-utf.patch +++ b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -1,19 +1,7 @@ -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:48:14.206027229 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/base.gypi 2017-03-05 16:50:49.266714740 +0100 -@@ -674,8 +674,6 @@ - 'third_party/dmg_fp/dmg_fp.h', - 'third_party/dmg_fp/dtoa_wrapper.cc', - 'third_party/dmg_fp/g_fmt.cc', -- 'third_party/icu/icu_utf.cc', -- 'third_party/icu/icu_utf.h', - 'third_party/superfasthash/superfasthash.c', - 'third_party/xdg_mime/xdgmime.h', - 'threading/non_thread_safe.h', -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:48:14.207027214 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-03-05 16:50:49.267714725 +0100 -@@ -801,8 +801,6 @@ +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 10:52:51.565409865 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 11:13:47.297983554 +0200 +@@ -834,8 +834,6 @@ "third_party/dmg_fp/dmg_fp.h", "third_party/dmg_fp/dtoa_wrapper.cc", "third_party/dmg_fp/g_fmt.cc", @@ -22,9 +10,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi "third_party/superfasthash/superfasthash.c", "threading/non_thread_safe.h", "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-03-05 16:50:49.267714725 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-06-08 11:02:19.933803953 +0200 @@ -18,7 +18,7 @@ #if defined(OS_MACOSX) @@ -34,7 +22,7 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi #endif #if defined(OS_WIN) -@@ -1150,9 +1150,9 @@ +@@ -1156,9 +1156,9 @@ int* index) { int codepoint = 0; while (*index < length && codepoint == 0) { @@ -46,9 +34,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi DCHECK_GT(codepoint, 0); if (codepoint > 0) { // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-03-05 16:50:49.268714710 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-06-08 11:05:52.045814002 +0200 @@ -16,7 +16,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" @@ -58,27 +46,33 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi #include "base/values.h" namespace base { -@@ -631,8 +631,8 @@ - int32_t next_char = 0; +@@ -630,21 +630,21 @@ while (CanConsume(1)) { + int start_index = index_; - pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. - CBU8_NEXT(start_pos_, index_, length, next_char); + pos_ = start_pos_ + index_; // U8_NEXT is postcrement. + U8_NEXT(start_pos_, index_, length, next_char); if (next_char < 0 || !IsValidCharacter(next_char)) { - ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); - return false; -@@ -725,7 +725,7 @@ - return false; + if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { + ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); + return false; } - } else if (next_char == '"') { +- CBU8_NEXT(start_pos_, start_index, length, next_char); ++ U8_NEXT(start_pos_, start_index, length, next_char); + string.Convert(); + string.AppendString(kUnicodeReplacementString); + continue; + } + + if (next_char == '"') { - --index_; // Rewind by one because of CBU8_NEXT. + --index_; // Rewind by one because of U8_NEXT. out->Swap(&string); return true; - } else { -@@ -765,10 +765,10 @@ + } +@@ -774,10 +774,10 @@ // If this is a high surrogate, consume the next code unit to get the // low surrogate. @@ -91,7 +85,7 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi return false; // Make sure that the token has more characters to consume the -@@ -785,24 +785,24 @@ +@@ -794,24 +794,24 @@ NextNChars(3); @@ -121,7 +115,7 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi } dest_string->append(code_unit8); -@@ -819,9 +819,9 @@ +@@ -828,9 +828,9 @@ } else { char utf8_units[4] = { 0 }; int offset = 0; @@ -133,9 +127,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi // zero terminated at this point. |offset| contains the correct length. dest->AppendString(std::string(utf8_units, offset)); } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-03-05 16:50:49.268714710 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-06-08 11:02:19.934803939 +0200 @@ -14,7 +14,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" @@ -145,9 +139,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-03-05 16:50:49.404712681 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-06-08 11:02:21.774778002 +0200 @@ -4,13 +4,13 @@ #include "base/strings/pattern.h" @@ -203,9 +197,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi *p += offset; return c; } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-03-05 16:50:49.404712681 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-06-08 11:02:21.774778002 +0200 @@ -8,7 +8,7 @@ #include "base/logging.h" @@ -215,9 +209,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-03-05 16:50:49.404712681 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-06-08 11:02:21.775777988 +0200 @@ -25,7 +25,7 @@ #include "base/memory/singleton.h" #include "base/strings/utf_string_conversion_utils.h" @@ -260,9 +254,9 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi if (!IsValidCharacter(code_point)) return false; } -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-03-05 16:50:49.404712681 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-06-08 11:02:21.775777988 +0200 @@ -4,7 +4,7 @@ #include "base/strings/utf_string_conversion_utils.h" @@ -341,9 +335,29 @@ diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromi } // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-opensource-src-5.8.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-01-03 10:28:53.000000000 +0100 -+++ qtwebengine-opensource-src-5.8.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-03-05 16:50:49.405712666 +0100 +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 10:55:05.945934291 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 11:14:16.956570568 +0200 +@@ -472,7 +472,6 @@ + 'base/task_scheduler/task_traits.cc', + 'base/third_party/dmg_fp/dtoa_wrapper.cc', + 'base/third_party/dmg_fp/g_fmt.cc', +- 'base/third_party/icu/icu_utf.cc', + 'base/threading/non_thread_safe_impl.cc', + 'base/threading/post_task_and_reply_impl.cc', + 'base/threading/sequenced_task_runner_handle.cc', +@@ -574,7 +573,7 @@ + } + + if is_linux: +- libs.extend(['-lrt', '-lnspr4']) ++ libs.extend(['-lrt', '-lnspr4', '-licuuc']) + ldflags.extend(['-pthread']) + + static_libraries['xdg_user_dirs'] = { +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-06-08 11:02:21.776777974 +0200 @@ -5,13 +5,13 @@ #include "ui/gfx/utf16_indexing.h" diff --git a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch new file mode 100644 index 0000000..33dcc91 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -0,0 +1,66 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 10:52:51.565409865 +0200 +@@ -49,6 +49,9 @@ + "-Wno-char-subscripts", + ] + } ++ ldflags = [ ++ "-lnspr4", ++ ] + } + + config("base_implementation") { +@@ -833,8 +836,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "threading/non_thread_safe.h", + "threading/non_thread_safe_impl.cc", +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-06-08 10:58:06.743413247 +0200 +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/time.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-06-08 10:58:09.557373071 +0200 +@@ -14,7 +14,7 @@ + #include "base/logging.h" + #include "base/macros.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "build/build_config.h" + + namespace base { +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 10:55:05.945934291 +0200 +@@ -473,7 +473,6 @@ + 'base/third_party/dmg_fp/dtoa_wrapper.cc', + 'base/third_party/dmg_fp/g_fmt.cc', + 'base/third_party/icu/icu_utf.cc', +- 'base/third_party/nspr/prtime.cc', + 'base/threading/non_thread_safe_impl.cc', + 'base/threading/post_task_and_reply_impl.cc', + 'base/threading/sequenced_task_runner_handle.cc', +@@ -575,7 +574,7 @@ + } + + if is_linux: +- libs.extend(['-lrt']) ++ libs.extend(['-lrt', '-lnspr4']) + ldflags.extend(['-pthread']) + + static_libraries['xdg_user_dirs'] = { diff --git a/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch new file mode 100644 index 0000000..a21802a --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch @@ -0,0 +1,14 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-06-10 13:20:14.959007488 +0200 +@@ -93,9 +93,7 @@ + if (is_linux) { + defines += [ "WEBRTC_THREAD_RR" ] + +- if (!build_with_chromium) { +- deps += [ ":cpu_features_linux" ] +- } ++ deps += [ ":cpu_features_linux" ] + + libs += [ "rt" ] + } diff --git a/sources b/sources index 805aa50..bf7d94e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.8.0-clean.tar.xz) = 18a49156da8d2e21fb0fe4781646c753c82d616964dd14b0651a1097b2a79a5ddb852dbdcc838d1e9e9a4ec460dd77fbab78a03672f5e827ab061fdf97db4a25 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 523568e690afa7dc4657458daa4c424a3006e32f4bcfbe015b90813b44967b36d9ec3263b4281089d33edd6e75d5b948cddc42792939fcf6aa71d051fc6937a8 From 7b17fa751bee2dd51c2f901f3d46bbe63038c200 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 15:20:41 +0200 Subject: [PATCH 165/437] Fix typo in no-sse2 patch, should fix FTBFS --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 5c10ebf..b07085e 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2489,7 +2489,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw + + public_configs = [ ":external_config" ] + } -+} else if (v8_is_component_build) { ++} else if (is_component_build) { v8_component("v8") { sources = [ "src/v8dll-main.cc", From eb0dbd1b82b7d2648f5de5a7ca6c7a928354641e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 15:27:30 +0200 Subject: [PATCH 166/437] Force verbose output from the GN bootstrap process --- qt5-qtwebengine.spec | 4 ++++ ...e-opensource-src-5.9.0-gn-bootstrap-verbose.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 15a0a20..3b5cc7e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -98,6 +98,8 @@ Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # FTBFS using qt < 5.8 Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch +# Force verbose output from the GN bootstrap process +Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -339,6 +341,7 @@ BuildArch: noarch %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch20 -p1 -b .qt57 +%patch21 -p1 -b .gn-bootstrap-verbose # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -549,6 +552,7 @@ done - Update system libvpx/libwebp version requirements (libvpx now F25+ only) - Drop the flag hacks (-g1 -fno-delete-null-pointer-checks) that are fixed upstream, force -g2 on x86_64 instead +- Force verbose output from the GN bootstrap process * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch b/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch new file mode 100644 index 0000000..87b5beb --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/buildtools/gn.pro qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose/src/buildtools/gn.pro +--- qtwebengine-opensource-src-5.9.0/src/buildtools/gn.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose/src/buildtools/gn.pro 2017-06-10 15:24:55.426814326 +0200 +@@ -20,7 +20,7 @@ + src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") + gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir)) + gn_args = $$system_quote($$gn_args) +- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path ++ gn_configure = $$system_quote($$gn_bootstrap) --verbose --shadow --gn-gen-args=$$gn_args $$ninja_path + !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") { + error("GN build error!") + } From 4d8875b36cc99d63a6fd93234171739245b7010b Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 15:48:08 +0200 Subject: [PATCH 167/437] Fix another typo in no-sse2 patch, should fix FTBFS --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index b07085e..314abdc 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2285,7 +2285,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web + "audio/SincResamplerSSE2.cpp", + "audio/VectorMathSSE2.cpp", + ] -+ cflags = [ "-msse2", '-mfpmath=sse' ] ++ cflags = [ "-msse2", "-mfpmath=sse" ] + deps = [ + ":blink_common", + ] From c3ca37c839eb225df313fb88536f7f0261228ebe Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 16:01:15 +0200 Subject: [PATCH 168/437] Use bundled libxml2 and libxslt QtWebEngine 5.9 requires a libxml2 built with ICU due to https://bugreports.qt.io/browse/QTBUG-59094 Fedora libxml2 is not. --- qt5-qtwebengine.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3b5cc7e..b2cebdc 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -149,8 +149,6 @@ BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(minizip) -BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xcursor) @@ -231,6 +229,10 @@ Provides: bundled(libvpx) = 1.6.0 %if !0%{?use_system_libwebp} Provides: bundled(libwebp) = 0.5.1 %endif +# see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h +Provides: bundled(libxml2) = 2.9.4 +# see src/3rdparty/chromium/third_party/libxslt/libxslt/xsltconfig.h for version +Provides: bundled(libxslt) = 1.1.29 Provides: bundled(libXNVCtrl) = 302.17 Provides: bundled(libyuv) = 1634 Provides: bundled(modp_b64) @@ -541,6 +543,8 @@ done - Update to 5.9.0 - Update version numbers of bundled stuff - Use bundled libsrtp and protobuf, Chromium dropped unbundling support for them +- Use bundled libxml2 and libxslt, QtWebEngine 5.9 requires a libxml2 built with + ICU due to https://bugreports.qt.io/browse/QTBUG-59094, Fedora libxml2 is not - Add missing Provides: bundled(hunspell) for the spellchecking added in 5.8 - Rebase linux-pri, no-neon, system-icu-utf, no-sse2, arm-fpu-fix, openmax-dl-neon and webrtc-neon-detect patches (port to GN) From 4fe1e7fce2bdfe781f5422e587cc0158c09f8fdc Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 16:26:21 +0200 Subject: [PATCH 169/437] Try to fix another no-sse2 patch FTBFS --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 314abdc..6b56f7d 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -30,6 +30,20 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8 + v8_current_cpu = "x87" + } +} +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-06-10 16:24:14.175128763 +0200 +@@ -213,6 +213,10 @@ + extra_ldflags = "" + } + ++ if (defined(invoker.shlib_subdir)) { ++ shlib_subdir = invoker.shlib_subdir ++ } ++ + # These library switches can apply to all tools below. + lib_switch = "-l" + lib_dir_switch = "-L" diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-06-10 02:09:47.874494730 +0200 @@ -2259,7 +2273,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web +#include "VectorMath.cpp" diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-09 00:40:12.361601303 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-10 15:47:49.419707504 +0200 @@ -1529,6 +1529,10 @@ deps += [ ":blink_x86_sse" ] } @@ -2390,7 +2404,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/web #endif diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 02:09:29.227782885 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 15:20:10.847967062 +0200 @@ -73,6 +73,9 @@ # If true, doesn't compile debug symbols into v8base reducing the # size of the binary and increasing the speed of gdb. From 5ee9cc8b1161260be751ff8728dcba4f88df7a4a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 21:26:43 +0200 Subject: [PATCH 170/437] Yet another no-sse2 patch typo fix --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 6b56f7d..efdfc7f 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1683,7 +1683,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcm - defines = [ "SSE2_ENABLE" ] - sources += [ "src/transform-sse2.c" ] + defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ "qcms_sse2" ] ++ deps = [ ":qcms_sse2" ] } } From 2b75cf68949e2ec9e69596f6c6d9fb7d152b65b3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 21:40:42 +0200 Subject: [PATCH 171/437] Fix another error from gn in the no-sse2 patch --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index efdfc7f..ed19885 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2499,7 +2499,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw + ":v8_maybe_snapshot", + ] + -+ configs = [ ":internal_config" ] ++ configs += [ ":internal_config" ] + + public_configs = [ ":external_config" ] + } From 4422cf08d8b5e6938e11b10d0845c6e4c20a169a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 22:03:46 +0200 Subject: [PATCH 172/437] system-nspr-prtime, system-icu-utf: Add missing link libraries to gn --- ...ngine-opensource-src-5.9.0-system-icu-utf.patch | 11 +++++++++++ ...e-opensource-src-5.9.0-system-nspr-prtime.patch | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch index d35ba87..f9954c0 100644 --- a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -355,6 +355,17 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi ldflags.extend(['-pthread']) static_libraries['xdg_user_dirs'] = { +diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:32.622964060 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:45.780913699 +0200 +@@ -277,6 +277,7 @@ + + libs += [ + "nspr4", ++ "icuuc", + ] + } + diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc --- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-06-08 11:02:21.776777974 +0200 diff --git a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch index 33dcc91..3ecf053 100644 --- a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -64,3 +64,17 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstr ldflags.extend(['-pthread']) static_libraries['xdg_user_dirs'] = { +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:32.622964060 +0200 +@@ -274,6 +274,10 @@ + "//build/config/sanitizers:deps", + "//build/win:default_exe_manifest", + ] ++ ++ libs += [ ++ "nspr4", ++ ] + } + + test("gn_unittests") { From 9dda045143282097dcf7ae56141cd05dc499a694 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 22:05:58 +0200 Subject: [PATCH 173/437] Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) --- qt5-qtwebengine.spec | 5 +++ ...gine-opensource-src-5.9.0-gn-aarch64.patch | 43 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 qtwebengine-opensource-src-5.9.0-gn-aarch64.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b2cebdc..db20651 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -100,6 +100,9 @@ Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch +# Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) +# https://codereview.qt-project.org/196178 +Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -344,6 +347,7 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose +%patch100 -p1 -b .gn-aarch64 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -557,6 +561,7 @@ done - Drop the flag hacks (-g1 -fno-delete-null-pointer-checks) that are fixed upstream, force -g2 on x86_64 instead - Force verbose output from the GN bootstrap process +- Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch b/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch new file mode 100644 index 0000000..1e8f31f --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch @@ -0,0 +1,43 @@ +From 801c957651fba94b5d7dde9cc490378a4dc3a987 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Thu, 1 Jun 2017 11:40:02 +0200 +Subject: [PATCH] [Backport] GN: Add Arm64 Linux support + +Add Arm64 linux support be able to build GN binary for +native arm64 builds. + +R=dpranke@chromium.org, brettw@chromium.org + +Review-Url: https://codereview.chromium.org/2550673002 + +Task-number: QTBUG-61128 +Change-Id: I3aa6b6ca7df374428a7f4a8b4db9f488a8926f6c +Reviewed-by: Joerg Bornemann +--- + chromium/tools/gn/args.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/3rdparty/chromium/tools/gn/args.cc b/src/3rdparty/chromium/tools/gn/args.cc +index 7285d7a..54703e1 100644 +--- a/src/3rdparty/chromium/tools/gn/args.cc ++++ b/src/3rdparty/chromium/tools/gn/args.cc +@@ -266,6 +266,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { + static const char kX86[] = "x86"; + static const char kX64[] = "x64"; + static const char kArm[] = "arm"; ++ static const char kArm64[] = "arm64"; + static const char kMips[] = "mipsel"; + static const char kS390X[] = "s390x"; + static const char kPPC64[] = "ppc64"; +@@ -280,6 +281,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const { + arch = kX64; + else if (os_arch.substr(0, 3) == "arm") + arch = kArm; ++ else if (os_arch == "aarch64") ++ arch = kArm64; + else if (os_arch == "mips") + arch = kMips; + else if (os_arch == "s390x") +-- +2.7.4 + From f6784380ac380455d2c88b78543c5a4c2c5d0578 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 22:20:01 +0200 Subject: [PATCH 174/437] system-nspr-prtime, system-icu-utf: Fix gn error --- qtwebengine-opensource-src-5.9.0-system-icu-utf.patch | 6 +++--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch index f9954c0..1c905e4 100644 --- a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ b/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch @@ -356,11 +356,11 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi static_libraries['xdg_user_dirs'] = { diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:32.622964060 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:45.780913699 +0200 +--- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:26.863178931 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:30.168114045 +0200 @@ -277,6 +277,7 @@ - libs += [ + libs = [ "nspr4", + "icuuc", ] diff --git a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch index 3ecf053..ab14cb9 100644 --- a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch @@ -66,13 +66,13 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstr static_libraries['xdg_user_dirs'] = { diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 21:47:32.622964060 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:26.863178931 +0200 @@ -274,6 +274,10 @@ "//build/config/sanitizers:deps", "//build/win:default_exe_manifest", ] + -+ libs += [ ++ libs = [ + "nspr4", + ] } From 0b8f82e8361b08d5719e9cf5cf140336ceaf534d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 23:27:07 +0200 Subject: [PATCH 175/437] Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium --- qt5-qtwebengine.spec | 5 ++++ ...urce-src-5.9.0-aarch64-gcc-toolchain.patch | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index db20651..a372459 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -103,6 +103,9 @@ Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch +# Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium +# https://codereview.chromium.org/2545053002 +Patch101: qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -348,6 +351,7 @@ BuildArch: noarch %patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose %patch100 -p1 -b .gn-aarch64 +%patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -562,6 +566,7 @@ done upstream, force -g2 on x86_64 instead - Force verbose output from the GN bootstrap process - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) +- Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch new file mode 100644 index 0000000..76228a0 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch @@ -0,0 +1,30 @@ +Index: src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +index 548722d3938017ac936b9088b7a686c2afbbb5fe..86cd7dabc6e86d22a266817dfbb3bf0c719f7992 100644 +--- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ++++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +@@ -21,6 +21,24 @@ clang_toolchain("clang_arm64") { + } + } + ++gcc_toolchain("arm64") { ++ toolprefix = "aarch64-linux-gnu-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ current_cpu = "arm64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ + gcc_toolchain("arm") { + toolprefix = "arm-linux-gnueabihf-" + From ac7d2ae4c97de63eac6cf0e3d270b6b9c743acfa Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Jun 2017 23:28:39 +0200 Subject: [PATCH 176/437] Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn --- qt5-qtwebengine.spec | 4 ++++ ...gine-opensource-src-5.9.0-system-re2.patch | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 qtwebengine-opensource-src-5.9.0-system-re2.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a372459..7a7d32e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -100,6 +100,8 @@ Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch +# Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn +Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch @@ -350,6 +352,7 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose +%patch22 -p1 -b .system-re2 %patch100 -p1 -b .gn-aarch64 %patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure @@ -567,6 +570,7 @@ done - Force verbose output from the GN bootstrap process - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) - Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium +- Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-system-re2.patch b/qtwebengine-opensource-src-5.9.0-system-re2.patch new file mode 100644 index 0000000..ac7bf5d --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-system-re2.patch @@ -0,0 +1,24 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-06-10 23:22:13.065385884 +0200 +@@ -5,13 +5,14 @@ + import("//build/shim_headers.gni") + + shim_headers("re2_shim") { +- root_path = "src" ++ root_path = "src/re2" ++ prefix = "re2/" + headers = [ +- "re2/filtered_re2.h", +- "re2/re2.h", +- "re2/set.h", +- "re2/stringpiece.h", +- "re2/variadic_function.h", ++ "filtered_re2.h", ++ "re2.h", ++ "set.h", ++ "stringpiece.h", ++ "variadic_function.h", + ] + } + From 114eb3b52d43ef63e736dfc695c2f6f513a3afd5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 01:13:38 +0200 Subject: [PATCH 177/437] Fix SSE2 detection in ANGLE - Build the SSE2 code in a separate compilation unit on i686. - Make supportsSSE2() return always true rather than always false on x86_64. - Make supportsSSE2() call the detection code from base/cpu.h instead of always returning false on i686. --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 228 +++++++++++++++++- 1 file changed, 226 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index ed19885..b007e76 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1673,9 +1673,233 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 01:02:55.060513393 +0200 +@@ -160,6 +160,17 @@ + public_deps = [ + ":angle_common", + ] ++ ++ deps = [ ++ ":angle_image_util_x86_sse2", ++ ] ++} ++ ++source_set("angle_image_util_x86_sse2") { ++ sources = [ ++ "image_util/loadimage_SSE2.cpp", ++ ] ++ cflags = [ "-msse2", "-mfpmath=sse" ] + } + + static_library("translator") { +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-11 01:08:46.225333830 +0200 +@@ -17,6 +17,7 @@ + #include + + #include ++#include + + #include "common/debug.h" + #include "common/platform.h" +@@ -142,9 +143,12 @@ + } + } + +-inline bool supportsSSE2() ++static inline bool supportsSSE2() + { + #if defined(ANGLE_USE_SSE) ++#if defined(__x86_64__) || defined(__SSE2__) ++ return true; ++#else + static bool checked = false; + static bool supports = false; + +@@ -153,21 +157,10 @@ + return supports; + } + +-#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) +- { +- int info[4]; +- __cpuid(info, 0); +- +- if (info[0] >= 1) +- { +- __cpuid(info, 1); +- +- supports = (info[3] >> 26) & 1; +- } +- } +-#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) ++ supports = base::CPU().has_sse2(); + checked = true; + return supports; ++#endif // defined(x86_64) || defined(__SSE2__) + #else // defined(ANGLE_USE_SSE) + return false; + #endif +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-06-11 00:43:54.961552623 +0200 +@@ -81,7 +81,9 @@ + #include + #define ANGLE_USE_SSE + #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) ++#if defined(__x86_64__) || defined(__SSE2__) + #include ++#endif + #define ANGLE_USE_SSE + #endif + +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-06-11 00:58:53.706120530 +0200 +@@ -12,9 +12,17 @@ + #include "common/platform.h" + #include "image_util/imageformats.h" + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + namespace angle + { + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++namespace SSE2 { ++#endif ++ + void LoadA8ToRGBA8(size_t width, + size_t height, + size_t depth, +@@ -28,6 +36,11 @@ + #if defined(ANGLE_USE_SSE) + if (gl::supportsSSE2()) + { ++#if !defined(__x86_64__) && !defined(__SSE2__) ++ angle::SSE2::LoadA8ToRGBA8(width, height, depth, input, inputRowPitch, ++ inputDepthPitch, output, outputRowPitch, ++ outputDepthPitch); ++#else + __m128i zeroWide = _mm_setzero_si128(); + + for (size_t z = 0; z < depth; z++) +@@ -68,6 +81,7 @@ + } + } + } ++#endif + + return; + } +@@ -89,6 +103,8 @@ + } + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void LoadA8ToBGRA8(size_t width, + size_t height, + size_t depth, +@@ -584,6 +600,8 @@ + } + } + ++#endif ++ + void LoadRGBA8ToBGRA8(size_t width, + size_t height, + size_t depth, +@@ -597,6 +615,11 @@ + #if defined(ANGLE_USE_SSE) + if (gl::supportsSSE2()) + { ++#if !defined(__x86_64__) && !defined(__SSE2__) ++ angle::SSE2::LoadRGBA8ToBGRA8(width, height, depth, input, ++ inputRowPitch, inputDepthPitch, output, ++ outputRowPitch, outputDepthPitch); ++#else + __m128i brMask = _mm_set1_epi32(0x00ff00ff); + + for (size_t z = 0; z < depth; z++) +@@ -641,6 +664,7 @@ + } + } + } ++#endif + + return; + } +@@ -663,6 +687,8 @@ + } + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void LoadRGBA8ToBGRA4(size_t width, + size_t height, + size_t depth, +@@ -1320,4 +1346,10 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++} // namespace SSE2 ++#endif ++ + } // namespace angle +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-06-11 00:52:18.251030762 +0200 +@@ -611,6 +611,32 @@ + size_t outputRowPitch, + size_t outputDepthPitch); + ++#if defined(__i386__) ++namespace SSE2 { ++ ++void LoadA8ToRGBA8(size_t width, ++ size_t height, ++ size_t depth, ++ const uint8_t *input, ++ size_t inputRowPitch, ++ size_t inputDepthPitch, ++ uint8_t *output, ++ size_t outputRowPitch, ++ size_t outputDepthPitch); ++ ++void LoadRGBA8ToBGRA8(size_t width, ++ size_t height, ++ size_t depth, ++ const uint8_t *input, ++ size_t inputRowPitch, ++ size_t inputDepthPitch, ++ uint8_t *output, ++ size_t outputRowPitch, ++ size_t outputDepthPitch); ++ ++} ++#endif // defined(__i386__) ++ + } // namespace angle + + #include "loadimage.inl" +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-06-11 00:59:45.318349164 +0200 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "loadimage.cpp" diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-08 22:50:07.147111135 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-10 21:27:01.666198494 +0200 @@ -30,8 +30,8 @@ ] @@ -2404,7 +2628,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/web #endif diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 15:20:10.847967062 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 21:40:01.510564765 +0200 @@ -73,6 +73,9 @@ # If true, doesn't compile debug symbols into v8base reducing the # size of the binary and increasing the speed of gdb. From afe1f40a5430c450293b894d898ea732b1b0977e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 01:32:25 +0200 Subject: [PATCH 178/437] clean_ffmpeg.sh: Add some more manual_files needed by autorename_* Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 11 +++++++++++ sources | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 6b33ac9..b1d3a6e 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -205,9 +205,14 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/mdct_template.c \ libavcodec/pel_template.c \ libavcodec/videodsp_template.c \ + libavcodec/flacdec.c \ + libavcodec/flacdsp.c \ + libavcodec/flacdsp_template.c \ + libavcodec/flacdsp_lpc_template.c \ libavcodec/h264pred.c \ libavcodec/hpeldsp.c \ libavcodec/videodsp.c \ + libavcodec/vorbisdsp.c \ libavcodec/vp3.c \ libavcodec/vp3_parser.c \ libavcodec/vp3dsp.c \ @@ -216,14 +221,20 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/vp8_parser.c \ libavcodec/vp8dsp.c \ libavutil/cpu.c \ + libavutil/float_dsp.c \ + libavutil/fixed_dsp.c \ + libavutil/aarch64/float_dsp_neon.S \ libavutil/arm/cpu.c \ libavutil/arm/float_dsp_neon.S \ libavformat/options.c \ libavformat/pcm.c \ libavformat/utils.c \ libavcodec/utils.c \ + libavcodec/aarch64/fft_neon.S \ libavcodec/aarch64/hpeldsp_neon.S \ libavcodec/aarch64/h264pred_neon.S \ + libavcodec/aarch64/mdct_neon.S \ + libavcodec/aarch64/vorbisdsp_neon.S \ libavcodec/arm/vorbisdsp_neon.S \ libavcodec/arm/mdct_neon.S \ libavcodec/arm/fft_neon.S \ diff --git a/sources b/sources index bf7d94e..1e150ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 523568e690afa7dc4657458daa4c424a3006e32f4bcfbe015b90813b44967b36d9ec3263b4281089d33edd6e75d5b948cddc42792939fcf6aa71d051fc6937a8 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 868f215e80594576652282025dccc4fcb48aa3834f9943f2365535498f4e1dd1eaf1c0c01984b42ee1c2b122db69dacf164203f5de2ed2dd8098ce930a1f9156 From e7e2ed38c49d452270304c61c671597add0f1452 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 02:16:40 +0200 Subject: [PATCH 179/437] no-sse2 patch: Fix errors in BUILD.gn Also bump the changelog date in the specfile. --- qt5-qtwebengine.spec | 2 +- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7a7d32e..5199684 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -550,7 +550,7 @@ done %changelog -* Sat Jun 10 2017 Kevin Kofler - 5.9.0-1 +* Sun Jun 11 2017 Kevin Kofler - 5.9.0-1 - Update to 5.9.0 - Update version numbers of bundled stuff - Use bundled libsrtp and protobuf, Chromium dropped unbundling support for them diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index b007e76..d1ec11f 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1675,20 +1675,22 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 01:02:55.060513393 +0200 -@@ -160,6 +160,17 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:14:15.319585286 +0200 +@@ -160,6 +160,19 @@ public_deps = [ ":angle_common", ] + -+ deps = [ -+ ":angle_image_util_x86_sse2", -+ ] ++ if (current_cpu == "x86") { ++ deps = [ ++ ":angle_image_util_x86_sse2", ++ ] ++ } +} + +source_set("angle_image_util_x86_sse2") { + sources = [ -+ "image_util/loadimage_SSE2.cpp", ++ "src/image_util/loadimage_SSE2.cpp", + ] + cflags = [ "-msse2", "-mfpmath=sse" ] } From d8a24a1ea7fe9bd8e6959841b523596a2fa6050c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 02:44:58 +0200 Subject: [PATCH 180/437] no-sse2 patch: More ANGLE BUILD.gn fixes --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index d1ec11f..096abe3 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1675,8 +1675,16 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:14:15.319585286 +0200 -@@ -160,6 +160,19 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:44:06.761460476 +0200 +@@ -154,12 +154,32 @@ + + configs -= angle_undefine_configs + configs += [ ":internal_config" ] ++ # readd the default include directories after ours, for base/cpu.h ++ configs += angle_undefine_configs + + public_configs = [ ":angle_image_util_config" ] + public_deps = [ ":angle_common", ] @@ -1689,6 +1697,11 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang +} + +source_set("angle_image_util_x86_sse2") { ++ configs -= angle_undefine_configs ++ configs += [ ":internal_config" ] ++ # readd the default include directories after ours, for base/cpu.h ++ configs += angle_undefine_configs ++ + sources = [ + "src/image_util/loadimage_SSE2.cpp", + ] From d1867a78c6854a1a725ec2795fcdf89e769064a4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 03:07:47 +0200 Subject: [PATCH 181/437] no-sse2 patch: Do not use Chromium headers in ANGLE Instead of relying on base/cpu.h, copy its implementation of __cpuid for GCC/Clang (from base/cpu.cc) and use the original SSE2 detection code from ANGLE using __cpuid. --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 77 ++++++++++--------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 096abe3..5feb31e 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1675,16 +1675,8 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:44:06.761460476 +0200 -@@ -154,12 +154,32 @@ - - configs -= angle_undefine_configs - configs += [ ":internal_config" ] -+ # readd the default include directories after ours, for base/cpu.h -+ configs += angle_undefine_configs - - public_configs = [ ":angle_image_util_config" ] - ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:59:25.143867714 +0200 +@@ -160,6 +160,22 @@ public_deps = [ ":angle_common", ] @@ -1699,8 +1691,6 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang +source_set("angle_image_util_x86_sse2") { + configs -= angle_undefine_configs + configs += [ ":internal_config" ] -+ # readd the default include directories after ours, for base/cpu.h -+ configs += angle_undefine_configs + + sources = [ + "src/image_util/loadimage_SSE2.cpp", @@ -1711,20 +1701,42 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang static_library("translator") { diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-11 01:08:46.225333830 +0200 -@@ -17,6 +17,7 @@ - #include - - #include -+#include - - #include "common/debug.h" - #include "common/platform.h" -@@ -142,9 +143,12 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-11 03:04:02.402397018 +0200 +@@ -142,9 +142,42 @@ } } -inline bool supportsSSE2() ++#if defined(ANGLE_USE_SSE) && !defined(__x86_64__) && !defined(__SSE2__) && !defined(_MSC_VER) ++ ++// From the base/cpu.cc in Chromium, to avoid depending on Chromium headers ++ ++#if defined(__pic__) && defined(__i386__) ++ ++static inline void __cpuid(int cpu_info[4], int info_type) { ++ __asm__ volatile ( ++ "mov %%ebx, %%edi\n" ++ "cpuid\n" ++ "xchg %%edi, %%ebx\n" ++ : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) ++ : "a"(info_type) ++ ); ++} ++ ++#else ++ ++static inline void __cpuid(int cpu_info[4], int info_type) { ++ __asm__ volatile ( ++ "cpuid\n" ++ : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) ++ : "a"(info_type) ++ ); ++} ++ ++#endif ++ ++#endif ++ +static inline bool supportsSSE2() { #if defined(ANGLE_USE_SSE) @@ -1734,24 +1746,19 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang static bool checked = false; static bool supports = false; -@@ -153,21 +157,10 @@ +@@ -153,7 +186,6 @@ return supports; } -#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) -- { -- int info[4]; -- __cpuid(info, 0); -- -- if (info[0] >= 1) -- { -- __cpuid(info, 1); -- -- supports = (info[3] >> 26) & 1; -- } -- } + { + int info[4]; + __cpuid(info, 0); +@@ -165,9 +197,9 @@ + supports = (info[3] >> 26) & 1; + } + } -#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) -+ supports = base::CPU().has_sse2(); checked = true; return supports; +#endif // defined(x86_64) || defined(__SSE2__) From a055048ab6649e1194feb364c0358a5d6609c217 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 03:29:36 +0200 Subject: [PATCH 182/437] no-sse2 patch: Yet another ANGLE BUILD.gn fix --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 5feb31e..1675ca5 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1675,8 +1675,8 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 02:59:25.143867714 +0200 -@@ -160,6 +160,22 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 03:28:05.966523743 +0200 +@@ -160,6 +160,26 @@ public_deps = [ ":angle_common", ] @@ -1692,6 +1692,10 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang + configs -= angle_undefine_configs + configs += [ ":internal_config" ] + ++ deps = [ ++ ":angle_common", ++ ] ++ + sources = [ + "src/image_util/loadimage_SSE2.cpp", + ] From be65fce41a7f019f8f423a99cea3f23cd35ca960 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 04:23:07 +0200 Subject: [PATCH 183/437] clean_ffmpeg.sh: Add some header_files needed by the new manual_files Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 5 +++++ sources | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index b1d3a6e..30b440d 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -60,6 +60,8 @@ header_files=" libavutil/x86/asm.h \ libavutil/cpu_internal.h \ libavutil/cpu.h \ libavutil/dynarray.h \ + libavutil/float_dsp.h \ + libavutil/fixed_dsp.h \ libavutil/internal.h \ libavutil/intfloat.h \ libavutil/intreadwrite.h \ @@ -102,6 +104,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/error_resilience.h \ libavcodec/fdctdsp.h \ libavcodec/flac.h \ + libavcodec/flacdsp.h \ libavcodec/fft.h \ libavcodec/fft-internal.h \ libavcodec/fft_table.h \ @@ -138,7 +141,9 @@ header_files=" libavutil/x86/asm.h \ libavcodec/tpel_template.c \ libavcodec/version.h \ libavcodec/videodsp.h \ + libavcodec/vlc.h \ libavcodec/vorbis_parser_internal.h \ + libavcodec/vorbisdsp.h \ libavcodec/vp3data.h \ libavcodec/vp3dsp.h \ libavcodec/vp56.h \ diff --git a/sources b/sources index 1e150ee..6695465 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 868f215e80594576652282025dccc4fcb48aa3834f9943f2365535498f4e1dd1eaf1c0c01984b42ee1c2b122db69dacf164203f5de2ed2dd8098ce930a1f9156 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 27f42c3943ff9358e0b0fbf8811ee93bf782971b31a47404bba564306c1a79d6bb2b2d5ffc0f6982bb8d0b0a18e1338f6d321b1cb7c2b057eb7f0e12225a6e5a From 3bbd19ebc7290310817733c9c54efd4286d9906d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 11:42:51 +0200 Subject: [PATCH 184/437] clean_ffmpeg.sh: Add missing libavcodec/unary.h Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 30b440d..e01cbaf 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -139,6 +139,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/rnd_avg.h \ libavcodec/thread.h \ libavcodec/tpel_template.c \ + libavcodec/unary.h \ libavcodec/version.h \ libavcodec/videodsp.h \ libavcodec/vlc.h \ diff --git a/sources b/sources index 6695465..56acd83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 27f42c3943ff9358e0b0fbf8811ee93bf782971b31a47404bba564306c1a79d6bb2b2d5ffc0f6982bb8d0b0a18e1338f6d321b1cb7c2b057eb7f0e12225a6e5a +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = ee0eeaa81302c609ea35df3bdffa2099ce2bbf90bb24d40da2153c0cf4a3af1a80a5e02d1a106ec4e9064b3c115557991246417521150b497b10fcde10c1db22 From 3cc5bcddde8de872e3c2b492f629907663e84b7e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 12:19:41 +0200 Subject: [PATCH 185/437] clean_ffmpeg.sh: Add missing libavutil/ffmath.h Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index e01cbaf..19ee99a 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -60,6 +60,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/cpu_internal.h \ libavutil/cpu.h \ libavutil/dynarray.h \ + libavutil/ffmath.h \ libavutil/float_dsp.h \ libavutil/fixed_dsp.h \ libavutil/internal.h \ diff --git a/sources b/sources index 56acd83..bd5c37a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = ee0eeaa81302c609ea35df3bdffa2099ce2bbf90bb24d40da2153c0cf4a3af1a80a5e02d1a106ec4e9064b3c115557991246417521150b497b10fcde10c1db22 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 1ad92d3fb1491f5396e39bc6e0905e019959b420c77c6e3056a032b08b3c6d1c313f8cb2a5e0aad440ae8fc6442b966a7c7996dc2e759dd8c1632d8e027d6d50 From a6e4284e9f92d0cd1423652aaf5050431fb4a0fc Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 12:25:55 +0200 Subject: [PATCH 186/437] no-sse2 patch: Ensure opts_check_x86.cpp is not built with -msse2 This is the file that decides whether to use SSE2 code or not, it must not contain any SSE2 code itself. --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 54 ++++++++++++++----- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 1675ca5..7d495b2 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1597,7 +1597,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn # TODO(watk): Refactor tests that could be made to run on Android. See diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-06-08 23:34:35.516753817 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-06-11 12:15:56.825339699 +0200 @@ -231,11 +231,6 @@ if (!is_ios) { sources += [ "ext/platform_canvas.cc" ] @@ -1610,24 +1610,54 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn q # The skia gypi values are relative to the skia_dir, so we need to rebase. sources += skia_core_sources -@@ -608,7 +603,15 @@ +@@ -500,6 +495,31 @@ + } + } + if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("skia_opts_sse2") { ++ sources = skia_opts.sse2_sources + ++ [ ++ # Chrome-specific. ++ "ext/convolver_SSE2.cc", ++ "ext/convolver_SSE2.h", ++ ] ++ sources -= [ ++ # Detection code must not be built with -msse2 ++ "//third_party/skia/src/opts/opts_check_x86.cpp", ++ ] ++ if (!is_win || is_clang) { ++ cflags = [ "-msse2" ] ++ } ++ if (is_win) { ++ defines = [ "SK_CPU_SSE_LEVEL=20" ] ++ } ++ visibility = [ ":skia_opts" ] ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ ++ ":skia_config", ++ ":skia_library_config", ++ "//build/config/compiler:no_chromium_code", ++ ] ++ } + source_set("skia_opts_sse3") { + sources = skia_opts.ssse3_sources + if (!is_win || is_clang) { +@@ -608,10 +628,13 @@ if (skia_build_no_opts) { sources = skia_opts.none_sources } else if (current_cpu == "x86" || current_cpu == "x64") { - sources = skia_opts.sse2_sources -+ sources = skia_opts.sse2_sources + -+ [ -+ # Chrome-specific. -+ "ext/convolver_SSE2.cc", -+ "ext/convolver_SSE2.h", -+ ] -+ if (!is_win || is_clang) { -+ cflags += [ "-msse2" ] -+ } ++ sources = [ ++ "//third_party/skia/src/opts/opts_check_x86.cpp", ++ ] deps += [ ":skia_opts_avx", ":skia_opts_hsw", -@@ -644,6 +647,13 @@ ++ ":skia_opts_sse2", + ":skia_opts_sse3", + ":skia_opts_sse41", + ":skia_opts_sse42", +@@ -644,6 +667,13 @@ if (mips_dsp_rev >= 1) { sources = skia_opts.mips_dsp_sources From 290964abea98cd0e6ed9a4cd5455c208e3b1eef5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 11 Jun 2017 13:04:09 +0200 Subject: [PATCH 187/437] clean_ffmpeg.sh: Add missing libavutil/hwcontext_internal.h Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 19ee99a..0b1fa64 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -63,6 +63,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/ffmath.h \ libavutil/float_dsp.h \ libavutil/fixed_dsp.h \ + libavutil/hwcontext_internal.h \ libavutil/internal.h \ libavutil/intfloat.h \ libavutil/intreadwrite.h \ diff --git a/sources b/sources index bd5c37a..2a6156f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = 1ad92d3fb1491f5396e39bc6e0905e019959b420c77c6e3056a032b08b3c6d1c313f8cb2a5e0aad440ae8fc6442b966a7c7996dc2e759dd8c1632d8e027d6d50 +SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = b97da4c9cd98d4c9c3cd4f59a4b488f55234dab947d324956643d0ccd61a527d3b5d7c647626b947dfde6dedcce1a9fa630d81b40ff1200c445547e3466c0607 From 139a3d63da6d42319ad5dc260e97df73c0ce1616 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 00:37:01 +0200 Subject: [PATCH 188/437] no-sse2 patch: More FTBFS fixes * add missing configs for the blink_x86_sse2 source set in src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn * in src/core/core_module.pro, when processing NINJA_SOLIBS, ignore the dummy convert_dict shared library used only to get a .pri file --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 7d495b2..63c29ce 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2553,7 +2553,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web +#include "VectorMath.cpp" diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-10 15:47:49.419707504 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-12 00:21:47.738315411 +0200 @@ -1529,6 +1529,10 @@ deps += [ ":blink_x86_sse" ] } @@ -2565,12 +2565,10 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web if (use_webaudio_ffmpeg) { include_dirs += [ "//third_party/ffmpeg" ] deps += [ "//third_party/ffmpeg" ] -@@ -1912,6 +1916,20 @@ - deps = [ - ":blink_common", +@@ -1914,6 +1918,26 @@ ] -+ } -+} + } + } + +if (current_cpu == "x86") { + source_set("blink_x86_sse2") { @@ -2583,9 +2581,17 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web + deps = [ + ":blink_common", + ] - } - } ++ configs += [ ++ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. ++ "//build/config/compiler:no_size_t_to_int_warning", ++ "//third_party/WebKit/Source:config", ++ "//third_party/WebKit/Source:non_test_config", ++ ] ++ } ++} + # This source set is used for fuzzers that need an environment similar to unit + # tests. diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-06-08 22:50:09.251079402 +0200 @@ -2849,21 +2855,24 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2 + v8.gyp >>v8_sse2.gyp diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro --- qtwebengine-opensource-src-5.9.0/src/core/core_module.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro 2017-06-09 00:59:19.199411383 +0200 -@@ -41,6 +41,28 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro 2017-06-12 00:25:07.241337485 +0200 +@@ -41,6 +41,31 @@ else: QMAKE_LFLAGS += $$NINJA_LFLAGS POST_TARGETDEPS += $$NINJA_TARGETDEPS +# go through the shared libraries that GN wants to link to ++# ignore the dummy convert_dict shared library used only to get a .pri file +# add the ones NOT in lib/sse2 to LIBS_PRIVATE +# don't add those in lib/sse2 that are only replacements for the normal ones +# collect all shared libraries, non-SSE2 and SSE2, so they can be installed +for(shlib, NINJA_SOLIBS) { -+ contains(shlib, .*/lib/sse2/.*) { -+ shlibs_sse2 += $$shlib -+ } else { -+ LIBS_PRIVATE += $$shlib -+ shlibs += $$shlib ++ !contains(shlib, .*convert_dict.*) { ++ contains(shlib, .*/lib/sse2/.*) { ++ shlibs_sse2 += $$shlib ++ } else { ++ LIBS_PRIVATE += $$shlib ++ shlibs += $$shlib ++ } + } +} + @@ -2879,7 +2888,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine- LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge -@@ -100,7 +122,12 @@ +@@ -100,7 +125,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources From 519e5a6cad35dd95daa7ff1b9e72f88bb00aa546 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 00:38:08 +0200 Subject: [PATCH 189/437] Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn --- qt5-qtwebengine.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5199684..73f8c59 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -362,6 +362,10 @@ sed -i -e 's!gpu//!gpu/!g' \ sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we +# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS +sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ + src/3rdparty/chromium/build/toolchain/linux/BUILD.gn # http://bugzilla.redhat.com/1337585 # can't just delete, but we'll overwrite with system headers to be on the safe side @@ -571,6 +575,7 @@ done - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) - Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium - Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn +- Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros From 88ac91a5b7a6c840ec10c00ef63f4dda82c21252 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 01:49:42 +0200 Subject: [PATCH 190/437] no-sse2 patch: Define V8_TARGET_ARCH_X87 for the V8 x87 build --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 63c29ce..b7cf31b 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2690,7 +2690,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/web #endif diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-10 21:40:01.510564765 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-12 01:48:06.425611303 +0200 @@ -73,6 +73,9 @@ # If true, doesn't compile debug symbols into v8base reducing the # size of the binary and increasing the speed of gdb. @@ -2747,7 +2747,17 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "USING_V8_SHARED" ] } include_dirs = [ "include" ] -@@ -2274,7 +2281,7 @@ +@@ -331,6 +338,9 @@ + cflags += [ "/arch:SSE2" ] + } + } ++ if (v8_current_cpu == "x87") { ++ defines += [ "V8_TARGET_ARCH_X87" ] ++ } + if (v8_current_cpu == "x64") { + defines += [ "V8_TARGET_ARCH_X64" ] + if (is_win) { +@@ -2274,7 +2284,7 @@ defines = [] @@ -2756,7 +2766,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "BUILDING_V8_BASE_SHARED" ] } -@@ -2364,7 +2371,7 @@ +@@ -2364,7 +2374,7 @@ configs = [ ":internal_config_base" ] @@ -2765,7 +2775,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "BUILDING_V8_PLATFORM_SHARED" ] } -@@ -2507,7 +2514,26 @@ +@@ -2507,7 +2517,26 @@ } } From 5b26f1b0c1b509cb48c45393152fcba1c708223a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 01:54:07 +0200 Subject: [PATCH 191/437] Build with -g1 on x86_64 too Unfortunately, eu-strip now segfaults while processing the -g2 debugging information on x86_64. --- qt5-qtwebengine.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 73f8c59..34412a8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -371,9 +371,12 @@ sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ # can't just delete, but we'll overwrite with system headers to be on the safe side cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ -%ifarch x86_64 -# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 -# (which is now the upstream default), force -g2 on x86_64 +%if 0 +#ifarch x86_64 +# enable this to force -g2 on x86_64 (most arches run out of memory with -g2) +# DISABLED BECAUSE OF: +# /usr/lib/rpm/find-debuginfo.sh: line 188: 3619 Segmentation fault +# (core dumped) eu-strip --remove-comment $r $g -f "$1" "$2" sed -i -e 's/symbol_level=1/symbol_level=2/g' src/core/config/common.pri %endif @@ -569,8 +572,7 @@ done - Drop webrtc-neon, v8-gcc7, pdfium-gcc7, wtf-gcc7, fix-open-in-new-tab and fix-dead-keys patches, fixed upstream - Update system libvpx/libwebp version requirements (libvpx now F25+ only) -- Drop the flag hacks (-g1 -fno-delete-null-pointer-checks) that are fixed - upstream, force -g2 on x86_64 instead +- Drop the flag hacks (-g1 -fno-delete-null-pointer-checks), fixed upstream - Force verbose output from the GN bootstrap process - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) - Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium From e4e544d68b23a9c0e9f1eeff857582eac4a144f8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 12:28:19 +0200 Subject: [PATCH 192/437] skia-neon patch: Do not build non-NEON ARM opts with -mfpu=neon Also bump the changelog date in the specfile. --- qt5-qtwebengine.spec | 2 +- ...ngine-opensource-src-5.9.0-skia-neon.patch | 60 ++++++++++++++++--- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 34412a8..9bd1ec1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -557,7 +557,7 @@ done %changelog -* Sun Jun 11 2017 Kevin Kofler - 5.9.0-1 +* Mon Jun 12 2017 Kevin Kofler - 5.9.0-1 - Update to 5.9.0 - Update version numbers of bundled stuff - Use bundled libsrtp and protobuf, Chromium dropped unbundling support for them diff --git a/qtwebengine-opensource-src-5.9.0-skia-neon.patch b/qtwebengine-opensource-src-5.9.0-skia-neon.patch index a9e774a..5dc8079 100644 --- a/qtwebengine-opensource-src-5.9.0-skia-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-skia-neon.patch @@ -1,6 +1,50 @@ +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-06-12 12:24:57.026914055 +0200 +@@ -486,6 +486,24 @@ + + # Separated out so it can be compiled with different flags for SSE. + if (!skia_build_no_opts) { ++ if (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) { ++ source_set("skia_opts_neon") { ++ sources = skia_opts.neon_sources ++ # Root build config sets -mfpu=$arm_fpu, which we expect to be neon ++ # when running this. ++ if (!arm_use_neon) { ++ configs -= [ "//build/config/compiler:compiler_arm_fpu" ] ++ cflags += [ "-mfpu=neon" ] ++ } ++ visibility = [ ":skia_opts" ] ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ ++ ":skia_config", ++ ":skia_library_config", ++ "//build/config/compiler:no_chromium_code", ++ ] ++ } ++ } + if (current_cpu == "arm64") { + source_set("skia_opts_crc32") { + sources = skia_opts.crc32_sources +@@ -624,14 +642,7 @@ + if (arm_version >= 7) { + sources = skia_opts.armv7_sources + if (arm_use_neon || arm_optionally_use_neon) { +- sources += skia_opts.neon_sources +- +- # Root build config sets -mfpu=$arm_fpu, which we expect to be neon +- # when running this. +- if (!arm_use_neon) { +- configs -= [ "//build/config/compiler:compiler_arm_fpu" ] +- cflags += [ "-mfpu=neon" ] +- } ++ deps += [ ":skia_opts_neon" ] + } + } else { + sources = skia_opts.none_sources diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-06-10 13:01:07.120762647 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-06-12 12:20:30.277109309 +0200 @@ -23,6 +23,7 @@ "$_src/opts/SkBitmapProcState_matrixProcs_neon.cpp", "$_src/opts/SkBlitMask_opts_arm_neon.cpp", @@ -19,7 +63,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski crc32 = [ "$_src/opts/SkOpts_crc32.cpp" ] diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-06-10 12:52:48.259092758 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-06-12 12:20:30.382107811 +0200 @@ -19,7 +19,7 @@ #include "SkImageEncoder.h" #include "SkResourceCache.h" @@ -40,7 +84,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski S32_alpha_D32_nofilter_DXDY, diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-06-10 12:52:48.259092758 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-06-12 12:20:30.448106869 +0200 @@ -47,16 +47,16 @@ /////////////////////////////////////////////////////////////////////////////// @@ -63,7 +107,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-06-10 12:52:48.260092743 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-06-12 12:20:30.449106855 +0200 @@ -20,7 +20,7 @@ uint32_t expanded32, unsigned maskRB); #endif @@ -102,7 +146,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski do { diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-06-10 13:10:57.090108380 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-06-12 12:20:30.449106855 +0200 @@ -73,6 +73,124 @@ return features; } @@ -230,7 +274,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-06-10 12:56:42.672648362 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-06-12 12:20:30.449106855 +0200 @@ -99,6 +99,7 @@ void Init_avx(); void Init_hsw(); @@ -251,7 +295,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-06-10 12:52:48.260092743 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-06-12 12:20:30.450106841 +0200 @@ -8,12 +8,75 @@ #ifndef SkUtilsArm_DEFINED #define SkUtilsArm_DEFINED @@ -334,7 +378,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski #endif // SkUtilsArm_DEFINED diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-06-10 12:52:48.259092758 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-06-12 12:20:30.450106841 +0200 @@ -0,0 +1,54 @@ +/* + * Copyright 2015 Google Inc. From 4182a4d0e229b6b70c7e1f83deb0131132deb2f5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 12:34:02 +0200 Subject: [PATCH 193/437] no-sse2 patch: Only enable SSE2 in wsola-internal.cc if __SSE2__ Runtime detection would be nice to have, but for now this is the same state as in 5.8. NEON is also not runtime-detected there. The x86_64 and aarch64 builds will get the SIMD optimizations, the i686 and armv7hl ones won't for now. --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index b7cf31b..c118908 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1595,6 +1595,18 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn } # TODO(watk): Refactor tests that could be made to run on Android. See +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-06-12 12:30:26.903281839 +0200 +@@ -15,7 +15,7 @@ + #include "base/logging.h" + #include "media/base/audio_bus.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE2__) + #define USE_SIMD 1 + #include + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-06-11 12:15:56.825339699 +0200 From a9a9bd00cca91fe8bd0928641385ccc21d134d2c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 13:00:31 +0200 Subject: [PATCH 194/437] skia-neon patch: Fix gn error on armv7hl --- qtwebengine-opensource-src-5.9.0-skia-neon.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-skia-neon.patch b/qtwebengine-opensource-src-5.9.0-skia-neon.patch index 5dc8079..3506533 100644 --- a/qtwebengine-opensource-src-5.9.0-skia-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-skia-neon.patch @@ -1,6 +1,6 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-06-12 12:24:57.026914055 +0200 ++++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-06-12 12:59:26.707922417 +0200 @@ -486,6 +486,24 @@ # Separated out so it can be compiled with different flags for SSE. @@ -12,7 +12,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn q + # when running this. + if (!arm_use_neon) { + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] -+ cflags += [ "-mfpu=neon" ] ++ cflags = [ "-mfpu=neon" ] + } + visibility = [ ":skia_opts" ] + configs -= [ "//build/config/compiler:chromium_code" ] From 2e9fc1cac1c8e417bbb127ba671a4ab6bbd1d227 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 13:52:37 +0200 Subject: [PATCH 195/437] Use upstream (Qt) fix for the ARM native build issue - Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) - Drop "Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium" - Drop "Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn" --- qt5-qtwebengine.spec | 15 +++------ ...urce-src-5.9.0-aarch64-gcc-toolchain.patch | 30 ----------------- ...-opensource-src-5.9.0-host-toolchain.patch | 32 +++++++++++++++++++ 3 files changed, 37 insertions(+), 40 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch create mode 100644 qtwebengine-opensource-src-5.9.0-host-toolchain.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9bd1ec1..7cc4c18 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -105,9 +105,9 @@ Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch -# Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium -# https://codereview.chromium.org/2545053002 -Patch101: qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch +# Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) +# https://codereview.qt-project.org/197071 +Patch101: qtwebengine-opensource-src-5.9.0-host-toolchain.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -354,7 +354,7 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 %patch100 -p1 -b .gn-aarch64 -%patch101 -p1 -b .aarch64-gcc-toolchain +%patch101 -p1 -b .host-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -362,10 +362,6 @@ sed -i -e 's!gpu//!gpu/!g' \ sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp -# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we -# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS -sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ - src/3rdparty/chromium/build/toolchain/linux/BUILD.gn # http://bugzilla.redhat.com/1337585 # can't just delete, but we'll overwrite with system headers to be on the safe side @@ -575,9 +571,8 @@ done - Drop the flag hacks (-g1 -fno-delete-null-pointer-checks), fixed upstream - Force verbose output from the GN bootstrap process - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) -- Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium +- Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) - Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn -- Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch deleted file mode 100644 index 76228a0..0000000 --- a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -index 548722d3938017ac936b9088b7a686c2afbbb5fe..86cd7dabc6e86d22a266817dfbb3bf0c719f7992 100644 ---- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -+++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -@@ -21,6 +21,24 @@ clang_toolchain("clang_arm64") { - } - } - -+gcc_toolchain("arm64") { -+ toolprefix = "aarch64-linux-gnu-" -+ -+ cc = "${toolprefix}gcc" -+ cxx = "${toolprefix}g++" -+ -+ ar = "${toolprefix}ar" -+ ld = cxx -+ readelf = "${toolprefix}readelf" -+ nm = "${toolprefix}nm" -+ -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "linux" -+ is_clang = false -+ } -+} -+ - gcc_toolchain("arm") { - toolprefix = "arm-linux-gnueabihf-" - diff --git a/qtwebengine-opensource-src-5.9.0-host-toolchain.patch b/qtwebengine-opensource-src-5.9.0-host-toolchain.patch new file mode 100644 index 0000000..aab4e90 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-host-toolchain.patch @@ -0,0 +1,32 @@ +From 33b69c4d138a8eebc392737ee1a58d999f922d59 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 12 Jun 2017 12:36:17 +0200 +Subject: [PATCH] Always set a host toolchain + +If we don't give Chromium a host toolchain it will pick one of its own +overriding which compiler should be used, and breaking native builds +on non-x86 architectuers. + +Task-number: QTBUG-61128 +Change-Id: Ia25a4f43a28214003abcb11dc75a0e57064f76a7 +--- + src/core/config/linux.pri | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +index 24951cd..076d8a3 100644 +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -103,8 +103,8 @@ host_build { + gn_args += use_system_libffi=false + } else { + gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:target\" ++ gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" + cross_compile { +- gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" + gn_args += v8_snapshot_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:v8_snapshot\" + GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) + GN_TARGET_CPU = $$gnArch($$QT_ARCH) +-- +2.7.4 + From 0df1d88b1a4469222323b3e1b44f3731b1eb6015 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 14:22:07 +0200 Subject: [PATCH 196/437] no-sse2 patch: Fix V8 dual build on i686 * Add the dependency on the SSE2 build to a target QtWebEngine actually uses. * Also handle v8_build_shared in the V8 inspector, so the symbols actually get exported. --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 105 +++++++++++------- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index c118908..55e5bb6 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -136,22 +136,23 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn qtw static_library("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/chrome/renderer/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/chrome/renderer/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/chrome/renderer/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/chrome/renderer/BUILD.gn 2017-06-10 02:12:19.472150369 +0200 -@@ -136,6 +136,12 @@ - "//v8:v8", +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-06-12 14:19:26.095936011 +0200 +@@ -468,6 +468,13 @@ + "//ui/surface", + "//v8", ] - ++ + if (current_cpu == "x86") { + deps += [ -+ "//v8:v8(//build/toolchain/linux:x86_sse2)", ++ "//v8(//build/toolchain/linux:x86_sse2)", + ] + } + - configs += [ "//build/config/compiler:wexit_time_destructors" ] + allow_circular_includes_from = [] - if (enable_nacl) { + if (use_aura && !use_qt) { diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-06-08 22:49:57.484256877 +0200 @@ -2702,29 +2703,8 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/web #endif diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-12 01:48:06.425611303 +0200 -@@ -73,6 +73,9 @@ - # If true, doesn't compile debug symbols into v8base reducing the - # size of the binary and increasing the speed of gdb. - remove_v8base_debug_symbols = false -+ -+ # Whether to build V8 as a shared library -+ v8_build_shared = false - } - - # Set project-specific defaults for some args if not provided in args.gn. The -@@ -99,6 +102,10 @@ - if (v8_enable_disassembler == "") { - v8_enable_disassembler = is_debug && !v8_optimized_debug - } -+if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { -+ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds -+ v8_build_shared = true -+} - - # Specifies if the target build is a simulator build. Comparing target cpu - # with v8 target cpu to not affect simulator builds for making cross-compile -@@ -117,7 +124,7 @@ ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-12 14:15:23.270523710 +0200 +@@ -117,7 +117,7 @@ include_dirs = [ "." ] @@ -2733,7 +2713,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "BUILDING_V8_SHARED" ] } } -@@ -131,14 +138,14 @@ +@@ -131,14 +131,14 @@ # This config should be applied to code using the libplatform. config("libplatform_config") { include_dirs = [ "include" ] @@ -2750,7 +2730,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "USING_V8_BASE_SHARED" ] } libs = [] -@@ -155,7 +162,7 @@ +@@ -155,7 +155,7 @@ # This config should only be applied to code using V8 and not any V8 code # itself. config("external_config") { @@ -2759,7 +2739,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "USING_V8_SHARED" ] } include_dirs = [ "include" ] -@@ -331,6 +338,9 @@ +@@ -331,6 +331,9 @@ cflags += [ "/arch:SSE2" ] } } @@ -2769,7 +2749,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw if (v8_current_cpu == "x64") { defines += [ "V8_TARGET_ARCH_X64" ] if (is_win) { -@@ -2274,7 +2284,7 @@ +@@ -2274,7 +2277,7 @@ defines = [] @@ -2778,7 +2758,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "BUILDING_V8_BASE_SHARED" ] } -@@ -2364,7 +2374,7 @@ +@@ -2364,7 +2367,7 @@ configs = [ ":internal_config_base" ] @@ -2787,7 +2767,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw defines = [ "BUILDING_V8_PLATFORM_SHARED" ] } -@@ -2507,7 +2517,26 @@ +@@ -2507,7 +2510,26 @@ } } @@ -2815,6 +2795,31 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw v8_component("v8") { sources = [ "src/v8dll-main.cc", +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/gni/v8.gni 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-06-12 14:15:47.965158851 +0200 +@@ -30,6 +30,9 @@ + # Enable ECMAScript Internationalization API. Enabling this feature will + # add a dependency on the ICU library. + v8_enable_i18n_support = true ++ ++ # Whether to build V8 as a shared library ++ v8_build_shared = false + } + + if (v8_use_external_startup_data == "") { +@@ -42,6 +45,11 @@ + v8_enable_backtrace = is_debug && !v8_optimized_debug + } + ++if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { ++ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds ++ v8_build_shared = true ++} ++ + # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute + # paths for all configs in templates as they are shared in different + # subdirectories. diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 2017-06-08 22:50:09.496075706 +0200 @@ -2875,6 +2880,30 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2 + -e "s/\.bin/_sse2.bin/g" \ + -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ + v8.gyp >>v8_sse2.gyp +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-06-12 14:16:16.955730521 +0200 +@@ -106,7 +106,7 @@ + "/wd4996", # Deprecated function call. + ] + } +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_SHARED" ] + } + } +diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-06-12 14:16:45.945302206 +0200 +@@ -335,7 +335,7 @@ + + defines = [] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + # cctest can't be built against a shared library, so we + # need to depend on the underlying static target in that case. + deps += [ "../..:v8_maybe_snapshot" ] diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro --- qtwebengine-opensource-src-5.9.0/src/core/core_module.pro 2017-05-19 06:22:04.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro 2017-06-12 00:25:07.241337485 +0200 From 705bf27fe143e9e36bace064a2d076ee5b444a30 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 14:38:07 +0200 Subject: [PATCH 197/437] Revert "Use upstream (Qt) fix for the ARM native build issue" This reverts commit 2e9fc1cac1c8e417bbb127ba671a4ab6bbd1d227. This does not work. --- qt5-qtwebengine.spec | 15 ++++++--- ...urce-src-5.9.0-aarch64-gcc-toolchain.patch | 30 +++++++++++++++++ ...-opensource-src-5.9.0-host-toolchain.patch | 32 ------------------- 3 files changed, 40 insertions(+), 37 deletions(-) create mode 100644 qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-host-toolchain.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7cc4c18..9bd1ec1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -105,9 +105,9 @@ Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch -# Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) -# https://codereview.qt-project.org/197071 -Patch101: qtwebengine-opensource-src-5.9.0-host-toolchain.patch +# Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium +# https://codereview.chromium.org/2545053002 +Patch101: qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -354,7 +354,7 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 %patch100 -p1 -b .gn-aarch64 -%patch101 -p1 -b .host-toolchain +%patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -362,6 +362,10 @@ sed -i -e 's!gpu//!gpu/!g' \ sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we +# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS +sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ + src/3rdparty/chromium/build/toolchain/linux/BUILD.gn # http://bugzilla.redhat.com/1337585 # can't just delete, but we'll overwrite with system headers to be on the safe side @@ -571,8 +575,9 @@ done - Drop the flag hacks (-g1 -fno-delete-null-pointer-checks), fixed upstream - Force verbose output from the GN bootstrap process - Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) -- Backport upstream patch to fix native builds on ARM and aarch64 (QTBUG-61128) +- Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium - Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn +- Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch new file mode 100644 index 0000000..76228a0 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch @@ -0,0 +1,30 @@ +Index: src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +index 548722d3938017ac936b9088b7a686c2afbbb5fe..86cd7dabc6e86d22a266817dfbb3bf0c719f7992 100644 +--- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ++++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +@@ -21,6 +21,24 @@ clang_toolchain("clang_arm64") { + } + } + ++gcc_toolchain("arm64") { ++ toolprefix = "aarch64-linux-gnu-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ current_cpu = "arm64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ + gcc_toolchain("arm") { + toolprefix = "arm-linux-gnueabihf-" + diff --git a/qtwebengine-opensource-src-5.9.0-host-toolchain.patch b/qtwebengine-opensource-src-5.9.0-host-toolchain.patch deleted file mode 100644 index aab4e90..0000000 --- a/qtwebengine-opensource-src-5.9.0-host-toolchain.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 33b69c4d138a8eebc392737ee1a58d999f922d59 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Mon, 12 Jun 2017 12:36:17 +0200 -Subject: [PATCH] Always set a host toolchain - -If we don't give Chromium a host toolchain it will pick one of its own -overriding which compiler should be used, and breaking native builds -on non-x86 architectuers. - -Task-number: QTBUG-61128 -Change-Id: Ia25a4f43a28214003abcb11dc75a0e57064f76a7 ---- - src/core/config/linux.pri | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri -index 24951cd..076d8a3 100644 ---- a/src/core/config/linux.pri -+++ b/src/core/config/linux.pri -@@ -103,8 +103,8 @@ host_build { - gn_args += use_system_libffi=false - } else { - gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:target\" -+ gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" - cross_compile { -- gn_args += host_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" - gn_args += v8_snapshot_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:v8_snapshot\" - GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) - GN_TARGET_CPU = $$gnArch($$QT_ARCH) --- -2.7.4 - From 1a7c1df9169786238b14cf920240e572f4c6ddf8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 16:37:52 +0200 Subject: [PATCH 198/437] no-sse2 patch: Set -rpath-link for QtWebEngineProcess --- qtwebengine-opensource-src-5.9.0-no-sse2.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 55e5bb6..6b7537d 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -2953,3 +2953,15 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine- !use?(system_icu) { icu.CONFIG += no_check_exist +diff -Nur qtwebengine-opensource-src-5.9.0/src/process/process.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/process/process.pro +--- qtwebengine-opensource-src-5.9.0/src/process/process.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/src/process/process.pro 2017-06-12 16:36:03.823777310 +0200 +@@ -9,6 +9,8 @@ + + SOURCES = main.cpp + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/Release ++ + win32 { + SOURCES += \ + support_win.cpp From 1d5bddf2595e4c4b061ac91f7b1badbca092d369 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 12 Jun 2017 20:55:43 +0200 Subject: [PATCH 199/437] no-sse2 patch: Set -rpath-link for the examples Unfortunately, this has to be done one example at a time because subdirectories do not inherit variables in QMake. --- ...bengine-opensource-src-5.9.0-no-sse2.patch | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.0-no-sse2.patch index 6b7537d..4dcbc92 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.0-no-sse2.patch @@ -1,3 +1,144 @@ +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/customdialogs/customdialogs.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro +--- qtwebengine-opensource-src-5.9.0/examples/webengine/customdialogs/customdialogs.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-06-12 20:48:36.743167401 +0200 +@@ -1,5 +1,7 @@ + QT += webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + server.h + +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/minimal/minimal.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/minimal/minimal.pro +--- qtwebengine-opensource-src-5.9.0/examples/webengine/minimal/minimal.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-06-12 20:48:02.646665156 +0200 +@@ -2,6 +2,8 @@ + + QT += webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += main.cpp + + RESOURCES += qml.qrc +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro +--- qtwebengine-opensource-src-5.9.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-06-12 20:48:24.553340621 +0200 +@@ -20,5 +20,7 @@ + QT += widgets # QApplication is required to get native styling with QtQuickControls + } + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser + INSTALLS += target +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro +--- qtwebengine-opensource-src-5.9.0/examples/webengine/recipebrowser/recipebrowser.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-06-12 20:48:31.672239461 +0200 +@@ -2,6 +2,8 @@ + + QT += quick qml quickcontrols2 webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + cross_compile { + posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED + } +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-06-12 20:47:51.870824827 +0200 +@@ -1,5 +1,7 @@ + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS = mainwindow.h + SOURCES = main.cpp \ + mainwindow.cpp +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-06-12 20:47:00.603584486 +0200 +@@ -3,6 +3,8 @@ + TEMPLATE = app + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += \ + main.cpp\ + mainwindow.cpp +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/demobrowser/demobrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-06-12 20:47:26.036207636 +0200 +@@ -3,6 +3,8 @@ + QT += webenginewidgets network widgets printsupport + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + qtHaveModule(uitools):!embedded: QT += uitools + else: DEFINES += QT_NO_UITOOLS + +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-06-12 20:47:36.026059609 +0200 +@@ -3,6 +3,8 @@ + QT += webenginewidgets webchannel + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h \ + previewpage.h \ +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/minimal/minimal.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/minimal/minimal.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-06-12 20:46:13.714279273 +0200 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += main.cpp + + target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-06-12 20:47:31.059133208 +0200 +@@ -3,6 +3,8 @@ + QT += webenginewidgets + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + browser.h \ + browserwindow.h \ +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-06-12 20:47:46.165909361 +0200 +@@ -7,6 +7,8 @@ + error("Spellcheck example can not be built when using native OS dictionaries.") + } + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + webview.h + +diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro +--- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-06-12 20:47:20.160294702 +0200 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h \ + fullscreenwindow.h \ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-06-08 23:09:28.104582812 +0200 From 593264c7166a67d1fec08f947ace5e5636129ff5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 13 Jun 2017 14:54:02 +0200 Subject: [PATCH 200/437] arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU * Tue Jun 13 2017 Kevin Kofler - 5.9.0-2 - arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU This ensures GN does not get built with NEON on 32-bit armv7hl. The ARM builders don't necessarily support NEON. (The Fedora one apparently does, but the RPM Fusion one apparently does not.) --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9bd1ec1..5264934 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -41,7 +41,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -557,6 +557,9 @@ done %changelog +* Tue Jun 13 2017 Kevin Kofler - 5.9.0-2 +- arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU + * Mon Jun 12 2017 Kevin Kofler - 5.9.0-1 - Update to 5.9.0 - Update version numbers of bundled stuff diff --git a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch index ddf8abc..ca308d4 100644 --- a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch +++ b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch @@ -1,6 +1,15 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri --- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-10 02:32:09.984692943 +0200 ++++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-13 14:51:26.986633933 +0200 +@@ -41,7 +41,7 @@ + !isEmpty(TOOLCHAIN_SYSROOT): gn_args += target_sysroot=\"$${TOOLCHAIN_SYSROOT}\" + } + +-contains(QT_ARCH, "arm"):!host_build { ++contains(QT_ARCH, "arm") { + # Extract ARM specific compiler options that we have to pass to gn, + # but let gn figure out a default if an option is not present. + MTUNE = $$extractCFlag("-mtune=.*") @@ -64,6 +64,7 @@ gn_args += arm_use_neon=true } else { From af0b8a6b9ba3e6a8a2b9188df5ea79b40c974439 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 15 Jun 2017 10:16:56 +0200 Subject: [PATCH 201/437] Introduce a debug_config macro Introduce a debug_config macro so that the debuginfo settings can be changed more easily. --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5264934..dc88b37 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -23,6 +23,10 @@ # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 %global arm_neon 1 +# the QMake CONFIG flags to force debugging information to be produced in +# release builds, and for all parts of the code +%global debug_config webcore_debug v8base_debug force_debug_info + #global prerelease rc # spellchecking dictionary directory @@ -399,7 +403,7 @@ export NINJA_PATH=%{_bindir}/ninja-build mkdir %{_target_platform} pushd %{_target_platform} -%{qmake_qt5} CONFIG+="webcore_debug v8base_debug force_debug_info" \ +%{qmake_qt5} CONFIG+="%{debug_config}" \ WEBENGINE_CONFIG+="use_system_icu use_spellchecker" .. make %{?_smp_mflags} From ddcf6aaa1ac7b4c81ff128f2e7d65218011028e5 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 21 Jun 2017 03:59:44 +0200 Subject: [PATCH 202/437] Fix FTBFS on F26 (and lower) due to debugedit failure Remove the double slashes from #include lines in 2 files in WebRTC. --- qt5-qtwebengine.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index dc88b37..c824a44 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -362,6 +362,10 @@ BuildArch: noarch # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc +# and another one in 2 files in WebRTC +sed -i -e 's!audio_processing//!audio_processing/!g' \ + src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \ + src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc # remove ./ from #line commands in ANGLE to avoid debugedit failure (?) sed -i -e 's!\./!!g' \ src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ From f4a3e4c1e3bfbe5d016781d1f06c9afcdff2e99e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 21 Jun 2017 12:02:23 +0200 Subject: [PATCH 203/437] Reduce debugging info on ARM on F26- For some reason, the builder ran out of memory on F26 but not on Rawhide. --- qt5-qtwebengine.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c824a44..4a44d7f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -23,9 +23,20 @@ # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 %global arm_neon 1 +%if 0%{?fedora} > 26 # the QMake CONFIG flags to force debugging information to be produced in # release builds, and for all parts of the code %global debug_config webcore_debug v8base_debug force_debug_info +%else +%ifarch %{arm} +# the ARM builder runs out of memory on Fedora 26 during linking with the full +# setting below, so omit debugging information for the parts upstream deems it +# dispensable for (webcore, v8base) +%global debug_config force_debug_info +%else +%global debug_config webcore_debug v8base_debug force_debug_info +%endif +%endif #global prerelease rc From 09a57d530ce6e89d75b43e1d73007b1b66a3bb8f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 25 Jun 2017 22:39:35 +0200 Subject: [PATCH 204/437] Fix broken binary compatibility for C memory management functions * Sun Jun 25 2017 Kevin Kofler - 5.9.0-3 - Fix broken binary compatibility for C memory management functions (incomplete upstream fix for QTBUG-60565) --- qt5-qtwebengine.spec | 10 +- ...urce-src-5.9.0-qtbug-60565-c-symbols.patch | 162 ++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4a44d7f..0abfcfe 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -117,6 +117,9 @@ Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch # Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch +# Fix broken binary compatibility for C memory management functions (incomplete +# upstream fix for QTBUG-60565) +Patch23: qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch @@ -368,6 +371,7 @@ BuildArch: noarch %patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 +%patch23 -p1 -b .qtbug-60565-c-symbols %patch100 -p1 -b .gn-aarch64 %patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure @@ -576,6 +580,10 @@ done %changelog +* Sun Jun 25 2017 Kevin Kofler - 5.9.0-3 +- Fix broken binary compatibility for C memory management functions (incomplete + upstream fix for QTBUG-60565) + * Tue Jun 13 2017 Kevin Kofler - 5.9.0-2 - arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU diff --git a/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch b/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch new file mode 100644 index 0000000..35edb0c --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch @@ -0,0 +1,162 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp +--- qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp 2017-06-25 22:33:28.508223362 +0200 +@@ -39,6 +39,8 @@ + + #include + #include ++#include ++#include + + #if defined(__LP64__) + # define SIZE_T_MANGLING "m" +@@ -47,6 +49,7 @@ + #endif + + #define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn))) ++#define SHIM_HIDDEN __attribute__ ((visibility ("hidden"))) + + extern "C" { + +@@ -82,26 +85,100 @@ + void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept + SHIM_ALIAS_SYMBOL(ShimCppDeleteArray); + ++__asm__(".symver __ShimMalloc, malloc@Qt_5"); ++void* __ShimMalloc(size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimMalloc); ++ ++__asm__(".symver __ShimCalloc, calloc@Qt_5"); ++void* __ShimCalloc(size_t n, size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimCalloc); ++ ++__asm__(".symver __ShimRealloc, realloc@Qt_5"); ++void* __ShimRealloc(void* address, size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimRealloc); ++ ++__asm__(".symver __ShimMemalign, memalign@Qt_5"); ++void* __ShimMemalign(size_t alignment, size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimMemalign); ++ ++__asm__(".symver __ShimPosixMemalign, posix_memalign@Qt_5"); ++int __ShimPosixMemalign(void** res, size_t alignment, size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimPosixMemalign); ++ ++__asm__(".symver __ShimValloc, valloc@Qt_5"); ++void* __ShimValloc(size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimValloc); ++ ++__asm__(".symver __ShimPvalloc, pvalloc@Qt_5"); ++void* __ShimPvalloc(size_t size) noexcept ++ SHIM_ALIAS_SYMBOL(ShimPvalloc); ++ ++__asm__(".symver __ShimFree, free@Qt_5"); ++void __ShimFree(void* address) noexcept ++ SHIM_ALIAS_SYMBOL(ShimFree); ++ + static void* __shimCppNew(size_t size); + static void* __shimCppNewArray(size_t size); + static void __shimCppDelete(void *address); + static void __shimCppDeleteArray(void *address); ++static void* __shimMalloc(size_t size) noexcept; ++static void* __shimCalloc(size_t n, size_t size) noexcept; ++static void* __shimRealloc(void* address, size_t size) noexcept; ++static void* __shimMemalign(size_t alignment, size_t size) noexcept; ++static int __shimPosixMemalign(void** res, size_t alignment, size_t size) ++ noexcept; ++static void* __shimValloc(size_t size) noexcept; ++static void* __shimPvalloc(size_t size) noexcept; ++static void __shimFree(void* address) noexcept; + +-static void* ShimCppNew(size_t size) { ++SHIM_HIDDEN void* ShimCppNew(size_t size) { + return __shimCppNew(size); + } + +-static void* ShimCppNewArray(size_t size) { ++SHIM_HIDDEN void* ShimCppNewArray(size_t size) { + return __shimCppNewArray(size); + } + +-static void ShimCppDelete(void* address) { ++SHIM_HIDDEN void ShimCppDelete(void* address) { + __shimCppDelete(address); + } + +-static void ShimCppDeleteArray(void* address) { ++SHIM_HIDDEN void ShimCppDeleteArray(void* address) { + __shimCppDeleteArray(address); + } ++ ++SHIM_HIDDEN void* ShimMalloc(size_t size) noexcept { ++ return __shimMalloc(size); ++} ++ ++SHIM_HIDDEN void* ShimCalloc(size_t n, size_t size) noexcept { ++ return __shimCalloc(n, size); ++} ++ ++SHIM_HIDDEN void* ShimRealloc(void* address, size_t size) noexcept { ++ return __shimRealloc(address, size); ++} ++ ++SHIM_HIDDEN void* ShimMemalign(size_t alignment, size_t size) noexcept { ++ return __shimMemalign(alignment, size); ++} ++ ++SHIM_HIDDEN int ShimPosixMemalign(void** res, size_t alignment, size_t size) ++ noexcept { ++ return __shimPosixMemalign(res, alignment, size); ++} ++ ++SHIM_HIDDEN void* ShimValloc(size_t size) noexcept { ++ return __shimValloc(size); ++} ++ ++SHIM_HIDDEN void* ShimPvalloc(size_t size) noexcept { ++ return __shimPvalloc(size); ++} ++ ++SHIM_HIDDEN void ShimFree(void* address) noexcept { ++ __shimFree(address); ++} + } // extern "C" + + static void* __shimCppNew(size_t size) { +@@ -119,3 +196,36 @@ + static void __shimCppDeleteArray(void* address) { + operator delete[](address); + } ++ ++static void* __shimMalloc(size_t size) noexcept { ++ return malloc(size); ++} ++ ++static void* __shimCalloc(size_t n, size_t size) noexcept { ++ return calloc(n, size); ++} ++ ++static void* __shimRealloc(void* address, size_t size) noexcept { ++ return realloc(address, size); ++} ++ ++static void* __shimMemalign(size_t alignment, size_t size) noexcept { ++ return memalign(alignment, size); ++} ++ ++static int __shimPosixMemalign(void** res, size_t alignment, size_t size) ++ noexcept { ++ return posix_memalign(res, alignment, size); ++} ++ ++static void* __shimValloc(size_t size) noexcept { ++ return valloc(size); ++} ++ ++static void* __shimPvalloc(size_t size) noexcept { ++ return pvalloc(size); ++} ++ ++static void __shimFree(void* address) noexcept { ++ free(address); ++} From 1c2a8df20326e4ad29b61b51c67d7262b951d0e4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 26 Jun 2017 23:23:28 +0200 Subject: [PATCH 205/437] Add a hunk to the QTBUG-61521 fix according to the upstream review * Mon Jun 26 2017 Kevin Kofler - 5.9.0-4 - Add a hunk to the QTBUG-61521 fix according to the upstream review --- qt5-qtwebengine.spec | 13 +++++++---- ...ine-opensource-src-5.9.0-qtbug-61521.patch | 23 +++++++++++++++++-- 2 files changed, 29 insertions(+), 7 deletions(-) rename qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch => qtwebengine-opensource-src-5.9.0-qtbug-61521.patch (82%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0abfcfe..480d8c7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -118,8 +118,8 @@ Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch # Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch # Fix broken binary compatibility for C memory management functions (incomplete -# upstream fix for QTBUG-60565) -Patch23: qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch +# upstream fix for QTBUG-60565) (QTBUG-61521) +Patch23: qtwebengine-opensource-src-5.9.0-qtbug-61521.patch # Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) # https://codereview.qt-project.org/196178 Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch @@ -371,7 +371,7 @@ BuildArch: noarch %patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 -%patch23 -p1 -b .qtbug-60565-c-symbols +%patch23 -p1 -b .qtbug-61521 %patch100 -p1 -b .gn-aarch64 %patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure @@ -580,9 +580,12 @@ done %changelog +* Mon Jun 26 2017 Kevin Kofler - 5.9.0-4 +- Add a hunk to the QTBUG-61521 fix according to the upstream review + * Sun Jun 25 2017 Kevin Kofler - 5.9.0-3 - Fix broken binary compatibility for C memory management functions (incomplete - upstream fix for QTBUG-60565) + upstream fix for QTBUG-60565) (QTBUG-61521) * Tue Jun 13 2017 Kevin Kofler - 5.9.0-2 - arm-fpu-fix patch: Also build the host tools (i.e., GN) with the correct FPU diff --git a/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch b/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch similarity index 82% rename from qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch rename to qtwebengine-opensource-src-5.9.0-qtbug-61521.patch index 35edb0c..eda3bda 100644 --- a/qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols.patch +++ b/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch @@ -1,6 +1,25 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-26 23:15:31.499258482 +0200 +@@ -60,6 +60,7 @@ + #endif + void* __libc_memalign(size_t alignment, size_t size); + ++if !defined(TOOLKIT_QT) //QTBUG-61521,QTBUG-60565 + // Overriding the system memory allocation functions: + // + // For security reasons, we want malloc failures to be fatal. Too much code +@@ -129,6 +130,7 @@ + *ptr = memalign(alignment, size); + return 0; + } ++#endif // TOOLKIT_QT + + } // extern C + +diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.0-qtbug-61521/src/core/api/qtbug-60565.cpp --- qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-qtbug-60565-c-symbols/src/core/api/qtbug-60565.cpp 2017-06-25 22:33:28.508223362 +0200 ++++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/core/api/qtbug-60565.cpp 2017-06-25 22:33:28.508223362 +0200 @@ -39,6 +39,8 @@ #include From ace3e112e6b8e0338b84be9abe5e63d7052ecf54 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 26 Jun 2017 23:48:53 +0200 Subject: [PATCH 206/437] Fix typo in the QTBUG-61521 patch causing FTBFS --- qtwebengine-opensource-src-5.9.0-qtbug-61521.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch b/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch index eda3bda..a9a0109 100644 --- a/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch +++ b/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch @@ -1,11 +1,11 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc --- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-26 23:15:31.499258482 +0200 ++++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-26 23:48:15.166464570 +0200 @@ -60,6 +60,7 @@ #endif void* __libc_memalign(size_t alignment, size_t size); -+if !defined(TOOLKIT_QT) //QTBUG-61521,QTBUG-60565 ++#if !defined(TOOLKIT_QT) //QTBUG-61521,QTBUG-60565 // Overriding the system memory allocation functions: // // For security reasons, we want malloc failures to be fatal. Too much code From f456610d8c80d8fdbf3dfaca93a55b2e960befc6 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 1 Jul 2017 01:30:34 +0200 Subject: [PATCH 207/437] Update to 5.9.1 * Fri Jun 30 2017 Kevin Kofler - 5.9.1-1 - Update to 5.9.1 - Rebase qtbug-61521 patch (drop the parts that are already in 5.9.1) - Drop backported GN aarch64 patches already included in 5.9.1 --- .gitignore | 1 + qt5-qtwebengine.spec | 27 ++++++------ ...urce-src-5.9.0-aarch64-gcc-toolchain.patch | 30 ------------- ...gine-opensource-src-5.9.0-gn-aarch64.patch | 43 ------------------- ...ine-opensource-src-5.9.1-qtbug-61521.patch | 43 +++++-------------- sources | 2 +- 6 files changed, 25 insertions(+), 121 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-gn-aarch64.patch rename qtwebengine-opensource-src-5.9.0-qtbug-61521.patch => qtwebengine-opensource-src-5.9.1-qtbug-61521.patch (75%) diff --git a/.gitignore b/.gitignore index 3eee6b2..01c15f0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /qtwebengine-opensource-src-5.7.1-clean.tar.xz /qtwebengine-opensource-src-5.8.0-clean.tar.xz /qtwebengine-opensource-src-5.9.0-clean.tar.xz +/qtwebengine-opensource-src-5.9.1-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 480d8c7..319699a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -55,8 +55,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.9.0 -Release: 4%{?dist} +Version: 5.9.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -64,8 +64,8 @@ Release: 4%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.9/5.9.0/submodules/qtwebengine-opensource-src-5.9.0.tar.xz -# ./clean_qtwebengine.sh 5.9.0 +# wget http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtwebengine-opensource-src-5.9.1.tar.xz +# ./clean_qtwebengine.sh 5.9.1 Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -119,13 +119,7 @@ Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch # Fix broken binary compatibility for C memory management functions (incomplete # upstream fix for QTBUG-60565) (QTBUG-61521) -Patch23: qtwebengine-opensource-src-5.9.0-qtbug-61521.patch -# Backport upstream patch to fix GN FTBFS on aarch64 (QTBUG-61128) -# https://codereview.qt-project.org/196178 -Patch100: qtwebengine-opensource-src-5.9.0-gn-aarch64.patch -# Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium -# https://codereview.chromium.org/2545053002 -Patch101: qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch +Patch23: qtwebengine-opensource-src-5.9.1-qtbug-61521.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -215,9 +209,9 @@ BuildRequires: pkgconfig(vpx) >= 1.6.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 58.0.3029.96) are backported, see: +# Some security fixes (up to version 59.0.3071.104) are backported, see: # http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=56-based -# see dist/changes-5.9.0 for the version numbers (base, security fixes) and for +# see dist/changes-5.9.1 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports Provides: bundled(chromium) = 56.0.2924.122 @@ -372,8 +366,6 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 %patch23 -p1 -b .qtbug-61521 -%patch100 -p1 -b .gn-aarch64 -%patch101 -p1 -b .aarch64-gcc-toolchain # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -580,6 +572,11 @@ done %changelog +* Fri Jun 30 2017 Kevin Kofler - 5.9.1-1 +- Update to 5.9.1 +- Rebase qtbug-61521 patch (drop the parts that are already in 5.9.1) +- Drop backported GN aarch64 patches already included in 5.9.1 + * Mon Jun 26 2017 Kevin Kofler - 5.9.0-4 - Add a hunk to the QTBUG-61521 fix according to the upstream review diff --git a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch b/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch deleted file mode 100644 index 76228a0..0000000 --- a/qtwebengine-opensource-src-5.9.0-aarch64-gcc-toolchain.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -index 548722d3938017ac936b9088b7a686c2afbbb5fe..86cd7dabc6e86d22a266817dfbb3bf0c719f7992 100644 ---- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -+++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -@@ -21,6 +21,24 @@ clang_toolchain("clang_arm64") { - } - } - -+gcc_toolchain("arm64") { -+ toolprefix = "aarch64-linux-gnu-" -+ -+ cc = "${toolprefix}gcc" -+ cxx = "${toolprefix}g++" -+ -+ ar = "${toolprefix}ar" -+ ld = cxx -+ readelf = "${toolprefix}readelf" -+ nm = "${toolprefix}nm" -+ -+ toolchain_args = { -+ current_cpu = "arm64" -+ current_os = "linux" -+ is_clang = false -+ } -+} -+ - gcc_toolchain("arm") { - toolprefix = "arm-linux-gnueabihf-" - diff --git a/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch b/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch deleted file mode 100644 index 1e8f31f..0000000 --- a/qtwebengine-opensource-src-5.9.0-gn-aarch64.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 801c957651fba94b5d7dde9cc490378a4dc3a987 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Thu, 1 Jun 2017 11:40:02 +0200 -Subject: [PATCH] [Backport] GN: Add Arm64 Linux support - -Add Arm64 linux support be able to build GN binary for -native arm64 builds. - -R=dpranke@chromium.org, brettw@chromium.org - -Review-Url: https://codereview.chromium.org/2550673002 - -Task-number: QTBUG-61128 -Change-Id: I3aa6b6ca7df374428a7f4a8b4db9f488a8926f6c -Reviewed-by: Joerg Bornemann ---- - chromium/tools/gn/args.cc | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/3rdparty/chromium/tools/gn/args.cc b/src/3rdparty/chromium/tools/gn/args.cc -index 7285d7a..54703e1 100644 ---- a/src/3rdparty/chromium/tools/gn/args.cc -+++ b/src/3rdparty/chromium/tools/gn/args.cc -@@ -266,6 +266,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { - static const char kX86[] = "x86"; - static const char kX64[] = "x64"; - static const char kArm[] = "arm"; -+ static const char kArm64[] = "arm64"; - static const char kMips[] = "mipsel"; - static const char kS390X[] = "s390x"; - static const char kPPC64[] = "ppc64"; -@@ -280,6 +281,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const { - arch = kX64; - else if (os_arch.substr(0, 3) == "arm") - arch = kArm; -+ else if (os_arch == "aarch64") -+ arch = kArm64; - else if (os_arch == "mips") - arch = kMips; - else if (os_arch == "s390x") --- -2.7.4 - diff --git a/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch b/qtwebengine-opensource-src-5.9.1-qtbug-61521.patch similarity index 75% rename from qtwebengine-opensource-src-5.9.0-qtbug-61521.patch rename to qtwebengine-opensource-src-5.9.1-qtbug-61521.patch index a9a0109..82d3a14 100644 --- a/qtwebengine-opensource-src-5.9.0-qtbug-61521.patch +++ b/qtwebengine-opensource-src-5.9.1-qtbug-61521.patch @@ -1,6 +1,6 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/memory_linux.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-26 23:48:15.166464570 +0200 +diff -ur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/base/process/memory_linux.cc qtwebengine-opensource-src-5.9.1-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-07-01 01:20:35.113886332 +0200 @@ -60,6 +60,7 @@ #endif void* __libc_memalign(size_t alignment, size_t size); @@ -17,9 +17,9 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/process/mem } // extern C -diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.0-qtbug-61521/src/core/api/qtbug-60565.cpp ---- qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-qtbug-61521/src/core/api/qtbug-60565.cpp 2017-06-25 22:33:28.508223362 +0200 +diff -ur qtwebengine-opensource-src-5.9.1/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.1-qtbug-61521/src/core/api/qtbug-60565.cpp +--- qtwebengine-opensource-src-5.9.1/src/core/api/qtbug-60565.cpp 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-qtbug-61521/src/core/api/qtbug-60565.cpp 2017-07-01 01:22:27.626242360 +0200 @@ -39,6 +39,8 @@ #include @@ -29,15 +29,7 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengi #if defined(__LP64__) # define SIZE_T_MANGLING "m" -@@ -47,6 +49,7 @@ - #endif - - #define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn))) -+#define SHIM_HIDDEN __attribute__ ((visibility ("hidden"))) - - extern "C" { - -@@ -82,26 +85,100 @@ +@@ -83,10 +85,51 @@ void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept SHIM_ALIAS_SYMBOL(ShimCppDeleteArray); @@ -87,23 +79,10 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengi +static void* __shimPvalloc(size_t size) noexcept; +static void __shimFree(void* address) noexcept; --static void* ShimCppNew(size_t size) { -+SHIM_HIDDEN void* ShimCppNew(size_t size) { + SHIM_HIDDEN void* ShimCppNew(size_t size) { return __shimCppNew(size); - } - --static void* ShimCppNewArray(size_t size) { -+SHIM_HIDDEN void* ShimCppNewArray(size_t size) { - return __shimCppNewArray(size); - } - --static void ShimCppDelete(void* address) { -+SHIM_HIDDEN void ShimCppDelete(void* address) { - __shimCppDelete(address); - } - --static void ShimCppDeleteArray(void* address) { -+SHIM_HIDDEN void ShimCppDeleteArray(void* address) { +@@ -103,6 +146,39 @@ + SHIM_HIDDEN void ShimCppDeleteArray(void* address) { __shimCppDeleteArray(address); } + @@ -142,7 +121,7 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/core/api/qtbug-60565.cpp qtwebengi } // extern "C" static void* __shimCppNew(size_t size) { -@@ -119,3 +196,36 @@ +@@ -120,3 +196,36 @@ static void __shimCppDeleteArray(void* address) { operator delete[](address); } diff --git a/sources b/sources index 2a6156f..979b865 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.0-clean.tar.xz) = b97da4c9cd98d4c9c3cd4f59a4b488f55234dab947d324956643d0ccd61a527d3b5d7c647626b947dfde6dedcce1a9fa630d81b40ff1200c445547e3466c0607 +SHA512 (qtwebengine-opensource-src-5.9.1-clean.tar.xz) = 86bbfe50d557b82df3b3598a43340b5fa913d01df0a8c7cd43ae8d36eed59e6deca633e42f8813c1074b3bbc5ac21179571f2ef9fd125838875bddd92faca36c From 8caa0e4388a9f890b187965389d96f9cec46a171 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 1 Jul 2017 03:43:16 +0200 Subject: [PATCH 208/437] no-sse2 patch: Upstream added 2 examples, add -Wl,-rpath-link to them too Also bump the changelog date. --- qt5-qtwebengine.spec | 5 +- ...bengine-opensource-src-5.9.1-no-sse2.patch | 460 +++++++++--------- 2 files changed, 245 insertions(+), 220 deletions(-) rename qtwebengine-opensource-src-5.9.0-no-sse2.patch => qtwebengine-opensource-src-5.9.1-no-sse2.patch (77%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 319699a..858c4d9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -100,7 +100,7 @@ Patch5: qtwebengine-opensource-src-5.9.0-system-icu-utf.patch # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along # with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch6: qtwebengine-opensource-src-5.9.0-no-sse2.patch +Patch6: qtwebengine-opensource-src-5.9.1-no-sse2.patch # fix missing ARM -mfpu setting Patch9: qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) @@ -572,10 +572,11 @@ done %changelog -* Fri Jun 30 2017 Kevin Kofler - 5.9.1-1 +* Sat Jul 01 2017 Kevin Kofler - 5.9.1-1 - Update to 5.9.1 - Rebase qtbug-61521 patch (drop the parts that are already in 5.9.1) - Drop backported GN aarch64 patches already included in 5.9.1 +- no-sse2 patch: Upstream added 2 examples, add -Wl,-rpath-link to them too * Mon Jun 26 2017 Kevin Kofler - 5.9.0-4 - Add a hunk to the QTBUG-61521 fix according to the upstream review diff --git a/qtwebengine-opensource-src-5.9.0-no-sse2.patch b/qtwebengine-opensource-src-5.9.1-no-sse2.patch similarity index 77% rename from qtwebengine-opensource-src-5.9.0-no-sse2.patch rename to qtwebengine-opensource-src-5.9.1-no-sse2.patch index 4dcbc92..086349a 100644 --- a/qtwebengine-opensource-src-5.9.0-no-sse2.patch +++ b/qtwebengine-opensource-src-5.9.1-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/customdialogs/customdialogs.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro ---- qtwebengine-opensource-src-5.9.0/examples/webengine/customdialogs/customdialogs.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-06-12 20:48:36.743167401 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/customdialogs/customdialogs.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro +--- qtwebengine-opensource-src-5.9.1/examples/webengine/customdialogs/customdialogs.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-07-01 03:36:34.349977335 +0200 @@ -1,5 +1,7 @@ QT += webengine @@ -9,9 +9,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/customdialogs/cust HEADERS += \ server.h -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/minimal/minimal.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/minimal/minimal.pro ---- qtwebengine-opensource-src-5.9.0/examples/webengine/minimal/minimal.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-06-12 20:48:02.646665156 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/minimal/minimal.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/minimal/minimal.pro +--- qtwebengine-opensource-src-5.9.1/examples/webengine/minimal/minimal.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/minimal/minimal.pro 2017-07-01 03:36:34.439976022 +0200 @@ -2,6 +2,8 @@ QT += webengine @@ -21,9 +21,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/minimal/minimal.pr SOURCES += main.cpp RESOURCES += qml.qrc -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro ---- qtwebengine-opensource-src-5.9.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-06-12 20:48:24.553340621 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro +--- qtwebengine-opensource-src-5.9.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-07-01 03:36:34.440976008 +0200 @@ -20,5 +20,7 @@ QT += widgets # QApplication is required to get native styling with QtQuickControls } @@ -32,9 +32,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/quicknanobrowser/q + target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser INSTALLS += target -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro ---- qtwebengine-opensource-src-5.9.0/examples/webengine/recipebrowser/recipebrowser.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-06-12 20:48:31.672239461 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro +--- qtwebengine-opensource-src-5.9.1/examples/webengine/recipebrowser/recipebrowser.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-07-01 03:36:34.497975177 +0200 @@ -2,6 +2,8 @@ QT += quick qml quickcontrols2 webengine @@ -44,9 +44,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webengine/recipebrowser/reci cross_compile { posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED } -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-06-12 20:47:51.870824827 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-07-01 03:36:34.556974316 +0200 @@ -1,5 +1,7 @@ QT += webenginewidgets @@ -55,9 +55,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/contentmani HEADERS = mainwindow.h SOURCES = main.cpp \ mainwindow.cpp -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-06-12 20:47:00.603584486 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-07-01 03:36:34.614973470 +0200 @@ -3,6 +3,8 @@ TEMPLATE = app CONFIG += c++11 @@ -67,9 +67,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/cookiebrows SOURCES += \ main.cpp\ mainwindow.cpp -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/demobrowser/demobrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-06-12 20:47:26.036207636 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/demobrowser/demobrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-07-01 03:36:34.673972609 +0200 @@ -3,6 +3,8 @@ QT += webenginewidgets network widgets printsupport CONFIG += c++11 @@ -79,9 +79,33 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/demobrowser qtHaveModule(uitools):!embedded: QT += uitools else: DEFINES += QT_NO_UITOOLS -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-06-12 20:47:36.026059609 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-07-01 03:39:53.946070116 +0200 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += html2pdf.cpp + + target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/maps/maps.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/maps/maps.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/maps/maps.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-07-01 03:40:09.747841163 +0200 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h + +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-07-01 03:36:34.731971763 +0200 @@ -3,6 +3,8 @@ QT += webenginewidgets webchannel CONFIG += c++11 @@ -91,9 +115,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/markdownedi HEADERS += \ mainwindow.h \ previewpage.h \ -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/minimal/minimal.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/minimal/minimal.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-06-12 20:46:13.714279273 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/minimal/minimal.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/minimal/minimal.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-07-01 03:36:34.789970917 +0200 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -103,9 +127,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/minimal/min SOURCES += main.cpp target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-06-12 20:47:31.059133208 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-07-01 03:36:34.850970027 +0200 @@ -3,6 +3,8 @@ QT += webenginewidgets CONFIG += c++11 @@ -115,9 +139,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/simplebrows HEADERS += \ browser.h \ browserwindow.h \ -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-06-12 20:47:46.165909361 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-07-01 03:36:34.851970013 +0200 @@ -7,6 +7,8 @@ error("Spellcheck example can not be built when using native OS dictionaries.") } @@ -127,9 +151,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/spellchecke HEADERS += \ webview.h -diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro ---- qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-06-12 20:47:20.160294702 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro +--- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-07-01 03:36:34.851970013 +0200 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -139,9 +163,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/examples/webenginewidgets/videoplayer HEADERS += \ mainwindow.h \ fullscreenwindow.h \ -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-06-08 23:09:28.104582812 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-07-01 03:36:34.851970013 +0200 @@ -533,13 +533,6 @@ } else if (current_cpu == "x86") { cflags += [ "-m32" ] @@ -156,9 +180,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/co } else if (current_cpu == "arm") { if (is_clang && !is_android && !is_nacl) { cflags += [ "--target=arm-linux-gnueabihf" ] -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-06-10 01:42:15.216049690 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-07-01 03:36:34.928968889 +0200 @@ -59,3 +59,11 @@ # It should never be explicitly set by the user. v8_current_cpu = v8_target_cpu @@ -171,9 +195,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/config/v8 + v8_current_cpu = "x87" + } +} -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-06-10 16:24:14.175128763 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-07-01 03:36:34.929968875 +0200 @@ -213,6 +213,10 @@ extra_ldflags = "" } @@ -185,10 +209,10 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain # These library switches can apply to all tools below. lib_switch = "-l" lib_dir_switch = "-L" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-06-10 02:09:47.874494730 +0200 -@@ -78,6 +78,26 @@ +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-07-01 03:36:34.929968875 +0200 +@@ -96,6 +96,26 @@ } } @@ -215,9 +239,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/toolchain clang_toolchain("clang_x64") { toolchain_args = { current_cpu = "x64" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-06-08 23:12:50.719511297 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/cc/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-07-01 03:36:34.929968875 +0200 @@ -567,13 +567,6 @@ "trees/tree_synchronizer.h", ] @@ -277,9 +301,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/cc/BUILD.gn qtw static_library("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-06-12 14:19:26.095936011 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-07-01 03:36:34.998967868 +0200 @@ -468,6 +468,13 @@ "//ui/surface", "//v8", @@ -294,9 +318,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/content/rendere allow_circular_includes_from = [] if (use_aura && !use_qt) { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-06-08 22:49:57.484256877 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-07-01 03:36:35.073966774 +0200 @@ -336,13 +336,13 @@ } @@ -365,9 +389,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/BUIL "simd/convert_yuv_to_rgb_sse.asm", "simd/convert_yuva_to_argb_mmx.asm", "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/media.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-06-08 22:49:57.484256877 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/media.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-07-01 03:36:35.131965928 +0200 @@ -10,6 +10,8 @@ #include "base/metrics/field_trial.h" #include "base/trace_event/trace_event.h" @@ -386,9 +410,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/medi InitializeCPUSpecificYUVConversions(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-06-08 22:49:57.643254478 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-07-01 03:36:35.131965928 +0200 @@ -65,6 +65,17 @@ int rgbstride, YUVType yuv_type); @@ -451,9 +475,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, const uint8_t* u_buf, const uint8_t* v_buf, -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-06-08 22:49:57.698253649 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-07-01 03:36:35.132965913 +0200 @@ -0,0 +1,23 @@ +; Copyright (c) 2011 The Chromium Authors. All rights reserved. +; Use of this source code is governed by a BSD-style license that can be @@ -478,9 +502,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd +; const int16* convert_table); +%define SYMBOL ConvertYUVToRGB32Row_MMX +%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-06-08 22:49:57.699253634 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-07-01 03:36:35.132965913 +0200 @@ -47,6 +47,34 @@ EmptyRegisterState(); } @@ -516,9 +540,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd void ConvertYUVToRGB32_SSE(const uint8_t* yplane, const uint8_t* uplane, const uint8_t* vplane, -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-06-08 22:49:57.699253634 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-07-01 03:36:35.132965913 +0200 @@ -20,6 +20,12 @@ int source_width, uint8_t source_y_fraction); @@ -532,9 +556,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-06-08 22:49:57.699253634 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-07-01 03:36:35.132965913 +0200 @@ -0,0 +1,79 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -615,9 +639,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd +#endif + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-06-08 22:49:57.699253634 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-07-01 03:36:35.133965899 +0200 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -669,9 +693,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd +} + +} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-06-08 22:49:57.700253619 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-07-01 03:36:35.133965899 +0200 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -791,9 +815,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/simd + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-06-08 22:49:57.700253619 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-07-01 03:36:35.133965899 +0200 @@ -81,17 +81,12 @@ #include #include @@ -904,9 +928,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-06-08 22:49:57.700253619 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-07-01 03:36:35.133965899 +0200 @@ -36,6 +36,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -918,9 +942,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-06-08 22:49:57.701253604 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-07-01 03:36:35.134965884 +0200 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -939,9 +963,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-06-08 22:49:57.701253604 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-07-01 03:36:35.134965884 +0200 @@ -10,6 +10,7 @@ #include "base/bind.h" @@ -961,9 +985,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/sinc // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-06-08 22:49:57.701253604 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-07-01 03:36:35.135965870 +0200 @@ -7,12 +7,17 @@ #include @@ -1151,9 +1175,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vect #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-06-08 22:49:57.701253604 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-07-01 03:36:35.135965870 +0200 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -1166,9 +1190,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vect // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-06-08 22:49:57.702253589 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-07-01 03:36:35.135965870 +0200 @@ -5,6 +5,7 @@ #include @@ -1261,9 +1285,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vect +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-06-08 22:49:57.702253589 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-07-01 03:36:35.136965855 +0200 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1273,9 +1297,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vect MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-06-08 22:49:57.702253589 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-07-01 03:36:35.136965855 +0200 @@ -9,6 +9,7 @@ #include @@ -1308,9 +1332,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/vect SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-06-08 22:49:57.703253573 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-07-01 03:36:35.136965855 +0200 @@ -32,7 +32,7 @@ #include "media/base/simd/convert_yuv_to_rgb.h" #include "media/base/simd/filter_yuv.h" @@ -1393,9 +1417,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_ if (cpu.has_ssse3()) { g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-06-08 22:49:57.703253573 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-07-01 03:36:35.137965840 +0200 @@ -71,6 +71,29 @@ DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); }; @@ -1503,9 +1527,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_ #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-06-08 22:49:57.703253573 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-07-01 03:36:35.137965840 +0200 @@ -643,6 +643,37 @@ EXPECT_EQ(0, error); } @@ -1707,9 +1731,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/base/yuv_ TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { base::CPU cpu; if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-06-08 22:49:57.704253558 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-07-01 03:36:35.138965826 +0200 @@ -832,6 +832,26 @@ "//base", "//ui/gfx/geometry", @@ -1737,9 +1761,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/BUILD.gn } # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-06-12 12:30:26.903281839 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-07-01 03:36:35.206964834 +0200 @@ -15,7 +15,7 @@ #include "base/logging.h" #include "media/base/audio_bus.h" @@ -1749,9 +1773,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/media/filters/w #define USE_SIMD 1 #include #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-06-11 12:15:56.825339699 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-07-01 03:36:35.273963857 +0200 @@ -231,11 +231,6 @@ if (!is_ios) { sources += [ "ext/platform_canvas.cc" ] @@ -1825,9 +1849,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn q } else { sources = skia_opts.none_sources } -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-06-08 22:50:00.933204857 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-07-01 03:36:35.331963011 +0200 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1846,9 +1870,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-06-08 22:50:00.998203877 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-07-01 03:36:35.331963011 +0200 @@ -11,6 +11,7 @@ #include @@ -1857,9 +1881,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/ext/convol #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-11 03:28:05.966523743 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-07-01 03:36:35.332962996 +0200 @@ -160,6 +160,26 @@ public_deps = [ ":angle_common", @@ -1887,9 +1911,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang } static_library("translator") { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-11 03:04:02.402397018 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-07-01 03:36:35.406961915 +0200 @@ -142,9 +142,42 @@ } } @@ -1953,9 +1977,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang #else // defined(ANGLE_USE_SSE) return false; #endif -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-06-11 00:43:54.961552623 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-07-01 03:36:35.406961915 +0200 @@ -81,7 +81,9 @@ #include #define ANGLE_USE_SSE @@ -1966,9 +1990,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang #define ANGLE_USE_SSE #endif -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-06-11 00:58:53.706120530 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-07-01 03:36:35.407961901 +0200 @@ -12,9 +12,17 @@ #include "common/platform.h" #include "image_util/imageformats.h" @@ -2065,9 +2089,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang +#endif + } // namespace angle -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-06-11 00:52:18.251030762 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-07-01 03:36:35.408961886 +0200 @@ -611,6 +611,32 @@ size_t outputRowPitch, size_t outputDepthPitch); @@ -2101,15 +2125,15 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ang } // namespace angle #include "loadimage.inl" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-06-11 00:59:45.318349164 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-07-01 03:36:35.408961886 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "loadimage.cpp" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-10 21:27:01.666198494 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-07-01 03:36:35.408961886 +0200 @@ -30,8 +30,8 @@ ] @@ -2137,9 +2161,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/qcm + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-06-08 23:59:48.897938821 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-07-01 03:36:35.556959728 +0200 @@ -31,7 +31,7 @@ #include "wtf/MathExtras.h" #include @@ -2176,9 +2200,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web if (fillToFrame > writeIndex) { const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); const __m128 vCurvePointsPerFrame = -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-06-09 00:10:04.104673129 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-07-01 03:36:35.673958021 +0200 @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2270,9 +2294,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web +#endif + } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-06-09 00:07:03.143398606 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-07-01 03:36:35.673958021 +0200 @@ -32,6 +32,7 @@ #include "platform/PlatformExport.h" #include "platform/audio/AudioArray.h" @@ -2296,15 +2320,15 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-06-08 22:50:07.966098783 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-07-01 03:36:35.673958021 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-06-09 00:12:04.250863595 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-07-01 03:36:35.674958007 +0200 @@ -26,15 +26,22 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -2382,9 +2406,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web // If the sourceP address is not 16-byte aligned, the first several // frames (at most three) should be processed seperately. while ((reinterpret_cast(inputP) & 0x0F) && n) { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-06-09 00:12:54.187111500 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-07-01 03:36:35.674958007 +0200 @@ -33,6 +33,7 @@ #include "platform/audio/AudioArray.h" #include "platform/audio/AudioSourceProvider.h" @@ -2407,15 +2431,15 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web }; } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-06-08 22:50:07.967098767 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-07-01 03:36:35.674958007 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-06-09 00:26:26.048970670 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-07-01 03:36:35.675957992 +0200 @@ -23,6 +23,9 @@ * DAMAGE. */ @@ -2625,9 +2649,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web #endif // OS(MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-06-09 00:27:58.975582370 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-07-01 03:36:35.675957992 +0200 @@ -27,6 +27,7 @@ #define VectorMath_h @@ -2699,15 +2723,15 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-06-08 22:50:07.969098737 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-07-01 03:36:35.675957992 +0200 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-12 00:21:47.738315411 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-07-01 03:36:35.676957977 +0200 @@ -1529,6 +1529,10 @@ deps += [ ":blink_x86_sse" ] } @@ -2746,9 +2770,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web # This source set is used for fuzzers that need an environment similar to unit # tests. -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-06-08 22:50:09.251079402 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-07-01 03:36:35.676957977 +0200 @@ -5,7 +5,7 @@ #ifndef WebGLImageConversionSSE_h #define WebGLImageConversionSSE_h @@ -2758,9 +2782,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web #include -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-06-09 00:33:14.375866479 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-07-01 03:36:35.677957963 +0200 @@ -441,7 +441,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2815,9 +2839,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/Web SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); #endif #if HAVE(MIPS_MSA_INTRINSICS) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-06-08 22:50:09.434076641 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-07-01 03:36:35.677957963 +0200 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_ooura.h" #include "webrtc/common_audio/real_fourier_openmax.h" @@ -2842,9 +2866,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/web #else return std::unique_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-06-12 14:15:23.270523710 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-07-01 03:36:35.762956723 +0200 @@ -117,7 +117,7 @@ include_dirs = [ "." ] @@ -2936,9 +2960,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/BUILD.gn qtw v8_component("v8") { sources = [ "src/v8dll-main.cc", -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/gni/v8.gni 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-06-12 14:15:47.965158851 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/gni/v8.gni 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-07-01 03:36:35.828955760 +0200 @@ -30,6 +30,9 @@ # Enable ECMAScript Internationalization API. Enabling this feature will # add a dependency on the ICU library. @@ -2961,9 +2985,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/gni/v8.gni q # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute # paths for all configs in templates as they are shared in different # subdirectories. -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 2017-06-08 22:50:09.496075706 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 2017-07-01 03:36:35.895954782 +0200 @@ -0,0 +1,56 @@ +#!/bin/sh +# This script renames the v8 targets to _sse2 names so that they do not conflict @@ -3021,9 +3045,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/make-v8-sse2 + -e "s/\.bin/_sse2.bin/g" \ + -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ + v8.gyp >>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-06-12 14:16:16.955730521 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-07-01 03:36:35.895954782 +0200 @@ -106,7 +106,7 @@ "/wd4996", # Deprecated function call. ] @@ -3033,9 +3057,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/src/inspecto defines = [ "BUILDING_V8_SHARED" ] } } -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-06-12 14:16:45.945302206 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn +--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-07-01 03:36:35.956953893 +0200 @@ -335,7 +335,7 @@ defines = [] @@ -3045,9 +3069,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/v8/test/cctest/ # cctest can't be built against a shared library, so we # need to depend on the underlying static target in that case. deps += [ "../..:v8_maybe_snapshot" ] -diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.9.0/src/core/core_module.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/core/core_module.pro 2017-06-12 00:25:07.241337485 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/core/core_module.pro qtwebengine-opensource-src-5.9.1-no-sse2/src/core/core_module.pro +--- qtwebengine-opensource-src-5.9.1/src/core/core_module.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/core/core_module.pro 2017-07-01 03:36:36.017953003 +0200 @@ -41,6 +41,31 @@ else: QMAKE_LFLAGS += $$NINJA_LFLAGS POST_TARGETDEPS += $$NINJA_TARGETDEPS @@ -3080,7 +3104,7 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine- LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge -@@ -100,7 +125,12 @@ +@@ -98,7 +123,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -3094,9 +3118,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/core/core_module.pro qtwebengine- !use?(system_icu) { icu.CONFIG += no_check_exist -diff -Nur qtwebengine-opensource-src-5.9.0/src/process/process.pro qtwebengine-opensource-src-5.9.0-no-sse2/src/process/process.pro ---- qtwebengine-opensource-src-5.9.0/src/process/process.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-sse2/src/process/process.pro 2017-06-12 16:36:03.823777310 +0200 +diff -Nur qtwebengine-opensource-src-5.9.1/src/process/process.pro qtwebengine-opensource-src-5.9.1-no-sse2/src/process/process.pro +--- qtwebengine-opensource-src-5.9.1/src/process/process.pro 2017-06-23 08:29:46.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.1-no-sse2/src/process/process.pro 2017-07-01 03:36:36.017953003 +0200 @@ -9,6 +9,8 @@ SOURCES = main.cpp From 6bd15796c1cd8920d0dcd1e13709e2b185d22d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 15:19:56 +0200 Subject: [PATCH 209/437] perl dependency renamed to perl-interpreter --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 858c4d9..4ab50b5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -186,7 +186,7 @@ BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) -BuildRequires: perl +BuildRequires: perl-interpreter BuildRequires: python %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.6.0 From 6ae3d219d0687ea5cc7cc19f94525d80fd75d33e Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 19 Jul 2017 14:10:35 -0500 Subject: [PATCH 210/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4ab50b5..458d11c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Wed Jul 19 2017 Rex Dieter - 5.9.1-2 +- rebuild (qt5) + * Sat Jul 01 2017 Kevin Kofler - 5.9.1-1 - Update to 5.9.1 - Rebase qtbug-61521 patch (drop the parts that are already in 5.9.1) From 583495c127c74ad3064f67c0df2904010f791305 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 12:46:18 +0000 Subject: [PATCH 211/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 458d11c..54f4b19 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 5.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed Jul 19 2017 Rex Dieter - 5.9.1-2 - rebuild (qt5) From 391e25bf2a208e9101e2b00b4e315c899b110085 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:22:19 +0000 Subject: [PATCH 212/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 54f4b19..8d48dd2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.1 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 5.9.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 5.9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 91e4b5c4b02e243d5e8e409cc37f763cae4f5379 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 9 Oct 2017 14:10:26 -0500 Subject: [PATCH 213/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8d48dd2..c011a83 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.1 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Mon Oct 09 2017 Rex Dieter - 5.9.1-5 +- rebuild (qt5) + * Thu Aug 03 2017 Fedora Release Engineering - 5.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 8d10a950e255b60e8e274c674e147cefdab955c5 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 10 Oct 2017 08:57:34 -0500 Subject: [PATCH 214/437] 5.9.2 --- .gitignore | 9 +- qt5-qtwebengine.spec | 18 +- qtwebengine-opensource-src-5.8.0-qt57.patch | 12 -- ...ine-opensource-src-5.9.0-arm-fpu-fix.patch | 9 - ...ine-opensource-src-5.9.1-qtbug-61521.patch | 160 ------------------ ...ngine-opensource-src-5.9.2-linux-pri.patch | 11 +- sources | 2 +- 7 files changed, 15 insertions(+), 206 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.8.0-qt57.patch delete mode 100644 qtwebengine-opensource-src-5.9.1-qtbug-61521.patch rename qtwebengine-opensource-src-5.9.0-linux-pri.patch => qtwebengine-opensource-src-5.9.2-linux-pri.patch (68%) diff --git a/.gitignore b/.gitignore index 01c15f0..7789fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,2 @@ -/qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz -/qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz -/qtwebengine-opensource-src-5.6.0-clean.tar.xz -/qtwebengine-opensource-src-5.6.1-clean.tar.xz -/qtwebengine-opensource-src-5.7.0-clean.tar.xz -/qtwebengine-opensource-src-5.7.1-clean.tar.xz -/qtwebengine-opensource-src-5.8.0-clean.tar.xz -/qtwebengine-opensource-src-5.9.0-clean.tar.xz /qtwebengine-opensource-src-5.9.1-clean.tar.xz +/qtwebengine-opensource-src-5.9.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c011a83..d1d2c8b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -55,8 +55,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.9.1 -Release: 5%{?dist} +Version: 5.9.2 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -74,7 +74,7 @@ Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine # some tweaks to linux.pri (system libs, link libpci, run unbundling script) -Patch0: qtwebengine-opensource-src-5.9.0-linux-pri.patch +Patch0: qtwebengine-opensource-src-5.9.2-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -111,15 +111,10 @@ Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch # webrtc: enable the CPU feature detection for ARM Linux also for Chromium Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch -# FTBFS using qt < 5.8 -Patch20: qtwebengine-opensource-src-5.8.0-qt57.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch # Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch -# Fix broken binary compatibility for C memory management functions (incomplete -# upstream fix for QTBUG-60565) (QTBUG-61521) -Patch23: qtwebengine-opensource-src-5.9.1-qtbug-61521.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -139,6 +134,8 @@ BuildRequires: qt5-qtlocation-devel BuildRequires: qt5-qtsensors-devel BuildRequires: qt5-qtwebchannel-devel BuildRequires: qt5-qttools-static +# for examples? +BuildRequires: qt5-qtquickcontrols2-devel BuildRequires: ninja-build BuildRequires: cmake BuildRequires: bison @@ -362,10 +359,8 @@ BuildArch: noarch %patch10 -p1 -b .openmax-dl-neon %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect -%patch20 -p1 -b .qt57 %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .system-re2 -%patch23 -p1 -b .qtbug-61521 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -572,6 +567,9 @@ done %changelog +* Tue Oct 10 2017 Rex Dieter - 5.9.2-1 +- 5.9.2 + * Mon Oct 09 2017 Rex Dieter - 5.9.1-5 - rebuild (qt5) diff --git a/qtwebengine-opensource-src-5.8.0-qt57.patch b/qtwebengine-opensource-src-5.8.0-qt57.patch deleted file mode 100644 index 480ae11..0000000 --- a/qtwebengine-opensource-src-5.8.0-qt57.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp ---- qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp.qt58 2017-01-03 04:35:11.000000000 -0600 -+++ qtwebengine-opensource-src-5.8.0/src/core/proxy_config_service_qt.cpp 2017-03-24 14:43:55.120363292 -0500 -@@ -109,7 +109,7 @@ net::ProxyConfigService::ConfigAvailabil - } - m_qtApplicationProxy = qtProxy; - m_qtProxyConfig = net::ProxyConfig(); --#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) -+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) - if (qtProxy.type() == QNetworkProxy::NoProxy - && QNetworkProxyFactory::usesSystemConfiguration()) { - *config = systemConfig; diff --git a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch index ca308d4..a475199 100644 --- a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch +++ b/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch @@ -1,15 +1,6 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri --- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 +++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-13 14:51:26.986633933 +0200 -@@ -41,7 +41,7 @@ - !isEmpty(TOOLCHAIN_SYSROOT): gn_args += target_sysroot=\"$${TOOLCHAIN_SYSROOT}\" - } - --contains(QT_ARCH, "arm"):!host_build { -+contains(QT_ARCH, "arm") { - # Extract ARM specific compiler options that we have to pass to gn, - # but let gn figure out a default if an option is not present. - MTUNE = $$extractCFlag("-mtune=.*") @@ -64,6 +64,7 @@ gn_args += arm_use_neon=true } else { diff --git a/qtwebengine-opensource-src-5.9.1-qtbug-61521.patch b/qtwebengine-opensource-src-5.9.1-qtbug-61521.patch deleted file mode 100644 index 82d3a14..0000000 --- a/qtwebengine-opensource-src-5.9.1-qtbug-61521.patch +++ /dev/null @@ -1,160 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/base/process/memory_linux.cc qtwebengine-opensource-src-5.9.1-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/base/process/memory_linux.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-qtbug-61521/src/3rdparty/chromium/base/process/memory_linux.cc 2017-07-01 01:20:35.113886332 +0200 -@@ -60,6 +60,7 @@ - #endif - void* __libc_memalign(size_t alignment, size_t size); - -+#if !defined(TOOLKIT_QT) //QTBUG-61521,QTBUG-60565 - // Overriding the system memory allocation functions: - // - // For security reasons, we want malloc failures to be fatal. Too much code -@@ -129,6 +130,7 @@ - *ptr = memalign(alignment, size); - return 0; - } -+#endif // TOOLKIT_QT - - } // extern C - -diff -ur qtwebengine-opensource-src-5.9.1/src/core/api/qtbug-60565.cpp qtwebengine-opensource-src-5.9.1-qtbug-61521/src/core/api/qtbug-60565.cpp ---- qtwebengine-opensource-src-5.9.1/src/core/api/qtbug-60565.cpp 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-qtbug-61521/src/core/api/qtbug-60565.cpp 2017-07-01 01:22:27.626242360 +0200 -@@ -39,6 +39,8 @@ - - #include - #include -+#include -+#include - - #if defined(__LP64__) - # define SIZE_T_MANGLING "m" -@@ -83,10 +85,51 @@ - void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept - SHIM_ALIAS_SYMBOL(ShimCppDeleteArray); - -+__asm__(".symver __ShimMalloc, malloc@Qt_5"); -+void* __ShimMalloc(size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimMalloc); -+ -+__asm__(".symver __ShimCalloc, calloc@Qt_5"); -+void* __ShimCalloc(size_t n, size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimCalloc); -+ -+__asm__(".symver __ShimRealloc, realloc@Qt_5"); -+void* __ShimRealloc(void* address, size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimRealloc); -+ -+__asm__(".symver __ShimMemalign, memalign@Qt_5"); -+void* __ShimMemalign(size_t alignment, size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimMemalign); -+ -+__asm__(".symver __ShimPosixMemalign, posix_memalign@Qt_5"); -+int __ShimPosixMemalign(void** res, size_t alignment, size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimPosixMemalign); -+ -+__asm__(".symver __ShimValloc, valloc@Qt_5"); -+void* __ShimValloc(size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimValloc); -+ -+__asm__(".symver __ShimPvalloc, pvalloc@Qt_5"); -+void* __ShimPvalloc(size_t size) noexcept -+ SHIM_ALIAS_SYMBOL(ShimPvalloc); -+ -+__asm__(".symver __ShimFree, free@Qt_5"); -+void __ShimFree(void* address) noexcept -+ SHIM_ALIAS_SYMBOL(ShimFree); -+ - static void* __shimCppNew(size_t size); - static void* __shimCppNewArray(size_t size); - static void __shimCppDelete(void *address); - static void __shimCppDeleteArray(void *address); -+static void* __shimMalloc(size_t size) noexcept; -+static void* __shimCalloc(size_t n, size_t size) noexcept; -+static void* __shimRealloc(void* address, size_t size) noexcept; -+static void* __shimMemalign(size_t alignment, size_t size) noexcept; -+static int __shimPosixMemalign(void** res, size_t alignment, size_t size) -+ noexcept; -+static void* __shimValloc(size_t size) noexcept; -+static void* __shimPvalloc(size_t size) noexcept; -+static void __shimFree(void* address) noexcept; - - SHIM_HIDDEN void* ShimCppNew(size_t size) { - return __shimCppNew(size); -@@ -103,6 +146,39 @@ - SHIM_HIDDEN void ShimCppDeleteArray(void* address) { - __shimCppDeleteArray(address); - } -+ -+SHIM_HIDDEN void* ShimMalloc(size_t size) noexcept { -+ return __shimMalloc(size); -+} -+ -+SHIM_HIDDEN void* ShimCalloc(size_t n, size_t size) noexcept { -+ return __shimCalloc(n, size); -+} -+ -+SHIM_HIDDEN void* ShimRealloc(void* address, size_t size) noexcept { -+ return __shimRealloc(address, size); -+} -+ -+SHIM_HIDDEN void* ShimMemalign(size_t alignment, size_t size) noexcept { -+ return __shimMemalign(alignment, size); -+} -+ -+SHIM_HIDDEN int ShimPosixMemalign(void** res, size_t alignment, size_t size) -+ noexcept { -+ return __shimPosixMemalign(res, alignment, size); -+} -+ -+SHIM_HIDDEN void* ShimValloc(size_t size) noexcept { -+ return __shimValloc(size); -+} -+ -+SHIM_HIDDEN void* ShimPvalloc(size_t size) noexcept { -+ return __shimPvalloc(size); -+} -+ -+SHIM_HIDDEN void ShimFree(void* address) noexcept { -+ __shimFree(address); -+} - } // extern "C" - - static void* __shimCppNew(size_t size) { -@@ -120,3 +196,36 @@ - static void __shimCppDeleteArray(void* address) { - operator delete[](address); - } -+ -+static void* __shimMalloc(size_t size) noexcept { -+ return malloc(size); -+} -+ -+static void* __shimCalloc(size_t n, size_t size) noexcept { -+ return calloc(n, size); -+} -+ -+static void* __shimRealloc(void* address, size_t size) noexcept { -+ return realloc(address, size); -+} -+ -+static void* __shimMemalign(size_t alignment, size_t size) noexcept { -+ return memalign(alignment, size); -+} -+ -+static int __shimPosixMemalign(void** res, size_t alignment, size_t size) -+ noexcept { -+ return posix_memalign(res, alignment, size); -+} -+ -+static void* __shimValloc(size_t size) noexcept { -+ return valloc(size); -+} -+ -+static void* __shimPvalloc(size_t size) noexcept { -+ return pvalloc(size); -+} -+ -+static void __shimFree(void* address) noexcept { -+ free(address); -+} diff --git a/qtwebengine-opensource-src-5.9.0-linux-pri.patch b/qtwebengine-opensource-src-5.9.2-linux-pri.patch similarity index 68% rename from qtwebengine-opensource-src-5.9.0-linux-pri.patch rename to qtwebengine-opensource-src-5.9.2-linux-pri.patch index c671f6b..564bdbe 100644 --- a/qtwebengine-opensource-src-5.9.0-linux-pri.patch +++ b/qtwebengine-opensource-src-5.9.2-linux-pri.patch @@ -1,11 +1,10 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-linux-pri/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-linux-pri/src/core/config/linux.pri 2017-06-08 00:20:53.688419747 +0200 -@@ -148,3 +148,22 @@ - use?(system_ffmpeg): gn_args += use_system_ffmpeg=true +diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri 2017-10-09 15:08:43.206663093 -0500 ++++ qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri 2017-10-09 15:09:52.248208321 -0500 +@@ -153,3 +153,21 @@ host_build { + use?(system_re2): gn_args += use_system_re2=true #use?(system_protobuf): gn_args += use_system_protobuf=true } -+ +# some more system packages, that are not checked for for some reason +gn_args += use_system_re2=true + diff --git a/sources b/sources index 979b865..aa0eaf2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.1-clean.tar.xz) = 86bbfe50d557b82df3b3598a43340b5fa913d01df0a8c7cd43ae8d36eed59e6deca633e42f8813c1074b3bbc5ac21179571f2ef9fd125838875bddd92faca36c +SHA512 (qtwebengine-opensource-src-5.9.2-clean.tar.xz) = d4919a4475101175c37455949b9e9dc8cdfb18243ff2fe3320e3c14c685523cc46a3e5fac4c01b40a090ad1f0f9458bf3fc15a86b7fcdd9b43f1c76b090dc9cf From 712fc44244e6775ea1feddf306b5885d66f4623e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 10 Oct 2017 19:06:31 +0200 Subject: [PATCH 215/437] Fix .gitignore Also sync it with the f24 branch. --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 7789fc7..c34c8f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,12 @@ +/qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz +/qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz +/qtwebengine-opensource-src-5.6.0-clean.tar.xz +/qtwebengine-opensource-src-5.6.1-clean.tar.xz +/qtwebengine-opensource-src-5.6.2-clean.tar.xz +/qtwebengine-opensource-src-5.6.3-ee719ad313e564d4e6f06d74b313ae179169466f-clean.tar.xz +/qtwebengine-opensource-src-5.7.0-clean.tar.xz +/qtwebengine-opensource-src-5.7.1-clean.tar.xz +/qtwebengine-opensource-src-5.8.0-clean.tar.xz +/qtwebengine-opensource-src-5.9.0-clean.tar.xz /qtwebengine-opensource-src-5.9.1-clean.tar.xz /qtwebengine-opensource-src-5.9.2-clean.tar.xz From b729fd5578a16098fcc3c3081e3b15c4746d87c7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 10 Oct 2017 19:08:56 +0200 Subject: [PATCH 216/437] Document rebased/dropped patches --- qt5-qtwebengine.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d1d2c8b..0daa7a9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -569,6 +569,8 @@ done %changelog * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 - 5.9.2 +- Rebase linux-pri patch +- Drop qt57 and qtbug-61521 patches (fixed upstream) * Mon Oct 09 2017 Rex Dieter - 5.9.1-5 - rebuild (qt5) From b81e4c0ba70b434340c06ea7da56d8375ed439ee Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 14 Oct 2017 22:53:08 +0200 Subject: [PATCH 217/437] Use QtWebEngine upstream system re2 support (new in 5.9.2) * Sat Oct 14 2017 Kevin Kofler - 5.9.2-2 - Do not call the Chromium unbundling script on re2, QtWebEngine now auto-detects and uses the system re2 out of the box - Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the QtWebEngine re2/BUILD.gn is already correct --- qt5-qtwebengine.spec | 14 +++++++---- ...gine-opensource-src-5.9.0-system-re2.patch | 24 ------------------- ...ngine-opensource-src-5.9.2-linux-pri.patch | 6 ++--- 3 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.9.0-system-re2.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0daa7a9..a301d16 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -73,7 +73,7 @@ Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine -# some tweaks to linux.pri (system libs, link libpci, run unbundling script) +# some tweaks to linux.pri (system yasm, link libpci, run unbundling script) Patch0: qtwebengine-opensource-src-5.9.2-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback @@ -113,8 +113,6 @@ Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch -# Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn -Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -567,10 +565,16 @@ done %changelog +* Sat Oct 14 2017 Kevin Kofler - 5.9.2-2 +- Do not call the Chromium unbundling script on re2, QtWebEngine now + auto-detects and uses the system re2 out of the box +- Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the + QtWebEngine re2/BUILD.gn is already correct + * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 - 5.9.2 - Rebase linux-pri patch -- Drop qt57 and qtbug-61521 patches (fixed upstream) +- Drop qt57 and qtbug-61521 patches, fixed upstream * Mon Oct 09 2017 Rex Dieter - 5.9.1-5 - rebuild (qt5) diff --git a/qtwebengine-opensource-src-5.9.0-system-re2.patch b/qtwebengine-opensource-src-5.9.0-system-re2.patch deleted file mode 100644 index ac7bf5d..0000000 --- a/qtwebengine-opensource-src-5.9.0-system-re2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-06-10 23:22:13.065385884 +0200 -@@ -5,13 +5,14 @@ - import("//build/shim_headers.gni") - - shim_headers("re2_shim") { -- root_path = "src" -+ root_path = "src/re2" -+ prefix = "re2/" - headers = [ -- "re2/filtered_re2.h", -- "re2/re2.h", -- "re2/set.h", -- "re2/stringpiece.h", -- "re2/variadic_function.h", -+ "filtered_re2.h", -+ "re2.h", -+ "set.h", -+ "stringpiece.h", -+ "variadic_function.h", - ] - } - diff --git a/qtwebengine-opensource-src-5.9.2-linux-pri.patch b/qtwebengine-opensource-src-5.9.2-linux-pri.patch index 564bdbe..ac7b583 100644 --- a/qtwebengine-opensource-src-5.9.2-linux-pri.patch +++ b/qtwebengine-opensource-src-5.9.2-linux-pri.patch @@ -1,12 +1,10 @@ diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri --- qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri 2017-10-09 15:08:43.206663093 -0500 +++ qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri 2017-10-09 15:09:52.248208321 -0500 -@@ -153,3 +153,21 @@ host_build { +@@ -153,3 +153,19 @@ host_build { use?(system_re2): gn_args += use_system_re2=true #use?(system_protobuf): gn_args += use_system_protobuf=true } -+# some more system packages, that are not checked for for some reason -+gn_args += use_system_re2=true + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on +# other architectures (e.g., ARM), so make it conditional on the architecture @@ -20,6 +18,6 @@ diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qt +# run the unbundling script Chromium provides +CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" +R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" -+R_G_F_PY_ARGS = "--system-libraries re2 yasm" ++R_G_F_PY_ARGS = "--system-libraries yasm" +log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") +!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") From 8895dc445aab6f9ca99427f2232cb2328b5c4dc7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 14 Oct 2017 22:55:06 +0200 Subject: [PATCH 218/437] Remove the patch line for the patch I dropped --- qt5-qtwebengine.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a301d16..78c8989 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -358,7 +358,6 @@ BuildArch: noarch %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose -%patch22 -p1 -b .system-re2 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc From cd95d3668e67743ac6b771f4132219077886d295 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 15 Oct 2017 01:02:49 +0200 Subject: [PATCH 219/437] Document BuildRequires added in 5.9.2-1 --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 78c8989..afd4c56 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -572,6 +572,7 @@ done * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 - 5.9.2 +- Add BuildRequires: qt5-qtquickcontrols2-devel for the examples - Rebase linux-pri patch - Drop qt57 and qtbug-61521 patches, fixed upstream From 2e960e1561425c81a27a6068fcc2ae4f27127e4d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 15 Oct 2017 01:14:16 +0200 Subject: [PATCH 220/437] Document the arm-fpu-fix rebase in 5.9.2-1 - arm-fpu-fix patch: Drop the host tools hunk added in 5.9.0-2, fixed upstream Also rename the patch file from qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch to qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch because the patch was rebased. Otherwise, it is easy to miss that the patch was rebased. (I did, I only noticed it now while working on the RPM Fusion package. And I might easily have missed it again and run into a build failure due to that.) --- qt5-qtwebengine.spec | 3 ++- ...patch => qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch => qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch (100%) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index afd4c56..052c342 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -102,7 +102,7 @@ Patch5: qtwebengine-opensource-src-5.9.0-system-icu-utf.patch # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-opensource-src-5.9.1-no-sse2.patch # fix missing ARM -mfpu setting -Patch9: qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch +Patch9: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # restore NEON runtime detection in Skia: revert upstream review 1952953004, @@ -575,6 +575,7 @@ done - Add BuildRequires: qt5-qtquickcontrols2-devel for the examples - Rebase linux-pri patch - Drop qt57 and qtbug-61521 patches, fixed upstream +- arm-fpu-fix patch: Drop the host tools hunk added in 5.9.0-2, fixed upstream * Mon Oct 09 2017 Rex Dieter - 5.9.1-5 - rebuild (qt5) diff --git a/qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch similarity index 100% rename from qtwebengine-opensource-src-5.9.0-arm-fpu-fix.patch rename to qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch From 0dc8bcd4c8cbaa1ac5a35748fc64015f80eca98a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 15 Oct 2017 01:31:01 +0200 Subject: [PATCH 221/437] Improve my changelog entry --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 052c342..1e480b9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -565,8 +565,8 @@ done %changelog * Sat Oct 14 2017 Kevin Kofler - 5.9.2-2 -- Do not call the Chromium unbundling script on re2, QtWebEngine now - auto-detects and uses the system re2 out of the box +- linux-pri patch: Do not call the Chromium unbundling script on re2, + QtWebEngine now auto-detects and uses the system re2 out of the box - Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the QtWebEngine re2/BUILD.gn is already correct From 7ed2bc94f3e91e32e13a8af8cce7a343c8d4d8ae Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 15 Oct 2017 01:32:19 +0200 Subject: [PATCH 222/437] Use consistent wording for the version bump in the changelog --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1e480b9..6b8c433 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -571,7 +571,7 @@ done QtWebEngine re2/BUILD.gn is already correct * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 -- 5.9.2 +- Update to 5.9.2 - Add BuildRequires: qt5-qtquickcontrols2-devel for the examples - Rebase linux-pri patch - Drop qt57 and qtbug-61521 patches, fixed upstream From 251726037de590ba2c11e96864dc013eafd02afe Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 16 Nov 2017 14:25:54 +0100 Subject: [PATCH 223/437] Explicitly force use_system_re2, the autodetection does not work on F25 --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6b8c433..f4a06d2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -407,7 +407,7 @@ mkdir %{_target_platform} pushd %{_target_platform} %{qmake_qt5} CONFIG+="%{debug_config}" \ - WEBENGINE_CONFIG+="use_system_icu use_spellchecker" .. + WEBENGINE_CONFIG+="use_system_icu use_system_re2 use_spellchecker" .. make %{?_smp_mflags} @@ -569,6 +569,7 @@ done QtWebEngine now auto-detects and uses the system re2 out of the box - Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the QtWebEngine re2/BUILD.gn is already correct +- Explicitly force use_system_re2, the autodetection does not work on F25 * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 - Update to 5.9.2 From 3f932e1ad9495068f96694e663b3d9e982c7806d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 16 Nov 2017 17:20:50 +0100 Subject: [PATCH 224/437] Fix FTBFS with Qt 5.7 --- qt5-qtwebengine.spec | 4 ++++ qtwebengine-opensource-src-5.9.2-qt57.patch | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 qtwebengine-opensource-src-5.9.2-qt57.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f4a06d2..347af18 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -113,6 +113,8 @@ Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch +# Fix FTBFS with Qt 5.7 +Patch22: qtwebengine-opensource-src-5.9.2-qt57.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -358,6 +360,7 @@ BuildArch: noarch %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose +%patch22 -p1 -b .qt57 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -570,6 +573,7 @@ done - Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the QtWebEngine re2/BUILD.gn is already correct - Explicitly force use_system_re2, the autodetection does not work on F25 +- Fix FTBFS with Qt 5.7 * Tue Oct 10 2017 Rex Dieter - 5.9.2-1 - Update to 5.9.2 diff --git a/qtwebengine-opensource-src-5.9.2-qt57.patch b/qtwebengine-opensource-src-5.9.2-qt57.patch new file mode 100644 index 0000000..1c10e4b --- /dev/null +++ b/qtwebengine-opensource-src-5.9.2-qt57.patch @@ -0,0 +1,19 @@ +diff -ur qtwebengine-opensource-src-5.9.2/src/core/web_contents_adapter.cpp qtwebengine-opensource-src-5.9.2-qt57/src/core/web_contents_adapter.cpp +--- qtwebengine-opensource-src-5.9.2/src/core/web_contents_adapter.cpp 2017-10-03 11:06:38.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.2-qt57/src/core/web_contents_adapter.cpp 2017-11-16 17:17:51.072511997 +0100 +@@ -1265,7 +1265,15 @@ + } + + const QString &fileName = toQt(dropData.file_description_filename); ++#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) + const QString &filePath = d->dndTmpDir->filePath(fileName); ++#else ++ QString filePath = d->dndTmpDir->path(); ++ if (!filePath.isEmpty()) { ++ filePath += QLatin1Char('/'); ++ filePath += fileName; ++ } ++#endif + QFile file(filePath); + if (!file.open(QIODevice::WriteOnly)) { + qWarning("Cannot write temporary file %s.", qUtf8Printable(filePath)); From 6ff058747a42bd4536d170da25c3f69a22a77346 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 26 Nov 2017 08:09:01 -0600 Subject: [PATCH 225/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 347af18..1401b3e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.2 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -567,6 +567,9 @@ done %changelog +* Sun Nov 26 2017 Rex Dieter - 5.9.2-3 +- rebuild (qt5) + * Sat Oct 14 2017 Kevin Kofler - 5.9.2-2 - linux-pri patch: Do not call the Chromium unbundling script on re2, QtWebEngine now auto-detects and uses the system re2 out of the box From 8dfb6c148688cdcb0dc7e7294b1f8fe3764b89e9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 26 Nov 2017 18:25:54 +0100 Subject: [PATCH 226/437] Update to 5.9.3 * Sun Nov 26 2017 Kevin Kofler - 5.9.3-1 - Update to 5.9.3 --- .gitignore | 1 + qt5-qtwebengine.spec | 15 +++++++++------ sources | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index c34c8f3..f48d43c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /qtwebengine-opensource-src-5.9.0-clean.tar.xz /qtwebengine-opensource-src-5.9.1-clean.tar.xz /qtwebengine-opensource-src-5.9.2-clean.tar.xz +/qtwebengine-opensource-src-5.9.3-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1401b3e..4f6396a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -55,8 +55,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.9.2 -Release: 3%{?dist} +Version: 5.9.3 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -64,8 +64,8 @@ Release: 3%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtwebengine-opensource-src-5.9.1.tar.xz -# ./clean_qtwebengine.sh 5.9.1 +# wget http://download.qt.io/official_releases/qt/5.9/5.9.3/submodules/qtwebengine-opensource-src-5.9.3.tar.xz +# ./clean_qtwebengine.sh 5.9.3 Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -206,9 +206,9 @@ BuildRequires: pkgconfig(vpx) >= 1.6.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 59.0.3071.104) are backported, see: +# Some security fixes (up to version 62.0.3202.89) are backported, see: # http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=56-based -# see dist/changes-5.9.1 for the version numbers (base, security fixes) and for +# see dist/changes-5.9.3 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports Provides: bundled(chromium) = 56.0.2924.122 @@ -567,6 +567,9 @@ done %changelog +* Sun Nov 26 2017 Kevin Kofler - 5.9.3-1 +- Update to 5.9.3 + * Sun Nov 26 2017 Rex Dieter - 5.9.2-3 - rebuild (qt5) diff --git a/sources b/sources index aa0eaf2..61b00bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.2-clean.tar.xz) = d4919a4475101175c37455949b9e9dc8cdfb18243ff2fe3320e3c14c685523cc46a3e5fac4c01b40a090ad1f0f9458bf3fc15a86b7fcdd9b43f1c76b090dc9cf +SHA512 (qtwebengine-opensource-src-5.9.3-clean.tar.xz) = fb1c6af02d7cbeef41da5cbe7e56861de3342a538940a997753fae204bdd5386d66b1385fc8450b6a4989e6e2b67e8c4f063e8192181cdc02ff64e0d48dde97e From 554118fe21670ecb621bf3d6350d3d1ba61089a9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 28 Nov 2017 16:51:55 +0100 Subject: [PATCH 227/437] Enable docs on F27 --- qt5-qtwebengine.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4f6396a..8cc536b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -5,8 +5,8 @@ # define to build docs, need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available -# disable on f27+ or where Qt-5.9 is present (for now) -%if 0%{?fedora} < 27 +# disable on Rawhide for now +%if 0%{?fedora} < 28 %global docs 1 %endif @@ -569,6 +569,7 @@ done %changelog * Sun Nov 26 2017 Kevin Kofler - 5.9.3-1 - Update to 5.9.3 +- Enable docs on F27 * Sun Nov 26 2017 Rex Dieter - 5.9.2-3 - rebuild (qt5) From 5ebf676d5a15997bc3c60554525d9122393d3e31 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Thu, 30 Nov 2017 20:45:48 +0000 Subject: [PATCH 228/437] Rebuild for ICU 60.1 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8cc536b..8e7d5a2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.3 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -567,6 +567,9 @@ done %changelog +* Thu Nov 30 2017 Pete Walter - 5.9.3-2 +- Rebuild for ICU 60.1 + * Sun Nov 26 2017 Kevin Kofler - 5.9.3-1 - Update to 5.9.3 - Enable docs on F27 From 210c122c323a13864d8f5e4832f7094dd9fe389c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 2 Dec 2017 03:22:28 +0100 Subject: [PATCH 229/437] Drop support for Unicode "aspirational scripts", fixes #error with ICU >= 60 * Sat Dec 02 2017 Kevin Kofler - 5.9.3-3 - Drop support for Unicode "aspirational scripts", fixes #error with ICU >= 60 --- qt5-qtwebengine.spec | 12 ++- ...ce-src-5.9.3-no-aspirational-scripts.patch | 77 +++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8e7d5a2..a029376 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.3 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -115,6 +115,12 @@ Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch # Fix FTBFS with Qt 5.7 Patch22: qtwebengine-opensource-src-5.9.2-qt57.patch +# drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), +# fixes #error with ICU >= 60 (which was a reminder to double-check the list) +# see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts +# backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 +# For 5.10, refetch the patch instead of forward-porting the backport. +Patch100: qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch %if 0%{?fedora} && 0%{?fedora} < 25 # work around missing qt5_qtwebengine_arches macro on F24 @@ -361,6 +367,7 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .qt57 +%patch100 -p1 -b .no-aspirational-scripts # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -567,6 +574,9 @@ done %changelog +* Sat Dec 02 2017 Kevin Kofler - 5.9.3-3 +- Drop support for Unicode "aspirational scripts", fixes #error with ICU >= 60 + * Thu Nov 30 2017 Pete Walter - 5.9.3-2 - Rebuild for ICU 60.1 diff --git a/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch b/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch new file mode 100644 index 0000000..695b25f --- /dev/null +++ b/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch @@ -0,0 +1,77 @@ +diff -ur qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter.cc qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter.cc +--- qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-11-08 20:13:31.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-12-02 03:07:07.447476275 +0100 +@@ -478,39 +478,6 @@ + const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status); + allowed_set.addAll(*inclusion_set); + +- // Five aspirational scripts are taken from UTR 31 Table 6 at +- // http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . +- // Not all the characters of aspirational scripts are suitable for +- // identifiers. Therefore, only characters belonging to +- // [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational' +- // section at +- // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are +- // are added to the allowed set. The list has to be updated when a new +- // version of Unicode is released. The current version is 9.0.0 and ICU 60 +- // will have Unicode 10.0 data. +-#if U_ICU_VERSION_MAJOR_NUM < 60 +- const icu::UnicodeSet aspirational_scripts( +- icu::UnicodeString( +- // Unified Canadian Syllabics +- "[\\u1401-\\u166C\\u166F-\\u167F" +- // Mongolian +- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA" +- // Unified Canadian Syllabics +- "\\u18B0-\\u18F5" +- // Tifinagh +- "\\u2D30-\\u2D67\\u2D7F" +- // Yi +- "\\uA000-\\uA48C" +- // Miao +- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E" +- "\\U00016F8F-\\U00016F9F]", +- -1, US_INV), +- *status); +- allowed_set.addAll(aspirational_scripts); +-#else +-#error "Update aspirational_scripts per Unicode 10.0" +-#endif +- + // U+0338 is included in the recommended set, while U+05F4 and U+2027 are in + // the inclusion set. However, they are blacklisted as a part of Mozilla's + // IDN blacklist (http://kb.mozillazine.org/Network.IDN.blacklist_chars). +diff -ur qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc +--- qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-11-08 20:13:31.000000000 +0100 ++++ qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-12-02 03:08:51.073912562 +0100 +@@ -102,22 +102,24 @@ + {"xn---123-kbjl2j0bl2k.in", + L"\x0939\x093f\x0928\x094d\x0926\x0940-123.in", true}, + +- // 5 Aspirational scripts ++ // What used to be 5 Aspirational scripts in the earlier versions of UAX 31. ++ // UAX 31 does not define aspirational scripts any more. ++ // See http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . + // Unifieid Canadian Syllabary +- {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", true}, ++ {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", false}, + // Tifinagh + {"xn--4ljxa2bb4a6bxb.ma", +- L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", true}, ++ L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", false}, + // Tifinagh with a disallowed character(U+2D6F) + {"xn--hmjzaby5d5f.ma", L"\x2d5c\x2d49\x2d3c\x2d6f\x2d49\x2d4f.ma", false}, + // Yi +- {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", true}, ++ {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", false}, + // Mongolian - 'ordu' (place, camp) +- {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", true}, ++ {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", false}, + // Mongolian with a disallowed character + {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, + // Miao/Pollad +- {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, ++ {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", false}, + + // Script mixing tests + // The following script combinations are allowed. From e763640d1de12debb34c7a166cd63b5c9a4923fe Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 14 Dec 2017 13:44:55 -0600 Subject: [PATCH 230/437] adjust Qt5WebEngineCoreConfig.cmake unconditionally --- qt5-qtwebengine.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a029376..65674ba 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.3 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -466,11 +466,9 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it -# only if older... (I suppose what we really want is the lesser of %%version, %%_qt5_version) -%if 0%{?fedora} < 27 +# otherwise, it assumes Qt5 is at least %%version sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake -%endif %post -p /sbin/ldconfig @@ -574,6 +572,9 @@ done %changelog +* Thu Dec 14 2017 Rex Dieter - 5.9.3-4 +- adjust Qt5WebEngineCoreConfig.cmake unconditionally + * Sat Dec 02 2017 Kevin Kofler - 5.9.3-3 - Drop support for Unicode "aspirational scripts", fixes #error with ICU >= 60 From 836b2d87c63241c9950a2d3fe1f55a5a64b95b9a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 15 Dec 2017 08:56:17 -0600 Subject: [PATCH 231/437] use the lesser of %%version and %%_qt5_version using 'sort -V' --- qt5-qtwebengine.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 65674ba..f6670ac 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -466,8 +466,9 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it -# otherwise, it assumes Qt5 is at least %%version -sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ +# using the lesser of %%version, %%_qt5_version +%global lesser_version $(echo -e "%{version}\n%{_qt5_version}" | sort -V | head -1) +sed -i -e "s|%{lesser_version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake From ae3c93c389069ac7dc3e747786fb46772f6e2285 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 15 Dec 2017 10:40:00 -0600 Subject: [PATCH 232/437] fix logic error replace version by lesser_version instead --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f6670ac..77c028e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -468,7 +468,7 @@ mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it # using the lesser of %%version, %%_qt5_version %global lesser_version $(echo -e "%{version}\n%{_qt5_version}" | sort -V | head -1) -sed -i -e "s|%{lesser_version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ +sed -i -e "s|%{version} \${_Qt5WebEngine|%{lesser_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake From 27c3f14dafbf4ee3d3e9677a2d1129f9c6ef498e Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 19 Dec 2017 08:34:41 -0600 Subject: [PATCH 233/437] properly escape newline in lesser_version hack --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 77c028e..fe97339 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.9.3 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -467,7 +467,7 @@ mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it # using the lesser of %%version, %%_qt5_version -%global lesser_version $(echo -e "%{version}\n%{_qt5_version}" | sort -V | head -1) +%global lesser_version $(echo -e "%{version}\\n%{_qt5_version}" | sort -V | head -1) sed -i -e "s|%{version} \${_Qt5WebEngine|%{lesser_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake @@ -573,6 +573,9 @@ done %changelog +* Tue Dec 19 2017 Rex Dieter - 5.9.3-5 +- properly escape newline in lesser_version hack + * Thu Dec 14 2017 Rex Dieter - 5.9.3-4 - adjust Qt5WebEngineCoreConfig.cmake unconditionally From bd1324398d0928ef88e8191abd840a8937bc92df Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 25 Dec 2017 19:51:57 +0100 Subject: [PATCH 234/437] Update to 5.10.0 * Mon Dec 25 2017 Kevin Kofler - 5.10.0-1 - Update to 5.10.0 - Update version numbers of bundled stuff - Drop support for Fedora < 26 (in particular, WEBENGINE_CONFIG F25 workarounds) - Drop qt57 patch, support for Qt 5.7 was completely dropped upstream - Update get_free_ffmpeg_source_files.py from Fedora Chromium packaging - clean_qtwebengine.sh: Update for the changed tarball naming scheme - Use QMAKE_EXTRA_ARGS instead of the removed WEBENGINE_CONFIG - Rebase linux-pri, system-nspr-prtime, system-icu-utf, no-sse2, skia-neon and gn-bootstrap-verbose patches - In particular, restore the removed V8 x87 backend in the no-sse2 patch - Re-backport no-aspirational-scripts from upstream (undo 5.9 backport) --- .gitignore | 1 + clean_qtwebengine.sh | 6 +- get_free_ffmpeg_source_files.py | 6 +- qt5-qtwebengine.spec | 98 +- ...here-src-5.10.0-gn-bootstrap-verbose.patch | 12 + ...gine-everywhere-src-5.10.0-linux-pri.patch | 12 +- ...e-src-5.10.0-no-aspirational-scripts.patch | 86 + ...engine-everywhere-src-5.10.0-no-sse2.patch | 30353 ++++++++++++++++ ...gine-everywhere-src-5.10.0-skia-neon.patch | 163 +- ...everywhere-src-5.10.0-system-icu-utf.patch | 204 +- ...ywhere-src-5.10.0-system-nspr-prtime.patch | 80 + ...ource-src-5.9.0-gn-bootstrap-verbose.patch | 12 - ...nsource-src-5.9.0-system-nspr-prtime.patch | 80 - ...bengine-opensource-src-5.9.1-no-sse2.patch | 3132 -- qtwebengine-opensource-src-5.9.2-qt57.patch | 19 - ...ce-src-5.9.3-no-aspirational-scripts.patch | 77 - sources | 2 +- 17 files changed, 30799 insertions(+), 3544 deletions(-) create mode 100644 qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch rename qtwebengine-opensource-src-5.9.2-linux-pri.patch => qtwebengine-everywhere-src-5.10.0-linux-pri.patch (58%) create mode 100644 qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch create mode 100644 qtwebengine-everywhere-src-5.10.0-no-sse2.patch rename qtwebengine-opensource-src-5.9.0-skia-neon.patch => qtwebengine-everywhere-src-5.10.0-skia-neon.patch (62%) rename qtwebengine-opensource-src-5.9.0-system-icu-utf.patch => qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch (51%) create mode 100644 qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-opensource-src-5.9.1-no-sse2.patch delete mode 100644 qtwebengine-opensource-src-5.9.2-qt57.patch delete mode 100644 qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch diff --git a/.gitignore b/.gitignore index f48d43c..35206c6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /qtwebengine-opensource-src-5.9.1-clean.tar.xz /qtwebengine-opensource-src-5.9.2-clean.tar.xz /qtwebengine-opensource-src-5.9.3-clean.tar.xz +/qtwebengine-everywhere-src-5.10.0-clean.tar.xz diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index 084a619..cc3fe6a 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015-2016 Kevin Kofler +# Copyright 2015-2017 Kevin Kofler # 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 @@ -21,11 +21,11 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.7.0" + echo "e.g.: ./clean_qtwebengine.sh 5.10.0" exit 1 fi -DIRNAME="qtwebengine-opensource-src-$1" +DIRNAME="qtwebengine-everywhere-src-$1" echo "removing $DIRNAME" rm -rf "$DIRNAME" || exit $? diff --git a/get_free_ffmpeg_source_files.py b/get_free_ffmpeg_source_files.py index 5a0e421..76c73ae 100755 --- a/get_free_ffmpeg_source_files.py +++ b/get_free_ffmpeg_source_files.py @@ -60,7 +60,7 @@ def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): if inserted: break limitations = ['ffmpeg_branding == "Chrome"', 'ffmpeg_branding == "ChromeOS"'] - if ('is_linux' in condition) and not any(limitation in condition for limitation in limitations): + if ('use_linux_config' in condition) and not any(limitation in condition for limitation in limitations): if (arch_not_arm): if ('x64' in condition) or ('x86' in condition): parse_sources (block[1], output_sources, arch_not_arm) @@ -69,6 +69,10 @@ def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): parse_sources (block[1], output_sources, arch_not_arm) inserted = True + if len(output_sources) == 0: + sys.stderr.write("Something went wrong, no sources parsed!\n") + sys.exit(1) + print ' '.join(output_sources) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fe97339..05ca77d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,14 +10,10 @@ %global docs 1 %endif -%if 0%{?fedora} > 24 # need libvpx >= 1.6.0 %global use_system_libvpx 1 -%endif -%if 0%{?fedora} > 23 -# need libwebp >= 0.5.1 +# need libwebp >= 0.6.0 %global use_system_libwebp 1 -%endif # NEON support on ARM (detected at runtime) - disable this if you are hitting # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 @@ -55,8 +51,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.9.3 -Release: 5%{?dist} +Version: 5.10.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -64,9 +60,9 @@ Release: 5%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.9/5.9.3/submodules/qtwebengine-opensource-src-5.9.3.tar.xz -# ./clean_qtwebengine.sh 5.9.3 -Source0: qtwebengine-opensource-src-%{version}-clean.tar.xz +# wget http://download.qt.io/official_releases/qt/5.10/5.10.0/submodules/qtwebengine-everywhere-src-5.10.0.tar.xz +# ./clean_qtwebengine.sh 5.10.0 +Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh Source2: clean_ffmpeg.sh @@ -74,7 +70,7 @@ Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine # some tweaks to linux.pri (system yasm, link libpci, run unbundling script) -Patch0: qtwebengine-opensource-src-5.9.2-linux-pri.patch +Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -89,18 +85,18 @@ Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch # use the system NSPR prtime (based on Debian patch) # We already depend on NSPR, so it is useless to copy these functions here. # Debian uses this just fine, and I don't see relevant modifications either. -Patch4: qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +Patch4: qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch # use the system ICU UTF functions # We already depend on ICU, so it is useless to copy these functions here. # I checked the history of that directory, and other than the renames I am # undoing, there were no modifications at all. Must be applied after Patch4. -Patch5: qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +Patch5: qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch # do not require SSE2 on i686 # cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts -# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along -# with some custom fixes and improvements +# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, and V8 +# Gerrit review 575756, along with some custom fixes and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch6: qtwebengine-opensource-src-5.9.1-no-sse2.patch +Patch6: qtwebengine-everywhere-src-5.10.0-no-sse2.patch # fix missing ARM -mfpu setting Patch9: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) @@ -108,24 +104,16 @@ Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # restore NEON runtime detection in Skia: revert upstream review 1952953004, # restore the non-Android Linux NEON runtime detection code lost in upstream # review 1890483002, also add VFPv4 runtime detection -Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch +Patch11: qtwebengine-everywhere-src-5.10.0-skia-neon.patch # webrtc: enable the CPU feature detection for ARM Linux also for Chromium Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # Force verbose output from the GN bootstrap process -Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch -# Fix FTBFS with Qt 5.7 -Patch22: qtwebengine-opensource-src-5.9.2-qt57.patch +Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts # backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 -# For 5.10, refetch the patch instead of forward-porting the backport. -Patch100: qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch - -%if 0%{?fedora} && 0%{?fedora} < 25 -# work around missing qt5_qtwebengine_arches macro on F24 -%{!?qt5_qtwebengine_arches:%global qt5_qtwebengine_arches %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el} -%endif +Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -212,11 +200,11 @@ BuildRequires: pkgconfig(vpx) >= 1.6.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 62.0.3202.89) are backported, see: -# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=56-based -# see dist/changes-5.9.3 for the version numbers (base, security fixes) and for +# Some security fixes (up to version 62.0.3202.94) are backported, see: +# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=61-based +# see dist/changes-5.10.0 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports -Provides: bundled(chromium) = 56.0.2924.122 +Provides: bundled(chromium) = 61.0.3163.140 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, @@ -236,32 +224,31 @@ Provides: bundled(brotli) # out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and # get_free_ffmpeg_source_files.py. # see src/3rdparty/chromium/third_party/ffmpeg/Changelog for the version number -Provides: bundled(ffmpeg) = 3.1 -Provides: bundled(hunspell) = 1.3.2 +Provides: bundled(ffmpeg) = 3.3 +Provides: bundled(hunspell) = 1.6.0 Provides: bundled(iccjpeg) # bundled as "khronos", headers only Provides: bundled(khronos_headers) # bundled as "leveldatabase" -Provides: bundled(leveldb) -Provides: bundled(libjingle) = 12750 +Provides: bundled(leveldb) = 1.20 +# bundled as "libjingle_xmpp" +Provides: bundled(libjingle) # see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number -Provides: bundled(libsrtp) = 1.5.2 +Provides: bundled(libsrtp) = 2.1.0 %if !0%{?use_system_libvpx} Provides: bundled(libvpx) = 1.6.0 %endif %if !0%{?use_system_libwebp} -Provides: bundled(libwebp) = 0.5.1 +Provides: bundled(libwebp) = 0.6.0 %endif +# bundled as "libxml" # see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h Provides: bundled(libxml2) = 2.9.4 -# see src/3rdparty/chromium/third_party/libxslt/libxslt/xsltconfig.h for version +# see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version Provides: bundled(libxslt) = 1.1.29 Provides: bundled(libXNVCtrl) = 302.17 -Provides: bundled(libyuv) = 1634 +Provides: bundled(libyuv) = 1658 Provides: bundled(modp_b64) -Provides: bundled(mojo) -# headers only -Provides: bundled(npapi) Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) # see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version @@ -271,12 +258,14 @@ Provides: bundled(sfntly) Provides: bundled(skia) # bundled as "smhasher" Provides: bundled(SMHasher) = 0-0.1.svn147 -Provides: bundled(sqlite) = 3.10.2 +Provides: bundled(sqlite) = 3.20 Provides: bundled(usrsctp) Provides: bundled(webrtc) = 90 + %ifarch %{ix86} x86_64 +# bundled by ffmpeg and libvpx: # header (for assembly) only -Provides: bundled(x86inc) = 0 +Provides: bundled(x86inc) %endif # Bundled in src/3rdparty/chromium/base/third_party: @@ -305,8 +294,9 @@ Provides: bundled(mozilla_security_manager) = 1.9.2 Provides: bundled(nsURLParsers) # Bundled outside of third_party, apparently not considered as such by Chromium: +Provides: bundled(mojo) # see src/3rdparty/chromium/v8/include/v8_version.h for the version number -Provides: bundled(v8) = 5.6.326.55 +Provides: bundled(v8) = 6.1.534.44 # bundled by v8 (src/3rdparty/chromium/v8/src/base/ieee754.cc) # The version number is 5.3, the last version that upstream released, years ago: # http://www.netlib.org/fdlibm/readme @@ -351,7 +341,7 @@ BuildArch: noarch %prep -%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} +%setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat %patch2 -p1 -b .fix-extractcflag @@ -366,7 +356,6 @@ BuildArch: noarch %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose -%patch22 -p1 -b .qt57 %patch100 -p1 -b .no-aspirational-scripts # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ @@ -417,7 +406,7 @@ mkdir %{_target_platform} pushd %{_target_platform} %{qmake_qt5} CONFIG+="%{debug_config}" \ - WEBENGINE_CONFIG+="use_system_icu use_system_re2 use_spellchecker" .. + QMAKE_EXTRA_ARGS+="-system-webengine-icu" .. make %{?_smp_mflags} @@ -573,6 +562,19 @@ done %changelog +* Mon Dec 25 2017 Kevin Kofler - 5.10.0-1 +- Update to 5.10.0 +- Update version numbers of bundled stuff +- Drop support for Fedora < 26 (in particular, WEBENGINE_CONFIG F25 workarounds) +- Drop qt57 patch, support for Qt 5.7 was completely dropped upstream +- Update get_free_ffmpeg_source_files.py from Fedora Chromium packaging +- clean_qtwebengine.sh: Update for the changed tarball naming scheme +- Use QMAKE_EXTRA_ARGS instead of the removed WEBENGINE_CONFIG +- Rebase linux-pri, system-nspr-prtime, system-icu-utf, no-sse2, skia-neon and + gn-bootstrap-verbose patches +- In particular, restore the removed V8 x87 backend in the no-sse2 patch +- Re-backport no-aspirational-scripts from upstream (undo 5.9 backport) + * Tue Dec 19 2017 Rex Dieter - 5.9.3-5 - properly escape newline in lesser_version hack diff --git a/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch new file mode 100644 index 0000000..cac2e56 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro +--- qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro 2017-12-25 18:51:46.953799125 +0100 +@@ -25,7 +25,7 @@ + gn_args = $$replace(gn_args, "use_incremental_linking=true ", "") + } + +- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path ++ gn_configure = $$system_quote($$gn_bootstrap) --verbose --shadow --gn-gen-args=$$gn_args $$ninja_path + !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") { + error("GN build error!") + } diff --git a/qtwebengine-opensource-src-5.9.2-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch similarity index 58% rename from qtwebengine-opensource-src-5.9.2-linux-pri.patch rename to qtwebengine-everywhere-src-5.10.0-linux-pri.patch index ac7b583..162f63e 100644 --- a/qtwebengine-opensource-src-5.9.2-linux-pri.patch +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -1,9 +1,9 @@ -diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri 2017-10-09 15:08:43.206663093 -0500 -+++ qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri 2017-10-09 15:09:52.248208321 -0500 -@@ -153,3 +153,19 @@ host_build { - use?(system_re2): gn_args += use_system_re2=true - #use?(system_protobuf): gn_args += use_system_protobuf=true +diff -ur qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri +--- qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri 2017-12-25 12:07:40.262411459 +0100 +@@ -157,3 +157,19 @@ + #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true + #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true } + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on diff --git a/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch b/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch new file mode 100644 index 0000000..967f452 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch @@ -0,0 +1,86 @@ +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-12-25 19:38:17.621271052 +0100 +@@ -331,39 +331,6 @@ + const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status); + allowed_set.addAll(*inclusion_set); + +-// Five aspirational scripts are taken from UTR 31 Table 6 at +-// http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . +-// Not all the characters of aspirational scripts are suitable for +-// identifiers. Therefore, only characters belonging to +-// [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational' +-// section at +-// http://www.unicode.org/Public/security/latest/xidmodifications.txt) are +-// are added to the allowed set. The list has to be updated when a new +-// version of Unicode is released. The current version is 9.0.0 and ICU 60 +-// will have Unicode 10.0 data. +-#if U_ICU_VERSION_MAJOR_NUM < 60 +- const icu::UnicodeSet aspirational_scripts( +- icu::UnicodeString( +- // Unified Canadian Syllabics +- "[\\u1401-\\u166C\\u166F-\\u167F" +- // Mongolian +- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA" +- // Unified Canadian Syllabics +- "\\u18B0-\\u18F5" +- // Tifinagh +- "\\u2D30-\\u2D67\\u2D7F" +- // Yi +- "\\uA000-\\uA48C" +- // Miao +- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E" +- "\\U00016F8F-\\U00016F9F]", +- -1, US_INV), +- *status); +- allowed_set.addAll(aspirational_scripts); +-#else +-#error "Update aspirational_scripts per Unicode 10.0" +-#endif +- + // The sections below refer to Mozilla's IDN blacklist: + // http://kb.mozillazine.org/Network.IDN.blacklist_chars + // +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-12-25 19:38:17.621271052 +0100 +@@ -132,22 +132,24 @@ + {"xn---123-kbjl2j0bl2k.in", L"\x0939\x093f\x0928\x094d\x0926\x0940-123.in", + true}, + +- // 5 Aspirational scripts ++ // What used to be 5 Aspirational scripts in the earlier versions of UAX 31. ++ // UAX 31 does not define aspirational scripts any more. ++ // See http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . + // Unifieid Canadian Syllabary +- {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", true}, ++ {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", false}, + // Tifinagh + {"xn--4ljxa2bb4a6bxb.ma", L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", +- true}, ++ false}, + // Tifinagh with a disallowed character(U+2D6F) + {"xn--hmjzaby5d5f.ma", L"\x2d5c\x2d49\x2d3c\x2d6f\x2d49\x2d4f.ma", false}, + // Yi +- {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", true}, ++ {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", false}, + // Mongolian - 'ordu' (place, camp) +- {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", true}, ++ {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", false}, + // Mongolian with a disallowed character + {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, + // Miao/Pollad +- {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, ++ {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", false}, + + // Script mixing tests + // The following script combinations are allowed. +@@ -606,7 +608,7 @@ + L"a\x144a" + L"b.com", + false}, +- {"xn--xcec9s.com", L"\x1401\x144a\x1402.com", true}, ++ {"xn--xcec9s.com", L"\x1401\x144a\x1402.com", false}, + + // Custom dangerous patterns + // Two Katakana-Hiragana combining mark in a row diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch new file mode 100644 index 0000000..a7d40dc --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -0,0 +1,30353 @@ +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-12-25 12:48:31.714986364 +0100 +@@ -1,5 +1,7 @@ + QT += webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + server.h + +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-12-25 12:48:31.752985827 +0100 +@@ -2,6 +2,8 @@ + + QT += webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += main.cpp + + RESOURCES += qml.qrc +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-12-25 12:48:31.815984938 +0100 +@@ -20,5 +20,7 @@ + QT += widgets # QApplication is required to get native styling with QtQuickControls + } + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser + INSTALLS += target +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-12-25 12:48:31.937983215 +0100 +@@ -2,6 +2,8 @@ + + QT += quick qml quickcontrols2 webengine + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + cross_compile { + posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED + } +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-12-25 12:48:31.938983201 +0100 +@@ -1,5 +1,7 @@ + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS = mainwindow.h + SOURCES = main.cpp \ + mainwindow.cpp +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-12-25 12:48:32.492975378 +0100 +@@ -3,6 +3,8 @@ + TEMPLATE = app + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += \ + main.cpp\ + mainwindow.cpp +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-12-25 12:49:15.954361683 +0100 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += html2pdf.cpp + + target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-12-25 12:49:16.125359268 +0100 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h + +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-12-25 12:49:16.187358393 +0100 +@@ -3,6 +3,8 @@ + QT += webenginewidgets webchannel + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h \ + previewpage.h \ +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-12-25 12:49:16.247357545 +0100 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + SOURCES += main.cpp + + target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-12-25 12:49:16.314356599 +0100 +@@ -3,6 +3,8 @@ + QT += webenginewidgets + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + browser.h \ + browserwindow.h \ +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-12-25 12:49:16.314356599 +0100 +@@ -9,6 +9,8 @@ + error("Spellcheck example can not be built when using native OS dictionaries.") + } + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + webview.h + +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-12-25 12:50:32.558279999 +0100 +@@ -3,6 +3,8 @@ + QT += webenginewidgets + CONFIG += c++11 + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h \ + stylesheetdialog.h +diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro +--- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-12-25 12:49:16.314356599 +0100 +@@ -2,6 +2,8 @@ + + QT += webenginewidgets + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++ + HEADERS += \ + mainwindow.h \ + fullscreenwindow.h \ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-12-25 12:49:16.315356585 +0100 +@@ -600,13 +600,6 @@ + } else if (current_cpu == "x86") { + cflags += [ "-m32" ] + ldflags += [ "-m32" ] +- if (!is_nacl) { +- cflags += [ +- "-msse2", +- "-mfpmath=sse", +- "-mmmx", +- ] +- } + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { + cflags += [ "--target=arm-linux-gnueabihf" ] +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-12-25 12:49:16.315356585 +0100 +@@ -59,3 +59,11 @@ + # It should never be explicitly set by the user. + v8_current_cpu = v8_target_cpu + } ++ ++if (v8_current_cpu == "x86") { ++ # If we are not building for the x86_sse2 toolchain, we actually want to build ++ # the "x87" backend instead. ++ if (current_toolchain != "//build/toolchain/linux:x86_sse2") { ++ v8_current_cpu = "x87" ++ } ++} +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-12-25 12:49:16.454354623 +0100 +@@ -266,6 +266,10 @@ + enable_linker_map = defined(invoker.enable_linker_map) && + invoker.enable_linker_map && generate_linker_map + ++ if (defined(invoker.shlib_subdir)) { ++ shlib_subdir = invoker.shlib_subdir ++ } ++ + # These library switches can apply to all tools below. + lib_switch = "-l" + lib_dir_switch = "-L" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-12-25 12:49:16.454354623 +0100 +@@ -110,6 +110,26 @@ + } + } + ++gcc_toolchain("x86_sse2") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ extra_cflags = "-msse2 -mfpmath=sse" ++ extra_cxxflags = "-msse2 -mfpmath=sse" ++ shlib_subdir = "lib/sse2" ++ ++ toolchain_args = { ++ current_cpu = "x86" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ + clang_toolchain("clang_x64") { + # Output linker map files for binary size analysis. + enable_linker_map = true +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-12-25 13:16:20.896994372 +0100 +@@ -445,13 +445,6 @@ + "trees/tree_synchronizer.h", + ] + +- if (current_cpu == "x86" || current_cpu == "x64") { +- sources += [ +- "raster/texture_compressor_etc1_sse.cc", +- "raster/texture_compressor_etc1_sse.h", +- ] +- } +- + # TODO(khushalsagar): Remove once crbug.com/683263 is fixed. + configs = [ "//build/config/compiler:no_size_t_to_int_warning" ] + +@@ -463,6 +456,7 @@ + deps = [ + "//base", + "//base/third_party/dynamic_annotations", ++ "//cc:cc_opts", + "//cc/paint", + "//components/viz/common", + "//gpu", +@@ -493,6 +487,36 @@ + } + } + ++source_set("cc_opts") { ++ public_deps = [ ++ "//cc:cc_opts_sse", ++ ] ++} ++ ++source_set("cc_opts_sse") { ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps = [ ++ "//base", ++ ] ++ ++ defines = [ "CC_IMPLEMENTATION=1" ] ++ ++ if (!is_debug && (is_win || is_android)) { ++ configs -= [ "//build/config/compiler:optimize" ] ++ configs += [ "//build/config/compiler:optimize_max" ] ++ } ++ ++ sources = [ ++ "raster/texture_compressor.h", ++ "raster/texture_compressor_etc1.h", ++ "raster/texture_compressor_etc1_sse.cc", ++ "raster/texture_compressor_etc1_sse.h", ++ ] ++ ++ cflags = [ "-msse2" ] ++ } ++} ++ + cc_static_library("test_support") { + testonly = true + sources = [ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-12-25 12:49:16.454354623 +0100 +@@ -514,6 +514,13 @@ + "//ui/surface", + "//v8", + ] ++ ++ if (current_cpu == "x86") { ++ deps += [ ++ "//v8(//build/toolchain/linux:x86_sse2)", ++ ] ++ } ++ + allow_circular_includes_from = [] + + if (use_aura && !use_qt) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-12-25 13:30:14.473844548 +0100 +@@ -344,6 +344,12 @@ + defines += [ "DISABLE_USER_INPUT_MONITOR" ] + } + ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":media_sse", ++ ] ++ } ++ + if (is_linux || is_win) { + sources += [ + "keyboard_event_counter.cc", +@@ -366,6 +372,21 @@ + ] + } + ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("media_sse") { ++ sources = [ ++ "sinc_resampler_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } ++} ++ + if (is_android) { + java_cpp_enum("java_enums") { + sources = [ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/media.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-12-25 13:32:19.234052101 +0100 +@@ -10,6 +10,8 @@ + #include "base/metrics/field_trial.h" + #include "base/trace_event/trace_event.h" + #include "media/base/media_switches.h" ++#include "media/base/sinc_resampler.h" ++#include "media/base/vector_math.h" + #include "third_party/libyuv/include/libyuv.h" + + #if defined(OS_ANDROID) +@@ -30,6 +32,9 @@ + TRACE_EVENT_WARMUP_CATEGORY("audio"); + TRACE_EVENT_WARMUP_CATEGORY("media"); + ++ // Perform initialization of libraries which require runtime CPU detection. ++ vector_math::Initialize(); ++ SincResampler::InitializeCPUSpecificFeatures(); + libyuv::InitCpuFlags(); + + #if !defined(MEDIA_DISABLE_FFMPEG) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-12-25 12:57:58.624478849 +0100 +@@ -81,17 +81,12 @@ + #include + #include + ++#include "base/cpu.h" + #include "base/logging.h" + #include "build/build_config.h" + +-#if defined(ARCH_CPU_X86_FAMILY) +-#include +-#define CONVOLVE_FUNC Convolve_SSE +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include +-#define CONVOLVE_FUNC Convolve_NEON +-#else +-#define CONVOLVE_FUNC Convolve_C + #endif + + namespace media { +@@ -112,10 +107,41 @@ + return sinc_scale_factor; + } + ++#undef CONVOLVE_FUNC ++ + static int CalculateChunkSize(int block_size_, double io_ratio) { + return block_size_ / io_ratio; + } + ++// If we know the minimum architecture at compile time, avoid CPU detection. ++// Force NaCl code to use C routines since (at present) nothing there uses these ++// methods and plumbing the -msse built library is non-trivial. ++#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(__SSE__) ++#define CONVOLVE_FUNC Convolve_SSE ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// X86 CPU detection required. Functions will be set by ++// InitializeCPUSpecificFeatures(). ++#define CONVOLVE_FUNC g_convolve_proc_ ++ ++typedef float (*ConvolveProc)(const float*, const float*, const float*, double); ++static ConvolveProc g_convolve_proc_ = NULL; ++ ++void SincResampler::InitializeCPUSpecificFeatures() { ++ CHECK(!g_convolve_proc_); ++ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; ++} ++#endif ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define CONVOLVE_FUNC Convolve_NEON ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#else ++// Unknown architecture. ++#define CONVOLVE_FUNC Convolve_C ++void SincResampler::InitializeCPUSpecificFeatures() {} ++#endif ++ + SincResampler::SincResampler(double io_sample_rate_ratio, + int request_frames, + const ReadCB& read_cb) +@@ -328,46 +354,7 @@ + kernel_interpolation_factor * sum2); + } + +-#if defined(ARCH_CPU_X86_FAMILY) +-float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, +- const float* k2, +- double kernel_interpolation_factor) { +- __m128 m_input; +- __m128 m_sums1 = _mm_setzero_ps(); +- __m128 m_sums2 = _mm_setzero_ps(); +- +- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling +- // these loops hurt performance in local testing. +- if (reinterpret_cast(input_ptr) & 0x0F) { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_loadu_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } else { +- for (int i = 0; i < kKernelSize; i += 4) { +- m_input = _mm_load_ps(input_ptr + i); +- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); +- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); +- } +- } +- +- // Linearly interpolate the two "convolutions". +- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( +- static_cast(1.0 - kernel_interpolation_factor))); +- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( +- static_cast(kernel_interpolation_factor))); +- m_sums1 = _mm_add_ps(m_sums1, m_sums2); +- +- // Sum components together. +- float result; +- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); +- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( +- m_sums2, m_sums2, 1))); +- +- return result; +-} +-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, + const float* k2, + double kernel_interpolation_factor) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-12-25 12:57:58.798476686 +0100 +@@ -36,6 +36,10 @@ + kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), + }; + ++ // Selects runtime specific CPU features like SSE. Must be called before ++ // using SincResampler. ++ static void InitializeCPUSpecificFeatures(); ++ + // Callback type for providing more data into the resampler. Expects |frames| + // of data to be rendered into |destination|; zero padded if not enough frames + // are available to satisfy the request. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-12-25 12:57:58.798476686 +0100 +@@ -4,6 +4,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/time/time.h" + #include "build/build_config.h" + #include "media/base/sinc_resampler.h" +@@ -61,6 +62,9 @@ + &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); + + #if defined(CONVOLVE_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + RunConvolveBenchmark( + &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); + RunConvolveBenchmark( +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 2017-07-01 03:36:35.000000000 +0200 +@@ -0,0 +1,50 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/sinc_resampler.h" ++ ++#include ++ ++namespace media { ++ ++float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, ++ const float* k2, ++ double kernel_interpolation_factor) { ++ __m128 m_input; ++ __m128 m_sums1 = _mm_setzero_ps(); ++ __m128 m_sums2 = _mm_setzero_ps(); ++ ++ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling ++ // these loops hurt performance in local testing. ++ if (reinterpret_cast(input_ptr) & 0x0F) { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_loadu_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } else { ++ for (int i = 0; i < kKernelSize; i += 4) { ++ m_input = _mm_load_ps(input_ptr + i); ++ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); ++ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); ++ } ++ } ++ ++ // Linearly interpolate the two "convolutions". ++ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( ++ static_cast(1.0 - kernel_interpolation_factor))); ++ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( ++ static_cast(kernel_interpolation_factor))); ++ m_sums1 = _mm_add_ps(m_sums1, m_sums2); ++ ++ // Sum components together. ++ float result; ++ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); ++ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( ++ m_sums2, m_sums2, 1))); ++ ++ return result; ++} ++ ++} // namespace media +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-12-25 12:57:58.798476686 +0100 +@@ -10,6 +10,7 @@ + + #include "base/bind.h" + #include "base/bind_helpers.h" ++#include "base/cpu.h" + #include "base/macros.h" + #include "base/strings/string_number_conversions.h" + #include "base/time/time.h" +@@ -166,6 +167,10 @@ + static const double kKernelInterpolationFactor = 0.5; + + TEST(SincResamplerTest, Convolve) { ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif ++ + // Initialize a dummy resampler. + MockSource mock_source; + SincResampler resampler( +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-12-25 12:57:58.799476673 +0100 +@@ -7,12 +7,17 @@ + + #include + ++#include "base/cpu.h" + #include "base/logging.h" + #include "build/build_config.h" + ++namespace media { ++namespace vector_math { ++ ++// If we know the minimum architecture at compile time, avoid CPU detection. + // NaCl does not allow intrinsics. + #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-#include ++#if defined(__SSE__) + // Don't use custom SSE versions where the auto-vectorized C version performs + // better, which is anywhere clang is used. + // TODO(pcc): Linux currently uses ThinLTO which has broken auto-vectorization +@@ -25,20 +30,52 @@ + #define FMUL_FUNC FMUL_C + #endif + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++void Initialize() {} ++#else ++// X86 CPU detection required. Functions will be set by Initialize(). ++#if !defined(__clang__) ++#define FMAC_FUNC g_fmac_proc_ ++#define FMUL_FUNC g_fmul_proc_ ++#else ++#define FMAC_FUNC FMAC_C ++#define FMUL_FUNC FMUL_C ++#endif ++#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ ++ ++#if !defined(__clang__) ++typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); ++static MathProc g_fmac_proc_ = NULL; ++static MathProc g_fmul_proc_ = NULL; ++#endif ++typedef std::pair (*EWMAAndMaxPowerProc)( ++ float initial_value, const float src[], int len, float smoothing_factor); ++static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; ++ ++void Initialize() { ++ CHECK(!g_fmac_proc_); ++ CHECK(!g_fmul_proc_); ++ CHECK(!g_ewma_power_proc_); ++ const bool kUseSSE = base::CPU().has_sse(); ++#if !defined(__clang__) ++ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; ++ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; ++#endif ++ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; ++} ++#endif + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #include + #define FMAC_FUNC FMAC_NEON + #define FMUL_FUNC FMUL_NEON + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++void Initialize() {} + #else + #define FMAC_FUNC FMAC_C + #define FMUL_FUNC FMUL_C + #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C ++void Initialize() {} + #endif + +-namespace media { +-namespace vector_math { +- + void FMAC(const float src[], float scale, int len, float dest[]) { + // Ensure |src| and |dest| are 16-byte aligned. + DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); +@@ -91,111 +128,6 @@ + return result; + } + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) +-void FMUL_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) +- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] = src[i] * scale; +-} +- +-void FMAC_SSE(const float src[], float scale, int len, float dest[]) { +- const int rem = len % 4; +- const int last_index = len - rem; +- __m128 m_scale = _mm_set_ps1(scale); +- for (int i = 0; i < last_index; i += 4) { +- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), +- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); +- } +- +- // Handle any remaining values that wouldn't fit in an SSE pass. +- for (int i = last_index; i < len; ++i) +- dest[i] += src[i] * scale; +-} +- +-// Convenience macro to extract float 0 through 3 from the vector |a|. This is +-// needed because compilers other than clang don't support access via +-// operator[](). +-#define EXTRACT_FLOAT(a, i) \ +- (i == 0 ? \ +- _mm_cvtss_f32(a) : \ +- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) +- +-std::pair EWMAAndMaxPower_SSE( +- float initial_value, const float src[], int len, float smoothing_factor) { +- // When the recurrence is unrolled, we see that we can split it into 4 +- // separate lanes of evaluation: +- // +- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) +- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... +- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- // +- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... +- // +- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in +- // each of the 4 lanes, and then combine them to give y[n]. +- +- const int rem = len % 4; +- const int last_index = len - rem; +- +- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); +- const float weight_prev = 1.0f - smoothing_factor; +- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); +- const __m128 weight_prev_squared_x4 = +- _mm_mul_ps(weight_prev_x4, weight_prev_x4); +- const __m128 weight_prev_4th_x4 = +- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); +- +- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and +- // 0, respectively. +- __m128 max_x4 = _mm_setzero_ps(); +- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); +- int i; +- for (i = 0; i < last_index; i += 4) { +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); +- const __m128 sample_x4 = _mm_load_ps(src + i); +- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); +- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); +- // Note: The compiler optimizes this to a single multiply-and-accumulate +- // instruction: +- ewma_x4 = _mm_add_ps(ewma_x4, +- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); +- } +- +- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) +- float ewma = EXTRACT_FLOAT(ewma_x4, 3); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 2); +- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 1); +- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); +- ewma += EXTRACT_FLOAT(ewma_x4, 0); +- +- // Fold the maximums together to get the overall maximum. +- max_x4 = _mm_max_ps(max_x4, +- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); +- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); +- +- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); +- +- // Handle remaining values at the end of |src|. +- for (; i < len; ++i) { +- result.first *= weight_prev; +- const float sample = src[i]; +- const float sample_squared = sample * sample; +- result.first += sample_squared * smoothing_factor; +- result.second = std::max(result.second, sample_squared); +- } +- +- return result; +-} +-#endif +- + #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + void FMAC_NEON(const float src[], float scale, int len, float dest[]) { + const int rem = len % 4; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-12-25 12:57:58.799476673 +0100 +@@ -15,6 +15,11 @@ + // Required alignment for inputs and outputs to all vector math functions + enum { kRequiredAlignment = 16 }; + ++// Selects runtime specific optimizations such as SSE. Must be called prior to ++// calling FMAC() or FMUL(). Called during media library initialization; most ++// users should never have to call this. ++MEDIA_EXPORT void Initialize(); ++ + // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. + // |src| and |dest| must be aligned by kRequiredAlignment. + MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-12-25 12:57:58.800476661 +0100 +@@ -5,6 +5,7 @@ + #include + + #include "base/macros.h" ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/time/time.h" + #include "build/build_config.h" +@@ -82,15 +83,11 @@ + DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); + }; + +-// Define platform dependent function names for SIMD optimized methods. ++// Define platform independent function name for FMAC* perf tests. + #if defined(ARCH_CPU_X86_FAMILY) + #define FMAC_FUNC FMAC_SSE +-#define FMUL_FUNC FMUL_SSE +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) + #define FMAC_FUNC FMAC_NEON +-#define FMUL_FUNC FMUL_NEON +-#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON + #endif + + // Benchmark for each optimized vector_math::FMAC() method. +@@ -99,6 +96,9 @@ + RunBenchmark( + vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); + #if defined(FMAC_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMAC_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -112,12 +112,24 @@ + #endif + } + ++#undef FMAC_FUNC ++ ++// Define platform independent function name for FMULBenchmark* tests. ++#if defined(ARCH_CPU_X86_FAMILY) ++#define FMUL_FUNC FMUL_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define FMUL_FUNC FMUL_NEON ++#endif ++ + // Benchmark for each optimized vector_math::FMUL() method. + TEST_F(VectorMathPerfTest, FMUL) { + // Benchmark FMUL_C(). + RunBenchmark( + vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); + #if defined(FMUL_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark FMUL_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -131,6 +143,14 @@ + #endif + } + ++#undef FMUL_FUNC ++ ++#if defined(ARCH_CPU_X86_FAMILY) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE ++#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) ++#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON ++#endif ++ + // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. + TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { + // Benchmark EWMAAndMaxPower_C(). +@@ -139,6 +159,9 @@ + "vector_math_ewma_and_max_power", + "unoptimized"); + #if defined(EWMAAndMaxPower_FUNC) ++#if defined(ARCH_CPU_X86_FAMILY) ++ ASSERT_TRUE(base::CPU().has_sse()); ++#endif + // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. + ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / + sizeof(float)), 0U); +@@ -156,4 +179,6 @@ + #endif + } + ++#undef EWMAAndMaxPower_FUNC ++ + } // namespace media +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_sse.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc 2017-07-01 03:36:35.000000000 +0200 +@@ -0,0 +1,118 @@ ++// Copyright 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "media/base/vector_math_testing.h" ++ ++#include ++ ++#include // NOLINT ++ ++namespace media { ++namespace vector_math { ++ ++void FMUL_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) ++ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] = src[i] * scale; ++} ++ ++void FMAC_SSE(const float src[], float scale, int len, float dest[]) { ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ __m128 m_scale = _mm_set_ps1(scale); ++ for (int i = 0; i < last_index; i += 4) { ++ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), ++ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); ++ } ++ ++ // Handle any remaining values that wouldn't fit in an SSE pass. ++ for (int i = last_index; i < len; ++i) ++ dest[i] += src[i] * scale; ++} ++ ++// Convenience macro to extract float 0 through 3 from the vector |a|. This is ++// needed because compilers other than clang don't support access via ++// operator[](). ++#define EXTRACT_FLOAT(a, i) \ ++ (i == 0 ? \ ++ _mm_cvtss_f32(a) : \ ++ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) ++ ++std::pair EWMAAndMaxPower_SSE( ++ float initial_value, const float src[], int len, float smoothing_factor) { ++ // When the recurrence is unrolled, we see that we can split it into 4 ++ // separate lanes of evaluation: ++ // ++ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) ++ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... ++ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ // ++ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... ++ // ++ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in ++ // each of the 4 lanes, and then combine them to give y[n]. ++ ++ const int rem = len % 4; ++ const int last_index = len - rem; ++ ++ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); ++ const float weight_prev = 1.0f - smoothing_factor; ++ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); ++ const __m128 weight_prev_squared_x4 = ++ _mm_mul_ps(weight_prev_x4, weight_prev_x4); ++ const __m128 weight_prev_4th_x4 = ++ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); ++ ++ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and ++ // 0, respectively. ++ __m128 max_x4 = _mm_setzero_ps(); ++ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); ++ int i; ++ for (i = 0; i < last_index; i += 4) { ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); ++ const __m128 sample_x4 = _mm_load_ps(src + i); ++ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); ++ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); ++ // Note: The compiler optimizes this to a single multiply-and-accumulate ++ // instruction: ++ ewma_x4 = _mm_add_ps(ewma_x4, ++ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); ++ } ++ ++ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) ++ float ewma = EXTRACT_FLOAT(ewma_x4, 3); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 2); ++ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 1); ++ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); ++ ewma += EXTRACT_FLOAT(ewma_x4, 0); ++ ++ // Fold the maximums together to get the overall maximum. ++ max_x4 = _mm_max_ps(max_x4, ++ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); ++ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); ++ ++ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); ++ ++ // Handle remaining values at the end of |src|. ++ for (; i < len; ++i) { ++ result.first *= weight_prev; ++ const float sample = src[i]; ++ const float sample_squared = sample * sample; ++ result.first += sample_squared * smoothing_factor; ++ result.second = std::max(result.second, sample_squared); ++ } ++ ++ return result; ++} ++ ++} // namespace vector_math ++} // namespace media +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-12-25 12:57:58.800476661 +0100 +@@ -19,7 +19,7 @@ + MEDIA_EXPORT std::pair EWMAAndMaxPower_C( + float initial_value, const float src[], int len, float smoothing_factor); + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) ++#if defined(ARCH_CPU_X86_FAMILY) + MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, + float dest[]); + MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-12-25 12:57:58.800476661 +0100 +@@ -9,6 +9,7 @@ + #include + + #include "base/macros.h" ++#include "base/cpu.h" + #include "base/memory/aligned_memory.h" + #include "base/strings/string_number_conversions.h" + #include "base/strings/stringize_macros.h" +@@ -78,6 +79,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMAC_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMAC_SSE( +@@ -119,6 +121,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("FMUL_SSE"); + FillTestVectors(kInputFillValue, kOutputFillValue); + vector_math::FMUL_SSE( +@@ -227,6 +230,7 @@ + + #if defined(ARCH_CPU_X86_FAMILY) + { ++ ASSERT_TRUE(base::CPU().has_sse()); + SCOPED_TRACE("EWMAAndMaxPower_SSE"); + const std::pair& result = vector_math::EWMAAndMaxPower_SSE( + initial_value_, data_.get(), data_len_, smoothing_factor_); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-12-25 13:38:30.438718953 +0100 +@@ -534,6 +534,26 @@ + "//base", + "//ui/gfx/geometry", + ] ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ++ ":shared_memory_support_sse", ++ ] ++ } ++} ++ ++if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("shared_memory_support_sse") { ++ sources = [ ++ "base/vector_math_sse.cc", ++ ] ++ configs += [ ++ "//media:media_config", ++ "//media:media_implementation", ++ ] ++ if (!is_win) { ++ cflags = [ "-msse" ] ++ } ++ } + } + + # TODO(watk): Refactor tests that could be made to run on Android. See +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-12-25 12:58:07.760365227 +0100 +@@ -15,7 +15,7 @@ + #include "base/logging.h" + #include "media/base/audio_bus.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE2__) + #define USE_SIMD 1 + #include + #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-12-25 13:45:09.341998517 +0100 +@@ -257,17 +257,6 @@ + "ext/platform_canvas.h", + ] + } +- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { +- sources += [ +- "ext/convolver_SSE2.cc", +- "ext/convolver_SSE2.h", +- ] +- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { +- sources += [ +- "ext/convolver_mips_dspr2.cc", +- "ext/convolver_mips_dspr2.h", +- ] +- } + + if (!is_fuchsia) { + sources -= [ +@@ -522,6 +511,31 @@ + } + } + if (current_cpu == "x86" || current_cpu == "x64") { ++ source_set("skia_opts_sse2") { ++ sources = skia_opts.sse2_sources + ++ [ ++ # Chrome-specific. ++ "ext/convolver_SSE2.cc", ++ "ext/convolver_SSE2.h", ++ ] ++ sources -= [ ++ # Detection code must not be built with -msse2 ++ "//third_party/skia/src/opts/opts_check_x86.cpp", ++ ] ++ if (!is_win || is_clang) { ++ cflags = [ "-msse2" ] ++ } ++ if (is_win) { ++ defines = [ "SK_CPU_SSE_LEVEL=20" ] ++ } ++ visibility = [ ":skia_opts" ] ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ ++ ":skia_config", ++ ":skia_library_config", ++ "//build/config/compiler:no_chromium_code", ++ ] ++ } + source_set("skia_opts_sse3") { + sources = skia_opts.ssse3_sources + if (!is_win || is_clang) { +@@ -626,10 +640,13 @@ + ] + + if (current_cpu == "x86" || current_cpu == "x64") { +- sources = skia_opts.sse2_sources ++ sources = [ ++ "//third_party/skia/src/opts/opts_check_x86.cpp", ++ ] + deps += [ + ":skia_opts_avx", + ":skia_opts_hsw", ++ ":skia_opts_sse2", + ":skia_opts_sse3", + ":skia_opts_sse41", + ":skia_opts_sse42", +@@ -664,6 +681,13 @@ + + if (mips_dsp_rev >= 1) { + sources = skia_opts.mips_dsp_sources ++ if (mips_dsp_rev >= 2) { ++ sources += [ ++ # Chrome-specific. ++ "ext/convolver_mips_dspr2.cc", ++ "ext/convolver_mips_dspr2.h", ++ ] ++ } + } else { + sources = skia_opts.none_sources + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-12-25 13:05:23.911940902 +0100 +@@ -362,10 +362,13 @@ + + void SetupSIMD(ConvolveProcs *procs) { + #ifdef SIMD_SSE2 +- procs->extra_horizontal_reads = 3; +- procs->convolve_vertically = &ConvolveVertically_SSE2; +- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; +- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ base::CPU cpu; ++ if (cpu.has_sse2()) { ++ procs->extra_horizontal_reads = 3; ++ procs->convolve_vertically = &ConvolveVertically_SSE2; ++ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; ++ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; ++ } + #elif defined SIMD_MIPS_DSPR2 + procs->extra_horizontal_reads = 3; + procs->convolve_vertically = &ConvolveVertically_mips_dspr2; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-12-25 13:05:23.951940405 +0100 +@@ -11,6 +11,7 @@ + #include + + #include "build/build_config.h" ++#include "base/cpu.h" + #include "third_party/skia/include/core/SkSize.h" + #include "third_party/skia/include/core/SkTypes.h" + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-12-25 13:05:23.951940405 +0100 +@@ -192,6 +192,26 @@ + public_deps = [ + ":angle_common", + ] ++ ++ if (current_cpu == "x86") { ++ deps = [ ++ ":angle_image_util_x86_sse2", ++ ] ++ } ++} ++ ++source_set("angle_image_util_x86_sse2") { ++ configs -= angle_undefine_configs ++ configs += [ ":internal_config" ] ++ ++ deps = [ ++ ":angle_common", ++ ] ++ ++ sources = [ ++ "src/image_util/loadimage_SSE2.cpp", ++ ] ++ cflags = [ "-msse2", "-mfpmath=sse" ] + } + + config("angle_gpu_info_util_config") { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-12-25 13:05:23.951940405 +0100 +@@ -124,9 +124,42 @@ + } + } + +-inline bool supportsSSE2() ++#if defined(ANGLE_USE_SSE) && !defined(__x86_64__) && !defined(__SSE2__) && !defined(_MSC_VER) ++ ++// From the base/cpu.cc in Chromium, to avoid depending on Chromium headers ++ ++#if defined(__pic__) && defined(__i386__) ++ ++static inline void __cpuid(int cpu_info[4], int info_type) { ++ __asm__ volatile ( ++ "mov %%ebx, %%edi\n" ++ "cpuid\n" ++ "xchg %%edi, %%ebx\n" ++ : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) ++ : "a"(info_type) ++ ); ++} ++ ++#else ++ ++static inline void __cpuid(int cpu_info[4], int info_type) { ++ __asm__ volatile ( ++ "cpuid\n" ++ : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) ++ : "a"(info_type) ++ ); ++} ++ ++#endif ++ ++#endif ++ ++static inline bool supportsSSE2() + { + #if defined(ANGLE_USE_SSE) ++#if defined(__x86_64__) || defined(__SSE2__) ++ return true; ++#else + static bool checked = false; + static bool supports = false; + +@@ -135,7 +168,6 @@ + return supports; + } + +-#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) + { + int info[4]; + __cpuid(info, 0); +@@ -147,9 +179,9 @@ + supports = (info[3] >> 26) & 1; + } + } +-#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) + checked = true; + return supports; ++#endif // defined(x86_64) || defined(__SSE2__) + #else // defined(ANGLE_USE_SSE) + return false; + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-12-25 13:05:23.951940405 +0100 +@@ -87,7 +87,9 @@ + #include + #define ANGLE_USE_SSE + #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) ++#if defined(__x86_64__) || defined(__SSE2__) + #include ++#endif + #define ANGLE_USE_SSE + #endif + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-12-25 13:05:23.952940392 +0100 +@@ -12,9 +12,17 @@ + #include "common/platform.h" + #include "image_util/imageformats.h" + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + namespace angle + { + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++namespace SSE2 { ++#endif ++ + void LoadA8ToRGBA8(size_t width, + size_t height, + size_t depth, +@@ -28,6 +36,11 @@ + #if defined(ANGLE_USE_SSE) + if (gl::supportsSSE2()) + { ++#if !defined(__x86_64__) && !defined(__SSE2__) ++ angle::SSE2::LoadA8ToRGBA8(width, height, depth, input, inputRowPitch, ++ inputDepthPitch, output, outputRowPitch, ++ outputDepthPitch); ++#else + __m128i zeroWide = _mm_setzero_si128(); + + for (size_t z = 0; z < depth; z++) +@@ -68,6 +81,7 @@ + } + } + } ++#endif + + return; + } +@@ -89,6 +103,8 @@ + } + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void LoadA8ToBGRA8(size_t width, + size_t height, + size_t depth, +@@ -584,6 +600,8 @@ + } + } + ++#endif ++ + void LoadRGBA8ToBGRA8(size_t width, + size_t height, + size_t depth, +@@ -597,6 +615,11 @@ + #if defined(ANGLE_USE_SSE) + if (gl::supportsSSE2()) + { ++#if !defined(__x86_64__) && !defined(__SSE2__) ++ angle::SSE2::LoadRGBA8ToBGRA8(width, height, depth, input, ++ inputRowPitch, inputDepthPitch, output, ++ outputRowPitch, outputDepthPitch); ++#else + __m128i brMask = _mm_set1_epi32(0x00ff00ff); + + for (size_t z = 0; z < depth; z++) +@@ -641,6 +664,7 @@ + } + } + } ++#endif + + return; + } +@@ -663,6 +687,8 @@ + } + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void LoadRGBA8ToBGRA4(size_t width, + size_t height, + size_t depth, +@@ -1320,4 +1346,10 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++} // namespace SSE2 ++#endif ++ + } // namespace angle +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-12-25 13:05:24.018939571 +0100 +@@ -651,6 +651,32 @@ + size_t outputRowPitch, + size_t outputDepthPitch); + ++#if defined(__i386__) ++namespace SSE2 { ++ ++void LoadA8ToRGBA8(size_t width, ++ size_t height, ++ size_t depth, ++ const uint8_t *input, ++ size_t inputRowPitch, ++ size_t inputDepthPitch, ++ uint8_t *output, ++ size_t outputRowPitch, ++ size_t outputDepthPitch); ++ ++void LoadRGBA8ToBGRA8(size_t width, ++ size_t height, ++ size_t depth, ++ const uint8_t *input, ++ size_t inputRowPitch, ++ size_t inputDepthPitch, ++ uint8_t *output, ++ size_t outputRowPitch, ++ size_t outputDepthPitch); ++ ++} ++#endif // defined(__i386__) ++ + } // namespace angle + + #include "loadimage.inl" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-12-25 13:05:24.018939571 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "loadimage.cpp" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-12-25 13:51:32.804702578 +0100 +@@ -34,8 +34,8 @@ + defines = [] + + if (current_cpu == "x86" || current_cpu == "x64") { +- defines += [ "SSE2_ENABLE" ] +- sources += [ "src/transform-sse2.c" ] ++ defines += [ "SSE2_ENABLE" ] # runtime detection ++ deps = [ ":qcms_sse2" ] + } + + if (use_libfuzzer) { +@@ -99,3 +99,15 @@ + public_configs = [ ":qcms_config" ] + } + } ++ ++source_set("qcms_sse2") { ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] ++ public_configs = [ ":qcms_config" ] ++ ++ if (current_cpu == "x86" || current_cpu == "x64") { ++ defines = [ "SSE2_ENABLE" ] ++ sources = [ "src/transform-sse2.c" ] ++ cflags = [ "-msse2" ] ++ } ++} +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-12-25 14:03:37.424681528 +0100 +@@ -35,7 +35,7 @@ + #include "platform/wtf/MathExtras.h" + #include "platform/wtf/PtrUtil.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + #include + #endif + +@@ -1290,7 +1290,7 @@ + size_t current_frame, + float value, + unsigned write_index) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + auto number_of_values = current_state.number_of_values; + #endif + auto fill_to_frame = current_state.fill_to_frame; +@@ -1303,7 +1303,7 @@ + double delta_time = time2 - time1; + float k = delta_time > 0 ? 1 / delta_time : 0; + const float value_delta = value2 - value1; +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if (fill_to_frame > write_index) { + // Minimize in-loop operations. Calculate starting value and increment. + // Next step: value += inc. +@@ -1431,7 +1431,7 @@ + size_t current_frame, + float value, + unsigned write_index) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + auto number_of_values = current_state.number_of_values; + #endif + auto fill_to_frame = current_state.fill_to_frame; +@@ -1482,7 +1482,7 @@ + for (; write_index < fill_to_frame; ++write_index) + values[write_index] = target; + } else { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if (fill_to_frame > write_index) { + // Resolve recursion by expanding constants to achieve a 4-step + // loop unrolling. +@@ -1616,7 +1616,7 @@ + // Oversampled curve data can be provided if sharp discontinuities are + // desired. + unsigned k = 0; +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if (fill_to_frame > write_index) { + const __m128 v_curve_virtual_index = _mm_set_ps1(curve_virtual_index); + const __m128 v_curve_points_per_frame = _mm_set_ps1(curve_points_per_frame); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-12-25 14:40:01.051077869 +0100 +@@ -26,6 +26,9 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/DirectConvolver.h" + + #include "build/build_config.h" +@@ -35,21 +38,48 @@ + #include + #endif + +-#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_MACOSX) ++#if ((defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64)) \ ++ && !defined(OS_MACOSX) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + namespace blink { + + using namespace VectorMath; + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + DirectConvolver::DirectConvolver(size_t input_block_size) +- : input_block_size_(input_block_size), buffer_(input_block_size * 2) {} ++ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) { ++#ifdef ARCH_CPU_X86 ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif ++} ++ ++#endif + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void DirectConvolver::m_ProcessSSE2(AudioFloatArray* convolution_kernel, ++ const float* source_p, ++ float* dest_p, ++ size_t frames_to_process) { ++#else + void DirectConvolver::Process(AudioFloatArray* convolution_kernel, + const float* source_p, + float* dest_p, + size_t frames_to_process) { ++#endif ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_ProcessSSE2(convolution_kernel, source_p, dest_p, frames_to_process); ++ return; ++ } ++#endif + DCHECK_EQ(frames_to_process, input_block_size_); + if (frames_to_process != input_block_size_) + return; +@@ -83,7 +113,7 @@ + #endif // ARCH_CPU_X86 + #else + size_t i = 0; +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + // Convolution using SSE2. Currently only do this if both |kernelSize| and + // |framesToProcess| are multiples of 4. If not, use the straightforward loop + // below. +@@ -397,7 +427,7 @@ + } + dest_p[i++] = sum; + } +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + } + #endif + #endif // OS_MACOSX +@@ -406,8 +436,12 @@ + memcpy(buffer_.Data(), input_p, sizeof(float) * frames_to_process); + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void DirectConvolver::Reset() { + buffer_.Zero(); + } + ++#endif ++ + } // namespace blink +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-12-25 14:39:21.094641400 +0100 +@@ -29,6 +29,7 @@ + #ifndef DirectConvolver_h + #define DirectConvolver_h + ++#include "build/build_config.h" + #include "platform/PlatformExport.h" + #include "platform/audio/AudioArray.h" + #include "platform/wtf/Allocator.h" +@@ -54,6 +55,14 @@ + size_t input_block_size_; + + AudioFloatArray buffer_; ++ ++#ifdef ARCH_CPU_X86 ++ bool m_haveSSE2; ++ void m_ProcessSSE2(AudioFloatArray* convolution_kernel, ++ const float* source_p, ++ float* dest_p, ++ size_t frames_to_process); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-12-25 13:05:24.021939534 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "DirectConvolver.cpp" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-12-25 14:41:03.697194334 +0100 +@@ -26,16 +26,23 @@ + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/SincResampler.h" + + #include "build/build_config.h" + #include "platform/audio/AudioBus.h" + #include "platform/wtf/MathExtras.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + // Input buffer layout, dividing the total buffer into regions (r0 - r5): + // + // |----------------|-----------------------------------------|----------------| +@@ -67,6 +74,8 @@ + + namespace blink { + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + SincResampler::SincResampler(double scale_factor, + unsigned kernel_size, + unsigned number_of_kernel_offsets) +@@ -82,6 +91,10 @@ + source_frames_available_(0), + source_provider_(nullptr), + is_buffer_primed_(false) { ++#ifdef ARCH_CPU_X86 ++ base::CPU cpu; ++ m_haveSSE2 = cpu.has_sse2(); ++#endif + InitializeKernel(); + } + +@@ -205,9 +218,23 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++void SincResampler::m_ProcessSSE2(AudioSourceProvider* source_provider, ++ float* destination, ++ size_t frames_to_process) { ++#else + void SincResampler::Process(AudioSourceProvider* source_provider, + float* destination, + size_t frames_to_process) { ++#endif ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (m_haveSSE2) { ++ m_ProcessSSE2(source_provider, destination, frames_to_process); ++ return; ++ } ++#endif + bool is_good = source_provider && block_size_ > kernel_size_ && + input_buffer_.size() >= block_size_ + kernel_size_ && + !(kernel_size_ % 2); +@@ -276,7 +303,7 @@ + { + float input; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + // If the sourceP address is not 16-byte aligned, the first several + // frames (at most three) should be processed seperately. + while ((reinterpret_cast(input_p) & 0x0F) && n) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-12-25 14:40:36.454578552 +0100 +@@ -29,6 +29,7 @@ + #ifndef SincResampler_h + #define SincResampler_h + ++#include "build/build_config.h" + #include "platform/PlatformExport.h" + #include "platform/audio/AudioArray.h" + #include "platform/audio/AudioSourceProvider.h" +@@ -96,6 +97,14 @@ + + // The buffer is primed once at the very beginning of processing. + bool is_buffer_primed_; ++ ++#ifdef ARCH_CPU_X86 ++ private: ++ bool m_haveSSE2; ++ void m_ProcessSSE2(AudioSourceProvider*, ++ float* destination, ++ size_t frames_to_process); ++#endif + }; + + } // namespace blink +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-12-25 13:05:24.022939522 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "SincResampler.cpp" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-12-25 14:48:07.515216969 +0100 +@@ -23,6 +23,9 @@ + * DAMAGE. + */ + ++// include this first to get it before the CPU() function-like macro ++#include "base/cpu.h" ++ + #include "platform/audio/VectorMath.h" + + #include +@@ -35,10 +38,14 @@ + #include + #endif + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + #include + #endif + ++#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) ++#error SSE2 parts must be built with -msse2 ++#endif ++ + #if WTF_CPU_ARM_NEON + #include + #endif +@@ -170,15 +177,30 @@ + } + #else + ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++namespace SSE2 { ++#endif ++ ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++static base::CPU cpu; ++#endif ++ + void Vsma(const float* source_p, + int source_stride, + const float* scale, + float* dest_p, + int dest_stride, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vsma(source_p, source_stride, scale, dest_p, ++ dest_stride, frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if ((source_stride == 1) && (dest_stride == 1)) { + float k = *scale; + +@@ -274,9 +296,16 @@ + float* dest_p, + int dest_stride, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vsmul(source_p, source_stride, scale, dest_p, ++ dest_stride, frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if ((source_stride == 1) && (dest_stride == 1)) { + float k = *scale; + +@@ -365,7 +394,7 @@ + source_p += source_stride; + dest_p += dest_stride; + } +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + } + #endif + } +@@ -377,9 +406,17 @@ + float* dest_p, + int dest_stride, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vadd(source1p, source_stride1, source2p, ++ source_stride2, dest_p, dest_stride, ++ frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if ((source_stride1 == 1) && (source_stride2 == 1) && (dest_stride == 1)) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -506,7 +543,7 @@ + source2p += source_stride2; + dest_p += dest_stride; + } +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + } + #endif + } +@@ -518,9 +555,17 @@ + float* dest_p, + int dest_stride, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vmul(source1p, source_stride1, source2p, ++ source_stride2, dest_p, dest_stride, ++ frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if ((source_stride1 == 1) && (source_stride2 == 1) && (dest_stride == 1)) { + // If the source1P address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -619,8 +664,15 @@ + float* real_dest_p, + float* imag_dest_p, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Zvmul(real1p, imag1p, real2p, imag2p, real_dest_p, ++ imag_dest_p, frames_to_process); ++ return; ++ } ++#endif + unsigned i = 0; +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + // Only use the SSE optimization in the very common case that all addresses + // are 16-byte aligned. Otherwise, fall through to the scalar code below. + if (!(reinterpret_cast(real1p) & 0x0F) && +@@ -676,10 +728,17 @@ + int source_stride, + float* sum_p, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vsvesq(source_p, source_stride, sum_p, ++ frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + float sum = 0; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if (source_stride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -745,10 +804,17 @@ + int source_stride, + float* max_p, + size_t frames_to_process) { ++#if defined(ARCH_CPU_X86) && !defined(__SSE2__) ++ if (cpu.has_sse2()) { ++ blink::VectorMath::SSE2::Vmaxmgv(source_p, source_stride, max_p, ++ frames_to_process); ++ return; ++ } ++#endif + int n = frames_to_process; + float max = 0; + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + if (source_stride == 1) { + // If the sourceP address is not 16-byte aligned, the first several frames + // (at most three) should be processed separately. +@@ -837,6 +903,8 @@ + *max_p = max; + } + ++#ifndef BUILD_ONLY_THE_SSE2_PARTS ++ + void Vclip(const float* source_p, + int source_stride, + const float* low_threshold_p, +@@ -894,6 +962,12 @@ + } + } + ++#endif ++ ++#ifdef BUILD_ONLY_THE_SSE2_PARTS ++} // namespace SSE2 ++#endif ++ + #endif // defined(OS_MACOSX) + + } // namespace VectorMath +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-12-25 14:51:17.547536826 +0100 +@@ -27,6 +27,7 @@ + #define VectorMath_h + + #include ++#include "build/build_config.h" + #include "platform/PlatformExport.h" + #include "platform/wtf/build_config.h" + +@@ -97,6 +98,62 @@ + int dest_stride, + size_t frames_to_process); + ++#ifdef ARCH_CPU_X86 ++namespace SSE2 { ++// Vector scalar multiply and then add. ++PLATFORM_EXPORT void Vsma(const float* source_p, ++ int source_stride, ++ const float* scale, ++ float* dest_p, ++ int dest_stride, ++ size_t frames_to_process); ++ ++PLATFORM_EXPORT void Vsmul(const float* source_p, ++ int source_stride, ++ const float* scale, ++ float* dest_p, ++ int dest_stride, ++ size_t frames_to_process); ++PLATFORM_EXPORT void Vadd(const float* source1p, ++ int source_stride1, ++ const float* source2p, ++ int source_stride2, ++ float* dest_p, ++ int dest_stride, ++ size_t frames_to_process); ++ ++// Finds the maximum magnitude of a float vector. ++PLATFORM_EXPORT void Vmaxmgv(const float* source_p, ++ int source_stride, ++ float* max_p, ++ size_t frames_to_process); ++ ++// Sums the squares of a float vector's elements. ++PLATFORM_EXPORT void Vsvesq(const float* source_p, ++ int source_stride, ++ float* sum_p, ++ size_t frames_to_process); ++ ++// For an element-by-element multiply of two float vectors. ++PLATFORM_EXPORT void Vmul(const float* source1p, ++ int source_stride1, ++ const float* source2p, ++ int source_stride2, ++ float* dest_p, ++ int dest_stride, ++ size_t frames_to_process); ++ ++// Multiplies two complex vectors. ++PLATFORM_EXPORT void Zvmul(const float* real1p, ++ const float* imag1p, ++ const float* real2p, ++ const float* imag2p, ++ float* real_dest_p, ++ float* imag_dest_p, ++ size_t frames_to_process); ++} ++#endif ++ + } // namespace VectorMath + } // namespace blink + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-12-25 13:05:24.024939497 +0100 +@@ -0,0 +1,2 @@ ++#define BUILD_ONLY_THE_SSE2_PARTS ++#include "VectorMath.cpp" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-12-25 13:05:24.025939484 +0100 +@@ -1693,6 +1693,10 @@ + deps += [ ":blink_x86_sse" ] + } + ++ if (current_cpu == "x86") { ++ deps += [ ":blink_x86_sse2" ] ++ } ++ + if (use_webaudio_ffmpeg) { + include_dirs += [ "//third_party/ffmpeg" ] + deps += [ "//third_party/ffmpeg" ] +@@ -2139,6 +2143,26 @@ + } + } + ++if (current_cpu == "x86") { ++ source_set("blink_x86_sse2") { ++ sources = [ ++ "audio/DirectConvolverSSE2.cpp", ++ "audio/SincResamplerSSE2.cpp", ++ "audio/VectorMathSSE2.cpp", ++ ] ++ cflags = [ "-msse2", "-mfpmath=sse" ] ++ deps = [ ++ ":blink_common", ++ ] ++ configs += [ ++ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. ++ "//build/config/compiler:no_size_t_to_int_warning", ++ "//third_party/WebKit/Source:config", ++ "//third_party/WebKit/Source:non_test_config", ++ ] ++ } ++} ++ + # This source set is used for fuzzers that need an environment similar to unit + # tests. + source_set("blink_fuzzer_test_support") { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-12-25 17:01:28.182182131 +0100 +@@ -7,7 +7,7 @@ + + #include "build/build_config.h" + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + #include + + namespace blink { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-12-25 17:03:30.477435712 +0100 +@@ -444,7 +444,7 @@ + const uint32_t* source32 = reinterpret_cast_ptr(source); + uint32_t* destination32 = reinterpret_cast_ptr(destination); + +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::UnpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, + pixels_per_row); + #endif +@@ -472,7 +472,7 @@ + const uint16_t* source, + uint8_t* destination, + unsigned pixels_per_row) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::UnpackOneRowOfRGBA5551LittleToRGBA8(source, destination, + pixels_per_row); + #endif +@@ -502,7 +502,7 @@ + const uint16_t* source, + uint8_t* destination, + unsigned pixels_per_row) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::UnpackOneRowOfRGBA4444LittleToRGBA8(source, destination, + pixels_per_row); + #endif +@@ -718,7 +718,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixels_per_row) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::PackOneRowOfRGBA8LittleToR8(source, destination, pixels_per_row); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -775,7 +775,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixels_per_row) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::PackOneRowOfRGBA8LittleToRA8(source, destination, pixels_per_row); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +@@ -887,7 +887,7 @@ + uint8_t>(const uint8_t* source, + uint8_t* destination, + unsigned pixels_per_row) { +-#if defined(ARCH_CPU_X86_FAMILY) ++#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) + SIMD::PackOneRowOfRGBA8LittleToRGBA8(source, destination, pixels_per_row); + #endif + #if HAVE(MIPS_MSA_INTRINSICS) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-12-25 17:05:49.957443890 +0100 +@@ -14,6 +14,7 @@ + #include "webrtc/common_audio/real_fourier_openmax.h" + #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" + #include "webrtc/rtc_base/checks.h" ++#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" + + namespace webrtc { + +@@ -23,7 +24,15 @@ + + std::unique_ptr RealFourier::Create(int fft_order) { + #if defined(RTC_USE_OPENMAX_DL) ++#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) ++ // x86 CPU detection required. ++ if (WebRtc_GetCPUInfo(kSSE2)) ++ return std::unique_ptr(new RealFourierOpenmax(fft_order)); ++ else ++ return std::unique_ptr(new RealFourierOoura(fft_order)); ++#else + return std::unique_ptr(new RealFourierOpenmax(fft_order)); ++#endif + #else + return std::unique_ptr(new RealFourierOoura(fft_order)); + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-12-25 17:42:57.199465881 +0100 +@@ -116,9 +116,9 @@ + v8_experimental_extra_library_files = + [ "//test/cctest/test-experimental-extra.js" ] + +- v8_enable_gdbjit = +- ((v8_current_cpu == "x86" || v8_current_cpu == "x64") && +- (is_linux || is_mac)) || (v8_current_cpu == "ppc64" && is_linux) ++ v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || ++ v8_current_cpu == "x87") && (is_linux || is_mac)) || ++ (v8_current_cpu == "ppc64" && is_linux) + + # Temporary flag to allow embedders to update their microtasks scopes + # while rolling in a new version of V8. +@@ -161,7 +161,7 @@ + + include_dirs = [ "." ] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_SHARED" ] + } + } +@@ -175,14 +175,14 @@ + # This config should be applied to code using the libplatform. + config("libplatform_config") { + include_dirs = [ "include" ] +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_PLATFORM_SHARED" ] + } + } + + # This config should be applied to code using the libbase. + config("libbase_config") { +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_BASE_SHARED" ] + } + libs = [] +@@ -199,7 +199,7 @@ + # This config should only be applied to code using V8 and not any V8 code + # itself. + config("external_config") { +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "USING_V8_SHARED" ] + } + include_dirs = [ +@@ -434,6 +434,9 @@ + cflags += [ "/arch:SSE2" ] + } + } ++ if (v8_current_cpu == "x87") { ++ defines += [ "V8_TARGET_ARCH_X87" ] ++ } + if (v8_current_cpu == "x64") { + defines += [ "V8_TARGET_ARCH_X64" ] + if (is_win) { +@@ -443,6 +446,9 @@ + ldflags += [ "/STACK:2097152" ] + } + } ++ if (v8_current_cpu == "x87") { ++ defines += [ "V8_TARGET_ARCH_X87" ] ++ } + if (is_android && v8_android_log_stdout) { + defines += [ "V8_ANDROID_LOG_STDOUT" ] + } +@@ -1040,6 +1046,11 @@ + ### gcmole(arch:s390) ### + "src/builtins/s390/builtins-s390.cc", + ] ++ } else if (v8_current_cpu == "x87") { ++ sources += [ ++ ### gcmole(arch:x87) ### ++ "src/builtins/x87/builtins-x87.cc", ++ ] + } + + if (!v8_enable_i18n_support) { +@@ -2309,6 +2320,37 @@ + "src/s390/simulator-s390.cc", + "src/s390/simulator-s390.h", + ] ++ } else if (v8_current_cpu == "x87") { ++ sources += [ ### gcmole(arch:x87) ### ++ "src/compiler/x87/code-generator-x87.cc", ++ "src/compiler/x87/instruction-codes-x87.h", ++ "src/compiler/x87/instruction-scheduler-x87.cc", ++ "src/compiler/x87/instruction-selector-x87.cc", ++ "src/debug/x87/debug-x87.cc", ++ "src/full-codegen/x87/full-codegen-x87.cc", ++ "src/ic/x87/access-compiler-x87.cc", ++ "src/ic/x87/handler-compiler-x87.cc", ++ "src/ic/x87/ic-x87.cc", ++ "src/regexp/x87/regexp-macro-assembler-x87.cc", ++ "src/regexp/x87/regexp-macro-assembler-x87.h", ++ "src/x87/assembler-x87-inl.h", ++ "src/x87/assembler-x87.cc", ++ "src/x87/assembler-x87.h", ++ "src/x87/code-stubs-x87.cc", ++ "src/x87/code-stubs-x87.h", ++ "src/x87/codegen-x87.cc", ++ "src/x87/codegen-x87.h", ++ "src/x87/cpu-x87.cc", ++ "src/x87/deoptimizer-x87.cc", ++ "src/x87/disasm-x87.cc", ++ "src/x87/frames-x87.cc", ++ "src/x87/frames-x87.h", ++ "src/x87/interface-descriptors-x87.cc", ++ "src/x87/macro-assembler-x87.cc", ++ "src/x87/macro-assembler-x87.h", ++ "src/x87/simulator-x87.cc", ++ "src/x87/simulator-x87.h", ++ ] + } + + configs = [ ":internal_config" ] +@@ -2420,7 +2462,7 @@ + + defines = [] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_BASE_SHARED" ] + } + +@@ -2530,7 +2572,7 @@ + + configs = [ ":internal_config_base" ] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_PLATFORM_SHARED" ] + } + +@@ -2676,7 +2718,22 @@ + ] + } + +-if (is_component_build) { ++if (v8_build_shared) { ++ shared_library("v8") { ++ sources = [ ++ "src/v8dll-main.cc", ++ ] ++ ++ public_deps = [ ++ ":v8_base", ++ ":v8_maybe_snapshot", ++ ] ++ ++ configs += [ ":internal_config" ] ++ ++ public_configs = [ ":external_config" ] ++ } ++} else if (is_component_build) { + v8_component("v8") { + sources = [ + "src/v8dll-main.cc", +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gni/v8.gni 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-12-25 18:02:06.095884970 +0100 +@@ -42,6 +42,9 @@ + # add a dependency on the ICU library. + v8_enable_i18n_support = true + ++ # Whether to build V8 as a shared library ++ v8_build_shared = false ++ + # Use static libraries instead of source_sets. + v8_static_library = false + } +@@ -56,6 +59,11 @@ + v8_enable_backtrace = is_debug && !v8_optimized_debug + } + ++if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { ++ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds ++ v8_build_shared = true ++} ++ + # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute + # paths for all configs in templates as they are shared in different + # subdirectories. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-12-25 17:42:57.200465867 +0100 +@@ -262,14 +262,14 @@ + # goma doesn't support PDB yet. + 'fastbuild%': 1, + }], +- ['((v8_target_arch=="ia32" or v8_target_arch=="x64") and \ ++ ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x87") and \ + (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")', { + 'v8_enable_gdbjit%': 1, + }, { + 'v8_enable_gdbjit%': 0, + }], + ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ +- v8_target_arch!="x32"', { ++ (v8_target_arch!="x87" and v8_target_arch!="x32")', { + 'clang%': 1, + }, { + 'clang%': 0, +@@ -1207,7 +1207,7 @@ + '-L<(android_libcpp_libs)/arm64-v8a', + ], + }], +- ['target_arch=="ia32"', { ++ ['target_arch=="ia32" or target_arch=="x87"', { + # The x86 toolchain currently has problems with stack-protector. + 'cflags!': [ + '-fstack-protector', +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2017-12-25 17:42:57.200465867 +0100 +@@ -144,7 +144,7 @@ + 'host_cxx_is_biarch%': 0, + }, + }], +- ['target_arch=="ia32" or target_arch=="x64" or \ ++ ['target_arch=="ia32" or target_arch=="x64" or target_arch=="x87" or \ + target_arch=="ppc" or target_arch=="ppc64" or target_arch=="s390" or \ + target_arch=="s390x" or clang==1', { + 'variables': { +@@ -342,6 +342,12 @@ + 'V8_TARGET_ARCH_IA32', + ], + }], # v8_target_arch=="ia32" ++ ['v8_target_arch=="x87"', { ++ 'defines': [ ++ 'V8_TARGET_ARCH_X87', ++ ], ++ 'cflags': ['-march=i586'], ++ }], # v8_target_arch=="x87" + ['v8_target_arch=="mips" or v8_target_arch=="mipsel" \ + or v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { + 'target_conditions': [ +@@ -1000,8 +1006,9 @@ + ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ + or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ + (v8_target_arch=="arm" or v8_target_arch=="ia32" or \ +- v8_target_arch=="mips" or v8_target_arch=="mipsel" or \ +- v8_target_arch=="ppc" or v8_target_arch=="s390")', { ++ v8_target_arch=="x87" or v8_target_arch=="mips" or \ ++ v8_target_arch=="mipsel" or v8_target_arch=="ppc" or \ ++ v8_target_arch=="s390")', { + 'target_conditions': [ + ['_toolset=="host"', { + 'conditions': [ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/Makefile qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/Makefile +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/Makefile 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/Makefile 2017-12-25 17:42:57.200465867 +0100 +@@ -255,13 +255,14 @@ + + # Architectures and modes to be compiled. Consider these to be internal + # variables, don't override them (use the targets instead). +-ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el ppc ppc64 s390 s390x +-ARCHES32 = ia32 arm mips mipsel ppc s390 ++ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el x87 ppc ppc64 s390 \ ++ s390x ++ARCHES32 = ia32 arm mips mipsel x87 ppc s390 + DEFAULT_ARCHES = ia32 x64 arm + MODES = release debug optdebug + DEFAULT_MODES = release debug + ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ +- android_mipsel ++ android_mipsel android_x87 + + # List of files that trigger Makefile regeneration: + GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc 2017-12-25 17:42:57.201465852 +0100 +@@ -85,6 +85,8 @@ + #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" // NOLINT + #elif V8_TARGET_ARCH_S390 + #include "src/regexp/s390/regexp-macro-assembler-s390.h" // NOLINT ++#elif V8_TARGET_ARCH_X87 ++#include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT + #else // Unknown architecture. + #error "Unknown architecture." + #endif // Target architecture. +@@ -1318,6 +1320,8 @@ + function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); + #elif V8_TARGET_ARCH_S390 + function = FUNCTION_ADDR(RegExpMacroAssemblerS390::CheckStackGuardState); ++#elif V8_TARGET_ARCH_X87 ++ function = FUNCTION_ADDR(RegExpMacroAssemblerX87::CheckStackGuardState); + #else + UNREACHABLE(); + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler-inl.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h 2017-12-25 17:42:57.201465852 +0100 +@@ -23,6 +23,8 @@ + #include "src/mips64/assembler-mips64-inl.h" + #elif V8_TARGET_ARCH_S390 + #include "src/s390/assembler-s390-inl.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/assembler-x87-inl.h" + #else + #error Unknown architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/build_config.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/build_config.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h 2017-12-25 17:42:57.201465852 +0100 +@@ -76,9 +76,9 @@ + // Target architecture detection. This may be set externally. If not, detect + // in the same way as the host architecture, that is, target the native + // environment as presented by the compiler. +-#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \ +- !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64 && \ +- !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390 ++#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \ ++ !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \ ++ !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390 + #if defined(_M_X64) || defined(__x86_64__) + #define V8_TARGET_ARCH_X64 1 + #elif defined(_M_IX86) || defined(__i386__) +@@ -129,6 +129,8 @@ + #else + #define V8_TARGET_ARCH_32_BIT 1 + #endif ++#elif V8_TARGET_ARCH_X87 ++#define V8_TARGET_ARCH_32_BIT 1 + #else + #error Unknown target architecture pointer size + #endif +@@ -179,6 +181,8 @@ + #else + #define V8_TARGET_LITTLE_ENDIAN 1 + #endif ++#elif V8_TARGET_ARCH_X87 ++#define V8_TARGET_LITTLE_ENDIAN 1 + #elif __BIG_ENDIAN__ // FOR PPCGR on AIX + #define V8_TARGET_BIG_ENDIAN 1 + #elif V8_TARGET_ARCH_PPC_LE +@@ -195,7 +199,8 @@ + #error Unknown target architecture endianness + #endif + +-#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) ++#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) || \ ++ defined(V8_TARGET_ARCH_X87) + #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 1 + #else + #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-25 17:42:57.204465808 +0100 +@@ -0,0 +1,3143 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/code-factory.h" ++#include "src/codegen.h" ++#include "src/deoptimizer.h" ++#include "src/full-codegen/full-codegen.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm) ++ ++void Builtins::Generate_Adaptor(MacroAssembler* masm, Address address, ++ ExitFrameType exit_frame_type) { ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments excluding receiver ++ // -- edi : target ++ // -- edx : new.target ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // -- ... ++ // -- esp[4 * argc] : first argument ++ // -- esp[4 * (argc +1)] : receiver ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // Make sure we operate in the context of the called function (for example ++ // ConstructStubs implemented in C++ will be run in the context of the caller ++ // instead of the callee, due to the way that [[Construct]] is defined for ++ // ordinary functions). ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ // JumpToExternalReference expects eax to contain the number of arguments ++ // including the receiver and the extra arguments. ++ const int num_extra_args = 3; ++ __ add(eax, Immediate(num_extra_args + 1)); ++ ++ // Insert extra arguments. ++ __ PopReturnAddressTo(ecx); ++ __ SmiTag(eax); ++ __ Push(eax); ++ __ SmiUntag(eax); ++ __ Push(edi); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ ++ __ JumpToExternalReference(ExternalReference(address, masm->isolate()), ++ exit_frame_type == BUILTIN_EXIT); ++} ++ ++static void GenerateTailCallToReturnedCode(MacroAssembler* masm, ++ Runtime::FunctionId function_id) { ++ // ----------- S t a t e ------------- ++ // -- eax : argument count (preserved for callee) ++ // -- edx : new target (preserved for callee) ++ // -- edi : target function (preserved for callee) ++ // ----------------------------------- ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // Push the number of arguments to the callee. ++ __ SmiTag(eax); ++ __ push(eax); ++ // Push a copy of the target function and the new target. ++ __ push(edi); ++ __ push(edx); ++ // Function is also the parameter to the runtime call. ++ __ push(edi); ++ ++ __ CallRuntime(function_id, 1); ++ __ mov(ebx, eax); ++ ++ // Restore target function and new target. ++ __ pop(edx); ++ __ pop(edi); ++ __ pop(eax); ++ __ SmiUntag(eax); ++ } ++ ++ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); ++ __ jmp(ebx); ++} ++ ++static void GenerateTailCallToSharedCode(MacroAssembler* masm) { ++ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); ++ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); ++ __ jmp(ebx); ++} ++ ++void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) { ++ // Checking whether the queued function is ready for install is optional, ++ // since we come across interrupts and stack checks elsewhere. However, ++ // not checking may delay installing ready functions, and always checking ++ // would be quite expensive. A good compromise is to first check against ++ // stack limit as a cue for an interrupt signal. ++ Label ok; ++ ExternalReference stack_limit = ++ ExternalReference::address_of_stack_limit(masm->isolate()); ++ __ cmp(esp, Operand::StaticVariable(stack_limit)); ++ __ j(above_equal, &ok, Label::kNear); ++ ++ GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); ++ ++ __ bind(&ok); ++ GenerateTailCallToSharedCode(masm); ++} ++ ++namespace { ++ ++void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function, ++ bool create_implicit_receiver, ++ bool check_derived_construct) { ++ // ----------- S t a t e ------------- ++ // -- eax: number of arguments ++ // -- esi: context ++ // -- edi: constructor function ++ // -- edx: new target ++ // ----------------------------------- ++ ++ // Enter a construct frame. ++ { ++ FrameScope scope(masm, StackFrame::CONSTRUCT); ++ ++ // Preserve the incoming parameters on the stack. ++ __ SmiTag(eax); ++ __ push(esi); ++ __ push(eax); ++ ++ if (create_implicit_receiver) { ++ // Allocate the new receiver object. ++ __ Push(edi); ++ __ Push(edx); ++ __ Call(Builtins::CallableFor(masm->isolate(), Builtins::kFastNewObject) ++ .code(), ++ RelocInfo::CODE_TARGET); ++ __ mov(ebx, eax); ++ __ Pop(edx); ++ __ Pop(edi); ++ ++ // ----------- S t a t e ------------- ++ // -- edi: constructor function ++ // -- ebx: newly allocated object ++ // -- edx: new target ++ // ----------------------------------- ++ ++ // Retrieve smi-tagged arguments count from the stack. ++ __ mov(eax, Operand(esp, 0)); ++ } ++ ++ __ SmiUntag(eax); ++ ++ if (create_implicit_receiver) { ++ // Push the allocated receiver to the stack. We need two copies ++ // because we may have to return the original one and the calling ++ // conventions dictate that the called function pops the receiver. ++ __ push(ebx); ++ __ push(ebx); ++ } else { ++ __ PushRoot(Heap::kTheHoleValueRootIndex); ++ } ++ ++ // Set up pointer to last argument. ++ __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); ++ ++ // Copy arguments and receiver to the expression stack. ++ Label loop, entry; ++ __ mov(ecx, eax); ++ __ jmp(&entry); ++ __ bind(&loop); ++ __ push(Operand(ebx, ecx, times_4, 0)); ++ __ bind(&entry); ++ __ dec(ecx); ++ __ j(greater_equal, &loop); ++ ++ // Call the function. ++ ParameterCount actual(eax); ++ __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, ++ CheckDebugStepCallWrapper()); ++ ++ // Store offset of return address for deoptimizer. ++ if (create_implicit_receiver && !is_api_function) { ++ masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); ++ } ++ ++ // Restore context from the frame. ++ __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); ++ ++ if (create_implicit_receiver) { ++ // If the result is an object (in the ECMA sense), we should get rid ++ // of the receiver and use the result; see ECMA-262 section 13.2.2-7 ++ // on page 74. ++ Label use_receiver, exit; ++ ++ // If the result is a smi, it is *not* an object in the ECMA sense. ++ __ JumpIfSmi(eax, &use_receiver, Label::kNear); ++ ++ // If the type of the result (stored in its map) is less than ++ // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(above_equal, &exit, Label::kNear); ++ ++ // Throw away the result of the constructor invocation and use the ++ // on-stack receiver as the result. ++ __ bind(&use_receiver); ++ __ mov(eax, Operand(esp, 0)); ++ ++ // Restore the arguments count and leave the construct frame. The ++ // arguments count is stored below the receiver. ++ __ bind(&exit); ++ __ mov(ebx, Operand(esp, 1 * kPointerSize)); ++ } else { ++ __ mov(ebx, Operand(esp, 0)); ++ } ++ ++ // Leave construct frame. ++ } ++ ++ // ES6 9.2.2. Step 13+ ++ // Check that the result is not a Smi, indicating that the constructor result ++ // from a derived class is neither undefined nor an Object. ++ if (check_derived_construct) { ++ Label dont_throw; ++ __ JumpIfNotSmi(eax, &dont_throw); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); ++ } ++ __ bind(&dont_throw); ++ } ++ ++ // Remove caller arguments from the stack and return. ++ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); ++ __ pop(ecx); ++ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver ++ __ push(ecx); ++ if (create_implicit_receiver) { ++ __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); ++ } ++ __ ret(0); ++} ++ ++} // namespace ++ ++void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { ++ Generate_JSConstructStubHelper(masm, false, true, false); ++} ++ ++void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { ++ Generate_JSConstructStubHelper(masm, true, false, false); ++} ++ ++void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { ++ Generate_JSConstructStubHelper(masm, false, false, false); ++} ++ ++void Builtins::Generate_JSBuiltinsConstructStubForDerived( ++ MacroAssembler* masm) { ++ Generate_JSConstructStubHelper(masm, false, false, true); ++} ++ ++void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ push(edi); ++ __ CallRuntime(Runtime::kThrowConstructedNonConstructable); ++} ++ ++enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt }; ++ ++// Clobbers ecx, edx, edi; preserves all other registers. ++static void Generate_CheckStackOverflow(MacroAssembler* masm, ++ IsTagged eax_is_tagged) { ++ // eax : the number of items to be pushed to the stack ++ // ++ // Check the stack for overflow. We are not trying to catch ++ // interruptions (e.g. debug break and preemption) here, so the "real stack ++ // limit" is checked. ++ Label okay; ++ ExternalReference real_stack_limit = ++ ExternalReference::address_of_real_stack_limit(masm->isolate()); ++ __ mov(edi, Operand::StaticVariable(real_stack_limit)); ++ // Make ecx the space we have left. The stack might already be overflowed ++ // here which will cause ecx to become negative. ++ __ mov(ecx, esp); ++ __ sub(ecx, edi); ++ // Make edx the space we need for the array when it is unrolled onto the ++ // stack. ++ __ mov(edx, eax); ++ int smi_tag = eax_is_tagged == kEaxIsSmiTagged ? kSmiTagSize : 0; ++ __ shl(edx, kPointerSizeLog2 - smi_tag); ++ // Check if the arguments will overflow the stack. ++ __ cmp(ecx, edx); ++ __ j(greater, &okay); // Signed comparison. ++ ++ // Out of stack space. ++ __ CallRuntime(Runtime::kThrowStackOverflow); ++ ++ __ bind(&okay); ++} ++ ++static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, ++ bool is_construct) { ++ ProfileEntryHookStub::MaybeCallEntryHook(masm); ++ ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Setup the context (we need to use the caller context from the isolate). ++ ExternalReference context_address(IsolateAddressId::kContextAddress, ++ masm->isolate()); ++ __ mov(esi, Operand::StaticVariable(context_address)); ++ ++ // Load the previous frame pointer (ebx) to access C arguments ++ __ mov(ebx, Operand(ebp, 0)); ++ ++ // Push the function and the receiver onto the stack. ++ __ push(Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); ++ __ push(Operand(ebx, EntryFrameConstants::kReceiverArgOffset)); ++ ++ // Load the number of arguments and setup pointer to the arguments. ++ __ mov(eax, Operand(ebx, EntryFrameConstants::kArgcOffset)); ++ __ mov(ebx, Operand(ebx, EntryFrameConstants::kArgvOffset)); ++ ++ // Check if we have enough stack space to push all arguments. ++ // Expects argument count in eax. Clobbers ecx, edx, edi. ++ Generate_CheckStackOverflow(masm, kEaxIsUntaggedInt); ++ ++ // Copy arguments to the stack in a loop. ++ Label loop, entry; ++ __ Move(ecx, Immediate(0)); ++ __ jmp(&entry, Label::kNear); ++ __ bind(&loop); ++ __ mov(edx, Operand(ebx, ecx, times_4, 0)); // push parameter from argv ++ __ push(Operand(edx, 0)); // dereference handle ++ __ inc(ecx); ++ __ bind(&entry); ++ __ cmp(ecx, eax); ++ __ j(not_equal, &loop); ++ ++ // Load the previous frame pointer (ebx) to access C arguments ++ __ mov(ebx, Operand(ebp, 0)); ++ ++ // Get the new.target and function from the frame. ++ __ mov(edx, Operand(ebx, EntryFrameConstants::kNewTargetArgOffset)); ++ __ mov(edi, Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); ++ ++ // Invoke the code. ++ Handle builtin = is_construct ++ ? masm->isolate()->builtins()->Construct() ++ : masm->isolate()->builtins()->Call(); ++ __ Call(builtin, RelocInfo::CODE_TARGET); ++ ++ // Exit the internal frame. Notice that this also removes the empty. ++ // context and the function left on the stack by the code ++ // invocation. ++ } ++ __ ret(kPointerSize); // Remove receiver. ++} ++ ++void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { ++ Generate_JSEntryTrampolineHelper(masm, false); ++} ++ ++void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { ++ Generate_JSEntryTrampolineHelper(masm, true); ++} ++ ++// static ++void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the value to pass to the generator ++ // -- ebx : the JSGeneratorObject to resume ++ // -- edx : the resume mode (tagged) ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ AssertGeneratorObject(ebx); ++ ++ // Store input value into generator object. ++ __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); ++ __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, ++ kDontSaveFPRegs); ++ ++ // Store resume mode into generator object. ++ __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); ++ ++ // Load suspended function and context. ++ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ // Flood function if we are stepping. ++ Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; ++ Label stepping_prepared; ++ ExternalReference debug_hook = ++ ExternalReference::debug_hook_on_function_call_address(masm->isolate()); ++ __ cmpb(Operand::StaticVariable(debug_hook), Immediate(0)); ++ __ j(not_equal, &prepare_step_in_if_stepping); ++ ++ // Flood function if we need to continue stepping in the suspended generator. ++ ExternalReference debug_suspended_generator = ++ ExternalReference::debug_suspended_generator_address(masm->isolate()); ++ __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); ++ __ j(equal, &prepare_step_in_suspended_generator); ++ __ bind(&stepping_prepared); ++ ++ // Pop return address. ++ __ PopReturnAddressTo(eax); ++ ++ // Push receiver. ++ __ Push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); ++ ++ // ----------- S t a t e ------------- ++ // -- eax : return address ++ // -- ebx : the JSGeneratorObject to resume ++ // -- edx : the resume mode (tagged) ++ // -- edi : generator function ++ // -- esi : generator context ++ // -- esp[0] : generator receiver ++ // ----------------------------------- ++ ++ // Push holes for arguments to generator function. Since the parser forced ++ // context allocation for any variables in generators, the actual argument ++ // values have already been copied into the context and these dummy values ++ // will never be used. ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, ++ FieldOperand(ecx, SharedFunctionInfo::kFormalParameterCountOffset)); ++ { ++ Label done_loop, loop; ++ __ bind(&loop); ++ __ sub(ecx, Immediate(1)); ++ __ j(carry, &done_loop, Label::kNear); ++ __ PushRoot(Heap::kTheHoleValueRootIndex); ++ __ jmp(&loop); ++ __ bind(&done_loop); ++ } ++ ++ // Underlying function needs to have bytecode available. ++ if (FLAG_debug_code) { ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kFunctionDataOffset)); ++ __ CmpObjectType(ecx, BYTECODE_ARRAY_TYPE, ecx); ++ __ Assert(equal, kMissingBytecodeArray); ++ } ++ ++ // Resume (Ignition/TurboFan) generator object. ++ { ++ __ PushReturnAddressFrom(eax); ++ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(eax, ++ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); ++ // We abuse new.target both to indicate that this is a resume call and to ++ // pass in the generator object. In ordinary calls, new.target is always ++ // undefined because generator functions are non-constructable. ++ __ mov(edx, ebx); ++ __ jmp(FieldOperand(edi, JSFunction::kCodeEntryOffset)); ++ } ++ ++ __ bind(&prepare_step_in_if_stepping); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(ebx); ++ __ Push(edx); ++ __ Push(edi); ++ __ CallRuntime(Runtime::kDebugOnFunctionCall); ++ __ Pop(edx); ++ __ Pop(ebx); ++ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); ++ } ++ __ jmp(&stepping_prepared); ++ ++ __ bind(&prepare_step_in_suspended_generator); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(ebx); ++ __ Push(edx); ++ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); ++ __ Pop(edx); ++ __ Pop(ebx); ++ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); ++ } ++ __ jmp(&stepping_prepared); ++} ++ ++static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, ++ Register scratch2) { ++ Register args_count = scratch1; ++ Register return_pc = scratch2; ++ ++ // Get the arguments + reciever count. ++ __ mov(args_count, ++ Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); ++ __ mov(args_count, ++ FieldOperand(args_count, BytecodeArray::kParameterSizeOffset)); ++ ++ // Leave the frame (also dropping the register file). ++ __ leave(); ++ ++ // Drop receiver + arguments. ++ __ pop(return_pc); ++ __ add(esp, args_count); ++ __ push(return_pc); ++} ++ ++// Generate code for entering a JS function with the interpreter. ++// On entry to the function the receiver and arguments have been pushed on the ++// stack left to right. The actual argument count matches the formal parameter ++// count expected by the function. ++// ++// The live registers are: ++// o edi: the JS function object being called ++// o edx: the new target ++// o esi: our context ++// o ebp: the caller's frame pointer ++// o esp: stack pointer (pointing to return address) ++// ++// The function builds an interpreter frame. See InterpreterFrameConstants in ++// frames.h for its layout. ++void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ++ ProfileEntryHookStub::MaybeCallEntryHook(masm); ++ ++ // Open a frame scope to indicate that there is a frame on the stack. The ++ // MANUAL indicates that the scope shouldn't actually generate code to set up ++ // the frame (that is done below). ++ FrameScope frame_scope(masm, StackFrame::MANUAL); ++ __ push(ebp); // Caller's frame pointer. ++ __ mov(ebp, esp); ++ __ push(esi); // Callee's context. ++ __ push(edi); // Callee's JS function. ++ __ push(edx); // Callee's new target. ++ ++ // Get the bytecode array from the function object (or from the DebugInfo if ++ // it is present) and load it into kInterpreterBytecodeArrayRegister. ++ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ Label load_debug_bytecode_array, bytecode_array_loaded; ++ __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), ++ &load_debug_bytecode_array); ++ __ mov(kInterpreterBytecodeArrayRegister, ++ FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); ++ __ bind(&bytecode_array_loaded); ++ ++ // Check whether we should continue to use the interpreter. ++ // TODO(rmcilroy) Remove self healing once liveedit only has to deal with ++ // Ignition bytecode. ++ Label switch_to_different_code_kind; ++ __ Move(ecx, masm->CodeObject()); // Self-reference to this code. ++ __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); ++ __ j(not_equal, &switch_to_different_code_kind); ++ ++ // Increment invocation count for the function. ++ __ EmitLoadFeedbackVector(ecx); ++ __ add( ++ FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize + ++ FeedbackVector::kHeaderSize), ++ Immediate(Smi::FromInt(1))); ++ ++ // Check function data field is actually a BytecodeArray object. ++ if (FLAG_debug_code) { ++ __ AssertNotSmi(kInterpreterBytecodeArrayRegister); ++ __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, ++ eax); ++ __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); ++ } ++ ++ // Reset code age. ++ __ mov_b(FieldOperand(kInterpreterBytecodeArrayRegister, ++ BytecodeArray::kBytecodeAgeOffset), ++ Immediate(BytecodeArray::kNoAgeBytecodeAge)); ++ ++ // Push bytecode array. ++ __ push(kInterpreterBytecodeArrayRegister); ++ // Push Smi tagged initial bytecode array offset. ++ __ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag))); ++ ++ // Allocate the local and temporary register file on the stack. ++ { ++ // Load frame size from the BytecodeArray object. ++ __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, ++ BytecodeArray::kFrameSizeOffset)); ++ ++ // Do a stack check to ensure we don't go over the limit. ++ Label ok; ++ __ mov(ecx, esp); ++ __ sub(ecx, ebx); ++ ExternalReference stack_limit = ++ ExternalReference::address_of_real_stack_limit(masm->isolate()); ++ __ cmp(ecx, Operand::StaticVariable(stack_limit)); ++ __ j(above_equal, &ok); ++ __ CallRuntime(Runtime::kThrowStackOverflow); ++ __ bind(&ok); ++ ++ // If ok, push undefined as the initial value for all register file entries. ++ Label loop_header; ++ Label loop_check; ++ __ mov(eax, Immediate(masm->isolate()->factory()->undefined_value())); ++ __ jmp(&loop_check); ++ __ bind(&loop_header); ++ // TODO(rmcilroy): Consider doing more than one push per loop iteration. ++ __ push(eax); ++ // Continue loop if not done. ++ __ bind(&loop_check); ++ __ sub(ebx, Immediate(kPointerSize)); ++ __ j(greater_equal, &loop_header); ++ } ++ ++ // Load accumulator, bytecode offset and dispatch table into registers. ++ __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); ++ __ mov(kInterpreterBytecodeOffsetRegister, ++ Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); ++ __ mov(kInterpreterDispatchTableRegister, ++ Immediate(ExternalReference::interpreter_dispatch_table_address( ++ masm->isolate()))); ++ ++ // Dispatch to the first bytecode handler for the function. ++ __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, ++ kInterpreterBytecodeOffsetRegister, times_1, 0)); ++ __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, ++ times_pointer_size, 0)); ++ __ call(ebx); ++ masm->isolate()->heap()->SetInterpreterEntryReturnPCOffset(masm->pc_offset()); ++ ++ // The return value is in eax. ++ LeaveInterpreterFrame(masm, ebx, ecx); ++ __ ret(0); ++ ++ // Load debug copy of the bytecode array. ++ __ bind(&load_debug_bytecode_array); ++ Register debug_info = kInterpreterBytecodeArrayRegister; ++ __ mov(debug_info, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); ++ __ mov(kInterpreterBytecodeArrayRegister, ++ FieldOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset)); ++ __ jmp(&bytecode_array_loaded); ++ ++ // If the shared code is no longer this entry trampoline, then the underlying ++ // function has been switched to a different kind of code and we heal the ++ // closure by switching the code entry field over to the new code as well. ++ __ bind(&switch_to_different_code_kind); ++ __ pop(edx); // Callee's new target. ++ __ pop(edi); // Callee's JS function. ++ __ pop(esi); // Callee's context. ++ __ leave(); // Leave the frame so we can tail call. ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); ++ __ RecordWriteCodeEntryField(edi, ecx, ebx); ++ __ jmp(ecx); ++} ++ ++static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, ++ Register scratch1, Register scratch2, ++ Label* stack_overflow, ++ bool include_receiver = false) { ++ // Check the stack for overflow. We are not trying to catch ++ // interruptions (e.g. debug break and preemption) here, so the "real stack ++ // limit" is checked. ++ ExternalReference real_stack_limit = ++ ExternalReference::address_of_real_stack_limit(masm->isolate()); ++ __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); ++ // Make scratch2 the space we have left. The stack might already be overflowed ++ // here which will cause scratch2 to become negative. ++ __ mov(scratch2, esp); ++ __ sub(scratch2, scratch1); ++ // Make scratch1 the space we need for the array when it is unrolled onto the ++ // stack. ++ __ mov(scratch1, num_args); ++ if (include_receiver) { ++ __ add(scratch1, Immediate(1)); ++ } ++ __ shl(scratch1, kPointerSizeLog2); ++ // Check if the arguments will overflow the stack. ++ __ cmp(scratch2, scratch1); ++ __ j(less_equal, stack_overflow); // Signed comparison. ++} ++ ++static void Generate_InterpreterPushArgs(MacroAssembler* masm, ++ Register array_limit, ++ Register start_address) { ++ // ----------- S t a t e ------------- ++ // -- start_address : Pointer to the last argument in the args array. ++ // -- array_limit : Pointer to one before the first argument in the ++ // args array. ++ // ----------------------------------- ++ Label loop_header, loop_check; ++ __ jmp(&loop_check); ++ __ bind(&loop_header); ++ __ Push(Operand(start_address, 0)); ++ __ sub(start_address, Immediate(kPointerSize)); ++ __ bind(&loop_check); ++ __ cmp(start_address, array_limit); ++ __ j(greater, &loop_header, Label::kNear); ++} ++ ++// static ++void Builtins::Generate_InterpreterPushArgsThenCallImpl( ++ MacroAssembler* masm, TailCallMode tail_call_mode, ++ InterpreterPushArgsMode mode) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- ebx : the address of the first argument to be pushed. Subsequent ++ // arguments should be consecutive above this, in the same order as ++ // they are to be pushed onto the stack. ++ // -- edi : the target to call (can be any Object). ++ // ----------------------------------- ++ Label stack_overflow; ++ // Compute the expected number of arguments. ++ __ mov(ecx, eax); ++ __ add(ecx, Immediate(1)); // Add one for receiver. ++ ++ // Add a stack check before pushing the arguments. We need an extra register ++ // to perform a stack check. So push it onto the stack temporarily. This ++ // might cause stack overflow, but it will be detected by the check. ++ __ Push(edi); ++ Generate_StackOverflowCheck(masm, ecx, edx, edi, &stack_overflow); ++ __ Pop(edi); ++ ++ // Pop return address to allow tail-call after pushing arguments. ++ __ Pop(edx); ++ ++ // Find the address of the last argument. ++ __ shl(ecx, kPointerSizeLog2); ++ __ neg(ecx); ++ __ add(ecx, ebx); ++ Generate_InterpreterPushArgs(masm, ecx, ebx); ++ ++ // Call the target. ++ __ Push(edx); // Re-push return address. ++ ++ if (mode == InterpreterPushArgsMode::kJSFunction) { ++ __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, ++ tail_call_mode), ++ RelocInfo::CODE_TARGET); ++ } else if (mode == InterpreterPushArgsMode::kWithFinalSpread) { ++ __ Jump(masm->isolate()->builtins()->CallWithSpread(), ++ RelocInfo::CODE_TARGET); ++ } else { ++ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, ++ tail_call_mode), ++ RelocInfo::CODE_TARGET); ++ } ++ ++ __ bind(&stack_overflow); ++ { ++ // Pop the temporary registers, so that return address is on top of stack. ++ __ Pop(edi); ++ ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ ++ // This should be unreachable. ++ __ int3(); ++ } ++} ++ ++namespace { ++ ++// This function modified start_addr, and only reads the contents of num_args ++// register. scratch1 and scratch2 are used as temporary registers. Their ++// original values are restored after the use. ++void Generate_InterpreterPushArgsThenReturnAddress( ++ MacroAssembler* masm, Register num_args, Register start_addr, ++ Register scratch1, Register scratch2, bool receiver_in_args, ++ int num_slots_above_ret_addr, Label* stack_overflow) { ++ // We have to move return address and the temporary registers above it ++ // before we can copy arguments onto the stack. To achieve this: ++ // Step 1: Increment the stack pointer by num_args + 1 (for receiver). ++ // Step 2: Move the return address and values above it to the top of stack. ++ // Step 3: Copy the arguments into the correct locations. ++ // current stack =====> required stack layout ++ // | | | scratch1 | (2) <-- esp(1) ++ // | | | .... | (2) ++ // | | | scratch-n | (2) ++ // | | | return addr | (2) ++ // | | | arg N | (3) ++ // | scratch1 | <-- esp | .... | ++ // | .... | | arg 0 | ++ // | scratch-n | | arg 0 | ++ // | return addr | | receiver slot | ++ ++ // Check for stack overflow before we increment the stack pointer. ++ Generate_StackOverflowCheck(masm, num_args, scratch1, scratch2, ++ stack_overflow, true); ++ ++// Step 1 - Update the stack pointer. scratch1 already contains the required ++// increment to the stack. i.e. num_args + 1 stack slots. This is computed in ++// the Generate_StackOverflowCheck. ++ ++#ifdef _MSC_VER ++ // TODO(mythria): Move it to macro assembler. ++ // In windows, we cannot increment the stack size by more than one page ++ // (mimimum page size is 4KB) without accessing at least one byte on the ++ // page. Check this: ++ // https://msdn.microsoft.com/en-us/library/aa227153(v=vs.60).aspx. ++ const int page_size = 4 * 1024; ++ Label check_offset, update_stack_pointer; ++ __ bind(&check_offset); ++ __ cmp(scratch1, page_size); ++ __ j(less, &update_stack_pointer); ++ __ sub(esp, Immediate(page_size)); ++ // Just to touch the page, before we increment further. ++ __ mov(Operand(esp, 0), Immediate(0)); ++ __ sub(scratch1, Immediate(page_size)); ++ __ jmp(&check_offset); ++ __ bind(&update_stack_pointer); ++#endif ++ ++ __ sub(esp, scratch1); ++ ++ // Step 2 move return_address and slots above it to the correct locations. ++ // Move from top to bottom, otherwise we may overwrite when num_args = 0 or 1, ++ // basically when the source and destination overlap. We at least need one ++ // extra slot for receiver, so no extra checks are required to avoid copy. ++ for (int i = 0; i < num_slots_above_ret_addr + 1; i++) { ++ __ mov(scratch1, ++ Operand(esp, num_args, times_pointer_size, (i + 1) * kPointerSize)); ++ __ mov(Operand(esp, i * kPointerSize), scratch1); ++ } ++ ++ // Step 3 copy arguments to correct locations. ++ if (receiver_in_args) { ++ __ mov(scratch1, num_args); ++ __ add(scratch1, Immediate(1)); ++ } else { ++ // Slot meant for receiver contains return address. Reset it so that ++ // we will not incorrectly interpret return address as an object. ++ __ mov(Operand(esp, num_args, times_pointer_size, ++ (num_slots_above_ret_addr + 1) * kPointerSize), ++ Immediate(0)); ++ __ mov(scratch1, num_args); ++ } ++ ++ Label loop_header, loop_check; ++ __ jmp(&loop_check); ++ __ bind(&loop_header); ++ __ mov(scratch2, Operand(start_addr, 0)); ++ __ mov(Operand(esp, scratch1, times_pointer_size, ++ num_slots_above_ret_addr * kPointerSize), ++ scratch2); ++ __ sub(start_addr, Immediate(kPointerSize)); ++ __ sub(scratch1, Immediate(1)); ++ __ bind(&loop_check); ++ __ cmp(scratch1, Immediate(0)); ++ __ j(greater, &loop_header, Label::kNear); ++} ++ ++} // end anonymous namespace ++ ++// static ++void Builtins::Generate_InterpreterPushArgsThenConstructImpl( ++ MacroAssembler* masm, InterpreterPushArgsMode mode) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the new target ++ // -- edi : the constructor ++ // -- ebx : allocation site feedback (if available or undefined) ++ // -- ecx : the address of the first argument to be pushed. Subsequent ++ // arguments should be consecutive above this, in the same order as ++ // they are to be pushed onto the stack. ++ // ----------------------------------- ++ Label stack_overflow; ++ // We need two scratch registers. Push edi and edx onto stack. ++ __ Push(edi); ++ __ Push(edx); ++ ++ // Push arguments and move return address to the top of stack. ++ // The eax register is readonly. The ecx register will be modified. The edx ++ // and edi registers will be modified but restored to their original values. ++ Generate_InterpreterPushArgsThenReturnAddress(masm, eax, ecx, edx, edi, false, ++ 2, &stack_overflow); ++ ++ // Restore edi and edx ++ __ Pop(edx); ++ __ Pop(edi); ++ ++ __ AssertUndefinedOrAllocationSite(ebx); ++ if (mode == InterpreterPushArgsMode::kJSFunction) { ++ // Tail call to the function-specific construct stub (still in the caller ++ // context at this point). ++ __ AssertFunction(edi); ++ ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++ } else if (mode == InterpreterPushArgsMode::kWithFinalSpread) { ++ // Call the constructor with unmodified eax, edi, edx values. ++ __ Jump(masm->isolate()->builtins()->ConstructWithSpread(), ++ RelocInfo::CODE_TARGET); ++ } else { ++ DCHECK_EQ(InterpreterPushArgsMode::kOther, mode); ++ // Call the constructor with unmodified eax, edi, edx values. ++ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); ++ } ++ ++ __ bind(&stack_overflow); ++ { ++ // Pop the temporary registers, so that return address is on top of stack. ++ __ Pop(edx); ++ __ Pop(edi); ++ ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ ++ // This should be unreachable. ++ __ int3(); ++ } ++} ++ ++// static ++void Builtins::Generate_InterpreterPushArgsThenConstructArray( ++ MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the target to call checked to be Array function. ++ // -- ebx : the allocation site feedback ++ // -- ecx : the address of the first argument to be pushed. Subsequent ++ // arguments should be consecutive above this, in the same order as ++ // they are to be pushed onto the stack. ++ // ----------------------------------- ++ Label stack_overflow; ++ // We need two scratch registers. Register edi is available, push edx onto ++ // stack. ++ __ Push(edx); ++ ++ // Push arguments and move return address to the top of stack. ++ // The eax register is readonly. The ecx register will be modified. The edx ++ // and edi registers will be modified but restored to their original values. ++ Generate_InterpreterPushArgsThenReturnAddress(masm, eax, ecx, edx, edi, true, ++ 1, &stack_overflow); ++ ++ // Restore edx. ++ __ Pop(edx); ++ ++ // Array constructor expects constructor in edi. It is same as edx here. ++ __ Move(edi, edx); ++ ++ ArrayConstructorStub stub(masm->isolate()); ++ __ TailCallStub(&stub); ++ ++ __ bind(&stack_overflow); ++ { ++ // Pop the temporary registers, so that return address is on top of stack. ++ __ Pop(edx); ++ ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ ++ // This should be unreachable. ++ __ int3(); ++ } ++} ++ ++static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) { ++ // Set the return address to the correct point in the interpreter entry ++ // trampoline. ++ Smi* interpreter_entry_return_pc_offset( ++ masm->isolate()->heap()->interpreter_entry_return_pc_offset()); ++ DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero); ++ __ LoadHeapObject(ebx, ++ masm->isolate()->builtins()->InterpreterEntryTrampoline()); ++ __ add(ebx, Immediate(interpreter_entry_return_pc_offset->value() + ++ Code::kHeaderSize - kHeapObjectTag)); ++ __ push(ebx); ++ ++ // Initialize the dispatch table register. ++ __ mov(kInterpreterDispatchTableRegister, ++ Immediate(ExternalReference::interpreter_dispatch_table_address( ++ masm->isolate()))); ++ ++ // Get the bytecode array pointer from the frame. ++ __ mov(kInterpreterBytecodeArrayRegister, ++ Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); ++ ++ if (FLAG_debug_code) { ++ // Check function data field is actually a BytecodeArray object. ++ __ AssertNotSmi(kInterpreterBytecodeArrayRegister); ++ __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, ++ ebx); ++ __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); ++ } ++ ++ // Get the target bytecode offset from the frame. ++ __ mov(kInterpreterBytecodeOffsetRegister, ++ Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); ++ __ SmiUntag(kInterpreterBytecodeOffsetRegister); ++ ++ // Dispatch to the target bytecode. ++ __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, ++ kInterpreterBytecodeOffsetRegister, times_1, 0)); ++ __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, ++ times_pointer_size, 0)); ++ __ jmp(ebx); ++} ++ ++void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) { ++ // Advance the current bytecode offset stored within the given interpreter ++ // stack frame. This simulates what all bytecode handlers do upon completion ++ // of the underlying operation. ++ __ mov(ebx, Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); ++ __ mov(edx, Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); ++ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(kInterpreterAccumulatorRegister); ++ __ Push(ebx); // First argument is the bytecode array. ++ __ Push(edx); // Second argument is the bytecode offset. ++ __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); ++ __ Move(edx, eax); // Result is the new bytecode offset. ++ __ Pop(kInterpreterAccumulatorRegister); ++ } ++ __ mov(Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp), edx); ++ ++ Generate_InterpreterEnterBytecode(masm); ++} ++ ++void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { ++ Generate_InterpreterEnterBytecode(masm); ++} ++ ++void Builtins::Generate_CompileLazy(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argument count (preserved for callee) ++ // -- edx : new target (preserved for callee) ++ // -- edi : target function (preserved for callee) ++ // ----------------------------------- ++ // First lookup code, maybe we don't need to compile! ++ Label gotta_call_runtime, gotta_call_runtime_no_stack; ++ Label try_shared; ++ Label loop_top, loop_bottom; ++ ++ Register closure = edi; ++ Register new_target = edx; ++ Register argument_count = eax; ++ ++ // Do we have a valid feedback vector? ++ __ mov(ebx, FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); ++ __ mov(ebx, FieldOperand(ebx, Cell::kValueOffset)); ++ __ cmp(ebx, masm->isolate()->factory()->undefined_value()); ++ __ j(equal, &gotta_call_runtime_no_stack); ++ ++ __ push(argument_count); ++ __ push(new_target); ++ __ push(closure); ++ ++ Register map = argument_count; ++ Register index = ebx; ++ __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); ++ __ mov(index, FieldOperand(map, FixedArray::kLengthOffset)); ++ __ cmp(index, Immediate(Smi::FromInt(2))); ++ __ j(less, &try_shared); ++ ++ // edx : native context ++ // ebx : length / index ++ // eax : optimized code map ++ // stack[0] : new target ++ // stack[4] : closure ++ Register native_context = edx; ++ __ mov(native_context, NativeContextOperand()); ++ ++ __ bind(&loop_top); ++ Register temp = edi; ++ ++ // Does the native context match? ++ __ mov(temp, FieldOperand(map, index, times_half_pointer_size, ++ SharedFunctionInfo::kOffsetToPreviousContext)); ++ __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); ++ __ cmp(temp, native_context); ++ __ j(not_equal, &loop_bottom); ++ // Code available? ++ Register entry = ecx; ++ __ mov(entry, FieldOperand(map, index, times_half_pointer_size, ++ SharedFunctionInfo::kOffsetToPreviousCachedCode)); ++ __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); ++ __ JumpIfSmi(entry, &try_shared); ++ ++ // Found code. Get it into the closure and return. ++ __ pop(closure); ++ // Store code entry in the closure. ++ __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); ++ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); ++ __ RecordWriteCodeEntryField(closure, entry, eax); ++ ++ // Link the closure into the optimized function list. ++ // ecx : code entry ++ // edx : native context ++ // edi : closure ++ __ mov(ebx, ++ ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST)); ++ __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), ebx); ++ __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, ebx, eax, ++ kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); ++ const int function_list_offset = ++ Context::SlotOffset(Context::OPTIMIZED_FUNCTIONS_LIST); ++ __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), ++ closure); ++ // Save closure before the write barrier. ++ __ mov(ebx, closure); ++ __ RecordWriteContextSlot(native_context, function_list_offset, closure, eax, ++ kDontSaveFPRegs); ++ __ mov(closure, ebx); ++ __ pop(new_target); ++ __ pop(argument_count); ++ __ jmp(entry); ++ ++ __ bind(&loop_bottom); ++ __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength))); ++ __ cmp(index, Immediate(Smi::FromInt(1))); ++ __ j(greater, &loop_top); ++ ++ // We found no code. ++ __ jmp(&gotta_call_runtime); ++ ++ __ bind(&try_shared); ++ __ pop(closure); ++ __ pop(new_target); ++ __ pop(argument_count); ++ __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); ++ // Is the shared function marked for tier up? ++ __ test(FieldOperand(entry, SharedFunctionInfo::kCompilerHintsOffset), ++ Immediate(SharedFunctionInfo::MarkedForTierUpBit::kMask)); ++ __ j(not_zero, &gotta_call_runtime_no_stack); ++ ++ // If SFI points to anything other than CompileLazy, install that. ++ __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); ++ __ Move(ebx, masm->CodeObject()); ++ __ cmp(entry, ebx); ++ __ j(equal, &gotta_call_runtime_no_stack); ++ ++ // Install the SFI's code entry. ++ __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); ++ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); ++ __ RecordWriteCodeEntryField(closure, entry, ebx); ++ __ jmp(entry); ++ ++ __ bind(&gotta_call_runtime); ++ __ pop(closure); ++ __ pop(new_target); ++ __ pop(argument_count); ++ __ bind(&gotta_call_runtime_no_stack); ++ ++ GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); ++} ++ ++void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { ++ GenerateTailCallToReturnedCode(masm, ++ Runtime::kCompileOptimized_NotConcurrent); ++} ++ ++void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { ++ GenerateTailCallToReturnedCode(masm, Runtime::kCompileOptimized_Concurrent); ++} ++ ++void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argument count (preserved for callee) ++ // -- edx : new target (preserved for callee) ++ // -- edi : target function (preserved for callee) ++ // ----------------------------------- ++ Label failed; ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // Preserve argument count for later compare. ++ __ mov(ecx, eax); ++ // Push the number of arguments to the callee. ++ __ SmiTag(eax); ++ __ push(eax); ++ // Push a copy of the target function and the new target. ++ __ push(edi); ++ __ push(edx); ++ ++ // The function. ++ __ push(edi); ++ // Copy arguments from caller (stdlib, foreign, heap). ++ Label args_done; ++ for (int j = 0; j < 4; ++j) { ++ Label over; ++ if (j < 3) { ++ __ cmp(ecx, Immediate(j)); ++ __ j(not_equal, &over, Label::kNear); ++ } ++ for (int i = j - 1; i >= 0; --i) { ++ __ Push(Operand( ++ ebp, StandardFrameConstants::kCallerSPOffset + i * kPointerSize)); ++ } ++ for (int i = 0; i < 3 - j; ++i) { ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ } ++ if (j < 3) { ++ __ jmp(&args_done, Label::kNear); ++ __ bind(&over); ++ } ++ } ++ __ bind(&args_done); ++ ++ // Call runtime, on success unwind frame, and parent frame. ++ __ CallRuntime(Runtime::kInstantiateAsmJs, 4); ++ // A smi 0 is returned on failure, an object on success. ++ __ JumpIfSmi(eax, &failed, Label::kNear); ++ ++ __ Drop(2); ++ __ Pop(ecx); ++ __ SmiUntag(ecx); ++ scope.GenerateLeaveFrame(); ++ ++ __ PopReturnAddressTo(ebx); ++ __ inc(ecx); ++ __ lea(esp, Operand(esp, ecx, times_pointer_size, 0)); ++ __ PushReturnAddressFrom(ebx); ++ __ ret(0); ++ ++ __ bind(&failed); ++ // Restore target function and new target. ++ __ pop(edx); ++ __ pop(edi); ++ __ pop(eax); ++ __ SmiUntag(eax); ++ } ++ // On failure, tail call back to regular js. ++ GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); ++} ++ ++static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { ++ // For now, we are relying on the fact that make_code_young doesn't do any ++ // garbage collection which allows us to save/restore the registers without ++ // worrying about which of them contain pointers. We also don't build an ++ // internal frame to make the code faster, since we shouldn't have to do stack ++ // crawls in MakeCodeYoung. This seems a bit fragile. ++ ++ // Re-execute the code that was patched back to the young age when ++ // the stub returns. ++ __ sub(Operand(esp, 0), Immediate(5)); ++ __ pushad(); ++ __ mov(eax, Operand(esp, 8 * kPointerSize)); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ PrepareCallCFunction(2, ebx); ++ __ mov(Operand(esp, 1 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(masm->isolate()))); ++ __ mov(Operand(esp, 0), eax); ++ __ CallCFunction( ++ ExternalReference::get_make_code_young_function(masm->isolate()), 2); ++ } ++ __ popad(); ++ __ ret(0); ++} ++ ++#define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ ++ void Builtins::Generate_Make##C##CodeYoungAgain(MacroAssembler* masm) { \ ++ GenerateMakeCodeYoungAgainCommon(masm); \ ++ } ++CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) ++#undef DEFINE_CODE_AGE_BUILTIN_GENERATOR ++ ++void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) { ++ // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact ++ // that make_code_young doesn't do any garbage collection which allows us to ++ // save/restore the registers without worrying about which of them contain ++ // pointers. ++ __ pushad(); ++ __ mov(eax, Operand(esp, 8 * kPointerSize)); ++ __ sub(eax, Immediate(Assembler::kCallInstructionLength)); ++ { // NOLINT ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ PrepareCallCFunction(2, ebx); ++ __ mov(Operand(esp, 1 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(masm->isolate()))); ++ __ mov(Operand(esp, 0), eax); ++ __ CallCFunction( ++ ExternalReference::get_mark_code_as_executed_function(masm->isolate()), ++ 2); ++ } ++ __ popad(); ++ ++ // Perform prologue operations usually performed by the young code stub. ++ __ pop(eax); // Pop return address into scratch register. ++ __ push(ebp); // Caller's frame pointer. ++ __ mov(ebp, esp); ++ __ push(esi); // Callee's context. ++ __ push(edi); // Callee's JS Function. ++ __ push(eax); // Push return address after frame prologue. ++ ++ // Jump to point after the code-age stub. ++ __ ret(0); ++} ++ ++void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { ++ GenerateMakeCodeYoungAgainCommon(masm); ++} ++ ++void Builtins::Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm) { ++ Generate_MarkCodeAsExecutedOnce(masm); ++} ++ ++static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, ++ Deoptimizer::BailoutType type) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Pass deoptimization type to the runtime system. ++ __ push(Immediate(Smi::FromInt(static_cast(type)))); ++ __ CallRuntime(Runtime::kNotifyDeoptimized); ++ ++ // Tear down internal frame. ++ } ++ ++ // Get the full codegen state from the stack and untag it. ++ __ mov(ecx, Operand(esp, 1 * kPointerSize)); ++ __ SmiUntag(ecx); ++ ++ // Switch on the state. ++ Label not_no_registers, not_tos_eax; ++ __ cmp(ecx, static_cast(Deoptimizer::BailoutState::NO_REGISTERS)); ++ __ j(not_equal, ¬_no_registers, Label::kNear); ++ __ ret(1 * kPointerSize); // Remove state. ++ ++ __ bind(¬_no_registers); ++ DCHECK_EQ(kInterpreterAccumulatorRegister.code(), eax.code()); ++ __ mov(eax, Operand(esp, 2 * kPointerSize)); ++ __ cmp(ecx, static_cast(Deoptimizer::BailoutState::TOS_REGISTER)); ++ __ j(not_equal, ¬_tos_eax, Label::kNear); ++ __ ret(2 * kPointerSize); // Remove state, eax. ++ ++ __ bind(¬_tos_eax); ++ __ Abort(kNoCasesLeft); ++} ++ ++void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) { ++ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); ++} ++ ++void Builtins::Generate_NotifySoftDeoptimized(MacroAssembler* masm) { ++ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::SOFT); ++} ++ ++void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { ++ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); ++} ++ ++// static ++void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- esp[0] : return address ++ // -- esp[4] : argArray ++ // -- esp[8] : thisArg ++ // -- esp[12] : receiver ++ // ----------------------------------- ++ ++ // 1. Load receiver into edi, argArray into eax (if present), remove all ++ // arguments from the stack (including the receiver), and push thisArg (if ++ // present) instead. ++ { ++ Label no_arg_array, no_this_arg; ++ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); ++ __ mov(ebx, edx); ++ __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ __ test(eax, eax); ++ __ j(zero, &no_this_arg, Label::kNear); ++ { ++ __ mov(edx, Operand(esp, eax, times_pointer_size, 0)); ++ __ cmp(eax, Immediate(1)); ++ __ j(equal, &no_arg_array, Label::kNear); ++ __ mov(ebx, Operand(esp, eax, times_pointer_size, -kPointerSize)); ++ __ bind(&no_arg_array); ++ } ++ __ bind(&no_this_arg); ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(eax, ebx); ++ } ++ ++ // ----------- S t a t e ------------- ++ // -- eax : argArray ++ // -- edi : receiver ++ // -- esp[0] : return address ++ // -- esp[4] : thisArg ++ // ----------------------------------- ++ ++ // 2. Make sure the receiver is actually callable. ++ Label receiver_not_callable; ++ __ JumpIfSmi(edi, &receiver_not_callable, Label::kNear); ++ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsCallable)); ++ __ j(zero, &receiver_not_callable, Label::kNear); ++ ++ // 3. Tail call with no arguments if argArray is null or undefined. ++ Label no_arguments; ++ __ JumpIfRoot(eax, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); ++ __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &no_arguments, ++ Label::kNear); ++ ++ // 4a. Apply the receiver to the given argArray (passing undefined for ++ // new.target). ++ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); ++ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); ++ ++ // 4b. The argArray is either null or undefined, so we tail call without any ++ // arguments to the receiver. ++ __ bind(&no_arguments); ++ { ++ __ Set(eax, 0); ++ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); ++ } ++ ++ // 4c. The receiver is not callable, throw an appropriate TypeError. ++ __ bind(&receiver_not_callable); ++ { ++ __ mov(Operand(esp, kPointerSize), edi); ++ __ TailCallRuntime(Runtime::kThrowApplyNonFunction); ++ } ++} ++ ++// static ++void Builtins::Generate_FunctionPrototypeCall(MacroAssembler* masm) { ++ // Stack Layout: ++ // esp[0] : Return address ++ // esp[8] : Argument n ++ // esp[16] : Argument n-1 ++ // ... ++ // esp[8 * n] : Argument 1 ++ // esp[8 * (n + 1)] : Receiver (callable to call) ++ // ++ // eax contains the number of arguments, n, not counting the receiver. ++ // ++ // 1. Make sure we have at least one argument. ++ { ++ Label done; ++ __ test(eax, eax); ++ __ j(not_zero, &done, Label::kNear); ++ __ PopReturnAddressTo(ebx); ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ __ PushReturnAddressFrom(ebx); ++ __ inc(eax); ++ __ bind(&done); ++ } ++ ++ // 2. Get the callable to call (passed as receiver) from the stack. ++ __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ ++ // 3. Shift arguments and return address one slot down on the stack ++ // (overwriting the original receiver). Adjust argument count to make ++ // the original first argument the new receiver. ++ { ++ Label loop; ++ __ mov(ecx, eax); ++ __ bind(&loop); ++ __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); ++ __ mov(Operand(esp, ecx, times_pointer_size, kPointerSize), ebx); ++ __ dec(ecx); ++ __ j(not_sign, &loop); // While non-negative (to copy return address). ++ __ pop(ebx); // Discard copy of return address. ++ __ dec(eax); // One fewer argument (first argument is new receiver). ++ } ++ ++ // 4. Call the callable. ++ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); ++} ++ ++void Builtins::Generate_ReflectApply(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- esp[0] : return address ++ // -- esp[4] : argumentsList ++ // -- esp[8] : thisArgument ++ // -- esp[12] : target ++ // -- esp[16] : receiver ++ // ----------------------------------- ++ ++ // 1. Load target into edi (if present), argumentsList into eax (if present), ++ // remove all arguments from the stack (including the receiver), and push ++ // thisArgument (if present) instead. ++ { ++ Label done; ++ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); ++ __ mov(edx, edi); ++ __ mov(ebx, edi); ++ __ cmp(eax, Immediate(1)); ++ __ j(below, &done, Label::kNear); ++ __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); ++ __ j(equal, &done, Label::kNear); ++ __ mov(edx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); ++ __ cmp(eax, Immediate(3)); ++ __ j(below, &done, Label::kNear); ++ __ mov(ebx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); ++ __ bind(&done); ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(eax, ebx); ++ } ++ ++ // ----------- S t a t e ------------- ++ // -- eax : argumentsList ++ // -- edi : target ++ // -- esp[0] : return address ++ // -- esp[4] : thisArgument ++ // ----------------------------------- ++ ++ // 2. Make sure the target is actually callable. ++ Label target_not_callable; ++ __ JumpIfSmi(edi, &target_not_callable, Label::kNear); ++ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsCallable)); ++ __ j(zero, &target_not_callable, Label::kNear); ++ ++ // 3a. Apply the target to the given argumentsList (passing undefined for ++ // new.target). ++ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); ++ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); ++ ++ // 3b. The target is not callable, throw an appropriate TypeError. ++ __ bind(&target_not_callable); ++ { ++ __ mov(Operand(esp, kPointerSize), edi); ++ __ TailCallRuntime(Runtime::kThrowApplyNonFunction); ++ } ++} ++ ++void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- esp[0] : return address ++ // -- esp[4] : new.target (optional) ++ // -- esp[8] : argumentsList ++ // -- esp[12] : target ++ // -- esp[16] : receiver ++ // ----------------------------------- ++ ++ // 1. Load target into edi (if present), argumentsList into eax (if present), ++ // new.target into edx (if present, otherwise use target), remove all ++ // arguments from the stack (including the receiver), and push thisArgument ++ // (if present) instead. ++ { ++ Label done; ++ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); ++ __ mov(edx, edi); ++ __ mov(ebx, edi); ++ __ cmp(eax, Immediate(1)); ++ __ j(below, &done, Label::kNear); ++ __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); ++ __ mov(edx, edi); ++ __ j(equal, &done, Label::kNear); ++ __ mov(ebx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); ++ __ cmp(eax, Immediate(3)); ++ __ j(below, &done, Label::kNear); ++ __ mov(edx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); ++ __ bind(&done); ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(eax, ebx); ++ } ++ ++ // ----------- S t a t e ------------- ++ // -- eax : argumentsList ++ // -- edx : new.target ++ // -- edi : target ++ // -- esp[0] : return address ++ // -- esp[4] : receiver (undefined) ++ // ----------------------------------- ++ ++ // 2. Make sure the target is actually a constructor. ++ Label target_not_constructor; ++ __ JumpIfSmi(edi, &target_not_constructor, Label::kNear); ++ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsConstructor)); ++ __ j(zero, &target_not_constructor, Label::kNear); ++ ++ // 3. Make sure the target is actually a constructor. ++ Label new_target_not_constructor; ++ __ JumpIfSmi(edx, &new_target_not_constructor, Label::kNear); ++ __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsConstructor)); ++ __ j(zero, &new_target_not_constructor, Label::kNear); ++ ++ // 4a. Construct the target with the given new.target and argumentsList. ++ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); ++ ++ // 4b. The target is not a constructor, throw an appropriate TypeError. ++ __ bind(&target_not_constructor); ++ { ++ __ mov(Operand(esp, kPointerSize), edi); ++ __ TailCallRuntime(Runtime::kThrowNotConstructor); ++ } ++ ++ // 4c. The new.target is not a constructor, throw an appropriate TypeError. ++ __ bind(&new_target_not_constructor); ++ { ++ __ mov(Operand(esp, kPointerSize), edx); ++ __ TailCallRuntime(Runtime::kThrowNotConstructor); ++ } ++} ++ ++void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // ----------------------------------- ++ Label generic_array_code; ++ ++ // Get the InternalArray function. ++ __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, edi); ++ ++ if (FLAG_debug_code) { ++ // Initial map for the builtin InternalArray function should be a map. ++ __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); ++ // Will both indicate a NULL and a Smi. ++ __ test(ebx, Immediate(kSmiTagMask)); ++ __ Assert(not_zero, kUnexpectedInitialMapForInternalArrayFunction); ++ __ CmpObjectType(ebx, MAP_TYPE, ecx); ++ __ Assert(equal, kUnexpectedInitialMapForInternalArrayFunction); ++ } ++ ++ // Run the native code for the InternalArray function called as a normal ++ // function. ++ // tail call a stub ++ InternalArrayConstructorStub stub(masm->isolate()); ++ __ TailCallStub(&stub); ++} ++ ++void Builtins::Generate_ArrayCode(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // ----------------------------------- ++ Label generic_array_code; ++ ++ // Get the Array function. ++ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); ++ __ mov(edx, edi); ++ ++ if (FLAG_debug_code) { ++ // Initial map for the builtin Array function should be a map. ++ __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); ++ // Will both indicate a NULL and a Smi. ++ __ test(ebx, Immediate(kSmiTagMask)); ++ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); ++ __ CmpObjectType(ebx, MAP_TYPE, ecx); ++ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); ++ } ++ ++ // Run the native code for the Array function called as a normal function. ++ // tail call a stub ++ __ mov(ebx, masm->isolate()->factory()->undefined_value()); ++ ArrayConstructorStub stub(masm->isolate()); ++ __ TailCallStub(&stub); ++} ++ ++// static ++void Builtins::Generate_NumberConstructor(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments ++ // -- edi : constructor function ++ // -- esi : context ++ // -- esp[0] : return address ++ // -- esp[(argc - n) * 4] : arg[n] (zero-based) ++ // -- esp[(argc + 1) * 4] : receiver ++ // ----------------------------------- ++ ++ // 1. Load the first argument into ebx. ++ Label no_arguments; ++ { ++ __ test(eax, eax); ++ __ j(zero, &no_arguments, Label::kNear); ++ __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); ++ } ++ ++ // 2a. Convert the first argument to a number. ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ SmiTag(eax); ++ __ EnterBuiltinFrame(esi, edi, eax); ++ __ mov(eax, ebx); ++ __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); ++ __ LeaveBuiltinFrame(esi, edi, ebx); // Argc popped to ebx. ++ __ SmiUntag(ebx); ++ } ++ ++ { ++ // Drop all arguments including the receiver. ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); ++ __ PushReturnAddressFrom(ecx); ++ __ Ret(); ++ } ++ ++ // 2b. No arguments, return +0 (already in eax). ++ __ bind(&no_arguments); ++ __ ret(1 * kPointerSize); ++} ++ ++// static ++void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments ++ // -- edi : constructor function ++ // -- edx : new target ++ // -- esi : context ++ // -- esp[0] : return address ++ // -- esp[(argc - n) * 4] : arg[n] (zero-based) ++ // -- esp[(argc + 1) * 4] : receiver ++ // ----------------------------------- ++ ++ // 1. Make sure we operate in the context of the called function. ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ // Store argc in r8. ++ __ mov(ecx, eax); ++ __ SmiTag(ecx); ++ ++ // 2. Load the first argument into ebx. ++ { ++ Label no_arguments, done; ++ __ test(eax, eax); ++ __ j(zero, &no_arguments, Label::kNear); ++ __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); ++ __ jmp(&done, Label::kNear); ++ __ bind(&no_arguments); ++ __ Move(ebx, Smi::kZero); ++ __ bind(&done); ++ } ++ ++ // 3. Make sure ebx is a number. ++ { ++ Label done_convert; ++ __ JumpIfSmi(ebx, &done_convert); ++ __ CompareRoot(FieldOperand(ebx, HeapObject::kMapOffset), ++ Heap::kHeapNumberMapRootIndex); ++ __ j(equal, &done_convert); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ EnterBuiltinFrame(esi, edi, ecx); ++ __ Push(edx); ++ __ Move(eax, ebx); ++ __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); ++ __ Move(ebx, eax); ++ __ Pop(edx); ++ __ LeaveBuiltinFrame(esi, edi, ecx); ++ } ++ __ bind(&done_convert); ++ } ++ ++ // 4. Check if new target and constructor differ. ++ Label drop_frame_and_ret, done_alloc, new_object; ++ __ cmp(edx, edi); ++ __ j(not_equal, &new_object); ++ ++ // 5. Allocate a JSValue wrapper for the number. ++ __ AllocateJSValue(eax, edi, ebx, esi, &done_alloc); ++ __ jmp(&drop_frame_and_ret); ++ ++ __ bind(&done_alloc); ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); // Restore esi. ++ ++ // 6. Fallback to the runtime to create new object. ++ __ bind(&new_object); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ EnterBuiltinFrame(esi, edi, ecx); ++ __ Push(ebx); // the first argument ++ __ Call(masm->isolate()->builtins()->FastNewObject(), ++ RelocInfo::CODE_TARGET); ++ __ Pop(FieldOperand(eax, JSValue::kValueOffset)); ++ __ LeaveBuiltinFrame(esi, edi, ecx); ++ } ++ ++ __ bind(&drop_frame_and_ret); ++ { ++ // Drop all arguments including the receiver. ++ __ PopReturnAddressTo(esi); ++ __ SmiUntag(ecx); ++ __ lea(esp, Operand(esp, ecx, times_pointer_size, kPointerSize)); ++ __ PushReturnAddressFrom(esi); ++ __ Ret(); ++ } ++} ++ ++// static ++void Builtins::Generate_StringConstructor(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments ++ // -- edi : constructor function ++ // -- esi : context ++ // -- esp[0] : return address ++ // -- esp[(argc - n) * 4] : arg[n] (zero-based) ++ // -- esp[(argc + 1) * 4] : receiver ++ // ----------------------------------- ++ ++ // 1. Load the first argument into eax. ++ Label no_arguments; ++ { ++ __ mov(ebx, eax); // Store argc in ebx. ++ __ test(eax, eax); ++ __ j(zero, &no_arguments, Label::kNear); ++ __ mov(eax, Operand(esp, eax, times_pointer_size, 0)); ++ } ++ ++ // 2a. At least one argument, return eax if it's a string, otherwise ++ // dispatch to appropriate conversion. ++ Label drop_frame_and_ret, to_string, symbol_descriptive_string; ++ { ++ __ JumpIfSmi(eax, &to_string, Label::kNear); ++ STATIC_ASSERT(FIRST_NONSTRING_TYPE == SYMBOL_TYPE); ++ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); ++ __ j(above, &to_string, Label::kNear); ++ __ j(equal, &symbol_descriptive_string, Label::kNear); ++ __ jmp(&drop_frame_and_ret, Label::kNear); ++ } ++ ++ // 2b. No arguments, return the empty string (and pop the receiver). ++ __ bind(&no_arguments); ++ { ++ __ LoadRoot(eax, Heap::kempty_stringRootIndex); ++ __ ret(1 * kPointerSize); ++ } ++ ++ // 3a. Convert eax to a string. ++ __ bind(&to_string); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ SmiTag(ebx); ++ __ EnterBuiltinFrame(esi, edi, ebx); ++ __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); ++ __ LeaveBuiltinFrame(esi, edi, ebx); ++ __ SmiUntag(ebx); ++ } ++ __ jmp(&drop_frame_and_ret, Label::kNear); ++ ++ // 3b. Convert symbol in eax to a string. ++ __ bind(&symbol_descriptive_string); ++ { ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); ++ __ Push(eax); ++ __ PushReturnAddressFrom(ecx); ++ __ TailCallRuntime(Runtime::kSymbolDescriptiveString); ++ } ++ ++ __ bind(&drop_frame_and_ret); ++ { ++ // Drop all arguments including the receiver. ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); ++ __ PushReturnAddressFrom(ecx); ++ __ Ret(); ++ } ++} ++ ++// static ++void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments ++ // -- edi : constructor function ++ // -- edx : new target ++ // -- esi : context ++ // -- esp[0] : return address ++ // -- esp[(argc - n) * 4] : arg[n] (zero-based) ++ // -- esp[(argc + 1) * 4] : receiver ++ // ----------------------------------- ++ ++ // 1. Make sure we operate in the context of the called function. ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ __ mov(ebx, eax); ++ ++ // 2. Load the first argument into eax. ++ { ++ Label no_arguments, done; ++ __ test(ebx, ebx); ++ __ j(zero, &no_arguments, Label::kNear); ++ __ mov(eax, Operand(esp, ebx, times_pointer_size, 0)); ++ __ jmp(&done, Label::kNear); ++ __ bind(&no_arguments); ++ __ LoadRoot(eax, Heap::kempty_stringRootIndex); ++ __ bind(&done); ++ } ++ ++ // 3. Make sure eax is a string. ++ { ++ Label convert, done_convert; ++ __ JumpIfSmi(eax, &convert, Label::kNear); ++ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx); ++ __ j(below, &done_convert); ++ __ bind(&convert); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ SmiTag(ebx); ++ __ EnterBuiltinFrame(esi, edi, ebx); ++ __ Push(edx); ++ __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); ++ __ Pop(edx); ++ __ LeaveBuiltinFrame(esi, edi, ebx); ++ __ SmiUntag(ebx); ++ } ++ __ bind(&done_convert); ++ } ++ ++ // 4. Check if new target and constructor differ. ++ Label drop_frame_and_ret, done_alloc, new_object; ++ __ cmp(edx, edi); ++ __ j(not_equal, &new_object); ++ ++ // 5. Allocate a JSValue wrapper for the string. ++ // AllocateJSValue can't handle src == dst register. Reuse esi and restore it ++ // as needed after the call. ++ __ mov(esi, eax); ++ __ AllocateJSValue(eax, edi, esi, ecx, &done_alloc); ++ __ jmp(&drop_frame_and_ret); ++ ++ __ bind(&done_alloc); ++ { ++ // Restore eax to the first argument and esi to the context. ++ __ mov(eax, esi); ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ } ++ ++ // 6. Fallback to the runtime to create new object. ++ __ bind(&new_object); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ SmiTag(ebx); ++ __ EnterBuiltinFrame(esi, edi, ebx); ++ __ Push(eax); // the first argument ++ __ Call(masm->isolate()->builtins()->FastNewObject(), ++ RelocInfo::CODE_TARGET); ++ __ Pop(FieldOperand(eax, JSValue::kValueOffset)); ++ __ LeaveBuiltinFrame(esi, edi, ebx); ++ __ SmiUntag(ebx); ++ } ++ ++ __ bind(&drop_frame_and_ret); ++ { ++ // Drop all arguments including the receiver. ++ __ PopReturnAddressTo(ecx); ++ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); ++ __ PushReturnAddressFrom(ecx); ++ __ Ret(); ++ } ++} ++ ++static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { ++ __ push(ebp); ++ __ mov(ebp, esp); ++ ++ // Store the arguments adaptor context sentinel. ++ __ push(Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ ++ // Push the function on the stack. ++ __ push(edi); ++ ++ // Preserve the number of arguments on the stack. Must preserve eax, ++ // ebx and ecx because these registers are used when copying the ++ // arguments and the receiver. ++ STATIC_ASSERT(kSmiTagSize == 1); ++ __ lea(edi, Operand(eax, eax, times_1, kSmiTag)); ++ __ push(edi); ++} ++ ++static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { ++ // Retrieve the number of arguments from the stack. ++ __ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ ++ // Leave the frame. ++ __ leave(); ++ ++ // Remove caller arguments from the stack. ++ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); ++ __ pop(ecx); ++ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver ++ __ push(ecx); ++} ++ ++// static ++void Builtins::Generate_Apply(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argumentsList ++ // -- edi : target ++ // -- edx : new.target (checked to be constructor or undefined) ++ // -- esp[0] : return address. ++ // -- esp[4] : thisArgument ++ // ----------------------------------- ++ ++ // Create the list of arguments from the array-like argumentsList. ++ { ++ Label create_arguments, create_array, create_holey_array, create_runtime, ++ done_create; ++ __ JumpIfSmi(eax, &create_runtime); ++ ++ // Load the map of argumentsList into ecx. ++ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); ++ ++ // Load native context into ebx. ++ __ mov(ebx, NativeContextOperand()); ++ ++ // Check if argumentsList is an (unmodified) arguments object. ++ __ cmp(ecx, ContextOperand(ebx, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); ++ __ j(equal, &create_arguments); ++ __ cmp(ecx, ContextOperand(ebx, Context::STRICT_ARGUMENTS_MAP_INDEX)); ++ __ j(equal, &create_arguments); ++ ++ // Check if argumentsList is a fast JSArray. ++ __ CmpInstanceType(ecx, JS_ARRAY_TYPE); ++ __ j(equal, &create_array); ++ ++ // Ask the runtime to create the list (actually a FixedArray). ++ __ bind(&create_runtime); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(edi); ++ __ Push(edx); ++ __ Push(eax); ++ __ CallRuntime(Runtime::kCreateListFromArrayLike); ++ __ Pop(edx); ++ __ Pop(edi); ++ __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); ++ __ SmiUntag(ebx); ++ } ++ __ jmp(&done_create); ++ ++ // Try to create the list from an arguments object. ++ __ bind(&create_arguments); ++ __ mov(ebx, FieldOperand(eax, JSArgumentsObject::kLengthOffset)); ++ __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); ++ __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); ++ __ j(not_equal, &create_runtime); ++ __ SmiUntag(ebx); ++ __ mov(eax, ecx); ++ __ jmp(&done_create); ++ ++ // For holey JSArrays we need to check that the array prototype chain ++ // protector is intact and our prototype is the Array.prototype actually. ++ __ bind(&create_holey_array); ++ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ mov(ecx, FieldOperand(ecx, Map::kPrototypeOffset)); ++ __ cmp(ecx, ContextOperand(ebx, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); ++ __ j(not_equal, &create_runtime); ++ __ LoadRoot(ecx, Heap::kArrayProtectorRootIndex); ++ __ cmp(FieldOperand(ecx, PropertyCell::kValueOffset), ++ Immediate(Smi::FromInt(Isolate::kProtectorValid))); ++ __ j(not_equal, &create_runtime); ++ __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); ++ __ SmiUntag(ebx); ++ __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); ++ __ jmp(&done_create); ++ ++ // Try to create the list from a JSArray object. ++ __ bind(&create_array); ++ __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); ++ __ DecodeField(ecx); ++ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); ++ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); ++ STATIC_ASSERT(PACKED_ELEMENTS == 2); ++ STATIC_ASSERT(HOLEY_ELEMENTS == 3); ++ __ cmp(ecx, Immediate(HOLEY_SMI_ELEMENTS)); ++ __ j(equal, &create_holey_array, Label::kNear); ++ __ cmp(ecx, Immediate(HOLEY_ELEMENTS)); ++ __ j(equal, &create_holey_array, Label::kNear); ++ __ j(above, &create_runtime); ++ __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); ++ __ SmiUntag(ebx); ++ __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); ++ ++ __ bind(&done_create); ++ } ++ ++ // Check for stack overflow. ++ { ++ // Check the stack for overflow. We are not trying to catch interruptions ++ // (i.e. debug break and preemption) here, so check the "real stack limit". ++ Label done; ++ ExternalReference real_stack_limit = ++ ExternalReference::address_of_real_stack_limit(masm->isolate()); ++ __ mov(ecx, Operand::StaticVariable(real_stack_limit)); ++ // Make ecx the space we have left. The stack might already be overflowed ++ // here which will cause ecx to become negative. ++ __ neg(ecx); ++ __ add(ecx, esp); ++ __ sar(ecx, kPointerSizeLog2); ++ // Check if the arguments will overflow the stack. ++ __ cmp(ecx, ebx); ++ __ j(greater, &done, Label::kNear); // Signed comparison. ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ __ bind(&done); ++ } ++ ++ // ----------- S t a t e ------------- ++ // -- edi : target ++ // -- eax : args (a FixedArray built from argumentsList) ++ // -- ebx : len (number of elements to push from args) ++ // -- edx : new.target (checked to be constructor or undefined) ++ // -- esp[0] : return address. ++ // -- esp[4] : thisArgument ++ // ----------------------------------- ++ ++ // Push arguments onto the stack (thisArgument is already on the stack). ++ { ++ // Save edx/edi to stX0/stX1. ++ __ push(edx); ++ __ push(edi); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 4)); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ ++ __ PopReturnAddressTo(edx); ++ __ Move(ecx, Immediate(0)); ++ Label done, push, loop; ++ __ bind(&loop); ++ __ cmp(ecx, ebx); ++ __ j(equal, &done, Label::kNear); ++ // Turn the hole into undefined as we go. ++ __ mov(edi, ++ FieldOperand(eax, ecx, times_pointer_size, FixedArray::kHeaderSize)); ++ __ CompareRoot(edi, Heap::kTheHoleValueRootIndex); ++ __ j(not_equal, &push, Label::kNear); ++ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); ++ __ bind(&push); ++ __ Push(edi); ++ __ inc(ecx); ++ __ jmp(&loop); ++ __ bind(&done); ++ __ PushReturnAddressFrom(edx); ++ ++ // Restore edx/edi from stX0/stX1. ++ __ lea(esp, Operand(esp, -2 * kFloatSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fstp_s(MemOperand(esp, 4)); ++ __ pop(edx); ++ __ pop(edi); ++ ++ __ Move(eax, ebx); ++ } ++ ++ // Dispatch to Call or Construct depending on whether new.target is undefined. ++ { ++ __ CompareRoot(edx, Heap::kUndefinedValueRootIndex); ++ __ j(equal, masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); ++ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); ++ } ++} ++ ++// static ++void Builtins::Generate_CallForwardVarargs(MacroAssembler* masm, ++ Handle code) { ++ // ----------- S t a t e ------------- ++ // -- edi : the target to call (can be any Object) ++ // -- ecx : start index (to support rest parameters) ++ // -- esp[0] : return address. ++ // -- esp[4] : thisArgument ++ // ----------------------------------- ++ ++ // Check if we have an arguments adaptor frame below the function frame. ++ Label arguments_adaptor, arguments_done; ++ __ mov(ebx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(equal, &arguments_adaptor, Label::kNear); ++ { ++ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(eax, ++ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); ++ __ mov(ebx, ebp); ++ } ++ __ jmp(&arguments_done, Label::kNear); ++ __ bind(&arguments_adaptor); ++ { ++ // Just load the length from the ArgumentsAdaptorFrame. ++ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ SmiUntag(eax); ++ } ++ __ bind(&arguments_done); ++ ++ Label stack_empty, stack_done; ++ __ sub(eax, ecx); ++ __ j(less_equal, &stack_empty); ++ { ++ // Check for stack overflow. ++ { ++ // Check the stack for overflow. We are not trying to catch interruptions ++ // (i.e. debug break and preemption) here, so check the "real stack ++ // limit". ++ Label done; ++ __ LoadRoot(ecx, Heap::kRealStackLimitRootIndex); ++ // Make ecx the space we have left. The stack might already be ++ // overflowed here which will cause ecx to become negative. ++ __ neg(ecx); ++ __ add(ecx, esp); ++ __ sar(ecx, kPointerSizeLog2); ++ // Check if the arguments will overflow the stack. ++ __ cmp(ecx, eax); ++ __ j(greater, &done, Label::kNear); // Signed comparison. ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ __ bind(&done); ++ } ++ ++ // Forward the arguments from the caller frame. ++ { ++ Label loop; ++ __ mov(ecx, eax); ++ __ pop(edx); ++ __ bind(&loop); ++ { ++ __ Push(Operand(ebx, ecx, times_pointer_size, 1 * kPointerSize)); ++ __ dec(ecx); ++ __ j(not_zero, &loop); ++ } ++ __ push(edx); ++ } ++ } ++ __ jmp(&stack_done, Label::kNear); ++ __ bind(&stack_empty); ++ { ++ // We just pass the receiver, which is already on the stack. ++ __ Move(eax, Immediate(0)); ++ } ++ __ bind(&stack_done); ++ ++ __ Jump(code, RelocInfo::CODE_TARGET); ++} ++ ++namespace { ++ ++// Drops top JavaScript frame and an arguments adaptor frame below it (if ++// present) preserving all the arguments prepared for current call. ++// Does nothing if debugger is currently active. ++// ES6 14.6.3. PrepareForTailCall ++// ++// Stack structure for the function g() tail calling f(): ++// ++// ------- Caller frame: ------- ++// | ... ++// | g()'s arg M ++// | ... ++// | g()'s arg 1 ++// | g()'s receiver arg ++// | g()'s caller pc ++// ------- g()'s frame: ------- ++// | g()'s caller fp <- fp ++// | g()'s context ++// | function pointer: g ++// | ------------------------- ++// | ... ++// | ... ++// | f()'s arg N ++// | ... ++// | f()'s arg 1 ++// | f()'s receiver arg ++// | f()'s caller pc <- sp ++// ---------------------- ++// ++void PrepareForTailCall(MacroAssembler* masm, Register args_reg, ++ Register scratch1, Register scratch2, ++ Register scratch3) { ++ DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); ++ Comment cmnt(masm, "[ PrepareForTailCall"); ++ ++ // Prepare for tail call only if ES2015 tail call elimination is enabled. ++ Label done; ++ ExternalReference is_tail_call_elimination_enabled = ++ ExternalReference::is_tail_call_elimination_enabled_address( ++ masm->isolate()); ++ __ movzx_b(scratch1, ++ Operand::StaticVariable(is_tail_call_elimination_enabled)); ++ __ cmp(scratch1, Immediate(0)); ++ __ j(equal, &done, Label::kNear); ++ ++ // Drop possible interpreter handler/stub frame. ++ { ++ Label no_interpreter_frame; ++ __ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(StackFrame::STUB))); ++ __ j(not_equal, &no_interpreter_frame, Label::kNear); ++ __ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ bind(&no_interpreter_frame); ++ } ++ ++ // Check if next frame is an arguments adaptor frame. ++ Register caller_args_count_reg = scratch1; ++ Label no_arguments_adaptor, formal_parameter_count_loaded; ++ __ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ cmp(Operand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(not_equal, &no_arguments_adaptor, Label::kNear); ++ ++ // Drop current frame and load arguments count from arguments adaptor frame. ++ __ mov(ebp, scratch2); ++ __ mov(caller_args_count_reg, ++ Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ SmiUntag(caller_args_count_reg); ++ __ jmp(&formal_parameter_count_loaded, Label::kNear); ++ ++ __ bind(&no_arguments_adaptor); ++ // Load caller's formal parameter count ++ __ mov(scratch1, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ mov(scratch1, ++ FieldOperand(scratch1, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov( ++ caller_args_count_reg, ++ FieldOperand(scratch1, SharedFunctionInfo::kFormalParameterCountOffset)); ++ ++ __ bind(&formal_parameter_count_loaded); ++ ++ ParameterCount callee_args_count(args_reg); ++ __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, ++ scratch3, ReturnAddressState::kOnStack, 0); ++ __ bind(&done); ++} ++} // namespace ++ ++// static ++void Builtins::Generate_CallFunction(MacroAssembler* masm, ++ ConvertReceiverMode mode, ++ TailCallMode tail_call_mode) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the function to call (checked to be a JSFunction) ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) ++ // Check that the function is not a "classConstructor". ++ Label class_constructor; ++ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ test(FieldOperand(edx, SharedFunctionInfo::kCompilerHintsOffset), ++ Immediate(SharedFunctionInfo::kClassConstructorMask)); ++ __ j(not_zero, &class_constructor); ++ ++ // Enter the context of the function; ToObject has to run in the function ++ // context, and we also need to take the global proxy from the function ++ // context in case of conversion. ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ // We need to convert the receiver for non-native sloppy mode functions. ++ Label done_convert; ++ __ test(FieldOperand(edx, SharedFunctionInfo::kCompilerHintsOffset), ++ Immediate(SharedFunctionInfo::IsNativeBit::kMask | ++ SharedFunctionInfo::IsStrictBit::kMask)); ++ __ j(not_zero, &done_convert); ++ { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the shared function info. ++ // -- edi : the function to call (checked to be a JSFunction) ++ // -- esi : the function context. ++ // ----------------------------------- ++ ++ if (mode == ConvertReceiverMode::kNullOrUndefined) { ++ // Patch receiver to global proxy. ++ __ LoadGlobalProxy(ecx); ++ } else { ++ Label convert_to_object, convert_receiver; ++ __ mov(ecx, Operand(esp, eax, times_pointer_size, kPointerSize)); ++ __ JumpIfSmi(ecx, &convert_to_object, Label::kNear); ++ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); ++ __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ebx); ++ __ j(above_equal, &done_convert); ++ if (mode != ConvertReceiverMode::kNotNullOrUndefined) { ++ Label convert_global_proxy; ++ __ JumpIfRoot(ecx, Heap::kUndefinedValueRootIndex, ++ &convert_global_proxy, Label::kNear); ++ __ JumpIfNotRoot(ecx, Heap::kNullValueRootIndex, &convert_to_object, ++ Label::kNear); ++ __ bind(&convert_global_proxy); ++ { ++ // Patch receiver to global proxy. ++ __ LoadGlobalProxy(ecx); ++ } ++ __ jmp(&convert_receiver); ++ } ++ __ bind(&convert_to_object); ++ { ++ // Convert receiver using ToObject. ++ // TODO(bmeurer): Inline the allocation here to avoid building the frame ++ // in the fast case? (fall back to AllocateInNewSpace?) ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ SmiTag(eax); ++ __ Push(eax); ++ __ Push(edi); ++ __ mov(eax, ecx); ++ __ Push(esi); ++ __ Call(masm->isolate()->builtins()->ToObject(), ++ RelocInfo::CODE_TARGET); ++ __ Pop(esi); ++ __ mov(ecx, eax); ++ __ Pop(edi); ++ __ Pop(eax); ++ __ SmiUntag(eax); ++ } ++ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ bind(&convert_receiver); ++ } ++ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ecx); ++ } ++ __ bind(&done_convert); ++ ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the shared function info. ++ // -- edi : the function to call (checked to be a JSFunction) ++ // -- esi : the function context. ++ // ----------------------------------- ++ ++ if (tail_call_mode == TailCallMode::kAllow) { ++ PrepareForTailCall(masm, eax, ebx, ecx, edx); ++ // Reload shared function info. ++ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ } ++ ++ __ mov(ebx, ++ FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); ++ ParameterCount actual(eax); ++ ParameterCount expected(ebx); ++ __ InvokeFunctionCode(edi, no_reg, expected, actual, JUMP_FUNCTION, ++ CheckDebugStepCallWrapper()); ++ // The function is a "classConstructor", need to raise an exception. ++ __ bind(&class_constructor); ++ { ++ FrameScope frame(masm, StackFrame::INTERNAL); ++ __ push(edi); ++ __ CallRuntime(Runtime::kThrowConstructorNonCallableError); ++ } ++} ++ ++namespace { ++ ++void Generate_PushBoundArguments(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : new.target (only in case of [[Construct]]) ++ // -- edi : target (checked to be a JSBoundFunction) ++ // ----------------------------------- ++ ++ // Load [[BoundArguments]] into ecx and length of that into ebx. ++ Label no_bound_arguments; ++ __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); ++ __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); ++ __ SmiUntag(ebx); ++ __ test(ebx, ebx); ++ __ j(zero, &no_bound_arguments); ++ { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : new.target (only in case of [[Construct]]) ++ // -- edi : target (checked to be a JSBoundFunction) ++ // -- ecx : the [[BoundArguments]] (implemented as FixedArray) ++ // -- ebx : the number of [[BoundArguments]] ++ // ----------------------------------- ++ ++ // Reserve stack space for the [[BoundArguments]]. ++ { ++ Label done; ++ __ lea(ecx, Operand(ebx, times_pointer_size, 0)); ++ __ sub(esp, ecx); ++ // Check the stack for overflow. We are not trying to catch interruptions ++ // (i.e. debug break and preemption) here, so check the "real stack ++ // limit". ++ __ CompareRoot(esp, ecx, Heap::kRealStackLimitRootIndex); ++ __ j(greater, &done, Label::kNear); // Signed comparison. ++ // Restore the stack pointer. ++ __ lea(esp, Operand(esp, ebx, times_pointer_size, 0)); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ EnterFrame(StackFrame::INTERNAL); ++ __ CallRuntime(Runtime::kThrowStackOverflow); ++ } ++ __ bind(&done); ++ } ++ ++ // Adjust effective number of arguments to include return address. ++ __ inc(eax); ++ ++ // Relocate arguments and return address down the stack. ++ { ++ Label loop; ++ __ Set(ecx, 0); ++ __ lea(ebx, Operand(esp, ebx, times_pointer_size, 0)); ++ __ bind(&loop); ++ __ fld_s(Operand(ebx, ecx, times_pointer_size, 0)); ++ __ fstp_s(Operand(esp, ecx, times_pointer_size, 0)); ++ __ inc(ecx); ++ __ cmp(ecx, eax); ++ __ j(less, &loop); ++ } ++ ++ // Copy [[BoundArguments]] to the stack (below the arguments). ++ { ++ Label loop; ++ __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); ++ __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); ++ __ SmiUntag(ebx); ++ __ bind(&loop); ++ __ dec(ebx); ++ __ fld_s( ++ FieldOperand(ecx, ebx, times_pointer_size, FixedArray::kHeaderSize)); ++ __ fstp_s(Operand(esp, eax, times_pointer_size, 0)); ++ __ lea(eax, Operand(eax, 1)); ++ __ j(greater, &loop); ++ } ++ ++ // Adjust effective number of arguments (eax contains the number of ++ // arguments from the call plus return address plus the number of ++ // [[BoundArguments]]), so we need to subtract one for the return address. ++ __ dec(eax); ++ } ++ __ bind(&no_bound_arguments); ++} ++ ++} // namespace ++ ++// static ++void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm, ++ TailCallMode tail_call_mode) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the function to call (checked to be a JSBoundFunction) ++ // ----------------------------------- ++ __ AssertBoundFunction(edi); ++ ++ if (tail_call_mode == TailCallMode::kAllow) { ++ PrepareForTailCall(masm, eax, ebx, ecx, edx); ++ } ++ ++ // Patch the receiver to [[BoundThis]]. ++ __ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); ++ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); ++ ++ // Push the [[BoundArguments]] onto the stack. ++ Generate_PushBoundArguments(masm); ++ ++ // Call the [[BoundTargetFunction]] via the Call builtin. ++ __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); ++ __ mov(ecx, Operand::StaticVariable(ExternalReference( ++ Builtins::kCall_ReceiverIsAny, masm->isolate()))); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++} ++ ++// static ++void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, ++ TailCallMode tail_call_mode) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the target to call (can be any Object). ++ // ----------------------------------- ++ ++ Label non_callable, non_function, non_smi; ++ __ JumpIfSmi(edi, &non_callable); ++ __ bind(&non_smi); ++ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); ++ __ j(equal, masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), ++ RelocInfo::CODE_TARGET); ++ __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); ++ __ j(equal, masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), ++ RelocInfo::CODE_TARGET); ++ ++ // Check if target has a [[Call]] internal method. ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsCallable)); ++ __ j(zero, &non_callable); ++ ++ // Check if target is a proxy and call CallProxy external builtin ++ __ CmpInstanceType(ecx, JS_PROXY_TYPE); ++ __ j(not_equal, &non_function); ++ ++ __ mov(ecx, Operand::StaticVariable( ++ ExternalReference(Builtins::kCallProxy, masm->isolate()))); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++ ++ // 2. Call to something else, which might have a [[Call]] internal method (if ++ // not we raise an exception). ++ __ bind(&non_function); ++ // Overwrite the original receiver with the (original) target. ++ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); ++ // Let the "call_as_function_delegate" take care of the rest. ++ __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, edi); ++ __ Jump(masm->isolate()->builtins()->CallFunction( ++ ConvertReceiverMode::kNotNullOrUndefined, tail_call_mode), ++ RelocInfo::CODE_TARGET); ++ ++ // 3. Call to something that is not callable. ++ __ bind(&non_callable); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(edi); ++ __ CallRuntime(Runtime::kThrowCalledNonCallable); ++ } ++} ++ ++static void CheckSpreadAndPushToStack(MacroAssembler* masm) { ++ // Free up some registers. ++ // Save edx/edi to stX0/stX1. ++ __ push(edx); ++ __ push(edi); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 4)); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ ++ Register argc = eax; ++ ++ Register scratch = ecx; ++ Register scratch2 = edi; ++ ++ Register spread = ebx; ++ Register spread_map = edx; ++ ++ Register spread_len = edx; ++ ++ Label runtime_call, push_args; ++ __ mov(spread, Operand(esp, kPointerSize)); ++ __ JumpIfSmi(spread, &runtime_call); ++ __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); ++ ++ // Check that the spread is an array. ++ __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); ++ __ j(not_equal, &runtime_call); ++ ++ // Check that we have the original ArrayPrototype. ++ __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); ++ __ mov(scratch2, NativeContextOperand()); ++ __ cmp(scratch, ++ ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); ++ __ j(not_equal, &runtime_call); ++ ++ // Check that the ArrayPrototype hasn't been modified in a way that would ++ // affect iteration. ++ __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex); ++ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), ++ Immediate(Smi::FromInt(Isolate::kProtectorValid))); ++ __ j(not_equal, &runtime_call); ++ ++ // Check that the map of the initial array iterator hasn't changed. ++ __ mov(scratch2, NativeContextOperand()); ++ __ mov(scratch, ++ ContextOperand(scratch2, ++ Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX)); ++ __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); ++ __ cmp(scratch, ++ ContextOperand(scratch2, ++ Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX)); ++ __ j(not_equal, &runtime_call); ++ ++ // For FastPacked kinds, iteration will have the same effect as simply ++ // accessing each property in order. ++ Label no_protector_check; ++ __ mov(scratch, FieldOperand(spread_map, Map::kBitField2Offset)); ++ __ DecodeField(scratch); ++ __ cmp(scratch, Immediate(HOLEY_ELEMENTS)); ++ __ j(above, &runtime_call); ++ // For non-FastHoley kinds, we can skip the protector check. ++ __ cmp(scratch, Immediate(PACKED_SMI_ELEMENTS)); ++ __ j(equal, &no_protector_check); ++ __ cmp(scratch, Immediate(PACKED_ELEMENTS)); ++ __ j(equal, &no_protector_check); ++ // Check the ArrayProtector cell. ++ __ LoadRoot(scratch, Heap::kArrayProtectorRootIndex); ++ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), ++ Immediate(Smi::FromInt(Isolate::kProtectorValid))); ++ __ j(not_equal, &runtime_call); ++ ++ __ bind(&no_protector_check); ++ // Load the FixedArray backing store, but use the length from the array. ++ __ mov(spread_len, FieldOperand(spread, JSArray::kLengthOffset)); ++ __ SmiUntag(spread_len); ++ __ mov(spread, FieldOperand(spread, JSArray::kElementsOffset)); ++ __ jmp(&push_args); ++ ++ __ bind(&runtime_call); ++ { ++ // Call the builtin for the result of the spread. ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // Need to save these on the stack. ++ // Restore edx/edi from stX0/stX1. ++ __ lea(esp, Operand(esp, -2 * kFloatSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fstp_s(MemOperand(esp, 4)); ++ __ pop(edx); ++ __ pop(edi); ++ ++ __ Push(edi); ++ __ Push(edx); ++ __ SmiTag(argc); ++ __ Push(argc); ++ __ Push(spread); ++ __ CallRuntime(Runtime::kSpreadIterableFixed); ++ __ mov(spread, eax); ++ __ Pop(argc); ++ __ SmiUntag(argc); ++ __ Pop(edx); ++ __ Pop(edi); ++ // Free up some registers. ++ // Save edx/edi to stX0/stX1. ++ __ push(edx); ++ __ push(edi); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 4)); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ } ++ ++ { ++ // Calculate the new nargs including the result of the spread. ++ __ mov(spread_len, FieldOperand(spread, FixedArray::kLengthOffset)); ++ __ SmiUntag(spread_len); ++ ++ __ bind(&push_args); ++ // argc += spread_len - 1. Subtract 1 for the spread itself. ++ __ lea(argc, Operand(argc, spread_len, times_1, -1)); ++ } ++ ++ // Check for stack overflow. ++ { ++ // Check the stack for overflow. We are not trying to catch interruptions ++ // (i.e. debug break and preemption) here, so check the "real stack limit". ++ Label done; ++ __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); ++ // Make scratch the space we have left. The stack might already be ++ // overflowed here which will cause scratch to become negative. ++ __ neg(scratch); ++ __ add(scratch, esp); ++ __ sar(scratch, kPointerSizeLog2); ++ // Check if the arguments will overflow the stack. ++ __ cmp(scratch, spread_len); ++ __ j(greater, &done, Label::kNear); // Signed comparison. ++ __ TailCallRuntime(Runtime::kThrowStackOverflow); ++ __ bind(&done); ++ } ++ ++ // Put the evaluated spread onto the stack as additional arguments. ++ { ++ Register return_address = edi; ++ // Pop the return address and spread argument. ++ __ PopReturnAddressTo(return_address); ++ __ Pop(scratch); ++ ++ Register scratch2 = esi; ++ // Save esi to stX0, edx/edi in stX1/stX2 now. ++ __ push(esi); ++ __ fld_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, 1 * kFloatSize)); ++ ++ __ mov(scratch, Immediate(0)); ++ Label done, push, loop; ++ __ bind(&loop); ++ __ cmp(scratch, spread_len); ++ __ j(equal, &done, Label::kNear); ++ __ mov(scratch2, FieldOperand(spread, scratch, times_pointer_size, ++ FixedArray::kHeaderSize)); ++ __ JumpIfNotRoot(scratch2, Heap::kTheHoleValueRootIndex, &push); ++ __ LoadRoot(scratch2, Heap::kUndefinedValueRootIndex); ++ __ bind(&push); ++ __ Push(scratch2); ++ __ inc(scratch); ++ __ jmp(&loop); ++ __ bind(&done); ++ __ PushReturnAddressFrom(return_address); ++ ++ // Now Restore esi from stX0, edx/edi from stX1/stX2. ++ __ lea(esp, Operand(esp, -3 * kFloatSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fstp_s(MemOperand(esp, 4)); ++ __ fstp_s(MemOperand(esp, 8)); ++ __ pop(esi); ++ __ pop(edx); ++ __ pop(edi); ++ } ++} ++ ++// static ++void Builtins::Generate_CallWithSpread(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the target to call (can be any Object) ++ // ----------------------------------- ++ ++ // CheckSpreadAndPushToStack will push edx to save it. ++ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); ++ CheckSpreadAndPushToStack(masm); ++ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, ++ TailCallMode::kDisallow), ++ RelocInfo::CODE_TARGET); ++} ++ ++// static ++void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the new target (checked to be a constructor) ++ // -- edi : the constructor to call (checked to be a JSFunction) ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // Calling convention for function specific ConstructStubs require ++ // ebx to contain either an AllocationSite or undefined. ++ __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); ++ ++ // Tail call to the function-specific construct stub (still in the caller ++ // context at this point). ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++} ++ ++// static ++void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the new target (checked to be a constructor) ++ // -- edi : the constructor to call (checked to be a JSBoundFunction) ++ // ----------------------------------- ++ __ AssertBoundFunction(edi); ++ ++ // Push the [[BoundArguments]] onto the stack. ++ Generate_PushBoundArguments(masm); ++ ++ // Patch new.target to [[BoundTargetFunction]] if new.target equals target. ++ { ++ Label done; ++ __ cmp(edi, edx); ++ __ j(not_equal, &done, Label::kNear); ++ __ mov(edx, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); ++ __ bind(&done); ++ } ++ ++ // Construct the [[BoundTargetFunction]] via the Construct builtin. ++ __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); ++ __ mov(ecx, Operand::StaticVariable( ++ ExternalReference(Builtins::kConstruct, masm->isolate()))); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++} ++ ++// static ++void Builtins::Generate_ConstructProxy(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the constructor to call (checked to be a JSProxy) ++ // -- edx : the new target (either the same as the constructor or ++ // the JSFunction on which new was invoked initially) ++ // ----------------------------------- ++ ++ // Call into the Runtime for Proxy [[Construct]]. ++ __ PopReturnAddressTo(ecx); ++ __ Push(edi); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ // Include the pushed new_target, constructor and the receiver. ++ __ add(eax, Immediate(3)); ++ // Tail-call to the runtime. ++ __ JumpToExternalReference( ++ ExternalReference(Runtime::kJSProxyConstruct, masm->isolate())); ++} ++ ++// static ++void Builtins::Generate_Construct(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the new target (either the same as the constructor or ++ // the JSFunction on which new was invoked initially) ++ // -- edi : the constructor to call (can be any Object) ++ // ----------------------------------- ++ ++ // Check if target is a Smi. ++ Label non_constructor; ++ __ JumpIfSmi(edi, &non_constructor, Label::kNear); ++ ++ // Dispatch based on instance type. ++ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); ++ __ j(equal, masm->isolate()->builtins()->ConstructFunction(), ++ RelocInfo::CODE_TARGET); ++ ++ // Check if target has a [[Construct]] internal method. ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsConstructor)); ++ __ j(zero, &non_constructor, Label::kNear); ++ ++ // Only dispatch to bound functions after checking whether they are ++ // constructors. ++ __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); ++ __ j(equal, masm->isolate()->builtins()->ConstructBoundFunction(), ++ RelocInfo::CODE_TARGET); ++ ++ // Only dispatch to proxies after checking whether they are constructors. ++ __ CmpInstanceType(ecx, JS_PROXY_TYPE); ++ __ j(equal, masm->isolate()->builtins()->ConstructProxy(), ++ RelocInfo::CODE_TARGET); ++ ++ // Called Construct on an exotic Object with a [[Construct]] internal method. ++ { ++ // Overwrite the original receiver with the (original) target. ++ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); ++ // Let the "call_as_constructor_delegate" take care of the rest. ++ __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, edi); ++ __ Jump(masm->isolate()->builtins()->CallFunction(), ++ RelocInfo::CODE_TARGET); ++ } ++ ++ // Called Construct on an Object that doesn't have a [[Construct]] internal ++ // method. ++ __ bind(&non_constructor); ++ __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), ++ RelocInfo::CODE_TARGET); ++} ++ ++// static ++void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edx : the new target (either the same as the constructor or ++ // the JSFunction on which new was invoked initially) ++ // -- edi : the constructor to call (can be any Object) ++ // ----------------------------------- ++ ++ CheckSpreadAndPushToStack(masm); ++ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); ++} ++ ++// static ++void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edx : requested object size (untagged) ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ SmiTag(edx); ++ __ PopReturnAddressTo(ecx); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(esi, Smi::kZero); ++ __ TailCallRuntime(Runtime::kAllocateInNewSpace); ++} ++ ++// static ++void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edx : requested object size (untagged) ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ SmiTag(edx); ++ __ PopReturnAddressTo(ecx); ++ __ Push(edx); ++ __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(esi, Smi::kZero); ++ __ TailCallRuntime(Runtime::kAllocateInTargetSpace); ++} ++ ++// static ++void Builtins::Generate_Abort(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edx : message_id as Smi ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ PopReturnAddressTo(ecx); ++ __ Push(edx); ++ __ PushReturnAddressFrom(ecx); ++ __ Move(esi, Smi::kZero); ++ __ TailCallRuntime(Runtime::kAbort); ++} ++ ++void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : actual number of arguments ++ // -- ebx : expected number of arguments ++ // -- edx : new target (passed through to callee) ++ // -- edi : function (passed through to callee) ++ // ----------------------------------- ++ ++ Label invoke, dont_adapt_arguments, stack_overflow; ++ __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); ++ ++ Label enough, too_few; ++ __ cmp(eax, ebx); ++ __ j(less, &too_few); ++ __ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel); ++ __ j(equal, &dont_adapt_arguments); ++ ++ { // Enough parameters: Actual >= expected. ++ __ bind(&enough); ++ EnterArgumentsAdaptorFrame(masm); ++ // edi is used as a scratch register. It should be restored from the frame ++ // when needed. ++ Generate_StackOverflowCheck(masm, ebx, ecx, edi, &stack_overflow); ++ ++ // Copy receiver and all expected arguments. ++ const int offset = StandardFrameConstants::kCallerSPOffset; ++ __ lea(edi, Operand(ebp, eax, times_4, offset)); ++ __ mov(eax, -1); // account for receiver ++ ++ Label copy; ++ __ bind(©); ++ __ inc(eax); ++ __ push(Operand(edi, 0)); ++ __ sub(edi, Immediate(kPointerSize)); ++ __ cmp(eax, ebx); ++ __ j(less, ©); ++ // eax now contains the expected number of arguments. ++ __ jmp(&invoke); ++ } ++ ++ { // Too few parameters: Actual < expected. ++ __ bind(&too_few); ++ EnterArgumentsAdaptorFrame(masm); ++ // edi is used as a scratch register. It should be restored from the frame ++ // when needed. ++ Generate_StackOverflowCheck(masm, ebx, ecx, edi, &stack_overflow); ++ ++ // Remember expected arguments in ecx. ++ __ mov(ecx, ebx); ++ ++ // Copy receiver and all actual arguments. ++ const int offset = StandardFrameConstants::kCallerSPOffset; ++ __ lea(edi, Operand(ebp, eax, times_4, offset)); ++ // ebx = expected - actual. ++ __ sub(ebx, eax); ++ // eax = -actual - 1 ++ __ neg(eax); ++ __ sub(eax, Immediate(1)); ++ ++ Label copy; ++ __ bind(©); ++ __ inc(eax); ++ __ push(Operand(edi, 0)); ++ __ sub(edi, Immediate(kPointerSize)); ++ __ test(eax, eax); ++ __ j(not_zero, ©); ++ ++ // Fill remaining expected arguments with undefined values. ++ Label fill; ++ __ bind(&fill); ++ __ inc(eax); ++ __ push(Immediate(masm->isolate()->factory()->undefined_value())); ++ __ cmp(eax, ebx); ++ __ j(less, &fill); ++ ++ // Restore expected arguments. ++ __ mov(eax, ecx); ++ } ++ ++ // Call the entry point. ++ __ bind(&invoke); ++ // Restore function pointer. ++ __ mov(edi, Operand(ebp, ArgumentsAdaptorFrameConstants::kFunctionOffset)); ++ // eax : expected number of arguments ++ // edx : new target (passed through to callee) ++ // edi : function (passed through to callee) ++ __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); ++ __ call(ecx); ++ ++ // Store offset of return address for deoptimizer. ++ masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset()); ++ ++ // Leave frame and return. ++ LeaveArgumentsAdaptorFrame(masm); ++ __ ret(0); ++ ++ // ------------------------------------------- ++ // Dont adapt arguments. ++ // ------------------------------------------- ++ __ bind(&dont_adapt_arguments); ++ __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); ++ __ jmp(ecx); ++ ++ __ bind(&stack_overflow); ++ { ++ FrameScope frame(masm, StackFrame::MANUAL); ++ __ CallRuntime(Runtime::kThrowStackOverflow); ++ __ int3(); ++ } ++} ++ ++static void Generate_OnStackReplacementHelper(MacroAssembler* masm, ++ bool has_handler_frame) { ++ // Lookup the function in the JavaScript frame. ++ if (has_handler_frame) { ++ __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ mov(eax, Operand(eax, JavaScriptFrameConstants::kFunctionOffset)); ++ } else { ++ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ } ++ ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // Pass function as argument. ++ __ push(eax); ++ __ CallRuntime(Runtime::kCompileForOnStackReplacement); ++ } ++ ++ Label skip; ++ // If the code object is null, just return to the caller. ++ __ cmp(eax, Immediate(0)); ++ __ j(not_equal, &skip, Label::kNear); ++ __ ret(0); ++ ++ __ bind(&skip); ++ ++ // Drop any potential handler frame that is be sitting on top of the actual ++ // JavaScript frame. This is the case then OSR is triggered from bytecode. ++ if (has_handler_frame) { ++ __ leave(); ++ } ++ ++ // Load deoptimization data from the code object. ++ __ mov(ebx, Operand(eax, Code::kDeoptimizationDataOffset - kHeapObjectTag)); ++ ++ // Load the OSR entrypoint offset from the deoptimization data. ++ __ mov(ebx, Operand(ebx, FixedArray::OffsetOfElementAt( ++ DeoptimizationInputData::kOsrPcOffsetIndex) - ++ kHeapObjectTag)); ++ __ SmiUntag(ebx); ++ ++ // Compute the target address = code_obj + header_size + osr_offset ++ __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); ++ ++ // Overwrite the return address on the stack. ++ __ mov(Operand(esp, 0), eax); ++ ++ // And "return" to the OSR entry point of the function. ++ __ ret(0); ++} ++ ++void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { ++ Generate_OnStackReplacementHelper(masm, false); ++} ++ ++void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { ++ Generate_OnStackReplacementHelper(masm, true); ++} ++ ++#undef __ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 2017-12-25 17:42:57.201465852 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/codegen.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/codegen.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/codegen.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/codegen.h 2017-12-25 17:42:57.205465793 +0100 +@@ -59,6 +59,8 @@ + #include "src/mips64/codegen-mips64.h" // NOLINT + #elif V8_TARGET_ARCH_S390 + #include "src/s390/codegen-s390.h" // NOLINT ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/codegen-x87.h" // NOLINT + #else + #error Unsupported target architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/code-stubs.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/code-stubs.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h 2017-12-25 17:42:57.205465793 +0100 +@@ -514,6 +514,8 @@ + #include "src/mips64/code-stubs-mips64.h" + #elif V8_TARGET_ARCH_S390 + #include "src/s390/code-stubs-s390.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/code-stubs-x87.h" + #else + #error Unsupported target architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2017-12-25 17:42:57.205465793 +0100 +@@ -50,6 +50,12 @@ + rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit() + #endif + ++#elif V8_TARGET_ARCH_X87 ++// =========================================================================== ++// == x87 ==================================================================== ++// =========================================================================== ++#define CALLEE_SAVE_REGISTERS esi.bit() | edi.bit() | ebx.bit() ++ + #elif V8_TARGET_ARCH_ARM + // =========================================================================== + // == arm ==================================================================== +@@ -155,7 +161,7 @@ + msig->parameter_count()); + // Check the types of the signature. + // Currently no floating point parameters or returns are allowed because +- // on ia32, the FP top of stack is involved. ++ // on x87 and ia32, the FP top of stack is involved. + for (size_t i = 0; i < msig->return_count(); i++) { + MachineRepresentation rep = msig->GetReturn(i).representation(); + CHECK_NE(MachineRepresentation::kFloat32, rep); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2017-12-25 17:42:57.205465793 +0100 +@@ -23,6 +23,8 @@ + #include "src/compiler/ppc/instruction-codes-ppc.h" + #elif V8_TARGET_ARCH_S390 + #include "src/compiler/s390/instruction-codes-s390.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/compiler/x87/instruction-codes-x87.h" + #else + #define TARGET_ARCH_OPCODE_LIST(V) + #define TARGET_ADDRESSING_MODE_LIST(V) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2017-12-25 17:42:57.205465793 +0100 +@@ -69,6 +69,14 @@ + #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 + #define FP_RETURN_REGISTERS xmm1, xmm2 + ++#elif V8_TARGET_ARCH_X87 ++// =========================================================================== ++// == x87 ==================================================================== ++// =========================================================================== ++#define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi ++#define GP_RETURN_REGISTERS eax, edx ++#define FP_RETURN_REGISTERS stX_0 ++ + #elif V8_TARGET_ARCH_ARM + // =========================================================================== + // == arm ==================================================================== +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-25 17:42:57.208465749 +0100 +@@ -0,0 +1,2768 @@ ++// Copyright 2013 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "src/compiler/code-generator.h" ++ ++#include "src/compilation-info.h" ++#include "src/compiler/code-generator-impl.h" ++#include "src/compiler/gap-resolver.h" ++#include "src/compiler/node-matchers.h" ++#include "src/compiler/osr.h" ++#include "src/frames.h" ++#include "src/x87/assembler-x87.h" ++#include "src/x87/frames-x87.h" ++#include "src/x87/macro-assembler-x87.h" ++ ++namespace v8 { ++namespace internal { ++namespace compiler { ++ ++#define __ masm()-> ++ ++ ++// Adds X87 specific methods for decoding operands. ++class X87OperandConverter : public InstructionOperandConverter { ++ public: ++ X87OperandConverter(CodeGenerator* gen, Instruction* instr) ++ : InstructionOperandConverter(gen, instr) {} ++ ++ Operand InputOperand(size_t index, int extra = 0) { ++ return ToOperand(instr_->InputAt(index), extra); ++ } ++ ++ Immediate InputImmediate(size_t index) { ++ return ToImmediate(instr_->InputAt(index)); ++ } ++ ++ Operand OutputOperand() { return ToOperand(instr_->Output()); } ++ ++ Operand ToOperand(InstructionOperand* op, int extra = 0) { ++ if (op->IsRegister()) { ++ DCHECK(extra == 0); ++ return Operand(ToRegister(op)); ++ } ++ DCHECK(op->IsStackSlot() || op->IsFPStackSlot()); ++ return SlotToOperand(AllocatedOperand::cast(op)->index(), extra); ++ } ++ ++ Operand SlotToOperand(int slot, int extra = 0) { ++ FrameOffset offset = frame_access_state()->GetFrameOffset(slot); ++ return Operand(offset.from_stack_pointer() ? esp : ebp, ++ offset.offset() + extra); ++ } ++ ++ Operand HighOperand(InstructionOperand* op) { ++ DCHECK(op->IsFPStackSlot()); ++ return ToOperand(op, kPointerSize); ++ } ++ ++ Immediate ToImmediate(InstructionOperand* operand) { ++ Constant constant = ToConstant(operand); ++ if (constant.type() == Constant::kInt32 && ++ RelocInfo::IsWasmReference(constant.rmode())) { ++ return Immediate(reinterpret_cast
(constant.ToInt32()), ++ constant.rmode()); ++ } ++ switch (constant.type()) { ++ case Constant::kInt32: ++ return Immediate(constant.ToInt32()); ++ case Constant::kFloat32: ++ return Immediate( ++ isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); ++ case Constant::kFloat64: ++ return Immediate(isolate()->factory()->NewNumber( ++ constant.ToFloat64(value()).value(), TENURED)); ++ case Constant::kExternalReference: ++ return Immediate(constant.ToExternalReference()); ++ case Constant::kHeapObject: ++ return Immediate(constant.ToHeapObject()); ++ case Constant::kInt64: ++ break; ++ case Constant::kRpoNumber: ++ return Immediate::CodeRelativeOffset(ToLabel(operand)); ++ } ++ UNREACHABLE(); ++ } ++ ++ static size_t NextOffset(size_t* offset) { ++ size_t i = *offset; ++ (*offset)++; ++ return i; ++ } ++ ++ static ScaleFactor ScaleFor(AddressingMode one, AddressingMode mode) { ++ STATIC_ASSERT(0 == static_cast(times_1)); ++ STATIC_ASSERT(1 == static_cast(times_2)); ++ STATIC_ASSERT(2 == static_cast(times_4)); ++ STATIC_ASSERT(3 == static_cast(times_8)); ++ int scale = static_cast(mode - one); ++ DCHECK(scale >= 0 && scale < 4); ++ return static_cast(scale); ++ } ++ ++ Operand MemoryOperand(size_t* offset) { ++ AddressingMode mode = AddressingModeField::decode(instr_->opcode()); ++ switch (mode) { ++ case kMode_MR: { ++ Register base = InputRegister(NextOffset(offset)); ++ int32_t disp = 0; ++ return Operand(base, disp); ++ } ++ case kMode_MRI: { ++ Register base = InputRegister(NextOffset(offset)); ++ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); ++ return Operand(base, ctant.ToInt32(), ctant.rmode()); ++ } ++ case kMode_MR1: ++ case kMode_MR2: ++ case kMode_MR4: ++ case kMode_MR8: { ++ Register base = InputRegister(NextOffset(offset)); ++ Register index = InputRegister(NextOffset(offset)); ++ ScaleFactor scale = ScaleFor(kMode_MR1, mode); ++ int32_t disp = 0; ++ return Operand(base, index, scale, disp); ++ } ++ case kMode_MR1I: ++ case kMode_MR2I: ++ case kMode_MR4I: ++ case kMode_MR8I: { ++ Register base = InputRegister(NextOffset(offset)); ++ Register index = InputRegister(NextOffset(offset)); ++ ScaleFactor scale = ScaleFor(kMode_MR1I, mode); ++ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); ++ return Operand(base, index, scale, ctant.ToInt32(), ctant.rmode()); ++ } ++ case kMode_M1: ++ case kMode_M2: ++ case kMode_M4: ++ case kMode_M8: { ++ Register index = InputRegister(NextOffset(offset)); ++ ScaleFactor scale = ScaleFor(kMode_M1, mode); ++ int32_t disp = 0; ++ return Operand(index, scale, disp); ++ } ++ case kMode_M1I: ++ case kMode_M2I: ++ case kMode_M4I: ++ case kMode_M8I: { ++ Register index = InputRegister(NextOffset(offset)); ++ ScaleFactor scale = ScaleFor(kMode_M1I, mode); ++ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); ++ return Operand(index, scale, ctant.ToInt32(), ctant.rmode()); ++ } ++ case kMode_MI: { ++ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); ++ return Operand(ctant.ToInt32(), ctant.rmode()); ++ } ++ case kMode_None: ++ UNREACHABLE(); ++ } ++ UNREACHABLE(); ++ } ++ ++ Operand MemoryOperand(size_t first_input = 0) { ++ return MemoryOperand(&first_input); ++ } ++}; ++ ++ ++namespace { ++ ++bool HasImmediateInput(Instruction* instr, size_t index) { ++ return instr->InputAt(index)->IsImmediate(); ++} ++ ++ ++class OutOfLineLoadInteger final : public OutOfLineCode { ++ public: ++ OutOfLineLoadInteger(CodeGenerator* gen, Register result) ++ : OutOfLineCode(gen), result_(result) {} ++ ++ void Generate() final { __ xor_(result_, result_); } ++ ++ private: ++ Register const result_; ++}; ++ ++class OutOfLineLoadFloat32NaN final : public OutOfLineCode { ++ public: ++ OutOfLineLoadFloat32NaN(CodeGenerator* gen, X87Register result) ++ : OutOfLineCode(gen), result_(result) {} ++ ++ void Generate() final { ++ DCHECK(result_.code() == 0); ++ USE(result_); ++ __ fstp(0); ++ __ push(Immediate(0xffc00000)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ } ++ ++ private: ++ X87Register const result_; ++}; ++ ++class OutOfLineLoadFloat64NaN final : public OutOfLineCode { ++ public: ++ OutOfLineLoadFloat64NaN(CodeGenerator* gen, X87Register result) ++ : OutOfLineCode(gen), result_(result) {} ++ ++ void Generate() final { ++ DCHECK(result_.code() == 0); ++ USE(result_); ++ __ fstp(0); ++ __ push(Immediate(0xfff80000)); ++ __ push(Immediate(0x00000000)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ } ++ ++ private: ++ X87Register const result_; ++}; ++ ++class OutOfLineTruncateDoubleToI final : public OutOfLineCode { ++ public: ++ OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result, ++ X87Register input) ++ : OutOfLineCode(gen), result_(result), input_(input) {} ++ ++ void Generate() final { ++ UNIMPLEMENTED(); ++ USE(result_); ++ USE(input_); ++ } ++ ++ private: ++ Register const result_; ++ X87Register const input_; ++}; ++ ++ ++class OutOfLineRecordWrite final : public OutOfLineCode { ++ public: ++ OutOfLineRecordWrite(CodeGenerator* gen, Register object, Operand operand, ++ Register value, Register scratch0, Register scratch1, ++ RecordWriteMode mode) ++ : OutOfLineCode(gen), ++ object_(object), ++ operand_(operand), ++ value_(value), ++ scratch0_(scratch0), ++ scratch1_(scratch1), ++ mode_(mode) {} ++ ++ void Generate() final { ++ if (mode_ > RecordWriteMode::kValueIsPointer) { ++ __ JumpIfSmi(value_, exit()); ++ } ++ __ CheckPageFlag(value_, scratch0_, ++ MemoryChunk::kPointersToHereAreInterestingMask, zero, ++ exit()); ++ RememberedSetAction const remembered_set_action = ++ mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET ++ : OMIT_REMEMBERED_SET; ++ SaveFPRegsMode const save_fp_mode = ++ frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; ++ RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, ++ remembered_set_action, save_fp_mode); ++ __ lea(scratch1_, operand_); ++ __ CallStub(&stub); ++ } ++ ++ private: ++ Register const object_; ++ Operand const operand_; ++ Register const value_; ++ Register const scratch0_; ++ Register const scratch1_; ++ RecordWriteMode const mode_; ++}; ++ ++} // namespace ++ ++#define ASSEMBLE_CHECKED_LOAD_FLOAT(asm_instr, OutOfLineLoadNaN) \ ++ do { \ ++ auto result = i.OutputDoubleRegister(); \ ++ auto offset = i.InputRegister(0); \ ++ DCHECK(result.code() == 0); \ ++ if (instr->InputAt(1)->IsRegister()) { \ ++ __ cmp(offset, i.InputRegister(1)); \ ++ } else { \ ++ __ cmp(offset, i.InputImmediate(1)); \ ++ } \ ++ OutOfLineCode* ool = new (zone()) OutOfLineLoadNaN(this, result); \ ++ __ j(above_equal, ool->entry()); \ ++ __ fstp(0); \ ++ __ asm_instr(i.MemoryOperand(2)); \ ++ __ bind(ool->exit()); \ ++ } while (false) ++ ++#define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \ ++ do { \ ++ auto result = i.OutputRegister(); \ ++ auto offset = i.InputRegister(0); \ ++ if (instr->InputAt(1)->IsRegister()) { \ ++ __ cmp(offset, i.InputRegister(1)); \ ++ } else { \ ++ __ cmp(offset, i.InputImmediate(1)); \ ++ } \ ++ OutOfLineCode* ool = new (zone()) OutOfLineLoadInteger(this, result); \ ++ __ j(above_equal, ool->entry()); \ ++ __ asm_instr(result, i.MemoryOperand(2)); \ ++ __ bind(ool->exit()); \ ++ } while (false) ++ ++ ++#define ASSEMBLE_CHECKED_STORE_FLOAT(asm_instr) \ ++ do { \ ++ auto offset = i.InputRegister(0); \ ++ if (instr->InputAt(1)->IsRegister()) { \ ++ __ cmp(offset, i.InputRegister(1)); \ ++ } else { \ ++ __ cmp(offset, i.InputImmediate(1)); \ ++ } \ ++ Label done; \ ++ DCHECK(i.InputDoubleRegister(2).code() == 0); \ ++ __ j(above_equal, &done, Label::kNear); \ ++ __ asm_instr(i.MemoryOperand(3)); \ ++ __ bind(&done); \ ++ } while (false) ++ ++ ++#define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \ ++ do { \ ++ auto offset = i.InputRegister(0); \ ++ if (instr->InputAt(1)->IsRegister()) { \ ++ __ cmp(offset, i.InputRegister(1)); \ ++ } else { \ ++ __ cmp(offset, i.InputImmediate(1)); \ ++ } \ ++ Label done; \ ++ __ j(above_equal, &done, Label::kNear); \ ++ if (instr->InputAt(2)->IsRegister()) { \ ++ __ asm_instr(i.MemoryOperand(3), i.InputRegister(2)); \ ++ } else { \ ++ __ asm_instr(i.MemoryOperand(3), i.InputImmediate(2)); \ ++ } \ ++ __ bind(&done); \ ++ } while (false) ++ ++#define ASSEMBLE_COMPARE(asm_instr) \ ++ do { \ ++ if (AddressingModeField::decode(instr->opcode()) != kMode_None) { \ ++ size_t index = 0; \ ++ Operand left = i.MemoryOperand(&index); \ ++ if (HasImmediateInput(instr, index)) { \ ++ __ asm_instr(left, i.InputImmediate(index)); \ ++ } else { \ ++ __ asm_instr(left, i.InputRegister(index)); \ ++ } \ ++ } else { \ ++ if (HasImmediateInput(instr, 1)) { \ ++ if (instr->InputAt(0)->IsRegister()) { \ ++ __ asm_instr(i.InputRegister(0), i.InputImmediate(1)); \ ++ } else { \ ++ __ asm_instr(i.InputOperand(0), i.InputImmediate(1)); \ ++ } \ ++ } else { \ ++ if (instr->InputAt(1)->IsRegister()) { \ ++ __ asm_instr(i.InputRegister(0), i.InputRegister(1)); \ ++ } else { \ ++ __ asm_instr(i.InputRegister(0), i.InputOperand(1)); \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ ++#define ASSEMBLE_IEEE754_BINOP(name) \ ++ do { \ ++ /* Saves the esp into ebx */ \ ++ __ push(ebx); \ ++ __ mov(ebx, esp); \ ++ /* Pass one double as argument on the stack. */ \ ++ __ PrepareCallCFunction(4, eax); \ ++ __ fstp(0); \ ++ /* Load first operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4 + kDoubleSize)); \ ++ /* Put first operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 0 * kDoubleSize)); \ ++ /* Load second operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4)); \ ++ /* Put second operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 1 * kDoubleSize)); \ ++ __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ ++ 4); \ ++ /* Restore the ebx */ \ ++ __ pop(ebx); \ ++ /* Return value is in st(0) on x87. */ \ ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); \ ++ } while (false) ++ ++#define ASSEMBLE_IEEE754_UNOP(name) \ ++ do { \ ++ /* Saves the esp into ebx */ \ ++ __ push(ebx); \ ++ __ mov(ebx, esp); \ ++ /* Pass one double as argument on the stack. */ \ ++ __ PrepareCallCFunction(2, eax); \ ++ __ fstp(0); \ ++ /* Load operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4)); \ ++ /* Put operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 0)); \ ++ __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ ++ 2); \ ++ /* Restore the ebx */ \ ++ __ pop(ebx); \ ++ /* Return value is in st(0) on x87. */ \ ++ __ lea(esp, Operand(esp, kDoubleSize)); \ ++ } while (false) ++ ++void CodeGenerator::AssembleDeconstructFrame() { ++ __ mov(esp, ebp); ++ __ pop(ebp); ++} ++ ++void CodeGenerator::AssemblePrepareTailCall() { ++ if (frame_access_state()->has_frame()) { ++ __ mov(ebp, MemOperand(ebp, 0)); ++ } ++ frame_access_state()->SetFrameAccessToSP(); ++} ++ ++void CodeGenerator::AssemblePopArgumentsAdaptorFrame(Register args_reg, ++ Register, Register, ++ Register) { ++ // There are not enough temp registers left on ia32 for a call instruction ++ // so we pick some scratch registers and save/restore them manually here. ++ int scratch_count = 3; ++ Register scratch1 = ebx; ++ Register scratch2 = ecx; ++ Register scratch3 = edx; ++ DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); ++ Label done; ++ ++ // Check if current frame is an arguments adaptor frame. ++ __ cmp(Operand(ebp, StandardFrameConstants::kContextOffset), ++ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(not_equal, &done, Label::kNear); ++ ++ __ push(scratch1); ++ __ push(scratch2); ++ __ push(scratch3); ++ ++ // Load arguments count from current arguments adaptor frame (note, it ++ // does not include receiver). ++ Register caller_args_count_reg = scratch1; ++ __ mov(caller_args_count_reg, ++ Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ SmiUntag(caller_args_count_reg); ++ ++ ParameterCount callee_args_count(args_reg); ++ __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, ++ scratch3, ReturnAddressState::kOnStack, scratch_count); ++ __ pop(scratch3); ++ __ pop(scratch2); ++ __ pop(scratch1); ++ ++ __ bind(&done); ++} ++ ++namespace { ++ ++void AdjustStackPointerForTailCall(MacroAssembler* masm, ++ FrameAccessState* state, ++ int new_slot_above_sp, ++ bool allow_shrinkage = true) { ++ int current_sp_offset = state->GetSPToFPSlotCount() + ++ StandardFrameConstants::kFixedSlotCountAboveFp; ++ int stack_slot_delta = new_slot_above_sp - current_sp_offset; ++ if (stack_slot_delta > 0) { ++ masm->sub(esp, Immediate(stack_slot_delta * kPointerSize)); ++ state->IncreaseSPDelta(stack_slot_delta); ++ } else if (allow_shrinkage && stack_slot_delta < 0) { ++ masm->add(esp, Immediate(-stack_slot_delta * kPointerSize)); ++ state->IncreaseSPDelta(stack_slot_delta); ++ } ++} ++ ++} // namespace ++ ++void CodeGenerator::AssembleTailCallBeforeGap(Instruction* instr, ++ int first_unused_stack_slot) { ++ CodeGenerator::PushTypeFlags flags(kImmediatePush | kScalarPush); ++ ZoneVector pushes(zone()); ++ GetPushCompatibleMoves(instr, flags, &pushes); ++ ++ if (!pushes.empty() && ++ (LocationOperand::cast(pushes.back()->destination()).index() + 1 == ++ first_unused_stack_slot)) { ++ X87OperandConverter g(this, instr); ++ for (auto move : pushes) { ++ LocationOperand destination_location( ++ LocationOperand::cast(move->destination())); ++ InstructionOperand source(move->source()); ++ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ destination_location.index()); ++ if (source.IsStackSlot()) { ++ LocationOperand source_location(LocationOperand::cast(source)); ++ __ push(g.SlotToOperand(source_location.index())); ++ } else if (source.IsRegister()) { ++ LocationOperand source_location(LocationOperand::cast(source)); ++ __ push(source_location.GetRegister()); ++ } else if (source.IsImmediate()) { ++ __ push(Immediate(ImmediateOperand::cast(source).inline_value())); ++ } else { ++ // Pushes of non-scalar data types is not supported. ++ UNIMPLEMENTED(); ++ } ++ frame_access_state()->IncreaseSPDelta(1); ++ move->Eliminate(); ++ } ++ } ++ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ first_unused_stack_slot, false); ++} ++ ++void CodeGenerator::AssembleTailCallAfterGap(Instruction* instr, ++ int first_unused_stack_slot) { ++ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ first_unused_stack_slot); ++} ++ ++// Assembles an instruction after register allocation, producing machine code. ++CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ++ Instruction* instr) { ++ X87OperandConverter i(this, instr); ++ InstructionCode opcode = instr->opcode(); ++ ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); ++ ++ switch (arch_opcode) { ++ case kArchCallCodeObject: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ EnsureSpaceForLazyDeopt(); ++ if (HasImmediateInput(instr, 0)) { ++ Handle code = Handle::cast(i.InputHeapObject(0)); ++ __ call(code, RelocInfo::CODE_TARGET); ++ } else { ++ Register reg = i.InputRegister(0); ++ __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); ++ __ call(reg); ++ } ++ RecordCallPosition(instr); ++ bool double_result = ++ instr->HasOutput() && instr->Output()->IsFPRegister(); ++ if (double_result) { ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ __ fstp_d(Operand(esp, 0)); ++ } ++ __ fninit(); ++ if (double_result) { ++ __ fld_d(Operand(esp, 0)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ } else { ++ __ fld1(); ++ } ++ frame_access_state()->ClearSPDelta(); ++ break; ++ } ++ case kArchTailCallCodeObjectFromJSFunction: ++ case kArchTailCallCodeObject: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ if (arch_opcode == kArchTailCallCodeObjectFromJSFunction) { ++ AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, ++ no_reg, no_reg, no_reg); ++ } ++ if (HasImmediateInput(instr, 0)) { ++ Handle code = Handle::cast(i.InputHeapObject(0)); ++ __ jmp(code, RelocInfo::CODE_TARGET); ++ } else { ++ Register reg = i.InputRegister(0); ++ __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); ++ __ jmp(reg); ++ } ++ frame_access_state()->ClearSPDelta(); ++ frame_access_state()->SetFrameAccessToDefault(); ++ break; ++ } ++ case kArchTailCallAddress: { ++ CHECK(!HasImmediateInput(instr, 0)); ++ Register reg = i.InputRegister(0); ++ __ jmp(reg); ++ frame_access_state()->ClearSPDelta(); ++ frame_access_state()->SetFrameAccessToDefault(); ++ break; ++ } ++ case kArchCallJSFunction: { ++ EnsureSpaceForLazyDeopt(); ++ Register func = i.InputRegister(0); ++ if (FLAG_debug_code) { ++ // Check the function's context matches the context argument. ++ __ cmp(esi, FieldOperand(func, JSFunction::kContextOffset)); ++ __ Assert(equal, kWrongFunctionContext); ++ } ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ call(FieldOperand(func, JSFunction::kCodeEntryOffset)); ++ RecordCallPosition(instr); ++ bool double_result = ++ instr->HasOutput() && instr->Output()->IsFPRegister(); ++ if (double_result) { ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ __ fstp_d(Operand(esp, 0)); ++ } ++ __ fninit(); ++ if (double_result) { ++ __ fld_d(Operand(esp, 0)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ } else { ++ __ fld1(); ++ } ++ frame_access_state()->ClearSPDelta(); ++ break; ++ } ++ case kArchTailCallJSFunctionFromJSFunction: { ++ Register func = i.InputRegister(0); ++ if (FLAG_debug_code) { ++ // Check the function's context matches the context argument. ++ __ cmp(esi, FieldOperand(func, JSFunction::kContextOffset)); ++ __ Assert(equal, kWrongFunctionContext); ++ } ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, no_reg, ++ no_reg, no_reg); ++ __ jmp(FieldOperand(func, JSFunction::kCodeEntryOffset)); ++ frame_access_state()->ClearSPDelta(); ++ frame_access_state()->SetFrameAccessToDefault(); ++ break; ++ } ++ case kArchPrepareCallCFunction: { ++ // Frame alignment requires using FP-relative frame addressing. ++ frame_access_state()->SetFrameAccessToFP(); ++ int const num_parameters = MiscField::decode(instr->opcode()); ++ __ PrepareCallCFunction(num_parameters, i.TempRegister(0)); ++ break; ++ } ++ case kArchPrepareTailCall: ++ AssemblePrepareTailCall(); ++ break; ++ case kArchCallCFunction: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ int const num_parameters = MiscField::decode(instr->opcode()); ++ if (HasImmediateInput(instr, 0)) { ++ ExternalReference ref = i.InputExternalReference(0); ++ __ CallCFunction(ref, num_parameters); ++ } else { ++ Register func = i.InputRegister(0); ++ __ CallCFunction(func, num_parameters); ++ } ++ bool double_result = ++ instr->HasOutput() && instr->Output()->IsFPRegister(); ++ if (double_result) { ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ __ fstp_d(Operand(esp, 0)); ++ } ++ __ fninit(); ++ if (double_result) { ++ __ fld_d(Operand(esp, 0)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ } else { ++ __ fld1(); ++ } ++ frame_access_state()->SetFrameAccessToDefault(); ++ frame_access_state()->ClearSPDelta(); ++ break; ++ } ++ case kArchJmp: ++ AssembleArchJump(i.InputRpo(0)); ++ break; ++ case kArchLookupSwitch: ++ AssembleArchLookupSwitch(instr); ++ break; ++ case kArchTableSwitch: ++ AssembleArchTableSwitch(instr); ++ break; ++ case kArchComment: { ++ Address comment_string = i.InputExternalReference(0).address(); ++ __ RecordComment(reinterpret_cast(comment_string)); ++ break; ++ } ++ case kArchDebugBreak: ++ __ int3(); ++ break; ++ case kArchNop: ++ case kArchThrowTerminator: ++ // don't emit code for nops. ++ break; ++ case kArchDeoptimize: { ++ int deopt_state_id = ++ BuildTranslation(instr, -1, 0, OutputFrameStateCombine::Ignore()); ++ int double_register_param_count = 0; ++ int x87_layout = 0; ++ for (size_t i = 0; i < instr->InputCount(); i++) { ++ if (instr->InputAt(i)->IsFPRegister()) { ++ double_register_param_count++; ++ } ++ } ++ // Currently we use only one X87 register. If double_register_param_count ++ // is bigger than 1, it means duplicated double register is added to input ++ // of this instruction. ++ if (double_register_param_count > 0) { ++ x87_layout = (0 << 3) | 1; ++ } ++ // The layout of x87 register stack is loaded on the top of FPU register ++ // stack for deoptimization. ++ __ push(Immediate(x87_layout)); ++ __ fild_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kPointerSize)); ++ ++ CodeGenResult result = ++ AssembleDeoptimizerCall(deopt_state_id, current_source_position_); ++ if (result != kSuccess) return result; ++ break; ++ } ++ case kArchRet: ++ AssembleReturn(instr->InputAt(0)); ++ break; ++ case kArchFramePointer: ++ __ mov(i.OutputRegister(), ebp); ++ break; ++ case kArchStackPointer: ++ __ mov(i.OutputRegister(), esp); ++ break; ++ case kArchParentFramePointer: ++ if (frame_access_state()->has_frame()) { ++ __ mov(i.OutputRegister(), Operand(ebp, 0)); ++ } else { ++ __ mov(i.OutputRegister(), ebp); ++ } ++ break; ++ case kArchTruncateDoubleToI: { ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fld_d(i.InputOperand(0)); ++ } ++ __ TruncateX87TOSToI(i.OutputRegister()); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fstp(0); ++ } ++ break; ++ } ++ case kArchStoreWithWriteBarrier: { ++ RecordWriteMode mode = ++ static_cast(MiscField::decode(instr->opcode())); ++ Register object = i.InputRegister(0); ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ Register value = i.InputRegister(index); ++ Register scratch0 = i.TempRegister(0); ++ Register scratch1 = i.TempRegister(1); ++ auto ool = new (zone()) OutOfLineRecordWrite(this, object, operand, value, ++ scratch0, scratch1, mode); ++ __ mov(operand, value); ++ __ CheckPageFlag(object, scratch0, ++ MemoryChunk::kPointersFromHereAreInterestingMask, ++ not_zero, ool->entry()); ++ __ bind(ool->exit()); ++ break; ++ } ++ case kArchStackSlot: { ++ FrameOffset offset = ++ frame_access_state()->GetFrameOffset(i.InputInt32(0)); ++ Register base; ++ if (offset.from_stack_pointer()) { ++ base = esp; ++ } else { ++ base = ebp; ++ } ++ __ lea(i.OutputRegister(), Operand(base, offset.offset())); ++ break; ++ } ++ case kIeee754Float64Acos: ++ ASSEMBLE_IEEE754_UNOP(acos); ++ break; ++ case kIeee754Float64Acosh: ++ ASSEMBLE_IEEE754_UNOP(acosh); ++ break; ++ case kIeee754Float64Asin: ++ ASSEMBLE_IEEE754_UNOP(asin); ++ break; ++ case kIeee754Float64Asinh: ++ ASSEMBLE_IEEE754_UNOP(asinh); ++ break; ++ case kIeee754Float64Atan: ++ ASSEMBLE_IEEE754_UNOP(atan); ++ break; ++ case kIeee754Float64Atanh: ++ ASSEMBLE_IEEE754_UNOP(atanh); ++ break; ++ case kIeee754Float64Atan2: ++ ASSEMBLE_IEEE754_BINOP(atan2); ++ break; ++ case kIeee754Float64Cbrt: ++ ASSEMBLE_IEEE754_UNOP(cbrt); ++ break; ++ case kIeee754Float64Cos: ++ __ X87SetFPUCW(0x027F); ++ ASSEMBLE_IEEE754_UNOP(cos); ++ __ X87SetFPUCW(0x037F); ++ break; ++ case kIeee754Float64Cosh: ++ ASSEMBLE_IEEE754_UNOP(cosh); ++ break; ++ case kIeee754Float64Expm1: ++ __ X87SetFPUCW(0x027F); ++ ASSEMBLE_IEEE754_UNOP(expm1); ++ __ X87SetFPUCW(0x037F); ++ break; ++ case kIeee754Float64Exp: ++ ASSEMBLE_IEEE754_UNOP(exp); ++ break; ++ case kIeee754Float64Log: ++ ASSEMBLE_IEEE754_UNOP(log); ++ break; ++ case kIeee754Float64Log1p: ++ ASSEMBLE_IEEE754_UNOP(log1p); ++ break; ++ case kIeee754Float64Log2: ++ ASSEMBLE_IEEE754_UNOP(log2); ++ break; ++ case kIeee754Float64Log10: ++ ASSEMBLE_IEEE754_UNOP(log10); ++ break; ++ case kIeee754Float64Pow: { ++ // Keep the x87 FPU stack empty before calling stub code ++ __ fstp(0); ++ // Call the MathStub and put return value in stX_0 ++ MathPowStub stub(isolate(), MathPowStub::DOUBLE); ++ __ CallStub(&stub); ++ /* Return value is in st(0) on x87. */ ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ break; ++ } ++ case kIeee754Float64Sin: ++ __ X87SetFPUCW(0x027F); ++ ASSEMBLE_IEEE754_UNOP(sin); ++ __ X87SetFPUCW(0x037F); ++ break; ++ case kIeee754Float64Sinh: ++ ASSEMBLE_IEEE754_UNOP(sinh); ++ break; ++ case kIeee754Float64Tan: ++ __ X87SetFPUCW(0x027F); ++ ASSEMBLE_IEEE754_UNOP(tan); ++ __ X87SetFPUCW(0x037F); ++ break; ++ case kIeee754Float64Tanh: ++ ASSEMBLE_IEEE754_UNOP(tanh); ++ break; ++ case kX87Add: ++ if (HasImmediateInput(instr, 1)) { ++ __ add(i.InputOperand(0), i.InputImmediate(1)); ++ } else { ++ __ add(i.InputRegister(0), i.InputOperand(1)); ++ } ++ break; ++ case kX87And: ++ if (HasImmediateInput(instr, 1)) { ++ __ and_(i.InputOperand(0), i.InputImmediate(1)); ++ } else { ++ __ and_(i.InputRegister(0), i.InputOperand(1)); ++ } ++ break; ++ case kX87Cmp: ++ ASSEMBLE_COMPARE(cmp); ++ break; ++ case kX87Cmp16: ++ ASSEMBLE_COMPARE(cmpw); ++ break; ++ case kX87Cmp8: ++ ASSEMBLE_COMPARE(cmpb); ++ break; ++ case kX87Test: ++ ASSEMBLE_COMPARE(test); ++ break; ++ case kX87Test16: ++ ASSEMBLE_COMPARE(test_w); ++ break; ++ case kX87Test8: ++ ASSEMBLE_COMPARE(test_b); ++ break; ++ case kX87Imul: ++ if (HasImmediateInput(instr, 1)) { ++ __ imul(i.OutputRegister(), i.InputOperand(0), i.InputInt32(1)); ++ } else { ++ __ imul(i.OutputRegister(), i.InputOperand(1)); ++ } ++ break; ++ case kX87ImulHigh: ++ __ imul(i.InputRegister(1)); ++ break; ++ case kX87UmulHigh: ++ __ mul(i.InputRegister(1)); ++ break; ++ case kX87Idiv: ++ __ cdq(); ++ __ idiv(i.InputOperand(1)); ++ break; ++ case kX87Udiv: ++ __ Move(edx, Immediate(0)); ++ __ div(i.InputOperand(1)); ++ break; ++ case kX87Not: ++ __ not_(i.OutputOperand()); ++ break; ++ case kX87Neg: ++ __ neg(i.OutputOperand()); ++ break; ++ case kX87Or: ++ if (HasImmediateInput(instr, 1)) { ++ __ or_(i.InputOperand(0), i.InputImmediate(1)); ++ } else { ++ __ or_(i.InputRegister(0), i.InputOperand(1)); ++ } ++ break; ++ case kX87Xor: ++ if (HasImmediateInput(instr, 1)) { ++ __ xor_(i.InputOperand(0), i.InputImmediate(1)); ++ } else { ++ __ xor_(i.InputRegister(0), i.InputOperand(1)); ++ } ++ break; ++ case kX87Sub: ++ if (HasImmediateInput(instr, 1)) { ++ __ sub(i.InputOperand(0), i.InputImmediate(1)); ++ } else { ++ __ sub(i.InputRegister(0), i.InputOperand(1)); ++ } ++ break; ++ case kX87Shl: ++ if (HasImmediateInput(instr, 1)) { ++ __ shl(i.OutputOperand(), i.InputInt5(1)); ++ } else { ++ __ shl_cl(i.OutputOperand()); ++ } ++ break; ++ case kX87Shr: ++ if (HasImmediateInput(instr, 1)) { ++ __ shr(i.OutputOperand(), i.InputInt5(1)); ++ } else { ++ __ shr_cl(i.OutputOperand()); ++ } ++ break; ++ case kX87Sar: ++ if (HasImmediateInput(instr, 1)) { ++ __ sar(i.OutputOperand(), i.InputInt5(1)); ++ } else { ++ __ sar_cl(i.OutputOperand()); ++ } ++ break; ++ case kX87AddPair: { ++ // i.OutputRegister(0) == i.InputRegister(0) ... left low word. ++ // i.InputRegister(1) ... left high word. ++ // i.InputRegister(2) ... right low word. ++ // i.InputRegister(3) ... right high word. ++ bool use_temp = false; ++ if (i.OutputRegister(0).code() == i.InputRegister(1).code() || ++ i.OutputRegister(0).code() == i.InputRegister(3).code()) { ++ // We cannot write to the output register directly, because it would ++ // overwrite an input for adc. We have to use the temp register. ++ use_temp = true; ++ __ Move(i.TempRegister(0), i.InputRegister(0)); ++ __ add(i.TempRegister(0), i.InputRegister(2)); ++ } else { ++ __ add(i.OutputRegister(0), i.InputRegister(2)); ++ } ++ if (i.OutputRegister(1).code() != i.InputRegister(1).code()) { ++ __ Move(i.OutputRegister(1), i.InputRegister(1)); ++ } ++ __ adc(i.OutputRegister(1), Operand(i.InputRegister(3))); ++ if (use_temp) { ++ __ Move(i.OutputRegister(0), i.TempRegister(0)); ++ } ++ break; ++ } ++ case kX87SubPair: { ++ // i.OutputRegister(0) == i.InputRegister(0) ... left low word. ++ // i.InputRegister(1) ... left high word. ++ // i.InputRegister(2) ... right low word. ++ // i.InputRegister(3) ... right high word. ++ bool use_temp = false; ++ if (i.OutputRegister(0).code() == i.InputRegister(1).code() || ++ i.OutputRegister(0).code() == i.InputRegister(3).code()) { ++ // We cannot write to the output register directly, because it would ++ // overwrite an input for adc. We have to use the temp register. ++ use_temp = true; ++ __ Move(i.TempRegister(0), i.InputRegister(0)); ++ __ sub(i.TempRegister(0), i.InputRegister(2)); ++ } else { ++ __ sub(i.OutputRegister(0), i.InputRegister(2)); ++ } ++ if (i.OutputRegister(1).code() != i.InputRegister(1).code()) { ++ __ Move(i.OutputRegister(1), i.InputRegister(1)); ++ } ++ __ sbb(i.OutputRegister(1), Operand(i.InputRegister(3))); ++ if (use_temp) { ++ __ Move(i.OutputRegister(0), i.TempRegister(0)); ++ } ++ break; ++ } ++ case kX87MulPair: { ++ __ imul(i.OutputRegister(1), i.InputOperand(0)); ++ __ mov(i.TempRegister(0), i.InputOperand(1)); ++ __ imul(i.TempRegister(0), i.InputOperand(2)); ++ __ add(i.OutputRegister(1), i.TempRegister(0)); ++ __ mov(i.OutputRegister(0), i.InputOperand(0)); ++ // Multiplies the low words and stores them in eax and edx. ++ __ mul(i.InputRegister(2)); ++ __ add(i.OutputRegister(1), i.TempRegister(0)); ++ ++ break; ++ } ++ case kX87ShlPair: ++ if (HasImmediateInput(instr, 2)) { ++ __ ShlPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); ++ } else { ++ // Shift has been loaded into CL by the register allocator. ++ __ ShlPair_cl(i.InputRegister(1), i.InputRegister(0)); ++ } ++ break; ++ case kX87ShrPair: ++ if (HasImmediateInput(instr, 2)) { ++ __ ShrPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); ++ } else { ++ // Shift has been loaded into CL by the register allocator. ++ __ ShrPair_cl(i.InputRegister(1), i.InputRegister(0)); ++ } ++ break; ++ case kX87SarPair: ++ if (HasImmediateInput(instr, 2)) { ++ __ SarPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); ++ } else { ++ // Shift has been loaded into CL by the register allocator. ++ __ SarPair_cl(i.InputRegister(1), i.InputRegister(0)); ++ } ++ break; ++ case kX87Ror: ++ if (HasImmediateInput(instr, 1)) { ++ __ ror(i.OutputOperand(), i.InputInt5(1)); ++ } else { ++ __ ror_cl(i.OutputOperand()); ++ } ++ break; ++ case kX87Lzcnt: ++ __ Lzcnt(i.OutputRegister(), i.InputOperand(0)); ++ break; ++ case kX87Popcnt: ++ __ Popcnt(i.OutputRegister(), i.InputOperand(0)); ++ break; ++ case kX87LoadFloat64Constant: { ++ InstructionOperand* source = instr->InputAt(0); ++ InstructionOperand* destination = instr->Output(); ++ DCHECK(source->IsConstant()); ++ X87OperandConverter g(this, nullptr); ++ Constant src_constant = g.ToConstant(source); ++ ++ DCHECK_EQ(Constant::kFloat64, src_constant.type()); ++ uint64_t src = src_constant.ToFloat64().AsUint64(); ++ uint32_t lower = static_cast(src); ++ uint32_t upper = static_cast(src >> 32); ++ if (destination->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ mov(MemOperand(esp, 0), Immediate(lower)); ++ __ mov(MemOperand(esp, kInt32Size), Immediate(upper)); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ UNREACHABLE(); ++ } ++ break; ++ } ++ case kX87Float32Cmp: { ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ FCmp(); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ break; ++ } ++ case kX87Float32Add: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ faddp(); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float32Sub: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fsubp(); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float32Mul: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fmulp(); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float32Div: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fdivp(); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ ++ case kX87Float32Sqrt: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fsqrt(); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ break; ++ } ++ case kX87Float32Abs: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fabs(); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ break; ++ } ++ case kX87Float32Neg: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fchs(); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ break; ++ } ++ case kX87Float32Round: { ++ RoundingMode mode = ++ static_cast(MiscField::decode(instr->opcode())); ++ // Set the correct round mode in x87 control register ++ __ X87SetRC((mode << 10)); ++ ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ InstructionOperand* input = instr->InputAt(0); ++ USE(input); ++ DCHECK(input->IsFPStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(i.InputOperand(0)); ++ } ++ __ frndint(); ++ __ X87SetRC(0x0000); ++ break; ++ } ++ case kX87Float64Add: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ faddp(); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float64Sub: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fsub_d(MemOperand(esp, 0)); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float64Mul: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fmul_d(MemOperand(esp, 0)); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float64Div: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fdiv_d(MemOperand(esp, 0)); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ // Restore the default value of control word. ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float64Mod: { ++ FrameScope frame_scope(&masm_, StackFrame::MANUAL); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ mov(eax, esp); ++ __ PrepareCallCFunction(4, eax); ++ __ fstp(0); ++ __ fld_d(MemOperand(eax, 0)); ++ __ fstp_d(Operand(esp, 1 * kDoubleSize)); ++ __ fld_d(MemOperand(eax, kDoubleSize)); ++ __ fstp_d(Operand(esp, 0)); ++ __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), ++ 4); ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ break; ++ } ++ case kX87Float32Max: { ++ Label compare_swap, done_compare; ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld(1); ++ __ fld(1); ++ __ FCmp(); ++ ++ auto ool = ++ new (zone()) OutOfLineLoadFloat32NaN(this, i.OutputDoubleRegister()); ++ __ j(parity_even, ool->entry()); ++ __ j(below, &done_compare, Label::kNear); ++ __ j(above, &compare_swap, Label::kNear); ++ __ push(eax); ++ __ lea(esp, Operand(esp, -kFloatSize)); ++ __ fld(1); ++ __ fstp_s(Operand(esp, 0)); ++ __ mov(eax, MemOperand(esp, 0)); ++ __ and_(eax, Immediate(0x80000000)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ __ pop(eax); ++ __ j(zero, &done_compare, Label::kNear); ++ ++ __ bind(&compare_swap); ++ __ bind(ool->exit()); ++ __ fxch(1); ++ ++ __ bind(&done_compare); ++ __ fstp(0); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ break; ++ } ++ case kX87Float64Max: { ++ Label compare_swap, done_compare; ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fld(1); ++ __ fld(1); ++ __ FCmp(); ++ ++ auto ool = ++ new (zone()) OutOfLineLoadFloat64NaN(this, i.OutputDoubleRegister()); ++ __ j(parity_even, ool->entry()); ++ __ j(below, &done_compare, Label::kNear); ++ __ j(above, &compare_swap, Label::kNear); ++ __ push(eax); ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ __ fld(1); ++ __ fstp_d(Operand(esp, 0)); ++ __ mov(eax, MemOperand(esp, 4)); ++ __ and_(eax, Immediate(0x80000000)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ __ pop(eax); ++ __ j(zero, &done_compare, Label::kNear); ++ ++ __ bind(&compare_swap); ++ __ bind(ool->exit()); ++ __ fxch(1); ++ ++ __ bind(&done_compare); ++ __ fstp(0); ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ break; ++ } ++ case kX87Float32Min: { ++ Label compare_swap, done_compare; ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, kFloatSize)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld(1); ++ __ fld(1); ++ __ FCmp(); ++ ++ auto ool = ++ new (zone()) OutOfLineLoadFloat32NaN(this, i.OutputDoubleRegister()); ++ __ j(parity_even, ool->entry()); ++ __ j(above, &done_compare, Label::kNear); ++ __ j(below, &compare_swap, Label::kNear); ++ __ push(eax); ++ __ lea(esp, Operand(esp, -kFloatSize)); ++ __ fld(0); ++ __ fstp_s(Operand(esp, 0)); ++ __ mov(eax, MemOperand(esp, 0)); ++ __ and_(eax, Immediate(0x80000000)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ __ pop(eax); ++ __ j(zero, &done_compare, Label::kNear); ++ ++ __ bind(&compare_swap); ++ __ bind(ool->exit()); ++ __ fxch(1); ++ ++ __ bind(&done_compare); ++ __ fstp(0); ++ __ lea(esp, Operand(esp, 2 * kFloatSize)); ++ break; ++ } ++ case kX87Float64Min: { ++ Label compare_swap, done_compare; ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fld(1); ++ __ fld(1); ++ __ FCmp(); ++ ++ auto ool = ++ new (zone()) OutOfLineLoadFloat64NaN(this, i.OutputDoubleRegister()); ++ __ j(parity_even, ool->entry()); ++ __ j(above, &done_compare, Label::kNear); ++ __ j(below, &compare_swap, Label::kNear); ++ __ push(eax); ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ __ fld(0); ++ __ fstp_d(Operand(esp, 0)); ++ __ mov(eax, MemOperand(esp, 4)); ++ __ and_(eax, Immediate(0x80000000)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ __ pop(eax); ++ __ j(zero, &done_compare, Label::kNear); ++ ++ __ bind(&compare_swap); ++ __ bind(ool->exit()); ++ __ fxch(1); ++ ++ __ bind(&done_compare); ++ __ fstp(0); ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ break; ++ } ++ case kX87Float64Abs: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fabs(); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ break; ++ } ++ case kX87Float64Neg: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fchs(); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ break; ++ } ++ case kX87Int32ToFloat32: { ++ InstructionOperand* input = instr->InputAt(0); ++ DCHECK(input->IsRegister() || input->IsStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ if (input->IsRegister()) { ++ Register input_reg = i.InputRegister(0); ++ __ push(input_reg); ++ __ fild_s(Operand(esp, 0)); ++ __ pop(input_reg); ++ } else { ++ __ fild_s(i.InputOperand(0)); ++ } ++ break; ++ } ++ case kX87Uint32ToFloat32: { ++ InstructionOperand* input = instr->InputAt(0); ++ DCHECK(input->IsRegister() || input->IsStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ Label msb_set_src; ++ Label jmp_return; ++ // Put input integer into eax(tmporarilly) ++ __ push(eax); ++ if (input->IsRegister()) ++ __ mov(eax, i.InputRegister(0)); ++ else ++ __ mov(eax, i.InputOperand(0)); ++ ++ __ test(eax, eax); ++ __ j(sign, &msb_set_src, Label::kNear); ++ __ push(eax); ++ __ fild_s(Operand(esp, 0)); ++ __ pop(eax); ++ ++ __ jmp(&jmp_return, Label::kNear); ++ __ bind(&msb_set_src); ++ // Need another temp reg ++ __ push(ebx); ++ __ mov(ebx, eax); ++ __ shr(eax, 1); ++ // Recover the least significant bit to avoid rounding errors. ++ __ and_(ebx, Immediate(1)); ++ __ or_(eax, ebx); ++ __ push(eax); ++ __ fild_s(Operand(esp, 0)); ++ __ pop(eax); ++ __ fld(0); ++ __ faddp(); ++ // Restore the ebx ++ __ pop(ebx); ++ __ bind(&jmp_return); ++ // Restore the eax ++ __ pop(eax); ++ break; ++ } ++ case kX87Int32ToFloat64: { ++ InstructionOperand* input = instr->InputAt(0); ++ DCHECK(input->IsRegister() || input->IsStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ if (input->IsRegister()) { ++ Register input_reg = i.InputRegister(0); ++ __ push(input_reg); ++ __ fild_s(Operand(esp, 0)); ++ __ pop(input_reg); ++ } else { ++ __ fild_s(i.InputOperand(0)); ++ } ++ break; ++ } ++ case kX87Float32ToFloat64: { ++ InstructionOperand* input = instr->InputAt(0); ++ if (input->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ DCHECK(input->IsFPStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(i.InputOperand(0)); ++ } ++ break; ++ } ++ case kX87Uint32ToFloat64: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ LoadUint32NoSSE2(i.InputRegister(0)); ++ break; ++ } ++ case kX87Float32ToInt32: { ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fld_s(i.InputOperand(0)); ++ } ++ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fstp(0); ++ } ++ break; ++ } ++ case kX87Float32ToUint32: { ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fld_s(i.InputOperand(0)); ++ } ++ Label success; ++ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ test(i.OutputRegister(0), i.OutputRegister(0)); ++ __ j(positive, &success); ++ // Need to reserve the input float32 data. ++ __ fld(0); ++ __ push(Immediate(INT32_MIN)); ++ __ fild_s(Operand(esp, 0)); ++ __ lea(esp, Operand(esp, kPointerSize)); ++ __ faddp(); ++ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ or_(i.OutputRegister(0), Immediate(0x80000000)); ++ // Only keep input float32 data in x87 stack when return. ++ __ fstp(0); ++ __ bind(&success); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fstp(0); ++ } ++ break; ++ } ++ case kX87Float64ToInt32: { ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fld_d(i.InputOperand(0)); ++ } ++ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fstp(0); ++ } ++ break; ++ } ++ case kX87Float64ToFloat32: { ++ InstructionOperand* input = instr->InputAt(0); ++ if (input->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ DCHECK(input->IsFPStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(i.InputOperand(0)); ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } ++ break; ++ } ++ case kX87Float64ToUint32: { ++ __ push_imm32(-2147483648); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fld_d(i.InputOperand(0)); ++ } ++ __ fild_s(Operand(esp, 0)); ++ __ fld(1); ++ __ faddp(); ++ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ add(esp, Immediate(kInt32Size)); ++ __ add(i.OutputRegister(), Immediate(0x80000000)); ++ __ fstp(0); ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ __ fstp(0); ++ } ++ break; ++ } ++ case kX87Float64ExtractHighWord32: { ++ if (instr->InputAt(0)->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fst_d(MemOperand(esp, 0)); ++ __ mov(i.OutputRegister(), MemOperand(esp, kDoubleSize / 2)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ InstructionOperand* input = instr->InputAt(0); ++ USE(input); ++ DCHECK(input->IsFPStackSlot()); ++ __ mov(i.OutputRegister(), i.InputOperand(0, kDoubleSize / 2)); ++ } ++ break; ++ } ++ case kX87Float64ExtractLowWord32: { ++ if (instr->InputAt(0)->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fst_d(MemOperand(esp, 0)); ++ __ mov(i.OutputRegister(), MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ InstructionOperand* input = instr->InputAt(0); ++ USE(input); ++ DCHECK(input->IsFPStackSlot()); ++ __ mov(i.OutputRegister(), i.InputOperand(0)); ++ } ++ break; ++ } ++ case kX87Float64InsertHighWord32: { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fstp_d(MemOperand(esp, 0)); ++ __ mov(MemOperand(esp, kDoubleSize / 2), i.InputRegister(1)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ break; ++ } ++ case kX87Float64InsertLowWord32: { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fstp_d(MemOperand(esp, 0)); ++ __ mov(MemOperand(esp, 0), i.InputRegister(1)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ break; ++ } ++ case kX87Float64Sqrt: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ X87SetFPUCW(0x027F); ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ fsqrt(); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ __ X87SetFPUCW(0x037F); ++ break; ++ } ++ case kX87Float64Round: { ++ RoundingMode mode = ++ static_cast(MiscField::decode(instr->opcode())); ++ // Set the correct round mode in x87 control register ++ __ X87SetRC((mode << 10)); ++ ++ if (!instr->InputAt(0)->IsFPRegister()) { ++ InstructionOperand* input = instr->InputAt(0); ++ USE(input); ++ DCHECK(input->IsFPStackSlot()); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(i.InputOperand(0)); ++ } ++ __ frndint(); ++ __ X87SetRC(0x0000); ++ break; ++ } ++ case kX87Float64Cmp: { ++ __ fld_d(MemOperand(esp, kDoubleSize)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ FCmp(); ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); ++ break; ++ } ++ case kX87Float64SilenceNaN: { ++ Label end, return_qnan; ++ __ fstp(0); ++ __ push(ebx); ++ // Load Half word of HoleNan(SNaN) into ebx ++ __ mov(ebx, MemOperand(esp, 2 * kInt32Size)); ++ __ cmp(ebx, Immediate(kHoleNanUpper32)); ++ // Check input is HoleNaN(SNaN)? ++ __ j(equal, &return_qnan, Label::kNear); ++ // If input isn't HoleNaN(SNaN), just load it and return ++ __ fld_d(MemOperand(esp, 1 * kInt32Size)); ++ __ jmp(&end); ++ __ bind(&return_qnan); ++ // If input is HoleNaN(SNaN), Return QNaN ++ __ push(Immediate(0xffffffff)); ++ __ push(Immediate(0xfff7ffff)); ++ __ fld_d(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kDoubleSize)); ++ __ bind(&end); ++ __ pop(ebx); ++ // Clear stack. ++ __ lea(esp, Operand(esp, 1 * kDoubleSize)); ++ break; ++ } ++ case kX87Movsxbl: ++ __ movsx_b(i.OutputRegister(), i.MemoryOperand()); ++ break; ++ case kX87Movzxbl: ++ __ movzx_b(i.OutputRegister(), i.MemoryOperand()); ++ break; ++ case kX87Movb: { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ if (HasImmediateInput(instr, index)) { ++ __ mov_b(operand, i.InputInt8(index)); ++ } else { ++ __ mov_b(operand, i.InputRegister(index)); ++ } ++ break; ++ } ++ case kX87Movsxwl: ++ __ movsx_w(i.OutputRegister(), i.MemoryOperand()); ++ break; ++ case kX87Movzxwl: ++ __ movzx_w(i.OutputRegister(), i.MemoryOperand()); ++ break; ++ case kX87Movw: { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ if (HasImmediateInput(instr, index)) { ++ __ mov_w(operand, i.InputInt16(index)); ++ } else { ++ __ mov_w(operand, i.InputRegister(index)); ++ } ++ break; ++ } ++ case kX87Movl: ++ if (instr->HasOutput()) { ++ __ mov(i.OutputRegister(), i.MemoryOperand()); ++ } else { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ if (HasImmediateInput(instr, index)) { ++ __ mov(operand, i.InputImmediate(index)); ++ } else { ++ __ mov(operand, i.InputRegister(index)); ++ } ++ } ++ break; ++ case kX87Movsd: { ++ if (instr->HasOutput()) { ++ X87Register output = i.OutputDoubleRegister(); ++ USE(output); ++ DCHECK(output.code() == 0); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_d(i.MemoryOperand()); ++ } else { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ __ fst_d(operand); ++ } ++ break; ++ } ++ case kX87Movss: { ++ if (instr->HasOutput()) { ++ X87Register output = i.OutputDoubleRegister(); ++ USE(output); ++ DCHECK(output.code() == 0); ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ __ fld_s(i.MemoryOperand()); ++ } else { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ __ fst_s(operand); ++ } ++ break; ++ } ++ case kX87BitcastFI: { ++ __ mov(i.OutputRegister(), MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ break; ++ } ++ case kX87BitcastIF: { ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ __ fstp(0); ++ if (instr->InputAt(0)->IsRegister()) { ++ __ lea(esp, Operand(esp, -kFloatSize)); ++ __ mov(MemOperand(esp, 0), i.InputRegister(0)); ++ __ fld_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ } else { ++ __ fld_s(i.InputOperand(0)); ++ } ++ break; ++ } ++ case kX87Lea: { ++ AddressingMode mode = AddressingModeField::decode(instr->opcode()); ++ // Shorten "leal" to "addl", "subl" or "shll" if the register allocation ++ // and addressing mode just happens to work out. The "addl"/"subl" forms ++ // in these cases are faster based on measurements. ++ if (mode == kMode_MI) { ++ __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); ++ } else if (i.InputRegister(0).is(i.OutputRegister())) { ++ if (mode == kMode_MRI) { ++ int32_t constant_summand = i.InputInt32(1); ++ if (constant_summand > 0) { ++ __ add(i.OutputRegister(), Immediate(constant_summand)); ++ } else if (constant_summand < 0) { ++ __ sub(i.OutputRegister(), Immediate(-constant_summand)); ++ } ++ } else if (mode == kMode_MR1) { ++ if (i.InputRegister(1).is(i.OutputRegister())) { ++ __ shl(i.OutputRegister(), 1); ++ } else { ++ __ add(i.OutputRegister(), i.InputRegister(1)); ++ } ++ } else if (mode == kMode_M2) { ++ __ shl(i.OutputRegister(), 1); ++ } else if (mode == kMode_M4) { ++ __ shl(i.OutputRegister(), 2); ++ } else if (mode == kMode_M8) { ++ __ shl(i.OutputRegister(), 3); ++ } else { ++ __ lea(i.OutputRegister(), i.MemoryOperand()); ++ } ++ } else if (mode == kMode_MR1 && ++ i.InputRegister(1).is(i.OutputRegister())) { ++ __ add(i.OutputRegister(), i.InputRegister(0)); ++ } else { ++ __ lea(i.OutputRegister(), i.MemoryOperand()); ++ } ++ break; ++ } ++ case kX87Push: ++ if (instr->InputAt(0)->IsFPRegister()) { ++ auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); ++ if (allocated.representation() == MachineRepresentation::kFloat32) { ++ __ sub(esp, Immediate(kFloatSize)); ++ __ fst_s(Operand(esp, 0)); ++ frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize); ++ } else { ++ DCHECK(allocated.representation() == MachineRepresentation::kFloat64); ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fst_d(Operand(esp, 0)); ++ frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); ++ } ++ } else if (instr->InputAt(0)->IsFPStackSlot()) { ++ auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); ++ if (allocated.representation() == MachineRepresentation::kFloat32) { ++ __ sub(esp, Immediate(kFloatSize)); ++ __ fld_s(i.InputOperand(0)); ++ __ fstp_s(MemOperand(esp, 0)); ++ frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize); ++ } else { ++ DCHECK(allocated.representation() == MachineRepresentation::kFloat64); ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ fld_d(i.InputOperand(0)); ++ __ fstp_d(MemOperand(esp, 0)); ++ frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); ++ } ++ } else if (HasImmediateInput(instr, 0)) { ++ __ push(i.InputImmediate(0)); ++ frame_access_state()->IncreaseSPDelta(1); ++ } else { ++ __ push(i.InputOperand(0)); ++ frame_access_state()->IncreaseSPDelta(1); ++ } ++ break; ++ case kX87Poke: { ++ int const slot = MiscField::decode(instr->opcode()); ++ if (HasImmediateInput(instr, 0)) { ++ __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); ++ } else { ++ __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); ++ } ++ break; ++ } ++ case kX87Xchgb: { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ __ xchg_b(i.InputRegister(index), operand); ++ break; ++ } ++ case kX87Xchgw: { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ __ xchg_w(i.InputRegister(index), operand); ++ break; ++ } ++ case kX87Xchgl: { ++ size_t index = 0; ++ Operand operand = i.MemoryOperand(&index); ++ __ xchg(i.InputRegister(index), operand); ++ break; ++ } ++ case kX87PushFloat32: ++ __ lea(esp, Operand(esp, -kFloatSize)); ++ if (instr->InputAt(0)->IsFPStackSlot()) { ++ __ fld_s(i.InputOperand(0)); ++ __ fstp_s(MemOperand(esp, 0)); ++ } else if (instr->InputAt(0)->IsFPRegister()) { ++ __ fst_s(MemOperand(esp, 0)); ++ } else { ++ UNREACHABLE(); ++ } ++ break; ++ case kX87PushFloat64: ++ __ lea(esp, Operand(esp, -kDoubleSize)); ++ if (instr->InputAt(0)->IsFPStackSlot()) { ++ __ fld_d(i.InputOperand(0)); ++ __ fstp_d(MemOperand(esp, 0)); ++ } else if (instr->InputAt(0)->IsFPRegister()) { ++ __ fst_d(MemOperand(esp, 0)); ++ } else { ++ UNREACHABLE(); ++ } ++ break; ++ case kCheckedLoadInt8: ++ ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); ++ break; ++ case kCheckedLoadUint8: ++ ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); ++ break; ++ case kCheckedLoadInt16: ++ ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); ++ break; ++ case kCheckedLoadUint16: ++ ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_w); ++ break; ++ case kCheckedLoadWord32: ++ ASSEMBLE_CHECKED_LOAD_INTEGER(mov); ++ break; ++ case kCheckedLoadFloat32: ++ ASSEMBLE_CHECKED_LOAD_FLOAT(fld_s, OutOfLineLoadFloat32NaN); ++ break; ++ case kCheckedLoadFloat64: ++ ASSEMBLE_CHECKED_LOAD_FLOAT(fld_d, OutOfLineLoadFloat64NaN); ++ break; ++ case kCheckedStoreWord8: ++ ASSEMBLE_CHECKED_STORE_INTEGER(mov_b); ++ break; ++ case kCheckedStoreWord16: ++ ASSEMBLE_CHECKED_STORE_INTEGER(mov_w); ++ break; ++ case kCheckedStoreWord32: ++ ASSEMBLE_CHECKED_STORE_INTEGER(mov); ++ break; ++ case kCheckedStoreFloat32: ++ ASSEMBLE_CHECKED_STORE_FLOAT(fst_s); ++ break; ++ case kCheckedStoreFloat64: ++ ASSEMBLE_CHECKED_STORE_FLOAT(fst_d); ++ break; ++ case kX87StackCheck: { ++ ExternalReference const stack_limit = ++ ExternalReference::address_of_stack_limit(isolate()); ++ __ cmp(esp, Operand::StaticVariable(stack_limit)); ++ break; ++ } ++ case kCheckedLoadWord64: ++ case kCheckedStoreWord64: ++ UNREACHABLE(); // currently unsupported checked int64 load/store. ++ break; ++ case kAtomicLoadInt8: ++ case kAtomicLoadUint8: ++ case kAtomicLoadInt16: ++ case kAtomicLoadUint16: ++ case kAtomicLoadWord32: ++ case kAtomicStoreWord8: ++ case kAtomicStoreWord16: ++ case kAtomicStoreWord32: ++ UNREACHABLE(); // Won't be generated by instruction selector. ++ break; ++ } ++ return kSuccess; ++} // NOLINT(readability/fn_size) ++ ++static Condition FlagsConditionToCondition(FlagsCondition condition) { ++ switch (condition) { ++ case kUnorderedEqual: ++ case kEqual: ++ return equal; ++ break; ++ case kUnorderedNotEqual: ++ case kNotEqual: ++ return not_equal; ++ break; ++ case kSignedLessThan: ++ return less; ++ break; ++ case kSignedGreaterThanOrEqual: ++ return greater_equal; ++ break; ++ case kSignedLessThanOrEqual: ++ return less_equal; ++ break; ++ case kSignedGreaterThan: ++ return greater; ++ break; ++ case kUnsignedLessThan: ++ return below; ++ break; ++ case kUnsignedGreaterThanOrEqual: ++ return above_equal; ++ break; ++ case kUnsignedLessThanOrEqual: ++ return below_equal; ++ break; ++ case kUnsignedGreaterThan: ++ return above; ++ break; ++ case kOverflow: ++ return overflow; ++ break; ++ case kNotOverflow: ++ return no_overflow; ++ break; ++ default: ++ UNREACHABLE(); ++ break; ++ } ++} ++ ++// Assembles a branch after an instruction. ++void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { ++ Label::Distance flabel_distance = ++ branch->fallthru ? Label::kNear : Label::kFar; ++ ++ Label done; ++ Label tlabel_tmp; ++ Label flabel_tmp; ++ Label* tlabel = &tlabel_tmp; ++ Label* flabel = &flabel_tmp; ++ ++ Label* tlabel_dst = branch->true_label; ++ Label* flabel_dst = branch->false_label; ++ ++ if (branch->condition == kUnorderedEqual) { ++ __ j(parity_even, flabel, flabel_distance); ++ } else if (branch->condition == kUnorderedNotEqual) { ++ __ j(parity_even, tlabel); ++ } ++ __ j(FlagsConditionToCondition(branch->condition), tlabel); ++ ++ // Add a jump if not falling through to the next block. ++ if (!branch->fallthru) __ jmp(flabel); ++ ++ __ jmp(&done); ++ __ bind(&tlabel_tmp); ++ FlagsMode mode = FlagsModeField::decode(instr->opcode()); ++ if (mode == kFlags_deoptimize) { ++ int double_register_param_count = 0; ++ int x87_layout = 0; ++ for (size_t i = 0; i < instr->InputCount(); i++) { ++ if (instr->InputAt(i)->IsFPRegister()) { ++ double_register_param_count++; ++ } ++ } ++ // Currently we use only one X87 register. If double_register_param_count ++ // is bigger than 1, it means duplicated double register is added to input ++ // of this instruction. ++ if (double_register_param_count > 0) { ++ x87_layout = (0 << 3) | 1; ++ } ++ // The layout of x87 register stack is loaded on the top of FPU register ++ // stack for deoptimization. ++ __ push(Immediate(x87_layout)); ++ __ fild_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kPointerSize)); ++ } ++ __ jmp(tlabel_dst); ++ __ bind(&flabel_tmp); ++ __ jmp(flabel_dst); ++ __ bind(&done); ++} ++ ++ ++void CodeGenerator::AssembleArchJump(RpoNumber target) { ++ if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); ++} ++ ++void CodeGenerator::AssembleArchTrap(Instruction* instr, ++ FlagsCondition condition) { ++ class OutOfLineTrap final : public OutOfLineCode { ++ public: ++ OutOfLineTrap(CodeGenerator* gen, bool frame_elided, Instruction* instr) ++ : OutOfLineCode(gen), ++ frame_elided_(frame_elided), ++ instr_(instr), ++ gen_(gen) {} ++ ++ void Generate() final { ++ X87OperandConverter i(gen_, instr_); ++ ++ Runtime::FunctionId trap_id = static_cast( ++ i.InputInt32(instr_->InputCount() - 1)); ++ bool old_has_frame = __ has_frame(); ++ if (frame_elided_) { ++ __ set_has_frame(true); ++ __ EnterFrame(StackFrame::WASM_COMPILED); ++ } ++ GenerateCallToTrap(trap_id); ++ if (frame_elided_) { ++ ReferenceMap* reference_map = ++ new (gen_->zone()) ReferenceMap(gen_->zone()); ++ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, ++ Safepoint::kNoLazyDeopt); ++ __ set_has_frame(old_has_frame); ++ } ++ if (FLAG_debug_code) { ++ __ ud2(); ++ } ++ } ++ ++ private: ++ void GenerateCallToTrap(Runtime::FunctionId trap_id) { ++ if (trap_id == Runtime::kNumFunctions) { ++ // We cannot test calls to the runtime in cctest/test-run-wasm. ++ // Therefore we emit a call to C here instead of a call to the runtime. ++ __ PrepareCallCFunction(0, esi); ++ __ CallCFunction( ++ ExternalReference::wasm_call_trap_callback_for_testing(isolate()), ++ 0); ++ } else { ++ __ Move(esi, isolate()->native_context()); ++ gen_->AssembleSourcePosition(instr_); ++ __ CallRuntime(trap_id); ++ } ++ } ++ ++ bool frame_elided_; ++ Instruction* instr_; ++ CodeGenerator* gen_; ++ }; ++ bool frame_elided = !frame_access_state()->has_frame(); ++ auto ool = new (zone()) OutOfLineTrap(this, frame_elided, instr); ++ Label* tlabel = ool->entry(); ++ Label end; ++ if (condition == kUnorderedEqual) { ++ __ j(parity_even, &end); ++ } else if (condition == kUnorderedNotEqual) { ++ __ j(parity_even, tlabel); ++ } ++ __ j(FlagsConditionToCondition(condition), tlabel); ++ __ bind(&end); ++} ++ ++// Assembles boolean materializations after an instruction. ++void CodeGenerator::AssembleArchBoolean(Instruction* instr, ++ FlagsCondition condition) { ++ X87OperandConverter i(this, instr); ++ Label done; ++ ++ // Materialize a full 32-bit 1 or 0 value. The result register is always the ++ // last output of the instruction. ++ Label check; ++ DCHECK_NE(0u, instr->OutputCount()); ++ Register reg = i.OutputRegister(instr->OutputCount() - 1); ++ if (condition == kUnorderedEqual) { ++ __ j(parity_odd, &check, Label::kNear); ++ __ Move(reg, Immediate(0)); ++ __ jmp(&done, Label::kNear); ++ } else if (condition == kUnorderedNotEqual) { ++ __ j(parity_odd, &check, Label::kNear); ++ __ mov(reg, Immediate(1)); ++ __ jmp(&done, Label::kNear); ++ } ++ Condition cc = FlagsConditionToCondition(condition); ++ ++ __ bind(&check); ++ if (reg.is_byte_register()) { ++ // setcc for byte registers (al, bl, cl, dl). ++ __ setcc(cc, reg); ++ __ movzx_b(reg, reg); ++ } else { ++ // Emit a branch to set a register to either 1 or 0. ++ Label set; ++ __ j(cc, &set, Label::kNear); ++ __ Move(reg, Immediate(0)); ++ __ jmp(&done, Label::kNear); ++ __ bind(&set); ++ __ mov(reg, Immediate(1)); ++ } ++ __ bind(&done); ++} ++ ++ ++void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { ++ X87OperandConverter i(this, instr); ++ Register input = i.InputRegister(0); ++ for (size_t index = 2; index < instr->InputCount(); index += 2) { ++ __ cmp(input, Immediate(i.InputInt32(index + 0))); ++ __ j(equal, GetLabel(i.InputRpo(index + 1))); ++ } ++ AssembleArchJump(i.InputRpo(1)); ++} ++ ++ ++void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { ++ X87OperandConverter i(this, instr); ++ Register input = i.InputRegister(0); ++ size_t const case_count = instr->InputCount() - 2; ++ Label** cases = zone()->NewArray(case_count); ++ for (size_t index = 0; index < case_count; ++index) { ++ cases[index] = GetLabel(i.InputRpo(index + 2)); ++ } ++ Label* const table = AddJumpTable(cases, case_count); ++ __ cmp(input, Immediate(case_count)); ++ __ j(above_equal, GetLabel(i.InputRpo(1))); ++ __ jmp(Operand::JumpTable(input, times_4, table)); ++} ++ ++CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( ++ int deoptimization_id, SourcePosition pos) { ++ DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); ++ DeoptimizeReason deoptimization_reason = ++ GetDeoptimizationReason(deoptimization_id); ++ Deoptimizer::BailoutType bailout_type = ++ deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT ++ : Deoptimizer::EAGER; ++ Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( ++ isolate(), deoptimization_id, bailout_type); ++ if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; ++ __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); ++ __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); ++ return kSuccess; ++} ++ ++ ++// The calling convention for JSFunctions on X87 passes arguments on the ++// stack and the JSFunction and context in EDI and ESI, respectively, thus ++// the steps of the call look as follows: ++ ++// --{ before the call instruction }-------------------------------------------- ++// | caller frame | ++// ^ esp ^ ebp ++ ++// --{ push arguments and setup ESI, EDI }-------------------------------------- ++// | args + receiver | caller frame | ++// ^ esp ^ ebp ++// [edi = JSFunction, esi = context] ++ ++// --{ call [edi + kCodeEntryOffset] }------------------------------------------ ++// | RET | args + receiver | caller frame | ++// ^ esp ^ ebp ++ ++// =={ prologue of called function }============================================ ++// --{ push ebp }--------------------------------------------------------------- ++// | FP | RET | args + receiver | caller frame | ++// ^ esp ^ ebp ++ ++// --{ mov ebp, esp }----------------------------------------------------------- ++// | FP | RET | args + receiver | caller frame | ++// ^ ebp,esp ++ ++// --{ push esi }--------------------------------------------------------------- ++// | CTX | FP | RET | args + receiver | caller frame | ++// ^esp ^ ebp ++ ++// --{ push edi }--------------------------------------------------------------- ++// | FNC | CTX | FP | RET | args + receiver | caller frame | ++// ^esp ^ ebp ++ ++// --{ subi esp, #N }----------------------------------------------------------- ++// | callee frame | FNC | CTX | FP | RET | args + receiver | caller frame | ++// ^esp ^ ebp ++ ++// =={ body of called function }================================================ ++ ++// =={ epilogue of called function }============================================ ++// --{ mov esp, ebp }----------------------------------------------------------- ++// | FP | RET | args + receiver | caller frame | ++// ^ esp,ebp ++ ++// --{ pop ebp }----------------------------------------------------------- ++// | | RET | args + receiver | caller frame | ++// ^ esp ^ ebp ++ ++// --{ ret #A+1 }----------------------------------------------------------- ++// | | caller frame | ++// ^ esp ^ ebp ++ ++ ++// Runtime function calls are accomplished by doing a stub call to the ++// CEntryStub (a real code object). On X87 passes arguments on the ++// stack, the number of arguments in EAX, the address of the runtime function ++// in EBX, and the context in ESI. ++ ++// --{ before the call instruction }-------------------------------------------- ++// | caller frame | ++// ^ esp ^ ebp ++ ++// --{ push arguments and setup EAX, EBX, and ESI }----------------------------- ++// | args + receiver | caller frame | ++// ^ esp ^ ebp ++// [eax = #args, ebx = runtime function, esi = context] ++ ++// --{ call #CEntryStub }------------------------------------------------------- ++// | RET | args + receiver | caller frame | ++// ^ esp ^ ebp ++ ++// =={ body of runtime function }=============================================== ++ ++// --{ runtime returns }-------------------------------------------------------- ++// | caller frame | ++// ^ esp ^ ebp ++ ++// Other custom linkages (e.g. for calling directly into and out of C++) may ++// need to save callee-saved registers on the stack, which is done in the ++// function prologue of generated code. ++ ++// --{ before the call instruction }-------------------------------------------- ++// | caller frame | ++// ^ esp ^ ebp ++ ++// --{ set up arguments in registers on stack }--------------------------------- ++// | args | caller frame | ++// ^ esp ^ ebp ++// [r0 = arg0, r1 = arg1, ...] ++ ++// --{ call code }-------------------------------------------------------------- ++// | RET | args | caller frame | ++// ^ esp ^ ebp ++ ++// =={ prologue of called function }============================================ ++// --{ push ebp }--------------------------------------------------------------- ++// | FP | RET | args | caller frame | ++// ^ esp ^ ebp ++ ++// --{ mov ebp, esp }----------------------------------------------------------- ++// | FP | RET | args | caller frame | ++// ^ ebp,esp ++ ++// --{ save registers }--------------------------------------------------------- ++// | regs | FP | RET | args | caller frame | ++// ^ esp ^ ebp ++ ++// --{ subi esp, #N }----------------------------------------------------------- ++// | callee frame | regs | FP | RET | args | caller frame | ++// ^esp ^ ebp ++ ++// =={ body of called function }================================================ ++ ++// =={ epilogue of called function }============================================ ++// --{ restore registers }------------------------------------------------------ ++// | regs | FP | RET | args | caller frame | ++// ^ esp ^ ebp ++ ++// --{ mov esp, ebp }----------------------------------------------------------- ++// | FP | RET | args | caller frame | ++// ^ esp,ebp ++ ++// --{ pop ebp }---------------------------------------------------------------- ++// | RET | args | caller frame | ++// ^ esp ^ ebp ++ ++void CodeGenerator::FinishFrame(Frame* frame) { ++ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); ++ const RegList saves = descriptor->CalleeSavedRegisters(); ++ if (saves != 0) { // Save callee-saved registers. ++ DCHECK(!info()->is_osr()); ++ int pushed = 0; ++ for (int i = Register::kNumRegisters - 1; i >= 0; i--) { ++ if (!((1 << i) & saves)) continue; ++ ++pushed; ++ } ++ frame->AllocateSavedCalleeRegisterSlots(pushed); ++ } ++ ++ // Initailize FPU state. ++ __ fninit(); ++ __ fld1(); ++} ++ ++void CodeGenerator::AssembleConstructFrame() { ++ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); ++ if (frame_access_state()->has_frame()) { ++ if (descriptor->IsCFunctionCall()) { ++ __ push(ebp); ++ __ mov(ebp, esp); ++ } else if (descriptor->IsJSFunctionCall()) { ++ __ Prologue(this->info()->GeneratePreagedPrologue()); ++ if (descriptor->PushArgumentCount()) { ++ __ push(kJavaScriptCallArgCountRegister); ++ } ++ } else { ++ __ StubPrologue(info()->GetOutputStackFrameType()); ++ } ++ } ++ ++ int shrink_slots = ++ frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); ++ ++ if (info()->is_osr()) { ++ // TurboFan OSR-compiled functions cannot be entered directly. ++ __ Abort(kShouldNotDirectlyEnterOsrFunction); ++ ++ // Unoptimized code jumps directly to this entrypoint while the unoptimized ++ // frame is still on the stack. Optimized code uses OSR values directly from ++ // the unoptimized frame. Thus, all that needs to be done is to allocate the ++ // remaining stack slots. ++ if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); ++ osr_pc_offset_ = __ pc_offset(); ++ shrink_slots -= osr_helper()->UnoptimizedFrameSlots(); ++ ++ // Initailize FPU state. ++ __ fninit(); ++ __ fld1(); ++ } ++ ++ const RegList saves = descriptor->CalleeSavedRegisters(); ++ if (shrink_slots > 0) { ++ __ sub(esp, Immediate(shrink_slots * kPointerSize)); ++ } ++ ++ if (saves != 0) { // Save callee-saved registers. ++ DCHECK(!info()->is_osr()); ++ int pushed = 0; ++ for (int i = Register::kNumRegisters - 1; i >= 0; i--) { ++ if (!((1 << i) & saves)) continue; ++ __ push(Register::from_code(i)); ++ ++pushed; ++ } ++ } ++} ++ ++void CodeGenerator::AssembleReturn(InstructionOperand* pop) { ++ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); ++ ++ // Clear the FPU stack only if there is no return value in the stack. ++ if (FLAG_debug_code && FLAG_enable_slow_asserts) { ++ __ VerifyX87StackDepth(1); ++ } ++ bool clear_stack = true; ++ for (size_t i = 0; i < descriptor->ReturnCount(); i++) { ++ MachineRepresentation rep = descriptor->GetReturnType(i).representation(); ++ LinkageLocation loc = descriptor->GetReturnLocation(i); ++ if (IsFloatingPoint(rep) && loc == LinkageLocation::ForRegister(0)) { ++ clear_stack = false; ++ break; ++ } ++ } ++ if (clear_stack) __ fstp(0); ++ ++ const RegList saves = descriptor->CalleeSavedRegisters(); ++ // Restore registers. ++ if (saves != 0) { ++ for (int i = 0; i < Register::kNumRegisters; i++) { ++ if (!((1 << i) & saves)) continue; ++ __ pop(Register::from_code(i)); ++ } ++ } ++ ++ // Might need ecx for scratch if pop_size is too big or if there is a variable ++ // pop count. ++ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit()); ++ size_t pop_size = descriptor->StackParameterCount() * kPointerSize; ++ X87OperandConverter g(this, nullptr); ++ if (descriptor->IsCFunctionCall()) { ++ AssembleDeconstructFrame(); ++ } else if (frame_access_state()->has_frame()) { ++ // Canonicalize JSFunction return sites for now if they always have the same ++ // number of return args. ++ if (pop->IsImmediate() && g.ToConstant(pop).ToInt32() == 0) { ++ if (return_label_.is_bound()) { ++ __ jmp(&return_label_); ++ return; ++ } else { ++ __ bind(&return_label_); ++ AssembleDeconstructFrame(); ++ } ++ } else { ++ AssembleDeconstructFrame(); ++ } ++ } ++ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & edx.bit()); ++ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit()); ++ if (pop->IsImmediate()) { ++ DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type()); ++ pop_size += g.ToConstant(pop).ToInt32() * kPointerSize; ++ __ Ret(static_cast(pop_size), ecx); ++ } else { ++ Register pop_reg = g.ToRegister(pop); ++ Register scratch_reg = pop_reg.is(ecx) ? edx : ecx; ++ __ pop(scratch_reg); ++ __ lea(esp, Operand(esp, pop_reg, times_4, static_cast(pop_size))); ++ __ jmp(scratch_reg); ++ } ++} ++ ++void CodeGenerator::FinishCode() {} ++ ++void CodeGenerator::AssembleMove(InstructionOperand* source, ++ InstructionOperand* destination) { ++ X87OperandConverter g(this, nullptr); ++ // Dispatch on the source and destination operand kinds. Not all ++ // combinations are possible. ++ if (source->IsRegister()) { ++ DCHECK(destination->IsRegister() || destination->IsStackSlot()); ++ Register src = g.ToRegister(source); ++ Operand dst = g.ToOperand(destination); ++ __ mov(dst, src); ++ } else if (source->IsStackSlot()) { ++ DCHECK(destination->IsRegister() || destination->IsStackSlot()); ++ Operand src = g.ToOperand(source); ++ if (destination->IsRegister()) { ++ Register dst = g.ToRegister(destination); ++ __ mov(dst, src); ++ } else { ++ Operand dst = g.ToOperand(destination); ++ __ push(src); ++ __ pop(dst); ++ } ++ } else if (source->IsConstant()) { ++ Constant src_constant = g.ToConstant(source); ++ if (src_constant.type() == Constant::kHeapObject) { ++ Handle src = src_constant.ToHeapObject(); ++ if (destination->IsRegister()) { ++ Register dst = g.ToRegister(destination); ++ __ LoadHeapObject(dst, src); ++ } else { ++ DCHECK(destination->IsStackSlot()); ++ Operand dst = g.ToOperand(destination); ++ AllowDeferredHandleDereference embedding_raw_address; ++ if (isolate()->heap()->InNewSpace(*src)) { ++ __ PushHeapObject(src); ++ __ pop(dst); ++ } else { ++ __ mov(dst, src); ++ } ++ } ++ } else if (destination->IsRegister()) { ++ Register dst = g.ToRegister(destination); ++ __ Move(dst, g.ToImmediate(source)); ++ } else if (destination->IsStackSlot()) { ++ Operand dst = g.ToOperand(destination); ++ __ Move(dst, g.ToImmediate(source)); ++ } else if (src_constant.type() == Constant::kFloat32) { ++ // TODO(turbofan): Can we do better here? ++ uint32_t src = src_constant.ToFloat32AsInt(); ++ if (destination->IsFPRegister()) { ++ __ sub(esp, Immediate(kInt32Size)); ++ __ mov(MemOperand(esp, 0), Immediate(src)); ++ // always only push one value into the x87 stack. ++ __ fstp(0); ++ __ fld_s(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kInt32Size)); ++ } else { ++ DCHECK(destination->IsFPStackSlot()); ++ Operand dst = g.ToOperand(destination); ++ __ Move(dst, Immediate(src)); ++ } ++ } else { ++ DCHECK_EQ(Constant::kFloat64, src_constant.type()); ++ uint64_t src = src_constant.ToFloat64().AsUint64(); ++ uint32_t lower = static_cast(src); ++ uint32_t upper = static_cast(src >> 32); ++ if (destination->IsFPRegister()) { ++ __ sub(esp, Immediate(kDoubleSize)); ++ __ mov(MemOperand(esp, 0), Immediate(lower)); ++ __ mov(MemOperand(esp, kInt32Size), Immediate(upper)); ++ // always only push one value into the x87 stack. ++ __ fstp(0); ++ __ fld_d(MemOperand(esp, 0)); ++ __ add(esp, Immediate(kDoubleSize)); ++ } else { ++ DCHECK(destination->IsFPStackSlot()); ++ Operand dst0 = g.ToOperand(destination); ++ Operand dst1 = g.HighOperand(destination); ++ __ Move(dst0, Immediate(lower)); ++ __ Move(dst1, Immediate(upper)); ++ } ++ } ++ } else if (source->IsFPRegister()) { ++ DCHECK(destination->IsFPStackSlot()); ++ Operand dst = g.ToOperand(destination); ++ auto allocated = AllocatedOperand::cast(*source); ++ switch (allocated.representation()) { ++ case MachineRepresentation::kFloat32: ++ __ fst_s(dst); ++ break; ++ case MachineRepresentation::kFloat64: ++ __ fst_d(dst); ++ break; ++ default: ++ UNREACHABLE(); ++ } ++ } else if (source->IsFPStackSlot()) { ++ DCHECK(destination->IsFPRegister() || destination->IsFPStackSlot()); ++ Operand src = g.ToOperand(source); ++ auto allocated = AllocatedOperand::cast(*source); ++ if (destination->IsFPRegister()) { ++ // always only push one value into the x87 stack. ++ __ fstp(0); ++ switch (allocated.representation()) { ++ case MachineRepresentation::kFloat32: ++ __ fld_s(src); ++ break; ++ case MachineRepresentation::kFloat64: ++ __ fld_d(src); ++ break; ++ default: ++ UNREACHABLE(); ++ } ++ } else { ++ Operand dst = g.ToOperand(destination); ++ switch (allocated.representation()) { ++ case MachineRepresentation::kFloat32: ++ __ fld_s(src); ++ __ fstp_s(dst); ++ break; ++ case MachineRepresentation::kFloat64: ++ __ fld_d(src); ++ __ fstp_d(dst); ++ break; ++ default: ++ UNREACHABLE(); ++ } ++ } ++ } else { ++ UNREACHABLE(); ++ } ++} ++ ++ ++void CodeGenerator::AssembleSwap(InstructionOperand* source, ++ InstructionOperand* destination) { ++ X87OperandConverter g(this, nullptr); ++ // Dispatch on the source and destination operand kinds. Not all ++ // combinations are possible. ++ if (source->IsRegister() && destination->IsRegister()) { ++ // Register-register. ++ Register src = g.ToRegister(source); ++ Register dst = g.ToRegister(destination); ++ __ xchg(dst, src); ++ } else if (source->IsRegister() && destination->IsStackSlot()) { ++ // Register-memory. ++ __ xchg(g.ToRegister(source), g.ToOperand(destination)); ++ } else if (source->IsStackSlot() && destination->IsStackSlot()) { ++ // Memory-memory. ++ Operand dst1 = g.ToOperand(destination); ++ __ push(dst1); ++ frame_access_state()->IncreaseSPDelta(1); ++ Operand src1 = g.ToOperand(source); ++ __ push(src1); ++ Operand dst2 = g.ToOperand(destination); ++ __ pop(dst2); ++ frame_access_state()->IncreaseSPDelta(-1); ++ Operand src2 = g.ToOperand(source); ++ __ pop(src2); ++ } else if (source->IsFPRegister() && destination->IsFPRegister()) { ++ UNREACHABLE(); ++ } else if (source->IsFPRegister() && destination->IsFPStackSlot()) { ++ auto allocated = AllocatedOperand::cast(*source); ++ switch (allocated.representation()) { ++ case MachineRepresentation::kFloat32: ++ __ fld_s(g.ToOperand(destination)); ++ __ fxch(); ++ __ fstp_s(g.ToOperand(destination)); ++ break; ++ case MachineRepresentation::kFloat64: ++ __ fld_d(g.ToOperand(destination)); ++ __ fxch(); ++ __ fstp_d(g.ToOperand(destination)); ++ break; ++ default: ++ UNREACHABLE(); ++ } ++ } else if (source->IsFPStackSlot() && destination->IsFPStackSlot()) { ++ auto allocated = AllocatedOperand::cast(*source); ++ switch (allocated.representation()) { ++ case MachineRepresentation::kFloat32: ++ __ fld_s(g.ToOperand(source)); ++ __ fld_s(g.ToOperand(destination)); ++ __ fstp_s(g.ToOperand(source)); ++ __ fstp_s(g.ToOperand(destination)); ++ break; ++ case MachineRepresentation::kFloat64: ++ __ fld_d(g.ToOperand(source)); ++ __ fld_d(g.ToOperand(destination)); ++ __ fstp_d(g.ToOperand(source)); ++ __ fstp_d(g.ToOperand(destination)); ++ break; ++ default: ++ UNREACHABLE(); ++ } ++ } else { ++ // No other combinations are possible. ++ UNREACHABLE(); ++ } ++} ++ ++ ++void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { ++ for (size_t index = 0; index < target_count; ++index) { ++ __ dd(targets[index]); ++ } ++} ++ ++ ++void CodeGenerator::EnsureSpaceForLazyDeopt() { ++ if (!info()->ShouldEnsureSpaceForLazyDeopt()) { ++ return; ++ } ++ ++ int space_needed = Deoptimizer::patch_size(); ++ // Ensure that we have enough space after the previous lazy-bailout ++ // instruction for patching the code here. ++ int current_pc = masm()->pc_offset(); ++ if (current_pc < last_lazy_deopt_pc_ + space_needed) { ++ int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; ++ __ Nop(padding_size); ++ } ++} ++ ++#undef __ ++ ++} // namespace compiler ++} // namespace internal ++} // namespace v8 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2017-12-25 17:42:57.208465749 +0100 +@@ -0,0 +1,144 @@ ++// Copyright 2014 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ ++#define V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ ++ ++#include "src/compiler/instruction.h" ++#include "src/compiler/instruction-codes.h" ++namespace v8 { ++namespace internal { ++namespace compiler { ++ ++// X87-specific opcodes that specify which assembly sequence to emit. ++// Most opcodes specify a single instruction. ++#define TARGET_ARCH_OPCODE_LIST(V) \ ++ V(X87Add) \ ++ V(X87And) \ ++ V(X87Cmp) \ ++ V(X87Cmp16) \ ++ V(X87Cmp8) \ ++ V(X87Test) \ ++ V(X87Test16) \ ++ V(X87Test8) \ ++ V(X87Or) \ ++ V(X87Xor) \ ++ V(X87Sub) \ ++ V(X87Imul) \ ++ V(X87ImulHigh) \ ++ V(X87UmulHigh) \ ++ V(X87Idiv) \ ++ V(X87Udiv) \ ++ V(X87Not) \ ++ V(X87Neg) \ ++ V(X87Shl) \ ++ V(X87Shr) \ ++ V(X87Sar) \ ++ V(X87AddPair) \ ++ V(X87SubPair) \ ++ V(X87MulPair) \ ++ V(X87ShlPair) \ ++ V(X87ShrPair) \ ++ V(X87SarPair) \ ++ V(X87Ror) \ ++ V(X87Lzcnt) \ ++ V(X87Popcnt) \ ++ V(X87Float32Cmp) \ ++ V(X87Float32Add) \ ++ V(X87Float32Sub) \ ++ V(X87Float32Mul) \ ++ V(X87Float32Div) \ ++ V(X87Float32Abs) \ ++ V(X87Float32Neg) \ ++ V(X87Float32Sqrt) \ ++ V(X87Float32Round) \ ++ V(X87LoadFloat64Constant) \ ++ V(X87Float64Add) \ ++ V(X87Float64Sub) \ ++ V(X87Float64Mul) \ ++ V(X87Float64Div) \ ++ V(X87Float64Mod) \ ++ V(X87Float32Max) \ ++ V(X87Float64Max) \ ++ V(X87Float32Min) \ ++ V(X87Float64Min) \ ++ V(X87Float64Abs) \ ++ V(X87Float64Neg) \ ++ V(X87Int32ToFloat32) \ ++ V(X87Uint32ToFloat32) \ ++ V(X87Int32ToFloat64) \ ++ V(X87Float32ToFloat64) \ ++ V(X87Uint32ToFloat64) \ ++ V(X87Float64ToInt32) \ ++ V(X87Float32ToInt32) \ ++ V(X87Float32ToUint32) \ ++ V(X87Float64ToFloat32) \ ++ V(X87Float64ToUint32) \ ++ V(X87Float64ExtractHighWord32) \ ++ V(X87Float64ExtractLowWord32) \ ++ V(X87Float64InsertHighWord32) \ ++ V(X87Float64InsertLowWord32) \ ++ V(X87Float64Sqrt) \ ++ V(X87Float64Round) \ ++ V(X87Float64Cmp) \ ++ V(X87Float64SilenceNaN) \ ++ V(X87Movsxbl) \ ++ V(X87Movzxbl) \ ++ V(X87Movb) \ ++ V(X87Movsxwl) \ ++ V(X87Movzxwl) \ ++ V(X87Movw) \ ++ V(X87Movl) \ ++ V(X87Movss) \ ++ V(X87Movsd) \ ++ V(X87Lea) \ ++ V(X87BitcastFI) \ ++ V(X87BitcastIF) \ ++ V(X87Push) \ ++ V(X87PushFloat64) \ ++ V(X87PushFloat32) \ ++ V(X87Poke) \ ++ V(X87StackCheck) \ ++ V(X87Xchgb) \ ++ V(X87Xchgw) \ ++ V(X87Xchgl) ++ ++// Addressing modes represent the "shape" of inputs to an instruction. ++// Many instructions support multiple addressing modes. Addressing modes ++// are encoded into the InstructionCode of the instruction and tell the ++// code generator after register allocation which assembler method to call. ++// ++// We use the following local notation for addressing modes: ++// ++// M = memory operand ++// R = base register ++// N = index register * N for N in {1, 2, 4, 8} ++// I = immediate displacement (int32_t) ++ ++#define TARGET_ADDRESSING_MODE_LIST(V) \ ++ V(MR) /* [%r1 ] */ \ ++ V(MRI) /* [%r1 + K] */ \ ++ V(MR1) /* [%r1 + %r2*1 ] */ \ ++ V(MR2) /* [%r1 + %r2*2 ] */ \ ++ V(MR4) /* [%r1 + %r2*4 ] */ \ ++ V(MR8) /* [%r1 + %r2*8 ] */ \ ++ V(MR1I) /* [%r1 + %r2*1 + K] */ \ ++ V(MR2I) /* [%r1 + %r2*2 + K] */ \ ++ V(MR4I) /* [%r1 + %r2*3 + K] */ \ ++ V(MR8I) /* [%r1 + %r2*4 + K] */ \ ++ V(M1) /* [ %r2*1 ] */ \ ++ V(M2) /* [ %r2*2 ] */ \ ++ V(M4) /* [ %r2*4 ] */ \ ++ V(M8) /* [ %r2*8 ] */ \ ++ V(M1I) /* [ %r2*1 + K] */ \ ++ V(M2I) /* [ %r2*2 + K] */ \ ++ V(M4I) /* [ %r2*4 + K] */ \ ++ V(M8I) /* [ %r2*8 + K] */ \ ++ V(MI) /* [ K] */ ++ ++} // namespace compiler ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 2017-12-25 17:42:57.208465749 +0100 +@@ -0,0 +1,26 @@ ++// Copyright 2015 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "src/compiler/instruction-scheduler.h" ++ ++namespace v8 { ++namespace internal { ++namespace compiler { ++ ++bool InstructionScheduler::SchedulerSupported() { return false; } ++ ++ ++int InstructionScheduler::GetTargetInstructionFlags( ++ const Instruction* instr) const { ++ UNIMPLEMENTED(); ++} ++ ++ ++int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { ++ UNIMPLEMENTED(); ++} ++ ++} // namespace compiler ++} // namespace internal ++} // namespace v8 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2017-12-25 17:42:57.210465720 +0100 +@@ -0,0 +1,1871 @@ ++// Copyright 2014 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "src/base/adapters.h" ++#include "src/compiler/instruction-selector-impl.h" ++#include "src/compiler/node-matchers.h" ++#include "src/compiler/node-properties.h" ++ ++namespace v8 { ++namespace internal { ++namespace compiler { ++ ++// Adds X87-specific methods for generating operands. ++class X87OperandGenerator final : public OperandGenerator { ++ public: ++ explicit X87OperandGenerator(InstructionSelector* selector) ++ : OperandGenerator(selector) {} ++ ++ InstructionOperand UseByteRegister(Node* node) { ++ // TODO(titzer): encode byte register use constraints. ++ return UseFixed(node, edx); ++ } ++ ++ InstructionOperand DefineAsByteRegister(Node* node) { ++ // TODO(titzer): encode byte register def constraints. ++ return DefineAsRegister(node); ++ } ++ ++ bool CanBeMemoryOperand(InstructionCode opcode, Node* node, Node* input, ++ int effect_level) { ++ if (input->opcode() != IrOpcode::kLoad || ++ !selector()->CanCover(node, input)) { ++ return false; ++ } ++ if (effect_level != selector()->GetEffectLevel(input)) { ++ return false; ++ } ++ MachineRepresentation rep = ++ LoadRepresentationOf(input->op()).representation(); ++ switch (opcode) { ++ case kX87Cmp: ++ case kX87Test: ++ return rep == MachineRepresentation::kWord32 || ++ rep == MachineRepresentation::kTagged; ++ case kX87Cmp16: ++ case kX87Test16: ++ return rep == MachineRepresentation::kWord16; ++ case kX87Cmp8: ++ case kX87Test8: ++ return rep == MachineRepresentation::kWord8; ++ default: ++ break; ++ } ++ return false; ++ } ++ ++ InstructionOperand CreateImmediate(int imm) { ++ return sequence()->AddImmediate(Constant(imm)); ++ } ++ ++ bool CanBeImmediate(Node* node) { ++ switch (node->opcode()) { ++ case IrOpcode::kInt32Constant: ++ case IrOpcode::kNumberConstant: ++ case IrOpcode::kExternalConstant: ++ case IrOpcode::kRelocatableInt32Constant: ++ case IrOpcode::kRelocatableInt64Constant: ++ return true; ++ case IrOpcode::kHeapConstant: { ++// TODO(bmeurer): We must not dereference handles concurrently. If we ++// really have to this here, then we need to find a way to put this ++// information on the HeapConstant node already. ++#if 0 ++ // Constants in new space cannot be used as immediates in V8 because ++ // the GC does not scan code objects when collecting the new generation. ++ Handle value = OpParameter>(node); ++ Isolate* isolate = value->GetIsolate(); ++ return !isolate->heap()->InNewSpace(*value); ++#endif ++ } ++ default: ++ return false; ++ } ++ } ++ ++ AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, ++ Node* displacement_node, ++ DisplacementMode displacement_mode, ++ InstructionOperand inputs[], ++ size_t* input_count) { ++ AddressingMode mode = kMode_MRI; ++ int32_t displacement = (displacement_node == nullptr) ++ ? 0 ++ : OpParameter(displacement_node); ++ if (displacement_mode == kNegativeDisplacement) { ++ displacement = -displacement; ++ } ++ if (base != nullptr) { ++ if (base->opcode() == IrOpcode::kInt32Constant) { ++ displacement += OpParameter(base); ++ base = nullptr; ++ } ++ } ++ if (base != nullptr) { ++ inputs[(*input_count)++] = UseRegister(base); ++ if (index != nullptr) { ++ DCHECK(scale >= 0 && scale <= 3); ++ inputs[(*input_count)++] = UseRegister(index); ++ if (displacement != 0) { ++ inputs[(*input_count)++] = TempImmediate(displacement); ++ static const AddressingMode kMRnI_modes[] = {kMode_MR1I, kMode_MR2I, ++ kMode_MR4I, kMode_MR8I}; ++ mode = kMRnI_modes[scale]; ++ } else { ++ static const AddressingMode kMRn_modes[] = {kMode_MR1, kMode_MR2, ++ kMode_MR4, kMode_MR8}; ++ mode = kMRn_modes[scale]; ++ } ++ } else { ++ if (displacement == 0) { ++ mode = kMode_MR; ++ } else { ++ inputs[(*input_count)++] = TempImmediate(displacement); ++ mode = kMode_MRI; ++ } ++ } ++ } else { ++ DCHECK(scale >= 0 && scale <= 3); ++ if (index != nullptr) { ++ inputs[(*input_count)++] = UseRegister(index); ++ if (displacement != 0) { ++ inputs[(*input_count)++] = TempImmediate(displacement); ++ static const AddressingMode kMnI_modes[] = {kMode_MRI, kMode_M2I, ++ kMode_M4I, kMode_M8I}; ++ mode = kMnI_modes[scale]; ++ } else { ++ static const AddressingMode kMn_modes[] = {kMode_MR, kMode_M2, ++ kMode_M4, kMode_M8}; ++ mode = kMn_modes[scale]; ++ } ++ } else { ++ inputs[(*input_count)++] = TempImmediate(displacement); ++ return kMode_MI; ++ } ++ } ++ return mode; ++ } ++ ++ AddressingMode GetEffectiveAddressMemoryOperand(Node* node, ++ InstructionOperand inputs[], ++ size_t* input_count) { ++ BaseWithIndexAndDisplacement32Matcher m(node, AddressOption::kAllowAll); ++ DCHECK(m.matches()); ++ if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) { ++ return GenerateMemoryOperandInputs( ++ m.index(), m.scale(), m.base(), m.displacement(), ++ m.displacement_mode(), inputs, input_count); ++ } else { ++ inputs[(*input_count)++] = UseRegister(node->InputAt(0)); ++ inputs[(*input_count)++] = UseRegister(node->InputAt(1)); ++ return kMode_MR1; ++ } ++ } ++ ++ bool CanBeBetterLeftOperand(Node* node) const { ++ return !selector()->IsLive(node); ++ } ++}; ++ ++void InstructionSelector::VisitStackSlot(Node* node) { ++ StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); ++ int slot = frame_->AllocateSpillSlot(rep.size()); ++ OperandGenerator g(this); ++ ++ Emit(kArchStackSlot, g.DefineAsRegister(node), ++ sequence()->AddImmediate(Constant(slot)), 0, nullptr); ++} ++ ++void InstructionSelector::VisitLoad(Node* node) { ++ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); ++ ++ ArchOpcode opcode = kArchNop; ++ switch (load_rep.representation()) { ++ case MachineRepresentation::kFloat32: ++ opcode = kX87Movss; ++ break; ++ case MachineRepresentation::kFloat64: ++ opcode = kX87Movsd; ++ break; ++ case MachineRepresentation::kBit: // Fall through. ++ case MachineRepresentation::kWord8: ++ opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl; ++ break; ++ case MachineRepresentation::kWord16: ++ opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; ++ break; ++ case MachineRepresentation::kTaggedSigned: // Fall through. ++ case MachineRepresentation::kTaggedPointer: // Fall through. ++ case MachineRepresentation::kTagged: // Fall through. ++ case MachineRepresentation::kWord32: ++ opcode = kX87Movl; ++ break; ++ case MachineRepresentation::kWord64: // Fall through. ++ case MachineRepresentation::kSimd128: // Fall through. ++ case MachineRepresentation::kNone: ++ UNREACHABLE(); ++ return; ++ } ++ ++ X87OperandGenerator g(this); ++ InstructionOperand outputs[1]; ++ outputs[0] = g.DefineAsRegister(node); ++ InstructionOperand inputs[3]; ++ size_t input_count = 0; ++ AddressingMode mode = ++ g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count); ++ InstructionCode code = opcode | AddressingModeField::encode(mode); ++ Emit(code, 1, outputs, input_count, inputs); ++} ++ ++void InstructionSelector::VisitProtectedLoad(Node* node) { ++ // TODO(eholk) ++ UNIMPLEMENTED(); ++} ++ ++void InstructionSelector::VisitStore(Node* node) { ++ X87OperandGenerator g(this); ++ Node* base = node->InputAt(0); ++ Node* index = node->InputAt(1); ++ Node* value = node->InputAt(2); ++ ++ StoreRepresentation store_rep = StoreRepresentationOf(node->op()); ++ WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); ++ MachineRepresentation rep = store_rep.representation(); ++ ++ if (write_barrier_kind != kNoWriteBarrier) { ++ DCHECK(CanBeTaggedPointer(rep)); ++ AddressingMode addressing_mode; ++ InstructionOperand inputs[3]; ++ size_t input_count = 0; ++ inputs[input_count++] = g.UseUniqueRegister(base); ++ if (g.CanBeImmediate(index)) { ++ inputs[input_count++] = g.UseImmediate(index); ++ addressing_mode = kMode_MRI; ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(index); ++ addressing_mode = kMode_MR1; ++ } ++ inputs[input_count++] = g.UseUniqueRegister(value); ++ RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny; ++ switch (write_barrier_kind) { ++ case kNoWriteBarrier: ++ UNREACHABLE(); ++ break; ++ case kMapWriteBarrier: ++ record_write_mode = RecordWriteMode::kValueIsMap; ++ break; ++ case kPointerWriteBarrier: ++ record_write_mode = RecordWriteMode::kValueIsPointer; ++ break; ++ case kFullWriteBarrier: ++ record_write_mode = RecordWriteMode::kValueIsAny; ++ break; ++ } ++ InstructionOperand temps[] = {g.TempRegister(), g.TempRegister()}; ++ size_t const temp_count = arraysize(temps); ++ InstructionCode code = kArchStoreWithWriteBarrier; ++ code |= AddressingModeField::encode(addressing_mode); ++ code |= MiscField::encode(static_cast(record_write_mode)); ++ Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); ++ } else { ++ ArchOpcode opcode = kArchNop; ++ switch (rep) { ++ case MachineRepresentation::kFloat32: ++ opcode = kX87Movss; ++ break; ++ case MachineRepresentation::kFloat64: ++ opcode = kX87Movsd; ++ break; ++ case MachineRepresentation::kBit: // Fall through. ++ case MachineRepresentation::kWord8: ++ opcode = kX87Movb; ++ break; ++ case MachineRepresentation::kWord16: ++ opcode = kX87Movw; ++ break; ++ case MachineRepresentation::kTaggedSigned: // Fall through. ++ case MachineRepresentation::kTaggedPointer: // Fall through. ++ case MachineRepresentation::kTagged: // Fall through. ++ case MachineRepresentation::kWord32: ++ opcode = kX87Movl; ++ break; ++ case MachineRepresentation::kWord64: // Fall through. ++ case MachineRepresentation::kSimd128: // Fall through. ++ case MachineRepresentation::kNone: ++ UNREACHABLE(); ++ return; ++ } ++ ++ InstructionOperand val; ++ if (g.CanBeImmediate(value)) { ++ val = g.UseImmediate(value); ++ } else if (rep == MachineRepresentation::kWord8 || ++ rep == MachineRepresentation::kBit) { ++ val = g.UseByteRegister(value); ++ } else { ++ val = g.UseRegister(value); ++ } ++ ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ AddressingMode addressing_mode = ++ g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count); ++ InstructionCode code = ++ opcode | AddressingModeField::encode(addressing_mode); ++ inputs[input_count++] = val; ++ Emit(code, 0, static_cast(nullptr), input_count, ++ inputs); ++ } ++} ++ ++void InstructionSelector::VisitProtectedStore(Node* node) { ++ // TODO(eholk) ++ UNIMPLEMENTED(); ++} ++ ++// Architecture supports unaligned access, therefore VisitLoad is used instead ++void InstructionSelector::VisitUnalignedLoad(Node* node) { UNREACHABLE(); } ++ ++// Architecture supports unaligned access, therefore VisitStore is used instead ++void InstructionSelector::VisitUnalignedStore(Node* node) { UNREACHABLE(); } ++ ++void InstructionSelector::VisitCheckedLoad(Node* node) { ++ CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); ++ X87OperandGenerator g(this); ++ Node* const buffer = node->InputAt(0); ++ Node* const offset = node->InputAt(1); ++ Node* const length = node->InputAt(2); ++ ArchOpcode opcode = kArchNop; ++ switch (load_rep.representation()) { ++ case MachineRepresentation::kWord8: ++ opcode = load_rep.IsSigned() ? kCheckedLoadInt8 : kCheckedLoadUint8; ++ break; ++ case MachineRepresentation::kWord16: ++ opcode = load_rep.IsSigned() ? kCheckedLoadInt16 : kCheckedLoadUint16; ++ break; ++ case MachineRepresentation::kWord32: ++ opcode = kCheckedLoadWord32; ++ break; ++ case MachineRepresentation::kFloat32: ++ opcode = kCheckedLoadFloat32; ++ break; ++ case MachineRepresentation::kFloat64: ++ opcode = kCheckedLoadFloat64; ++ break; ++ case MachineRepresentation::kBit: // Fall through. ++ case MachineRepresentation::kTaggedSigned: // Fall through. ++ case MachineRepresentation::kTaggedPointer: // Fall through. ++ case MachineRepresentation::kTagged: // Fall through. ++ case MachineRepresentation::kWord64: // Fall through. ++ case MachineRepresentation::kSimd128: // Fall through. ++ case MachineRepresentation::kNone: ++ UNREACHABLE(); ++ return; ++ } ++ InstructionOperand offset_operand = g.UseRegister(offset); ++ InstructionOperand length_operand = ++ g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); ++ if (g.CanBeImmediate(buffer)) { ++ Emit(opcode | AddressingModeField::encode(kMode_MRI), ++ g.DefineAsRegister(node), offset_operand, length_operand, ++ offset_operand, g.UseImmediate(buffer)); ++ } else { ++ Emit(opcode | AddressingModeField::encode(kMode_MR1), ++ g.DefineAsRegister(node), offset_operand, length_operand, ++ g.UseRegister(buffer), offset_operand); ++ } ++} ++ ++ ++void InstructionSelector::VisitCheckedStore(Node* node) { ++ MachineRepresentation rep = CheckedStoreRepresentationOf(node->op()); ++ X87OperandGenerator g(this); ++ Node* const buffer = node->InputAt(0); ++ Node* const offset = node->InputAt(1); ++ Node* const length = node->InputAt(2); ++ Node* const value = node->InputAt(3); ++ ArchOpcode opcode = kArchNop; ++ switch (rep) { ++ case MachineRepresentation::kWord8: ++ opcode = kCheckedStoreWord8; ++ break; ++ case MachineRepresentation::kWord16: ++ opcode = kCheckedStoreWord16; ++ break; ++ case MachineRepresentation::kWord32: ++ opcode = kCheckedStoreWord32; ++ break; ++ case MachineRepresentation::kFloat32: ++ opcode = kCheckedStoreFloat32; ++ break; ++ case MachineRepresentation::kFloat64: ++ opcode = kCheckedStoreFloat64; ++ break; ++ case MachineRepresentation::kBit: // Fall through. ++ case MachineRepresentation::kTaggedSigned: // Fall through. ++ case MachineRepresentation::kTaggedPointer: // Fall through. ++ case MachineRepresentation::kTagged: // Fall through. ++ case MachineRepresentation::kWord64: // Fall through. ++ case MachineRepresentation::kSimd128: // Fall through. ++ case MachineRepresentation::kNone: ++ UNREACHABLE(); ++ return; ++ } ++ InstructionOperand value_operand = ++ g.CanBeImmediate(value) ? g.UseImmediate(value) ++ : ((rep == MachineRepresentation::kWord8 || ++ rep == MachineRepresentation::kBit) ++ ? g.UseByteRegister(value) ++ : g.UseRegister(value)); ++ InstructionOperand offset_operand = g.UseRegister(offset); ++ InstructionOperand length_operand = ++ g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); ++ if (g.CanBeImmediate(buffer)) { ++ Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), ++ offset_operand, length_operand, value_operand, offset_operand, ++ g.UseImmediate(buffer)); ++ } else { ++ Emit(opcode | AddressingModeField::encode(kMode_MR1), g.NoOutput(), ++ offset_operand, length_operand, value_operand, g.UseRegister(buffer), ++ offset_operand); ++ } ++} ++ ++namespace { ++ ++// Shared routine for multiple binary operations. ++void VisitBinop(InstructionSelector* selector, Node* node, ++ InstructionCode opcode, FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ Int32BinopMatcher m(node); ++ Node* left = m.left().node(); ++ Node* right = m.right().node(); ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ InstructionOperand outputs[2]; ++ size_t output_count = 0; ++ ++ // TODO(turbofan): match complex addressing modes. ++ if (left == right) { ++ // If both inputs refer to the same operand, enforce allocating a register ++ // for both of them to ensure that we don't end up generating code like ++ // this: ++ // ++ // mov eax, [ebp-0x10] ++ // add eax, [ebp-0x10] ++ // jo label ++ InstructionOperand const input = g.UseRegister(left); ++ inputs[input_count++] = input; ++ inputs[input_count++] = input; ++ } else if (g.CanBeImmediate(right)) { ++ inputs[input_count++] = g.UseRegister(left); ++ inputs[input_count++] = g.UseImmediate(right); ++ } else { ++ if (node->op()->HasProperty(Operator::kCommutative) && ++ g.CanBeBetterLeftOperand(right)) { ++ std::swap(left, right); ++ } ++ inputs[input_count++] = g.UseRegister(left); ++ inputs[input_count++] = g.Use(right); ++ } ++ ++ if (cont->IsBranch()) { ++ inputs[input_count++] = g.Label(cont->true_block()); ++ inputs[input_count++] = g.Label(cont->false_block()); ++ } ++ ++ outputs[output_count++] = g.DefineSameAsFirst(node); ++ if (cont->IsSet()) { ++ outputs[output_count++] = g.DefineAsRegister(cont->result()); ++ } ++ ++ DCHECK_NE(0u, input_count); ++ DCHECK_NE(0u, output_count); ++ DCHECK_GE(arraysize(inputs), input_count); ++ DCHECK_GE(arraysize(outputs), output_count); ++ ++ opcode = cont->Encode(opcode); ++ if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs, ++ cont->kind(), cont->reason(), cont->frame_state()); ++ } else { ++ selector->Emit(opcode, output_count, outputs, input_count, inputs); ++ } ++} ++ ++ ++// Shared routine for multiple binary operations. ++void VisitBinop(InstructionSelector* selector, Node* node, ++ InstructionCode opcode) { ++ FlagsContinuation cont; ++ VisitBinop(selector, node, opcode, &cont); ++} ++ ++} // namespace ++ ++void InstructionSelector::VisitWord32And(Node* node) { ++ VisitBinop(this, node, kX87And); ++} ++ ++ ++void InstructionSelector::VisitWord32Or(Node* node) { ++ VisitBinop(this, node, kX87Or); ++} ++ ++ ++void InstructionSelector::VisitWord32Xor(Node* node) { ++ X87OperandGenerator g(this); ++ Int32BinopMatcher m(node); ++ if (m.right().Is(-1)) { ++ Emit(kX87Not, g.DefineSameAsFirst(node), g.UseRegister(m.left().node())); ++ } else { ++ VisitBinop(this, node, kX87Xor); ++ } ++} ++ ++ ++// Shared routine for multiple shift operations. ++static inline void VisitShift(InstructionSelector* selector, Node* node, ++ ArchOpcode opcode) { ++ X87OperandGenerator g(selector); ++ Node* left = node->InputAt(0); ++ Node* right = node->InputAt(1); ++ ++ if (g.CanBeImmediate(right)) { ++ selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), ++ g.UseImmediate(right)); ++ } else { ++ selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), ++ g.UseFixed(right, ecx)); ++ } ++} ++ ++ ++namespace { ++ ++void VisitMulHigh(InstructionSelector* selector, Node* node, ++ ArchOpcode opcode) { ++ X87OperandGenerator g(selector); ++ InstructionOperand temps[] = {g.TempRegister(eax)}; ++ selector->Emit( ++ opcode, g.DefineAsFixed(node, edx), g.UseFixed(node->InputAt(0), eax), ++ g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); ++} ++ ++ ++void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode opcode) { ++ X87OperandGenerator g(selector); ++ InstructionOperand temps[] = {g.TempRegister(edx)}; ++ selector->Emit(opcode, g.DefineAsFixed(node, eax), ++ g.UseFixed(node->InputAt(0), eax), ++ g.UseUnique(node->InputAt(1)), arraysize(temps), temps); ++} ++ ++ ++void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { ++ X87OperandGenerator g(selector); ++ InstructionOperand temps[] = {g.TempRegister(eax)}; ++ selector->Emit(opcode, g.DefineAsFixed(node, edx), ++ g.UseFixed(node->InputAt(0), eax), ++ g.UseUnique(node->InputAt(1)), arraysize(temps), temps); ++} ++ ++void EmitLea(InstructionSelector* selector, Node* result, Node* index, ++ int scale, Node* base, Node* displacement, ++ DisplacementMode displacement_mode) { ++ X87OperandGenerator g(selector); ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ AddressingMode mode = ++ g.GenerateMemoryOperandInputs(index, scale, base, displacement, ++ displacement_mode, inputs, &input_count); ++ ++ DCHECK_NE(0u, input_count); ++ DCHECK_GE(arraysize(inputs), input_count); ++ ++ InstructionOperand outputs[1]; ++ outputs[0] = g.DefineAsRegister(result); ++ ++ InstructionCode opcode = AddressingModeField::encode(mode) | kX87Lea; ++ ++ selector->Emit(opcode, 1, outputs, input_count, inputs); ++} ++ ++} // namespace ++ ++ ++void InstructionSelector::VisitWord32Shl(Node* node) { ++ Int32ScaleMatcher m(node, true); ++ if (m.matches()) { ++ Node* index = node->InputAt(0); ++ Node* base = m.power_of_two_plus_one() ? index : nullptr; ++ EmitLea(this, node, index, m.scale(), base, nullptr, kPositiveDisplacement); ++ return; ++ } ++ VisitShift(this, node, kX87Shl); ++} ++ ++ ++void InstructionSelector::VisitWord32Shr(Node* node) { ++ VisitShift(this, node, kX87Shr); ++} ++ ++ ++void InstructionSelector::VisitWord32Sar(Node* node) { ++ VisitShift(this, node, kX87Sar); ++} ++ ++void InstructionSelector::VisitInt32PairAdd(Node* node) { ++ X87OperandGenerator g(this); ++ ++ Node* projection1 = NodeProperties::FindProjection(node, 1); ++ if (projection1) { ++ // We use UseUniqueRegister here to avoid register sharing with the temp ++ // register. ++ InstructionOperand inputs[] = { ++ g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), ++ g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; ++ ++ InstructionOperand outputs[] = {g.DefineSameAsFirst(node), ++ g.DefineAsRegister(projection1)}; ++ ++ InstructionOperand temps[] = {g.TempRegister()}; ++ ++ Emit(kX87AddPair, 2, outputs, 4, inputs, 1, temps); ++ } else { ++ // The high word of the result is not used, so we emit the standard 32 bit ++ // instruction. ++ Emit(kX87Add, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), ++ g.Use(node->InputAt(2))); ++ } ++} ++ ++void InstructionSelector::VisitInt32PairSub(Node* node) { ++ X87OperandGenerator g(this); ++ ++ Node* projection1 = NodeProperties::FindProjection(node, 1); ++ if (projection1) { ++ // We use UseUniqueRegister here to avoid register sharing with the temp ++ // register. ++ InstructionOperand inputs[] = { ++ g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), ++ g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; ++ ++ InstructionOperand outputs[] = {g.DefineSameAsFirst(node), ++ g.DefineAsRegister(projection1)}; ++ ++ InstructionOperand temps[] = {g.TempRegister()}; ++ ++ Emit(kX87SubPair, 2, outputs, 4, inputs, 1, temps); ++ } else { ++ // The high word of the result is not used, so we emit the standard 32 bit ++ // instruction. ++ Emit(kX87Sub, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), ++ g.Use(node->InputAt(2))); ++ } ++} ++ ++void InstructionSelector::VisitInt32PairMul(Node* node) { ++ X87OperandGenerator g(this); ++ ++ Node* projection1 = NodeProperties::FindProjection(node, 1); ++ if (projection1) { ++ // InputAt(3) explicitly shares ecx with OutputRegister(1) to save one ++ // register and one mov instruction. ++ InstructionOperand inputs[] = {g.UseUnique(node->InputAt(0)), ++ g.UseUnique(node->InputAt(1)), ++ g.UseUniqueRegister(node->InputAt(2)), ++ g.UseFixed(node->InputAt(3), ecx)}; ++ ++ InstructionOperand outputs[] = { ++ g.DefineAsFixed(node, eax), ++ g.DefineAsFixed(NodeProperties::FindProjection(node, 1), ecx)}; ++ ++ InstructionOperand temps[] = {g.TempRegister(edx)}; ++ ++ Emit(kX87MulPair, 2, outputs, 4, inputs, 1, temps); ++ } else { ++ // The high word of the result is not used, so we emit the standard 32 bit ++ // instruction. ++ Emit(kX87Imul, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), ++ g.Use(node->InputAt(2))); ++ } ++} ++ ++void VisitWord32PairShift(InstructionSelector* selector, InstructionCode opcode, ++ Node* node) { ++ X87OperandGenerator g(selector); ++ ++ Node* shift = node->InputAt(2); ++ InstructionOperand shift_operand; ++ if (g.CanBeImmediate(shift)) { ++ shift_operand = g.UseImmediate(shift); ++ } else { ++ shift_operand = g.UseFixed(shift, ecx); ++ } ++ InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax), ++ g.UseFixed(node->InputAt(1), edx), ++ shift_operand}; ++ ++ InstructionOperand outputs[2]; ++ InstructionOperand temps[1]; ++ int32_t output_count = 0; ++ int32_t temp_count = 0; ++ outputs[output_count++] = g.DefineAsFixed(node, eax); ++ Node* projection1 = NodeProperties::FindProjection(node, 1); ++ if (projection1) { ++ outputs[output_count++] = g.DefineAsFixed(projection1, edx); ++ } else { ++ temps[temp_count++] = g.TempRegister(edx); ++ } ++ ++ selector->Emit(opcode, output_count, outputs, 3, inputs, temp_count, temps); ++} ++ ++void InstructionSelector::VisitWord32PairShl(Node* node) { ++ VisitWord32PairShift(this, kX87ShlPair, node); ++} ++ ++void InstructionSelector::VisitWord32PairShr(Node* node) { ++ VisitWord32PairShift(this, kX87ShrPair, node); ++} ++ ++void InstructionSelector::VisitWord32PairSar(Node* node) { ++ VisitWord32PairShift(this, kX87SarPair, node); ++} ++ ++void InstructionSelector::VisitWord32Ror(Node* node) { ++ VisitShift(this, node, kX87Ror); ++} ++ ++ ++void InstructionSelector::VisitWord32Clz(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } ++ ++ ++void InstructionSelector::VisitWord32ReverseBits(Node* node) { UNREACHABLE(); } ++ ++void InstructionSelector::VisitWord64ReverseBytes(Node* node) { UNREACHABLE(); } ++ ++void InstructionSelector::VisitWord32ReverseBytes(Node* node) { UNREACHABLE(); } ++ ++void InstructionSelector::VisitWord32Popcnt(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Popcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitInt32Add(Node* node) { ++ X87OperandGenerator g(this); ++ ++ // Try to match the Add to a lea pattern ++ BaseWithIndexAndDisplacement32Matcher m(node); ++ if (m.matches() && ++ (m.displacement() == nullptr || g.CanBeImmediate(m.displacement()))) { ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ AddressingMode mode = g.GenerateMemoryOperandInputs( ++ m.index(), m.scale(), m.base(), m.displacement(), m.displacement_mode(), ++ inputs, &input_count); ++ ++ DCHECK_NE(0u, input_count); ++ DCHECK_GE(arraysize(inputs), input_count); ++ ++ InstructionOperand outputs[1]; ++ outputs[0] = g.DefineAsRegister(node); ++ ++ InstructionCode opcode = AddressingModeField::encode(mode) | kX87Lea; ++ Emit(opcode, 1, outputs, input_count, inputs); ++ return; ++ } ++ ++ // No lea pattern match, use add ++ VisitBinop(this, node, kX87Add); ++} ++ ++ ++void InstructionSelector::VisitInt32Sub(Node* node) { ++ X87OperandGenerator g(this); ++ Int32BinopMatcher m(node); ++ if (m.left().Is(0)) { ++ Emit(kX87Neg, g.DefineSameAsFirst(node), g.Use(m.right().node())); ++ } else { ++ VisitBinop(this, node, kX87Sub); ++ } ++} ++ ++ ++void InstructionSelector::VisitInt32Mul(Node* node) { ++ Int32ScaleMatcher m(node, true); ++ if (m.matches()) { ++ Node* index = node->InputAt(0); ++ Node* base = m.power_of_two_plus_one() ? index : nullptr; ++ EmitLea(this, node, index, m.scale(), base, nullptr, kPositiveDisplacement); ++ return; ++ } ++ X87OperandGenerator g(this); ++ Node* left = node->InputAt(0); ++ Node* right = node->InputAt(1); ++ if (g.CanBeImmediate(right)) { ++ Emit(kX87Imul, g.DefineAsRegister(node), g.Use(left), ++ g.UseImmediate(right)); ++ } else { ++ if (g.CanBeBetterLeftOperand(right)) { ++ std::swap(left, right); ++ } ++ Emit(kX87Imul, g.DefineSameAsFirst(node), g.UseRegister(left), ++ g.Use(right)); ++ } ++} ++ ++ ++void InstructionSelector::VisitInt32MulHigh(Node* node) { ++ VisitMulHigh(this, node, kX87ImulHigh); ++} ++ ++ ++void InstructionSelector::VisitUint32MulHigh(Node* node) { ++ VisitMulHigh(this, node, kX87UmulHigh); ++} ++ ++ ++void InstructionSelector::VisitInt32Div(Node* node) { ++ VisitDiv(this, node, kX87Idiv); ++} ++ ++ ++void InstructionSelector::VisitUint32Div(Node* node) { ++ VisitDiv(this, node, kX87Udiv); ++} ++ ++ ++void InstructionSelector::VisitInt32Mod(Node* node) { ++ VisitMod(this, node, kX87Idiv); ++} ++ ++ ++void InstructionSelector::VisitUint32Mod(Node* node) { ++ VisitMod(this, node, kX87Udiv); ++} ++ ++ ++void InstructionSelector::VisitChangeFloat32ToFloat64(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32ToFloat64, g.DefineAsFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitRoundInt32ToFloat32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Int32ToFloat32, g.DefineAsFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitRoundUint32ToFloat32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Uint32ToFloat32, g.DefineAsFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Int32ToFloat64, g.DefineAsFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Uint32ToFloat64, g.DefineAsFixed(node, stX_0), ++ g.UseRegister(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitTruncateFloat32ToUint32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++void InstructionSelector::VisitTruncateFloat64ToUint32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), ++ g.Use(node->InputAt(0))); ++} ++ ++void InstructionSelector::VisitRoundFloat64ToInt32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87BitcastFI, g.DefineAsRegister(node), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87BitcastIF, g.DefineAsFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat32Add(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Add(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Add, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat32Sub(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat64Sub(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat32Mul(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Mul(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat32Div(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Div, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Div(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Div, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Mod(Node* node) { ++ X87OperandGenerator g(this); ++ InstructionOperand temps[] = {g.TempRegister(eax)}; ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Mod, g.DefineAsFixed(node, stX_0), 1, temps)->MarkAsCall(); ++} ++ ++void InstructionSelector::VisitFloat32Max(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Max, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat64Max(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Max, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat32Min(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float32Min, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat64Min(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(kX87Float64Min, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat32Abs(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float32Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Abs(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float64Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat32Sqrt(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float32Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat64Sqrt(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float64Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++ ++void InstructionSelector::VisitFloat32RoundDown(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32Round | MiscField::encode(kRoundDown), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64RoundDown(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64Round | MiscField::encode(kRoundDown), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat32RoundUp(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64RoundUp(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32Round | MiscField::encode(kRoundToZero), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64Round | MiscField::encode(kRoundToZero), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { ++ UNREACHABLE(); ++} ++ ++ ++void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float32Round | MiscField::encode(kRoundToNearest), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64Round | MiscField::encode(kRoundToNearest), ++ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); ++} ++ ++void InstructionSelector::VisitFloat32Neg(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float32Neg, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat64Neg(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float64Neg, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitFloat64Ieee754Binop(Node* node, ++ InstructionCode opcode) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ Emit(opcode, g.DefineAsFixed(node, stX_0), 0, nullptr)->MarkAsCall(); ++} ++ ++void InstructionSelector::VisitFloat64Ieee754Unop(Node* node, ++ InstructionCode opcode) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(opcode, g.DefineAsFixed(node, stX_0), 0, nullptr)->MarkAsCall(); ++} ++ ++void InstructionSelector::EmitPrepareArguments( ++ ZoneVector* arguments, const CallDescriptor* descriptor, ++ Node* node) { ++ X87OperandGenerator g(this); ++ ++ // Prepare for C function call. ++ if (descriptor->IsCFunctionCall()) { ++ InstructionOperand temps[] = {g.TempRegister()}; ++ size_t const temp_count = arraysize(temps); ++ Emit(kArchPrepareCallCFunction | ++ MiscField::encode(static_cast(descriptor->ParameterCount())), ++ 0, nullptr, 0, nullptr, temp_count, temps); ++ ++ // Poke any stack arguments. ++ for (size_t n = 0; n < arguments->size(); ++n) { ++ PushParameter input = (*arguments)[n]; ++ if (input.node()) { ++ int const slot = static_cast(n); ++ InstructionOperand value = g.CanBeImmediate(input.node()) ++ ? g.UseImmediate(input.node()) ++ : g.UseRegister(input.node()); ++ Emit(kX87Poke | MiscField::encode(slot), g.NoOutput(), value); ++ } ++ } ++ } else { ++ // Push any stack arguments. ++ for (PushParameter input : base::Reversed(*arguments)) { ++ // TODO(titzer): handle pushing double parameters. ++ if (input.node() == nullptr) continue; ++ InstructionOperand value = ++ g.CanBeImmediate(input.node()) ++ ? g.UseImmediate(input.node()) ++ : IsSupported(ATOM) || ++ sequence()->IsFP(GetVirtualRegister(input.node())) ++ ? g.UseRegister(input.node()) ++ : g.Use(input.node()); ++ Emit(kX87Push, g.NoOutput(), value); ++ } ++ } ++} ++ ++ ++bool InstructionSelector::IsTailCallAddressImmediate() { return true; } ++ ++int InstructionSelector::GetTempsCountForTailCallFromJSFunction() { return 0; } ++ ++namespace { ++ ++void VisitCompareWithMemoryOperand(InstructionSelector* selector, ++ InstructionCode opcode, Node* left, ++ InstructionOperand right, ++ FlagsContinuation* cont) { ++ DCHECK(left->opcode() == IrOpcode::kLoad); ++ X87OperandGenerator g(selector); ++ size_t input_count = 0; ++ InstructionOperand inputs[6]; ++ AddressingMode addressing_mode = ++ g.GetEffectiveAddressMemoryOperand(left, inputs, &input_count); ++ opcode |= AddressingModeField::encode(addressing_mode); ++ opcode = cont->Encode(opcode); ++ inputs[input_count++] = right; ++ ++ if (cont->IsBranch()) { ++ inputs[input_count++] = g.Label(cont->true_block()); ++ inputs[input_count++] = g.Label(cont->false_block()); ++ selector->Emit(opcode, 0, nullptr, input_count, inputs); ++ } else if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(opcode, 0, nullptr, input_count, inputs, ++ cont->kind(), cont->reason(), cont->frame_state()); ++ } else if (cont->IsSet()) { ++ InstructionOperand output = g.DefineAsRegister(cont->result()); ++ selector->Emit(opcode, 1, &output, input_count, inputs); ++ } else { ++ DCHECK(cont->IsTrap()); ++ inputs[input_count++] = g.UseImmediate(cont->trap_id()); ++ selector->Emit(opcode, 0, nullptr, input_count, inputs); ++ } ++} ++ ++// Shared routine for multiple compare operations. ++void VisitCompare(InstructionSelector* selector, InstructionCode opcode, ++ InstructionOperand left, InstructionOperand right, ++ FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ opcode = cont->Encode(opcode); ++ if (cont->IsBranch()) { ++ selector->Emit(opcode, g.NoOutput(), left, right, ++ g.Label(cont->true_block()), g.Label(cont->false_block())); ++ } else if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(opcode, g.NoOutput(), left, right, cont->kind(), ++ cont->reason(), cont->frame_state()); ++ } else if (cont->IsSet()) { ++ selector->Emit(opcode, g.DefineAsByteRegister(cont->result()), left, right); ++ } else { ++ DCHECK(cont->IsTrap()); ++ selector->Emit(opcode, g.NoOutput(), left, right, ++ g.UseImmediate(cont->trap_id())); ++ } ++} ++ ++ ++// Shared routine for multiple compare operations. ++void VisitCompare(InstructionSelector* selector, InstructionCode opcode, ++ Node* left, Node* right, FlagsContinuation* cont, ++ bool commutative) { ++ X87OperandGenerator g(selector); ++ if (commutative && g.CanBeBetterLeftOperand(right)) { ++ std::swap(left, right); ++ } ++ VisitCompare(selector, opcode, g.UseRegister(left), g.Use(right), cont); ++} ++ ++MachineType MachineTypeForNarrow(Node* node, Node* hint_node) { ++ if (hint_node->opcode() == IrOpcode::kLoad) { ++ MachineType hint = LoadRepresentationOf(hint_node->op()); ++ if (node->opcode() == IrOpcode::kInt32Constant || ++ node->opcode() == IrOpcode::kInt64Constant) { ++ int64_t constant = node->opcode() == IrOpcode::kInt32Constant ++ ? OpParameter(node) ++ : OpParameter(node); ++ if (hint == MachineType::Int8()) { ++ if (constant >= std::numeric_limits::min() && ++ constant <= std::numeric_limits::max()) { ++ return hint; ++ } ++ } else if (hint == MachineType::Uint8()) { ++ if (constant >= std::numeric_limits::min() && ++ constant <= std::numeric_limits::max()) { ++ return hint; ++ } ++ } else if (hint == MachineType::Int16()) { ++ if (constant >= std::numeric_limits::min() && ++ constant <= std::numeric_limits::max()) { ++ return hint; ++ } ++ } else if (hint == MachineType::Uint16()) { ++ if (constant >= std::numeric_limits::min() && ++ constant <= std::numeric_limits::max()) { ++ return hint; ++ } ++ } else if (hint == MachineType::Int32()) { ++ return hint; ++ } else if (hint == MachineType::Uint32()) { ++ if (constant >= 0) return hint; ++ } ++ } ++ } ++ return node->opcode() == IrOpcode::kLoad ? LoadRepresentationOf(node->op()) ++ : MachineType::None(); ++} ++ ++// Tries to match the size of the given opcode to that of the operands, if ++// possible. ++InstructionCode TryNarrowOpcodeSize(InstructionCode opcode, Node* left, ++ Node* right, FlagsContinuation* cont) { ++ // TODO(epertoso): we can probably get some size information out of phi nodes. ++ // If the load representations don't match, both operands will be ++ // zero/sign-extended to 32bit. ++ MachineType left_type = MachineTypeForNarrow(left, right); ++ MachineType right_type = MachineTypeForNarrow(right, left); ++ if (left_type == right_type) { ++ switch (left_type.representation()) { ++ case MachineRepresentation::kBit: ++ case MachineRepresentation::kWord8: { ++ if (opcode == kX87Test) return kX87Test8; ++ if (opcode == kX87Cmp) { ++ if (left_type.semantic() == MachineSemantic::kUint32) { ++ cont->OverwriteUnsignedIfSigned(); ++ } else { ++ CHECK_EQ(MachineSemantic::kInt32, left_type.semantic()); ++ } ++ return kX87Cmp8; ++ } ++ break; ++ } ++ case MachineRepresentation::kWord16: ++ if (opcode == kX87Test) return kX87Test16; ++ if (opcode == kX87Cmp) { ++ if (left_type.semantic() == MachineSemantic::kUint32) { ++ cont->OverwriteUnsignedIfSigned(); ++ } else { ++ CHECK_EQ(MachineSemantic::kInt32, left_type.semantic()); ++ } ++ return kX87Cmp16; ++ } ++ break; ++ default: ++ break; ++ } ++ } ++ return opcode; ++} ++ ++// Shared routine for multiple float32 compare operations (inputs commuted). ++void VisitFloat32Compare(InstructionSelector* selector, Node* node, ++ FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ selector->Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); ++ selector->Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); ++ if (cont->IsBranch()) { ++ selector->Emit(cont->Encode(kX87Float32Cmp), g.NoOutput(), ++ g.Label(cont->true_block()), g.Label(cont->false_block())); ++ } else if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(cont->Encode(kX87Float32Cmp), g.NoOutput(), ++ g.Use(node->InputAt(0)), g.Use(node->InputAt(1)), ++ cont->kind(), cont->reason(), cont->frame_state()); ++ } else if (cont->IsSet()) { ++ selector->Emit(cont->Encode(kX87Float32Cmp), ++ g.DefineAsByteRegister(cont->result())); ++ } else { ++ DCHECK(cont->IsTrap()); ++ selector->Emit(cont->Encode(kX87Float32Cmp), g.NoOutput(), ++ g.UseImmediate(cont->trap_id())); ++ } ++} ++ ++ ++// Shared routine for multiple float64 compare operations (inputs commuted). ++void VisitFloat64Compare(InstructionSelector* selector, Node* node, ++ FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ selector->Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ selector->Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); ++ if (cont->IsBranch()) { ++ selector->Emit(cont->Encode(kX87Float64Cmp), g.NoOutput(), ++ g.Label(cont->true_block()), g.Label(cont->false_block())); ++ } else if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(cont->Encode(kX87Float64Cmp), g.NoOutput(), ++ g.Use(node->InputAt(0)), g.Use(node->InputAt(1)), ++ cont->kind(), cont->reason(), cont->frame_state()); ++ } else if (cont->IsSet()) { ++ selector->Emit(cont->Encode(kX87Float64Cmp), ++ g.DefineAsByteRegister(cont->result())); ++ } else { ++ DCHECK(cont->IsTrap()); ++ selector->Emit(cont->Encode(kX87Float64Cmp), g.NoOutput(), ++ g.UseImmediate(cont->trap_id())); ++ } ++} ++ ++// Shared routine for multiple word compare operations. ++void VisitWordCompare(InstructionSelector* selector, Node* node, ++ InstructionCode opcode, FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ Node* left = node->InputAt(0); ++ Node* right = node->InputAt(1); ++ ++ InstructionCode narrowed_opcode = ++ TryNarrowOpcodeSize(opcode, left, right, cont); ++ ++ int effect_level = selector->GetEffectLevel(node); ++ if (cont->IsBranch()) { ++ effect_level = selector->GetEffectLevel( ++ cont->true_block()->PredecessorAt(0)->control_input()); ++ } ++ ++ // If one of the two inputs is an immediate, make sure it's on the right, or ++ // if one of the two inputs is a memory operand, make sure it's on the left. ++ if ((!g.CanBeImmediate(right) && g.CanBeImmediate(left)) || ++ (g.CanBeMemoryOperand(narrowed_opcode, node, right, effect_level) && ++ !g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level))) { ++ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); ++ std::swap(left, right); ++ } ++ ++ // Match immediates on right side of comparison. ++ if (g.CanBeImmediate(right)) { ++ if (g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level)) { ++ return VisitCompareWithMemoryOperand(selector, narrowed_opcode, left, ++ g.UseImmediate(right), cont); ++ } ++ return VisitCompare(selector, opcode, g.Use(left), g.UseImmediate(right), ++ cont); ++ } ++ ++ // Match memory operands on left side of comparison. ++ if (g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level)) { ++ bool needs_byte_register = ++ narrowed_opcode == kX87Test8 || narrowed_opcode == kX87Cmp8; ++ return VisitCompareWithMemoryOperand( ++ selector, narrowed_opcode, left, ++ needs_byte_register ? g.UseByteRegister(right) : g.UseRegister(right), ++ cont); ++ } ++ ++ if (g.CanBeBetterLeftOperand(right)) { ++ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); ++ std::swap(left, right); ++ } ++ ++ return VisitCompare(selector, opcode, left, right, cont, ++ node->op()->HasProperty(Operator::kCommutative)); ++} ++ ++void VisitWordCompare(InstructionSelector* selector, Node* node, ++ FlagsContinuation* cont) { ++ X87OperandGenerator g(selector); ++ Int32BinopMatcher m(node); ++ if (m.left().IsLoad() && m.right().IsLoadStackPointer()) { ++ LoadMatcher mleft(m.left().node()); ++ ExternalReference js_stack_limit = ++ ExternalReference::address_of_stack_limit(selector->isolate()); ++ if (mleft.object().Is(js_stack_limit) && mleft.index().Is(0)) { ++ // Compare(Load(js_stack_limit), LoadStackPointer) ++ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); ++ InstructionCode opcode = cont->Encode(kX87StackCheck); ++ if (cont->IsBranch()) { ++ selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()), ++ g.Label(cont->false_block())); ++ } else if (cont->IsDeoptimize()) { ++ selector->EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, cont->kind(), ++ cont->reason(), cont->frame_state()); ++ } else { ++ DCHECK(cont->IsSet()); ++ selector->Emit(opcode, g.DefineAsRegister(cont->result())); ++ } ++ return; ++ } ++ } ++ VisitWordCompare(selector, node, kX87Cmp, cont); ++} ++ ++ ++// Shared routine for word comparison with zero. ++void VisitWordCompareZero(InstructionSelector* selector, Node* user, ++ Node* value, FlagsContinuation* cont) { ++ // Try to combine with comparisons against 0 by simply inverting the branch. ++ while (value->opcode() == IrOpcode::kWord32Equal && ++ selector->CanCover(user, value)) { ++ Int32BinopMatcher m(value); ++ if (!m.right().Is(0)) break; ++ ++ user = value; ++ value = m.left().node(); ++ cont->Negate(); ++ } ++ ++ if (selector->CanCover(user, value)) { ++ switch (value->opcode()) { ++ case IrOpcode::kWord32Equal: ++ cont->OverwriteAndNegateIfEqual(kEqual); ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kInt32LessThan: ++ cont->OverwriteAndNegateIfEqual(kSignedLessThan); ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kInt32LessThanOrEqual: ++ cont->OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kUint32LessThan: ++ cont->OverwriteAndNegateIfEqual(kUnsignedLessThan); ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kUint32LessThanOrEqual: ++ cont->OverwriteAndNegateIfEqual(kUnsignedLessThanOrEqual); ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kFloat32Equal: ++ cont->OverwriteAndNegateIfEqual(kUnorderedEqual); ++ return VisitFloat32Compare(selector, value, cont); ++ case IrOpcode::kFloat32LessThan: ++ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThan); ++ return VisitFloat32Compare(selector, value, cont); ++ case IrOpcode::kFloat32LessThanOrEqual: ++ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThanOrEqual); ++ return VisitFloat32Compare(selector, value, cont); ++ case IrOpcode::kFloat64Equal: ++ cont->OverwriteAndNegateIfEqual(kUnorderedEqual); ++ return VisitFloat64Compare(selector, value, cont); ++ case IrOpcode::kFloat64LessThan: ++ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThan); ++ return VisitFloat64Compare(selector, value, cont); ++ case IrOpcode::kFloat64LessThanOrEqual: ++ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThanOrEqual); ++ return VisitFloat64Compare(selector, value, cont); ++ case IrOpcode::kProjection: ++ // Check if this is the overflow output projection of an ++ // WithOverflow node. ++ if (ProjectionIndexOf(value->op()) == 1u) { ++ // We cannot combine the WithOverflow with this branch ++ // unless the 0th projection (the use of the actual value of the ++ // is either nullptr, which means there's no use of the ++ // actual value, or was already defined, which means it is scheduled ++ // *AFTER* this branch). ++ Node* const node = value->InputAt(0); ++ Node* const result = NodeProperties::FindProjection(node, 0); ++ if (result == nullptr || selector->IsDefined(result)) { ++ switch (node->opcode()) { ++ case IrOpcode::kInt32AddWithOverflow: ++ cont->OverwriteAndNegateIfEqual(kOverflow); ++ return VisitBinop(selector, node, kX87Add, cont); ++ case IrOpcode::kInt32SubWithOverflow: ++ cont->OverwriteAndNegateIfEqual(kOverflow); ++ return VisitBinop(selector, node, kX87Sub, cont); ++ case IrOpcode::kInt32MulWithOverflow: ++ cont->OverwriteAndNegateIfEqual(kOverflow); ++ return VisitBinop(selector, node, kX87Imul, cont); ++ default: ++ break; ++ } ++ } ++ } ++ break; ++ case IrOpcode::kInt32Sub: ++ return VisitWordCompare(selector, value, cont); ++ case IrOpcode::kWord32And: ++ return VisitWordCompare(selector, value, kX87Test, cont); ++ default: ++ break; ++ } ++ } ++ ++ // Continuation could not be combined with a compare, emit compare against 0. ++ X87OperandGenerator g(selector); ++ VisitCompare(selector, kX87Cmp, g.Use(value), g.TempImmediate(0), cont); ++} ++ ++} // namespace ++ ++ ++void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, ++ BasicBlock* fbranch) { ++ FlagsContinuation cont(kNotEqual, tbranch, fbranch); ++ VisitWordCompareZero(this, branch, branch->InputAt(0), &cont); ++} ++ ++void InstructionSelector::VisitDeoptimizeIf(Node* node) { ++ DeoptimizeParameters p = DeoptimizeParametersOf(node->op()); ++ FlagsContinuation cont = FlagsContinuation::ForDeoptimize( ++ kNotEqual, p.kind(), p.reason(), node->InputAt(1)); ++ VisitWordCompareZero(this, node, node->InputAt(0), &cont); ++} ++ ++void InstructionSelector::VisitDeoptimizeUnless(Node* node) { ++ DeoptimizeParameters p = DeoptimizeParametersOf(node->op()); ++ FlagsContinuation cont = FlagsContinuation::ForDeoptimize( ++ kEqual, p.kind(), p.reason(), node->InputAt(1)); ++ VisitWordCompareZero(this, node, node->InputAt(0), &cont); ++} ++ ++void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1)); ++ VisitWordCompareZero(this, node, node->InputAt(0), &cont); ++} ++ ++void InstructionSelector::VisitTrapUnless(Node* node, ++ Runtime::FunctionId func_id) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1)); ++ VisitWordCompareZero(this, node, node->InputAt(0), &cont); ++} ++ ++void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { ++ X87OperandGenerator g(this); ++ InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); ++ ++ // Emit either ArchTableSwitch or ArchLookupSwitch. ++ static const size_t kMaxTableSwitchValueRange = 2 << 16; ++ size_t table_space_cost = 4 + sw.value_range; ++ size_t table_time_cost = 3; ++ size_t lookup_space_cost = 3 + 2 * sw.case_count; ++ size_t lookup_time_cost = sw.case_count; ++ if (sw.case_count > 4 && ++ table_space_cost + 3 * table_time_cost <= ++ lookup_space_cost + 3 * lookup_time_cost && ++ sw.min_value > std::numeric_limits::min() && ++ sw.value_range <= kMaxTableSwitchValueRange) { ++ InstructionOperand index_operand = value_operand; ++ if (sw.min_value) { ++ index_operand = g.TempRegister(); ++ Emit(kX87Lea | AddressingModeField::encode(kMode_MRI), index_operand, ++ value_operand, g.TempImmediate(-sw.min_value)); ++ } ++ // Generate a table lookup. ++ return EmitTableSwitch(sw, index_operand); ++ } ++ ++ // Generate a sequence of conditional jumps. ++ return EmitLookupSwitch(sw, value_operand); ++} ++ ++ ++void InstructionSelector::VisitWord32Equal(Node* const node) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kEqual, node); ++ Int32BinopMatcher m(node); ++ if (m.right().Is(0)) { ++ return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); ++ } ++ VisitWordCompare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitInt32LessThan(Node* node) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kSignedLessThan, node); ++ VisitWordCompare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitInt32LessThanOrEqual(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kSignedLessThanOrEqual, node); ++ VisitWordCompare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitUint32LessThan(Node* node) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kUnsignedLessThan, node); ++ VisitWordCompare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitUint32LessThanOrEqual(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kUnsignedLessThanOrEqual, node); ++ VisitWordCompare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { ++ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); ++ return VisitBinop(this, node, kX87Add, &cont); ++ } ++ FlagsContinuation cont; ++ VisitBinop(this, node, kX87Add, &cont); ++} ++ ++ ++void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { ++ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); ++ return VisitBinop(this, node, kX87Sub, &cont); ++ } ++ FlagsContinuation cont; ++ VisitBinop(this, node, kX87Sub, &cont); ++} ++ ++void InstructionSelector::VisitInt32MulWithOverflow(Node* node) { ++ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); ++ return VisitBinop(this, node, kX87Imul, &cont); ++ } ++ FlagsContinuation cont; ++ VisitBinop(this, node, kX87Imul, &cont); ++} ++ ++void InstructionSelector::VisitFloat32Equal(Node* node) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node); ++ VisitFloat32Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat32LessThan(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kUnsignedGreaterThan, node); ++ VisitFloat32Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat32LessThanOrEqual(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kUnsignedGreaterThanOrEqual, node); ++ VisitFloat32Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat64Equal(Node* node) { ++ FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node); ++ VisitFloat64Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat64LessThan(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kUnsignedGreaterThan, node); ++ VisitFloat64Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { ++ FlagsContinuation cont = ++ FlagsContinuation::ForSet(kUnsignedGreaterThanOrEqual, node); ++ VisitFloat64Compare(this, node, &cont); ++} ++ ++ ++void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ExtractLowWord32, g.DefineAsRegister(node), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64ExtractHighWord32(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87Float64ExtractHighWord32, g.DefineAsRegister(node), ++ g.Use(node->InputAt(0))); ++} ++ ++ ++void InstructionSelector::VisitFloat64InsertLowWord32(Node* node) { ++ X87OperandGenerator g(this); ++ Node* left = node->InputAt(0); ++ Node* right = node->InputAt(1); ++ Emit(kX87Float64InsertLowWord32, g.UseFixed(node, stX_0), g.UseRegister(left), ++ g.UseRegister(right)); ++} ++ ++ ++void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { ++ X87OperandGenerator g(this); ++ Node* left = node->InputAt(0); ++ Node* right = node->InputAt(1); ++ Emit(kX87Float64InsertHighWord32, g.UseFixed(node, stX_0), ++ g.UseRegister(left), g.UseRegister(right)); ++} ++ ++void InstructionSelector::VisitFloat64SilenceNaN(Node* node) { ++ X87OperandGenerator g(this); ++ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); ++ Emit(kX87Float64SilenceNaN, g.DefineAsFixed(node, stX_0), 0, nullptr); ++} ++ ++void InstructionSelector::VisitAtomicLoad(Node* node) { ++ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); ++ DCHECK(load_rep.representation() == MachineRepresentation::kWord8 || ++ load_rep.representation() == MachineRepresentation::kWord16 || ++ load_rep.representation() == MachineRepresentation::kWord32); ++ USE(load_rep); ++ VisitLoad(node); ++} ++ ++void InstructionSelector::VisitAtomicStore(Node* node) { ++ X87OperandGenerator g(this); ++ Node* base = node->InputAt(0); ++ Node* index = node->InputAt(1); ++ Node* value = node->InputAt(2); ++ ++ MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); ++ ArchOpcode opcode = kArchNop; ++ switch (rep) { ++ case MachineRepresentation::kWord8: ++ opcode = kX87Xchgb; ++ break; ++ case MachineRepresentation::kWord16: ++ opcode = kX87Xchgw; ++ break; ++ case MachineRepresentation::kWord32: ++ opcode = kX87Xchgl; ++ break; ++ default: ++ UNREACHABLE(); ++ break; ++ } ++ AddressingMode addressing_mode; ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ inputs[input_count++] = g.UseUniqueRegister(base); ++ if (g.CanBeImmediate(index)) { ++ inputs[input_count++] = g.UseImmediate(index); ++ addressing_mode = kMode_MRI; ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(index); ++ addressing_mode = kMode_MR1; ++ } ++ inputs[input_count++] = g.UseUniqueRegister(value); ++ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); ++ Emit(code, 0, nullptr, input_count, inputs); ++} ++ ++void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { ++ UNREACHABLE(); ++} ++ ++void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { ++ UNREACHABLE(); ++} ++ ++// static ++MachineOperatorBuilder::Flags ++InstructionSelector::SupportedMachineOperatorFlags() { ++ MachineOperatorBuilder::Flags flags = ++ MachineOperatorBuilder::kWord32ShiftIsSafe; ++ if (CpuFeatures::IsSupported(POPCNT)) { ++ flags |= MachineOperatorBuilder::kWord32Popcnt; ++ } ++ ++ flags |= MachineOperatorBuilder::kFloat32RoundDown | ++ MachineOperatorBuilder::kFloat64RoundDown | ++ MachineOperatorBuilder::kFloat32RoundUp | ++ MachineOperatorBuilder::kFloat64RoundUp | ++ MachineOperatorBuilder::kFloat32RoundTruncate | ++ MachineOperatorBuilder::kFloat64RoundTruncate | ++ MachineOperatorBuilder::kFloat32RoundTiesEven | ++ MachineOperatorBuilder::kFloat64RoundTiesEven; ++ return flags; ++} ++ ++// static ++MachineOperatorBuilder::AlignmentRequirements ++InstructionSelector::AlignmentRequirements() { ++ return MachineOperatorBuilder::AlignmentRequirements:: ++ FullUnalignedAccessSupport(); ++} ++ ++} // namespace compiler ++} // namespace internal ++} // namespace v8 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 2017-12-25 17:42:57.205465793 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2017-12-25 17:42:57.210465720 +0100 +@@ -0,0 +1,157 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/debug/debug.h" ++ ++#include "src/codegen.h" ++#include "src/debug/liveedit.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm) ++ ++ ++void EmitDebugBreakSlot(MacroAssembler* masm) { ++ Label check_codesize; ++ __ bind(&check_codesize); ++ __ Nop(Assembler::kDebugBreakSlotLength); ++ DCHECK_EQ(Assembler::kDebugBreakSlotLength, ++ masm->SizeOfCodeGeneratedSince(&check_codesize)); ++} ++ ++ ++void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { ++ // Generate enough nop's to make space for a call instruction. ++ masm->RecordDebugBreakSlot(mode); ++ EmitDebugBreakSlot(masm); ++} ++ ++ ++void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { ++ CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotLength); ++ EmitDebugBreakSlot(patcher.masm()); ++} ++ ++ ++void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, ++ Handle code) { ++ DCHECK(code->is_debug_stub()); ++ static const int kSize = Assembler::kDebugBreakSlotLength; ++ CodePatcher patcher(isolate, pc, kSize); ++ ++ // Add a label for checking the size of the code used for returning. ++ Label check_codesize; ++ patcher.masm()->bind(&check_codesize); ++ patcher.masm()->call(code->entry(), RelocInfo::NONE32); ++ // Check that the size of the code generated is as expected. ++ DCHECK_EQ(kSize, patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); ++} ++ ++bool DebugCodegen::DebugBreakSlotIsPatched(Address pc) { ++ return !Assembler::IsNop(pc); ++} ++ ++void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm, ++ DebugBreakCallHelperMode mode) { ++ __ RecordComment("Debug break"); ++ ++ // Enter an internal frame. ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Load padding words on stack. ++ for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { ++ __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingValue))); ++ } ++ __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingInitialSize))); ++ ++ // Push arguments for DebugBreak call. ++ if (mode == SAVE_RESULT_REGISTER) { ++ // Break on return. ++ __ push(eax); ++ } else { ++ // Non-return breaks. ++ __ Push(masm->isolate()->factory()->the_hole_value()); ++ } ++ __ Move(eax, Immediate(1)); ++ __ mov(ebx, ++ Immediate(ExternalReference( ++ Runtime::FunctionForId(Runtime::kDebugBreak), masm->isolate()))); ++ ++ CEntryStub ceb(masm->isolate(), 1); ++ __ CallStub(&ceb); ++ ++ if (FLAG_debug_code) { ++ for (int i = 0; i < kNumJSCallerSaved; ++i) { ++ Register reg = {JSCallerSavedCode(i)}; ++ // Do not clobber eax if mode is SAVE_RESULT_REGISTER. It will ++ // contain return value of the function. ++ if (!(reg.is(eax) && (mode == SAVE_RESULT_REGISTER))) { ++ __ Move(reg, Immediate(kDebugZapValue)); ++ } ++ } ++ } ++ ++ __ pop(ebx); ++ // We divide stored value by 2 (untagging) and multiply it by word's size. ++ STATIC_ASSERT(kSmiTagSize == 1 && kSmiShiftSize == 0); ++ __ lea(esp, Operand(esp, ebx, times_half_pointer_size, 0)); ++ ++ // Get rid of the internal frame. ++ } ++ ++ // This call did not replace a call , so there will be an unwanted ++ // return address left on the stack. Here we get rid of that. ++ __ add(esp, Immediate(kPointerSize)); ++ ++ // Now that the break point has been handled, resume normal execution by ++ // jumping to the target address intended by the caller and that was ++ // overwritten by the address of DebugBreakXXX. ++ ExternalReference after_break_target = ++ ExternalReference::debug_after_break_target_address(masm->isolate()); ++ __ jmp(Operand::StaticVariable(after_break_target)); ++} ++ ++ ++void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { ++ // We do not know our frame height, but set esp based on ebp. ++ __ lea(esp, Operand(ebp, FrameDropperFrameConstants::kFunctionOffset)); ++ __ pop(edi); // Function. ++ __ add(esp, Immediate(-FrameDropperFrameConstants::kCodeOffset)); // INTERNAL ++ // frame ++ // marker ++ // and code ++ __ pop(ebp); ++ ++ ParameterCount dummy(0); ++ __ CheckDebugHook(edi, no_reg, dummy, dummy); ++ ++ // Load context from the function. ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ // Clear new.target register as a safety measure. ++ __ mov(edx, masm->isolate()->factory()->undefined_value()); ++ ++ // Get function code. ++ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); ++ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); ++ ++ // Re-run JSFunction, edi is function, esi is context. ++ __ jmp(ebx); ++} ++ ++ ++const bool LiveEdit::kFrameDropperSupported = true; ++ ++#undef __ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 2017-12-25 17:42:57.210465720 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/frames-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/frames-inl.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h 2017-12-25 17:42:57.210465720 +0100 +@@ -26,6 +26,8 @@ + #include "src/mips64/frames-mips64.h" // NOLINT + #elif V8_TARGET_ARCH_S390 + #include "src/s390/frames-s390.h" // NOLINT ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/frames-x87.h" // NOLINT + #else + #error Unsupported target architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2017-12-25 17:42:57.211465705 +0100 +@@ -45,7 +45,7 @@ + static const int kMaxBackEdgeWeight = 127; + + // Platform-specific code size multiplier. +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + static const int kCodeSizeMultiplier = 105; + #elif V8_TARGET_ARCH_X64 + static const int kCodeSizeMultiplier = 165; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-25 17:42:57.213465676 +0100 +@@ -0,0 +1,2425 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/ast/compile-time-value.h" ++#include "src/ast/scopes.h" ++#include "src/builtins/builtins-constructor.h" ++#include "src/code-factory.h" ++#include "src/code-stubs.h" ++#include "src/codegen.h" ++#include "src/compilation-info.h" ++#include "src/compiler.h" ++#include "src/debug/debug.h" ++#include "src/full-codegen/full-codegen.h" ++#include "src/ic/ic.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm()) ++ ++class JumpPatchSite BASE_EMBEDDED { ++ public: ++ explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) { ++#ifdef DEBUG ++ info_emitted_ = false; ++#endif ++ } ++ ++ ~JumpPatchSite() { ++ DCHECK(patch_site_.is_bound() == info_emitted_); ++ } ++ ++ void EmitJumpIfNotSmi(Register reg, ++ Label* target, ++ Label::Distance distance = Label::kFar) { ++ __ test(reg, Immediate(kSmiTagMask)); ++ EmitJump(not_carry, target, distance); // Always taken before patched. ++ } ++ ++ void EmitJumpIfSmi(Register reg, ++ Label* target, ++ Label::Distance distance = Label::kFar) { ++ __ test(reg, Immediate(kSmiTagMask)); ++ EmitJump(carry, target, distance); // Never taken before patched. ++ } ++ ++ void EmitPatchInfo() { ++ if (patch_site_.is_bound()) { ++ int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site_); ++ DCHECK(is_uint8(delta_to_patch_site)); ++ __ test(eax, Immediate(delta_to_patch_site)); ++#ifdef DEBUG ++ info_emitted_ = true; ++#endif ++ } else { ++ __ nop(); // Signals no inlined code. ++ } ++ } ++ ++ private: ++ // jc will be patched with jz, jnc will become jnz. ++ void EmitJump(Condition cc, Label* target, Label::Distance distance) { ++ DCHECK(!patch_site_.is_bound() && !info_emitted_); ++ DCHECK(cc == carry || cc == not_carry); ++ __ bind(&patch_site_); ++ __ j(cc, target, distance); ++ } ++ ++ MacroAssembler* masm() { return masm_; } ++ MacroAssembler* masm_; ++ Label patch_site_; ++#ifdef DEBUG ++ bool info_emitted_; ++#endif ++}; ++ ++ ++// Generate code for a JS function. On entry to the function the receiver ++// and arguments have been pushed on the stack left to right, with the ++// return address on top of them. The actual argument count matches the ++// formal parameter count expected by the function. ++// ++// The live registers are: ++// o edi: the JS function object being called (i.e. ourselves) ++// o edx: the new target value ++// o esi: our context ++// o ebp: our caller's frame pointer ++// o esp: stack pointer (pointing to return address) ++// ++// The function builds a JS frame. Please see JavaScriptFrameConstants in ++// frames-x87.h for its layout. ++void FullCodeGenerator::Generate() { ++ CompilationInfo* info = info_; ++ profiling_counter_ = isolate()->factory()->NewCell( ++ Handle(Smi::FromInt(FLAG_interrupt_budget), isolate())); ++ SetFunctionPosition(literal()); ++ Comment cmnt(masm_, "[ function compiled by full code generator"); ++ ++ ProfileEntryHookStub::MaybeCallEntryHook(masm_); ++ ++ if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) { ++ int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; ++ __ mov(ecx, Operand(esp, receiver_offset)); ++ __ AssertNotSmi(ecx); ++ __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); ++ } ++ ++ // Open a frame scope to indicate that there is a frame on the stack. The ++ // MANUAL indicates that the scope shouldn't actually generate code to set up ++ // the frame (that is done below). ++ FrameScope frame_scope(masm_, StackFrame::MANUAL); ++ ++ info->set_prologue_offset(masm_->pc_offset()); ++ __ Prologue(info->GeneratePreagedPrologue()); ++ ++ // Increment invocation count for the function. ++ { ++ Comment cmnt(masm_, "[ Increment invocation count"); ++ __ mov(ecx, FieldOperand(edi, JSFunction::kFeedbackVectorOffset)); ++ __ mov(ecx, FieldOperand(ecx, Cell::kValueOffset)); ++ __ add( ++ FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize + ++ FeedbackVector::kHeaderSize), ++ Immediate(Smi::FromInt(1))); ++ } ++ ++ { Comment cmnt(masm_, "[ Allocate locals"); ++ int locals_count = info->scope()->num_stack_slots(); ++ OperandStackDepthIncrement(locals_count); ++ if (locals_count == 1) { ++ __ push(Immediate(isolate()->factory()->undefined_value())); ++ } else if (locals_count > 1) { ++ if (locals_count >= 128) { ++ Label ok; ++ __ mov(ecx, esp); ++ __ sub(ecx, Immediate(locals_count * kPointerSize)); ++ ExternalReference stack_limit = ++ ExternalReference::address_of_real_stack_limit(isolate()); ++ __ cmp(ecx, Operand::StaticVariable(stack_limit)); ++ __ j(above_equal, &ok, Label::kNear); ++ __ CallRuntime(Runtime::kThrowStackOverflow); ++ __ bind(&ok); ++ } ++ __ mov(eax, Immediate(isolate()->factory()->undefined_value())); ++ const int kMaxPushes = 32; ++ if (locals_count >= kMaxPushes) { ++ int loop_iterations = locals_count / kMaxPushes; ++ __ mov(ecx, loop_iterations); ++ Label loop_header; ++ __ bind(&loop_header); ++ // Do pushes. ++ for (int i = 0; i < kMaxPushes; i++) { ++ __ push(eax); ++ } ++ __ dec(ecx); ++ __ j(not_zero, &loop_header, Label::kNear); ++ } ++ int remaining = locals_count % kMaxPushes; ++ // Emit the remaining pushes. ++ for (int i = 0; i < remaining; i++) { ++ __ push(eax); ++ } ++ } ++ } ++ ++ bool function_in_register = true; ++ ++ // Possibly allocate a local context. ++ if (info->scope()->NeedsContext()) { ++ Comment cmnt(masm_, "[ Allocate context"); ++ bool need_write_barrier = true; ++ int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; ++ // Argument to NewContext is the function, which is still in edi. ++ if (info->scope()->is_script_scope()) { ++ __ push(edi); ++ __ Push(info->scope()->scope_info()); ++ __ CallRuntime(Runtime::kNewScriptContext); ++ // The new target value is not used, clobbering is safe. ++ DCHECK_NULL(info->scope()->new_target_var()); ++ } else { ++ if (info->scope()->new_target_var() != nullptr) { ++ __ push(edx); // Preserve new target. ++ } ++ if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { ++ Callable callable = CodeFactory::FastNewFunctionContext( ++ isolate(), info->scope()->scope_type()); ++ __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), ++ Immediate(slots)); ++ __ Call(callable.code(), RelocInfo::CODE_TARGET); ++ // Result of the FastNewFunctionContext builtin is always in new space. ++ need_write_barrier = false; ++ } else { ++ __ push(edi); ++ __ Push(Smi::FromInt(info->scope()->scope_type())); ++ __ CallRuntime(Runtime::kNewFunctionContext); ++ } ++ if (info->scope()->new_target_var() != nullptr) { ++ __ pop(edx); // Restore new target. ++ } ++ } ++ function_in_register = false; ++ // Context is returned in eax. It replaces the context passed to us. ++ // It's saved in the stack and kept live in esi. ++ __ mov(esi, eax); ++ __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); ++ ++ // Copy parameters into context if necessary. ++ int num_parameters = info->scope()->num_parameters(); ++ int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; ++ for (int i = first_parameter; i < num_parameters; i++) { ++ Variable* var = ++ (i == -1) ? info->scope()->receiver() : info->scope()->parameter(i); ++ if (var->IsContextSlot()) { ++ int parameter_offset = StandardFrameConstants::kCallerSPOffset + ++ (num_parameters - 1 - i) * kPointerSize; ++ // Load parameter from stack. ++ __ mov(eax, Operand(ebp, parameter_offset)); ++ // Store it in the context. ++ int context_offset = Context::SlotOffset(var->index()); ++ __ mov(Operand(esi, context_offset), eax); ++ // Update the write barrier. This clobbers eax and ebx. ++ if (need_write_barrier) { ++ __ RecordWriteContextSlot(esi, context_offset, eax, ebx, ++ kDontSaveFPRegs); ++ } else if (FLAG_debug_code) { ++ Label done; ++ __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); ++ __ Abort(kExpectedNewSpaceObject); ++ __ bind(&done); ++ } ++ } ++ } ++ } ++ ++ // We don't support new.target and rest parameters here. ++ DCHECK_NULL(info->scope()->new_target_var()); ++ DCHECK_NULL(info->scope()->rest_parameter()); ++ DCHECK_NULL(info->scope()->this_function_var()); ++ ++ Variable* arguments = info->scope()->arguments(); ++ if (arguments != NULL) { ++ // Arguments object must be allocated after the context object, in ++ // case the "arguments" or ".arguments" variables are in the context. ++ Comment cmnt(masm_, "[ Allocate arguments object"); ++ if (!function_in_register) { ++ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ } ++ if (is_strict(language_mode()) || !has_simple_parameters()) { ++ FastNewStrictArgumentsStub stub(isolate()); ++ __ CallStub(&stub); ++ } else if (literal()->has_duplicate_parameters()) { ++ __ Push(edi); ++ __ CallRuntime(Runtime::kNewSloppyArguments_Generic); ++ } else { ++ FastNewSloppyArgumentsStub stub(isolate()); ++ __ CallStub(&stub); ++ } ++ ++ SetVar(arguments, eax, ebx, edx); ++ } ++ ++ if (FLAG_trace) { ++ __ CallRuntime(Runtime::kTraceEnter); ++ } ++ ++ // Visit the declarations and body. ++ { ++ Comment cmnt(masm_, "[ Declarations"); ++ VisitDeclarations(scope()->declarations()); ++ } ++ ++ // Assert that the declarations do not use ICs. Otherwise the debugger ++ // won't be able to redirect a PC at an IC to the correct IC in newly ++ // recompiled code. ++ DCHECK_EQ(0, ic_total_count_); ++ ++ { ++ Comment cmnt(masm_, "[ Stack check"); ++ Label ok; ++ ExternalReference stack_limit = ++ ExternalReference::address_of_stack_limit(isolate()); ++ __ cmp(esp, Operand::StaticVariable(stack_limit)); ++ __ j(above_equal, &ok, Label::kNear); ++ __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); ++ __ bind(&ok); ++ } ++ ++ { ++ Comment cmnt(masm_, "[ Body"); ++ DCHECK(loop_depth() == 0); ++ VisitStatements(literal()->body()); ++ DCHECK(loop_depth() == 0); ++ } ++ ++ // Always emit a 'return undefined' in case control fell off the end of ++ // the body. ++ { Comment cmnt(masm_, "[ return ;"); ++ __ mov(eax, isolate()->factory()->undefined_value()); ++ EmitReturnSequence(); ++ } ++} ++ ++ ++void FullCodeGenerator::ClearAccumulator() { ++ __ Move(eax, Immediate(Smi::kZero)); ++} ++ ++ ++void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { ++ __ mov(ebx, Immediate(profiling_counter_)); ++ __ sub(FieldOperand(ebx, Cell::kValueOffset), ++ Immediate(Smi::FromInt(delta))); ++} ++ ++ ++void FullCodeGenerator::EmitProfilingCounterReset() { ++ int reset_value = FLAG_interrupt_budget; ++ __ mov(ebx, Immediate(profiling_counter_)); ++ __ mov(FieldOperand(ebx, Cell::kValueOffset), ++ Immediate(Smi::FromInt(reset_value))); ++} ++ ++ ++void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, ++ Label* back_edge_target) { ++ Comment cmnt(masm_, "[ Back edge bookkeeping"); ++ Label ok; ++ ++ DCHECK(back_edge_target->is_bound()); ++ int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); ++ int weight = Min(kMaxBackEdgeWeight, ++ Max(1, distance / kCodeSizeMultiplier)); ++ EmitProfilingCounterDecrement(weight); ++ __ j(positive, &ok, Label::kNear); ++ __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); ++ ++ // Record a mapping of this PC offset to the OSR id. This is used to find ++ // the AST id from the unoptimized code in order to use it as a key into ++ // the deoptimization input data found in the optimized code. ++ RecordBackEdge(stmt->OsrEntryId()); ++ ++ EmitProfilingCounterReset(); ++ ++ __ bind(&ok); ++} ++ ++void FullCodeGenerator::EmitProfilingCounterHandlingForReturnSequence( ++ bool is_tail_call) { ++ // Pretend that the exit is a backwards jump to the entry. ++ int weight = 1; ++ if (info_->ShouldSelfOptimize()) { ++ weight = FLAG_interrupt_budget / FLAG_self_opt_count; ++ } else { ++ int distance = masm_->pc_offset(); ++ weight = Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier)); ++ } ++ EmitProfilingCounterDecrement(weight); ++ Label ok; ++ __ j(positive, &ok, Label::kNear); ++ // Don't need to save result register if we are going to do a tail call. ++ if (!is_tail_call) { ++ __ push(eax); ++ } ++ __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); ++ if (!is_tail_call) { ++ __ pop(eax); ++ } ++ EmitProfilingCounterReset(); ++ __ bind(&ok); ++} ++ ++void FullCodeGenerator::EmitReturnSequence() { ++ Comment cmnt(masm_, "[ Return sequence"); ++ if (return_label_.is_bound()) { ++ __ jmp(&return_label_); ++ } else { ++ // Common return label ++ __ bind(&return_label_); ++ if (FLAG_trace) { ++ __ push(eax); ++ __ CallRuntime(Runtime::kTraceExit); ++ } ++ EmitProfilingCounterHandlingForReturnSequence(false); ++ ++ SetReturnPosition(literal()); ++ __ leave(); ++ ++ int arg_count = info_->scope()->num_parameters() + 1; ++ int arguments_bytes = arg_count * kPointerSize; ++ __ Ret(arguments_bytes, ecx); ++ } ++} ++ ++void FullCodeGenerator::RestoreContext() { ++ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); ++} ++ ++void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { ++ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); ++ MemOperand operand = codegen()->VarOperand(var, result_register()); ++ // Memory operands can be pushed directly. ++ codegen()->PushOperand(operand); ++} ++ ++ ++void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { ++ UNREACHABLE(); // Not used on X87. ++} ++ ++ ++void FullCodeGenerator::AccumulatorValueContext::Plug( ++ Heap::RootListIndex index) const { ++ UNREACHABLE(); // Not used on X87. ++} ++ ++ ++void FullCodeGenerator::StackValueContext::Plug( ++ Heap::RootListIndex index) const { ++ UNREACHABLE(); // Not used on X87. ++} ++ ++ ++void FullCodeGenerator::TestContext::Plug(Heap::RootListIndex index) const { ++ UNREACHABLE(); // Not used on X87. ++} ++ ++ ++void FullCodeGenerator::EffectContext::Plug(Handle lit) const { ++} ++ ++ ++void FullCodeGenerator::AccumulatorValueContext::Plug( ++ Handle lit) const { ++ if (lit->IsSmi()) { ++ __ SafeMove(result_register(), Immediate(lit)); ++ } else { ++ __ Move(result_register(), Immediate(lit)); ++ } ++} ++ ++ ++void FullCodeGenerator::StackValueContext::Plug(Handle lit) const { ++ codegen()->OperandStackDepthIncrement(1); ++ if (lit->IsSmi()) { ++ __ SafePush(Immediate(lit)); ++ } else { ++ __ push(Immediate(lit)); ++ } ++} ++ ++ ++void FullCodeGenerator::TestContext::Plug(Handle lit) const { ++ DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); ++ if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { ++ if (false_label_ != fall_through_) __ jmp(false_label_); ++ } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { ++ if (true_label_ != fall_through_) __ jmp(true_label_); ++ } else if (lit->IsString()) { ++ if (String::cast(*lit)->length() == 0) { ++ if (false_label_ != fall_through_) __ jmp(false_label_); ++ } else { ++ if (true_label_ != fall_through_) __ jmp(true_label_); ++ } ++ } else if (lit->IsSmi()) { ++ if (Smi::ToInt(*lit) == 0) { ++ if (false_label_ != fall_through_) __ jmp(false_label_); ++ } else { ++ if (true_label_ != fall_through_) __ jmp(true_label_); ++ } ++ } else { ++ // For simplicity we always test the accumulator register. ++ __ mov(result_register(), lit); ++ codegen()->DoTest(this); ++ } ++} ++ ++ ++void FullCodeGenerator::StackValueContext::DropAndPlug(int count, ++ Register reg) const { ++ DCHECK(count > 0); ++ if (count > 1) codegen()->DropOperands(count - 1); ++ __ mov(Operand(esp, 0), reg); ++} ++ ++ ++void FullCodeGenerator::EffectContext::Plug(Label* materialize_true, ++ Label* materialize_false) const { ++ DCHECK(materialize_true == materialize_false); ++ __ bind(materialize_true); ++} ++ ++ ++void FullCodeGenerator::AccumulatorValueContext::Plug( ++ Label* materialize_true, ++ Label* materialize_false) const { ++ Label done; ++ __ bind(materialize_true); ++ __ mov(result_register(), isolate()->factory()->true_value()); ++ __ jmp(&done, Label::kNear); ++ __ bind(materialize_false); ++ __ mov(result_register(), isolate()->factory()->false_value()); ++ __ bind(&done); ++} ++ ++ ++void FullCodeGenerator::StackValueContext::Plug( ++ Label* materialize_true, ++ Label* materialize_false) const { ++ codegen()->OperandStackDepthIncrement(1); ++ Label done; ++ __ bind(materialize_true); ++ __ push(Immediate(isolate()->factory()->true_value())); ++ __ jmp(&done, Label::kNear); ++ __ bind(materialize_false); ++ __ push(Immediate(isolate()->factory()->false_value())); ++ __ bind(&done); ++} ++ ++ ++void FullCodeGenerator::TestContext::Plug(Label* materialize_true, ++ Label* materialize_false) const { ++ DCHECK(materialize_true == true_label_); ++ DCHECK(materialize_false == false_label_); ++} ++ ++ ++void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { ++ Handle value = flag ++ ? isolate()->factory()->true_value() ++ : isolate()->factory()->false_value(); ++ __ mov(result_register(), value); ++} ++ ++ ++void FullCodeGenerator::StackValueContext::Plug(bool flag) const { ++ codegen()->OperandStackDepthIncrement(1); ++ Handle value = flag ++ ? isolate()->factory()->true_value() ++ : isolate()->factory()->false_value(); ++ __ push(Immediate(value)); ++} ++ ++ ++void FullCodeGenerator::TestContext::Plug(bool flag) const { ++ if (flag) { ++ if (true_label_ != fall_through_) __ jmp(true_label_); ++ } else { ++ if (false_label_ != fall_through_) __ jmp(false_label_); ++ } ++} ++ ++ ++void FullCodeGenerator::DoTest(Expression* condition, ++ Label* if_true, ++ Label* if_false, ++ Label* fall_through) { ++ Callable callable = Builtins::CallableFor(isolate(), Builtins::kToBoolean); ++ __ Call(callable.code(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); ++ Split(equal, if_true, if_false, fall_through); ++} ++ ++ ++void FullCodeGenerator::Split(Condition cc, ++ Label* if_true, ++ Label* if_false, ++ Label* fall_through) { ++ if (if_false == fall_through) { ++ __ j(cc, if_true); ++ } else if (if_true == fall_through) { ++ __ j(NegateCondition(cc), if_false); ++ } else { ++ __ j(cc, if_true); ++ __ jmp(if_false); ++ } ++} ++ ++ ++MemOperand FullCodeGenerator::StackOperand(Variable* var) { ++ DCHECK(var->IsStackAllocated()); ++ // Offset is negative because higher indexes are at lower addresses. ++ int offset = -var->index() * kPointerSize; ++ // Adjust by a (parameter or local) base offset. ++ if (var->IsParameter()) { ++ offset += (info_->scope()->num_parameters() + 1) * kPointerSize; ++ } else { ++ offset += JavaScriptFrameConstants::kLocal0Offset; ++ } ++ return Operand(ebp, offset); ++} ++ ++ ++MemOperand FullCodeGenerator::VarOperand(Variable* var, Register scratch) { ++ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); ++ if (var->IsContextSlot()) { ++ int context_chain_length = scope()->ContextChainLength(var->scope()); ++ __ LoadContext(scratch, context_chain_length); ++ return ContextOperand(scratch, var->index()); ++ } else { ++ return StackOperand(var); ++ } ++} ++ ++ ++void FullCodeGenerator::GetVar(Register dest, Variable* var) { ++ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); ++ MemOperand location = VarOperand(var, dest); ++ __ mov(dest, location); ++} ++ ++ ++void FullCodeGenerator::SetVar(Variable* var, ++ Register src, ++ Register scratch0, ++ Register scratch1) { ++ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); ++ DCHECK(!scratch0.is(src)); ++ DCHECK(!scratch0.is(scratch1)); ++ DCHECK(!scratch1.is(src)); ++ MemOperand location = VarOperand(var, scratch0); ++ __ mov(location, src); ++ ++ // Emit the write barrier code if the location is in the heap. ++ if (var->IsContextSlot()) { ++ int offset = Context::SlotOffset(var->index()); ++ DCHECK(!scratch0.is(esi) && !src.is(esi) && !scratch1.is(esi)); ++ __ RecordWriteContextSlot(scratch0, offset, src, scratch1, kDontSaveFPRegs); ++ } ++} ++ ++ ++void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { ++ // The variable in the declaration always resides in the current context. ++ DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); ++ if (FLAG_debug_code) { ++ // Check that we're not inside a with or catch context. ++ __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset)); ++ __ cmp(ebx, isolate()->factory()->with_context_map()); ++ __ Check(not_equal, kDeclarationInWithContext); ++ __ cmp(ebx, isolate()->factory()->catch_context_map()); ++ __ Check(not_equal, kDeclarationInCatchContext); ++ } ++} ++ ++ ++void FullCodeGenerator::VisitVariableDeclaration( ++ VariableDeclaration* declaration) { ++ VariableProxy* proxy = declaration->proxy(); ++ Variable* variable = proxy->var(); ++ switch (variable->location()) { ++ case VariableLocation::UNALLOCATED: { ++ DCHECK(!variable->binding_needs_init()); ++ globals_->Add(variable->name(), zone()); ++ FeedbackSlot slot = proxy->VariableFeedbackSlot(); ++ DCHECK(!slot.IsInvalid()); ++ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); ++ globals_->Add(isolate()->factory()->undefined_value(), zone()); ++ globals_->Add(isolate()->factory()->undefined_value(), zone()); ++ break; ++ } ++ case VariableLocation::PARAMETER: ++ case VariableLocation::LOCAL: ++ if (variable->binding_needs_init()) { ++ Comment cmnt(masm_, "[ VariableDeclaration"); ++ __ mov(StackOperand(variable), ++ Immediate(isolate()->factory()->the_hole_value())); ++ } ++ break; ++ ++ case VariableLocation::CONTEXT: ++ if (variable->binding_needs_init()) { ++ Comment cmnt(masm_, "[ VariableDeclaration"); ++ EmitDebugCheckDeclarationContext(variable); ++ __ mov(ContextOperand(esi, variable->index()), ++ Immediate(isolate()->factory()->the_hole_value())); ++ // No write barrier since the hole value is in old space. ++ } ++ break; ++ ++ case VariableLocation::LOOKUP: ++ case VariableLocation::MODULE: ++ UNREACHABLE(); ++ } ++} ++ ++void FullCodeGenerator::VisitFunctionDeclaration( ++ FunctionDeclaration* declaration) { ++ VariableProxy* proxy = declaration->proxy(); ++ Variable* variable = proxy->var(); ++ switch (variable->location()) { ++ case VariableLocation::UNALLOCATED: { ++ globals_->Add(variable->name(), zone()); ++ FeedbackSlot slot = proxy->VariableFeedbackSlot(); ++ DCHECK(!slot.IsInvalid()); ++ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); ++ ++ // We need the slot where the literals array lives, too. ++ slot = declaration->fun()->LiteralFeedbackSlot(); ++ DCHECK(!slot.IsInvalid()); ++ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); ++ ++ Handle function = ++ Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); ++ // Check for stack-overflow exception. ++ if (function.is_null()) return SetStackOverflow(); ++ globals_->Add(function, zone()); ++ break; ++ } ++ ++ case VariableLocation::PARAMETER: ++ case VariableLocation::LOCAL: { ++ Comment cmnt(masm_, "[ FunctionDeclaration"); ++ VisitForAccumulatorValue(declaration->fun()); ++ __ mov(StackOperand(variable), result_register()); ++ break; ++ } ++ ++ case VariableLocation::CONTEXT: { ++ Comment cmnt(masm_, "[ FunctionDeclaration"); ++ EmitDebugCheckDeclarationContext(variable); ++ VisitForAccumulatorValue(declaration->fun()); ++ __ mov(ContextOperand(esi, variable->index()), result_register()); ++ // We know that we have written a function, which is not a smi. ++ __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), ++ result_register(), ecx, kDontSaveFPRegs, ++ EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); ++ break; ++ } ++ ++ case VariableLocation::LOOKUP: ++ case VariableLocation::MODULE: ++ UNREACHABLE(); ++ } ++} ++ ++ ++void FullCodeGenerator::DeclareGlobals(Handle pairs) { ++ // Call the runtime to declare the globals. ++ __ Push(pairs); ++ __ Push(Smi::FromInt(DeclareGlobalsFlags())); ++ __ EmitLoadFeedbackVector(eax); ++ __ Push(eax); ++ __ CallRuntime(Runtime::kDeclareGlobals); ++ // Return value is ignored. ++} ++ ++ ++void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { ++ Comment cmnt(masm_, "[ SwitchStatement"); ++ Breakable nested_statement(this, stmt); ++ SetStatementPosition(stmt); ++ ++ // Keep the switch value on the stack until a case matches. ++ VisitForStackValue(stmt->tag()); ++ ++ ZoneList* clauses = stmt->cases(); ++ CaseClause* default_clause = NULL; // Can occur anywhere in the list. ++ ++ Label next_test; // Recycled for each test. ++ // Compile all the tests with branches to their bodies. ++ for (int i = 0; i < clauses->length(); i++) { ++ CaseClause* clause = clauses->at(i); ++ clause->body_target()->Unuse(); ++ ++ // The default is not a test, but remember it as final fall through. ++ if (clause->is_default()) { ++ default_clause = clause; ++ continue; ++ } ++ ++ Comment cmnt(masm_, "[ Case comparison"); ++ __ bind(&next_test); ++ next_test.Unuse(); ++ ++ // Compile the label expression. ++ VisitForAccumulatorValue(clause->label()); ++ ++ // Perform the comparison as if via '==='. ++ __ mov(edx, Operand(esp, 0)); // Switch value. ++ bool inline_smi_code = ShouldInlineSmiCase(Token::EQ_STRICT); ++ JumpPatchSite patch_site(masm_); ++ if (inline_smi_code) { ++ Label slow_case; ++ __ mov(ecx, edx); ++ __ or_(ecx, eax); ++ patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); ++ ++ __ cmp(edx, eax); ++ __ j(not_equal, &next_test); ++ __ Drop(1); // Switch value is no longer needed. ++ __ jmp(clause->body_target()); ++ __ bind(&slow_case); ++ } ++ ++ SetExpressionPosition(clause); ++ Handle ic = ++ CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); ++ CallIC(ic); ++ patch_site.EmitPatchInfo(); ++ ++ Label skip; ++ __ jmp(&skip, Label::kNear); ++ __ cmp(eax, isolate()->factory()->true_value()); ++ __ j(not_equal, &next_test); ++ __ Drop(1); ++ __ jmp(clause->body_target()); ++ __ bind(&skip); ++ ++ __ test(eax, eax); ++ __ j(not_equal, &next_test); ++ __ Drop(1); // Switch value is no longer needed. ++ __ jmp(clause->body_target()); ++ } ++ ++ // Discard the test value and jump to the default if present, otherwise to ++ // the end of the statement. ++ __ bind(&next_test); ++ DropOperands(1); // Switch value is no longer needed. ++ if (default_clause == NULL) { ++ __ jmp(nested_statement.break_label()); ++ } else { ++ __ jmp(default_clause->body_target()); ++ } ++ ++ // Compile all the case bodies. ++ for (int i = 0; i < clauses->length(); i++) { ++ Comment cmnt(masm_, "[ Case body"); ++ CaseClause* clause = clauses->at(i); ++ __ bind(clause->body_target()); ++ VisitStatements(clause->statements()); ++ } ++ ++ __ bind(nested_statement.break_label()); ++} ++ ++ ++void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { ++ Comment cmnt(masm_, "[ ForInStatement"); ++ SetStatementPosition(stmt, SKIP_BREAK); ++ ++ FeedbackSlot slot = stmt->ForInFeedbackSlot(); ++ ++ // Get the object to enumerate over. ++ SetExpressionAsStatementPosition(stmt->enumerable()); ++ VisitForAccumulatorValue(stmt->enumerable()); ++ OperandStackDepthIncrement(5); ++ ++ Label loop, exit; ++ Iteration loop_statement(this, stmt); ++ increment_loop_depth(); ++ ++ // If the object is null or undefined, skip over the loop, otherwise convert ++ // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. ++ Label convert, done_convert; ++ __ JumpIfSmi(eax, &convert, Label::kNear); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(above_equal, &done_convert, Label::kNear); ++ __ cmp(eax, isolate()->factory()->undefined_value()); ++ __ j(equal, &exit); ++ __ cmp(eax, isolate()->factory()->null_value()); ++ __ j(equal, &exit); ++ __ bind(&convert); ++ __ Call(isolate()->builtins()->ToObject(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ __ bind(&done_convert); ++ __ push(eax); ++ ++ // Check cache validity in generated code. If we cannot guarantee cache ++ // validity, call the runtime system to check cache validity or get the ++ // property names in a fixed array. Note: Proxies never have an enum cache, ++ // so will always take the slow path. ++ Label call_runtime, use_cache, fixed_array; ++ __ CheckEnumCache(&call_runtime); ++ ++ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ jmp(&use_cache, Label::kNear); ++ ++ // Get the set of properties to enumerate. ++ __ bind(&call_runtime); ++ __ push(eax); ++ __ CallRuntime(Runtime::kForInEnumerate); ++ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), ++ isolate()->factory()->meta_map()); ++ __ j(not_equal, &fixed_array); ++ ++ ++ // We got a map in register eax. Get the enumeration cache from it. ++ Label no_descriptors; ++ __ bind(&use_cache); ++ ++ __ EnumLength(edx, eax); ++ __ cmp(edx, Immediate(Smi::kZero)); ++ __ j(equal, &no_descriptors); ++ ++ __ LoadInstanceDescriptors(eax, ecx); ++ __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeOffset)); ++ __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); ++ ++ // Set up the four remaining stack slots. ++ __ push(eax); // Map. ++ __ push(ecx); // Enumeration cache. ++ __ push(edx); // Number of valid entries for the map in the enum cache. ++ __ push(Immediate(Smi::kZero)); // Initial index. ++ __ jmp(&loop); ++ ++ __ bind(&no_descriptors); ++ __ add(esp, Immediate(kPointerSize)); ++ __ jmp(&exit); ++ ++ // We got a fixed array in register eax. Iterate through that. ++ __ bind(&fixed_array); ++ ++ __ push(Immediate(Smi::FromInt(1))); // Smi(1) indicates slow check ++ __ push(eax); // Array ++ __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); ++ __ push(eax); // Fixed array length (as smi). ++ __ push(Immediate(Smi::kZero)); // Initial index. ++ ++ // Generate code for doing the condition check. ++ __ bind(&loop); ++ SetExpressionAsStatementPosition(stmt->each()); ++ ++ __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. ++ __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length. ++ __ j(above_equal, loop_statement.break_label()); ++ ++ // Get the current entry of the array into register eax. ++ __ mov(ebx, Operand(esp, 2 * kPointerSize)); ++ __ mov(eax, FieldOperand(ebx, eax, times_2, FixedArray::kHeaderSize)); ++ ++ // Get the expected map from the stack or a smi in the ++ // permanent slow case into register edx. ++ __ mov(edx, Operand(esp, 3 * kPointerSize)); ++ ++ // Check if the expected map still matches that of the enumerable. ++ // If not, we may have to filter the key. ++ Label update_each; ++ __ mov(ebx, Operand(esp, 4 * kPointerSize)); ++ __ cmp(edx, FieldOperand(ebx, HeapObject::kMapOffset)); ++ __ j(equal, &update_each, Label::kNear); ++ ++ // We need to filter the key, record slow-path here. ++ int const vector_index = SmiFromSlot(slot)->value(); ++ __ EmitLoadFeedbackVector(edx); ++ __ mov(FieldOperand(edx, FixedArray::OffsetOfElementAt(vector_index)), ++ Immediate(FeedbackVector::MegamorphicSentinel(isolate()))); ++ ++ // eax contains the key. The receiver in ebx is the second argument to the ++ // ForInFilter. ForInFilter returns undefined if the receiver doesn't ++ // have the key or returns the name-converted key. ++ __ Call(isolate()->builtins()->ForInFilter(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ __ JumpIfRoot(result_register(), Heap::kUndefinedValueRootIndex, ++ loop_statement.continue_label()); ++ ++ // Update the 'each' property or variable from the possibly filtered ++ // entry in register eax. ++ __ bind(&update_each); ++ // Perform the assignment as if via '='. ++ { EffectContext context(this); ++ EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); ++ } ++ ++ // Generate code for the body of the loop. ++ Visit(stmt->body()); ++ ++ // Generate code for going to the next element by incrementing the ++ // index (smi) stored on top of the stack. ++ __ bind(loop_statement.continue_label()); ++ __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); ++ ++ EmitBackEdgeBookkeeping(stmt, &loop); ++ __ jmp(&loop); ++ ++ // Remove the pointers stored on the stack. ++ __ bind(loop_statement.break_label()); ++ DropOperands(5); ++ ++ // Exit and decrement the loop depth. ++ __ bind(&exit); ++ decrement_loop_depth(); ++} ++ ++void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, ++ FeedbackSlot slot) { ++ DCHECK(NeedsHomeObject(initializer)); ++ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); ++ CallStoreIC(slot, isolate()->factory()->home_object_symbol()); ++} ++ ++void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, ++ int offset, ++ FeedbackSlot slot) { ++ DCHECK(NeedsHomeObject(initializer)); ++ __ mov(StoreDescriptor::ReceiverRegister(), eax); ++ __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); ++ CallStoreIC(slot, isolate()->factory()->home_object_symbol()); ++} ++ ++void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, ++ TypeofMode typeof_mode) { ++ SetExpressionPosition(proxy); ++ Variable* var = proxy->var(); ++ ++ // Two cases: global variables and all other types of variables. ++ switch (var->location()) { ++ case VariableLocation::UNALLOCATED: { ++ Comment cmnt(masm_, "[ Global variable"); ++ EmitGlobalVariableLoad(proxy, typeof_mode); ++ context()->Plug(eax); ++ break; ++ } ++ ++ case VariableLocation::PARAMETER: ++ case VariableLocation::LOCAL: ++ case VariableLocation::CONTEXT: { ++ DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); ++ Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" ++ : "[ Stack variable"); ++ ++ if (proxy->hole_check_mode() == HoleCheckMode::kRequired) { ++ // Throw a reference error when using an uninitialized let/const ++ // binding in harmony mode. ++ Label done; ++ GetVar(eax, var); ++ __ cmp(eax, isolate()->factory()->the_hole_value()); ++ __ j(not_equal, &done, Label::kNear); ++ __ push(Immediate(var->name())); ++ __ CallRuntime(Runtime::kThrowReferenceError); ++ __ bind(&done); ++ context()->Plug(eax); ++ break; ++ } ++ context()->Plug(var); ++ break; ++ } ++ ++ case VariableLocation::LOOKUP: ++ case VariableLocation::MODULE: ++ UNREACHABLE(); ++ } ++} ++ ++ ++void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { ++ Expression* expression = (property == NULL) ? NULL : property->value(); ++ if (expression == NULL) { ++ PushOperand(isolate()->factory()->null_value()); ++ } else { ++ VisitForStackValue(expression); ++ if (NeedsHomeObject(expression)) { ++ DCHECK(property->kind() == ObjectLiteral::Property::GETTER || ++ property->kind() == ObjectLiteral::Property::SETTER); ++ int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; ++ EmitSetHomeObject(expression, offset, property->GetSlot()); ++ } ++ } ++} ++ ++ ++void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { ++ Comment cmnt(masm_, "[ ObjectLiteral"); ++ ++ Handle constant_properties = ++ expr->GetOrBuildConstantProperties(isolate()); ++ int flags = expr->ComputeFlags(); ++ // If any of the keys would store to the elements array, then we shouldn't ++ // allow it. ++ if (MustCreateObjectLiteralWithRuntime(expr)) { ++ __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ push(Immediate(Smi::FromInt(expr->literal_index()))); ++ __ push(Immediate(constant_properties)); ++ __ push(Immediate(Smi::FromInt(flags))); ++ __ CallRuntime(Runtime::kCreateObjectLiteral); ++ } else { ++ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); ++ __ mov(ecx, Immediate(constant_properties)); ++ __ mov(edx, Immediate(Smi::FromInt(flags))); ++ Callable callable = ++ Builtins::CallableFor(isolate(), Builtins::kFastCloneShallowObject); ++ __ Call(callable.code(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ } ++ ++ // If result_saved is true the result is on top of the stack. If ++ // result_saved is false the result is in eax. ++ bool result_saved = false; ++ ++ AccessorTable accessor_table(zone()); ++ for (int i = 0; i < expr->properties()->length(); i++) { ++ ObjectLiteral::Property* property = expr->properties()->at(i); ++ DCHECK(!property->is_computed_name()); ++ if (property->IsCompileTimeValue()) continue; ++ ++ Literal* key = property->key()->AsLiteral(); ++ Expression* value = property->value(); ++ if (!result_saved) { ++ PushOperand(eax); // Save result on the stack ++ result_saved = true; ++ } ++ switch (property->kind()) { ++ case ObjectLiteral::Property::SPREAD: ++ case ObjectLiteral::Property::CONSTANT: ++ UNREACHABLE(); ++ case ObjectLiteral::Property::MATERIALIZED_LITERAL: ++ DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); ++ // Fall through. ++ case ObjectLiteral::Property::COMPUTED: ++ // It is safe to use [[Put]] here because the boilerplate already ++ // contains computed properties with an uninitialized value. ++ if (key->IsStringLiteral()) { ++ DCHECK(key->IsPropertyName()); ++ if (property->emit_store()) { ++ VisitForAccumulatorValue(value); ++ DCHECK(StoreDescriptor::ValueRegister().is(eax)); ++ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ CallStoreIC(property->GetSlot(0), key->value(), kStoreOwn); ++ if (NeedsHomeObject(value)) { ++ EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); ++ } ++ } else { ++ VisitForEffect(value); ++ } ++ break; ++ } ++ PushOperand(Operand(esp, 0)); // Duplicate receiver. ++ VisitForStackValue(key); ++ VisitForStackValue(value); ++ if (property->emit_store()) { ++ if (NeedsHomeObject(value)) { ++ EmitSetHomeObject(value, 2, property->GetSlot()); ++ } ++ PushOperand(Smi::FromInt(SLOPPY)); // Language mode ++ CallRuntimeWithOperands(Runtime::kSetProperty); ++ } else { ++ DropOperands(3); ++ } ++ break; ++ case ObjectLiteral::Property::PROTOTYPE: ++ PushOperand(Operand(esp, 0)); // Duplicate receiver. ++ VisitForStackValue(value); ++ DCHECK(property->emit_store()); ++ CallRuntimeWithOperands(Runtime::kInternalSetPrototype); ++ break; ++ case ObjectLiteral::Property::GETTER: ++ if (property->emit_store()) { ++ AccessorTable::Iterator it = accessor_table.lookup(key); ++ it->second->getter = property; ++ } ++ break; ++ case ObjectLiteral::Property::SETTER: ++ if (property->emit_store()) { ++ AccessorTable::Iterator it = accessor_table.lookup(key); ++ it->second->setter = property; ++ } ++ break; ++ } ++ } ++ ++ // Emit code to define accessors, using only a single call to the runtime for ++ // each pair of corresponding getters and setters. ++ for (AccessorTable::Iterator it = accessor_table.begin(); ++ it != accessor_table.end(); ++ ++it) { ++ PushOperand(Operand(esp, 0)); // Duplicate receiver. ++ VisitForStackValue(it->first); ++ ++ EmitAccessor(it->second->getter); ++ EmitAccessor(it->second->setter); ++ ++ PushOperand(Smi::FromInt(NONE)); ++ CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); ++ } ++ ++ if (result_saved) { ++ context()->PlugTOS(); ++ } else { ++ context()->Plug(eax); ++ } ++} ++ ++ ++void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { ++ Comment cmnt(masm_, "[ ArrayLiteral"); ++ ++ Handle constant_elements = ++ expr->GetOrBuildConstantElements(isolate()); ++ ++ if (MustCreateArrayLiteralWithRuntime(expr)) { ++ __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ push(Immediate(Smi::FromInt(expr->literal_index()))); ++ __ push(Immediate(constant_elements)); ++ __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); ++ __ CallRuntime(Runtime::kCreateArrayLiteral); ++ } else { ++ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); ++ __ mov(ecx, Immediate(constant_elements)); ++ Callable callable = ++ CodeFactory::FastCloneShallowArray(isolate(), TRACK_ALLOCATION_SITE); ++ __ Call(callable.code(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ } ++ ++ bool result_saved = false; // Is the result saved to the stack? ++ ZoneList* subexprs = expr->values(); ++ int length = subexprs->length(); ++ ++ // Emit code to evaluate all the non-constant subexpressions and to store ++ // them into the newly cloned array. ++ for (int array_index = 0; array_index < length; array_index++) { ++ Expression* subexpr = subexprs->at(array_index); ++ DCHECK(!subexpr->IsSpread()); ++ ++ // If the subexpression is a literal or a simple materialized literal it ++ // is already set in the cloned array. ++ if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; ++ ++ if (!result_saved) { ++ PushOperand(eax); // array literal. ++ result_saved = true; ++ } ++ VisitForAccumulatorValue(subexpr); ++ ++ __ mov(StoreDescriptor::NameRegister(), ++ Immediate(Smi::FromInt(array_index))); ++ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ CallKeyedStoreIC(expr->LiteralFeedbackSlot()); ++ } ++ ++ if (result_saved) { ++ context()->PlugTOS(); ++ } else { ++ context()->Plug(eax); ++ } ++} ++ ++ ++void FullCodeGenerator::VisitAssignment(Assignment* expr) { ++ DCHECK(expr->target()->IsValidReferenceExpressionOrThis()); ++ ++ Comment cmnt(masm_, "[ Assignment"); ++ ++ Property* property = expr->target()->AsProperty(); ++ LhsKind assign_type = Property::GetAssignType(property); ++ ++ // Evaluate LHS expression. ++ switch (assign_type) { ++ case VARIABLE: ++ // Nothing to do here. ++ break; ++ case NAMED_PROPERTY: ++ if (expr->is_compound()) { ++ // We need the receiver both on the stack and in the register. ++ VisitForStackValue(property->obj()); ++ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ } else { ++ VisitForStackValue(property->obj()); ++ } ++ break; ++ case KEYED_PROPERTY: { ++ if (expr->is_compound()) { ++ VisitForStackValue(property->obj()); ++ VisitForStackValue(property->key()); ++ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize)); ++ __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); ++ } else { ++ VisitForStackValue(property->obj()); ++ VisitForStackValue(property->key()); ++ } ++ break; ++ } ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++ ++ // For compound assignments we need another deoptimization point after the ++ // variable/property load. ++ if (expr->is_compound()) { ++ AccumulatorValueContext result_context(this); ++ { AccumulatorValueContext left_operand_context(this); ++ switch (assign_type) { ++ case VARIABLE: ++ EmitVariableLoad(expr->target()->AsVariableProxy()); ++ break; ++ case NAMED_PROPERTY: ++ EmitNamedPropertyLoad(property); ++ break; ++ case KEYED_PROPERTY: ++ EmitKeyedPropertyLoad(property); ++ break; ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++ } ++ ++ Token::Value op = expr->binary_op(); ++ PushOperand(eax); // Left operand goes on the stack. ++ VisitForAccumulatorValue(expr->value()); ++ ++ EmitBinaryOp(expr->binary_operation(), op); ++ } else { ++ VisitForAccumulatorValue(expr->value()); ++ } ++ ++ SetExpressionPosition(expr); ++ ++ // Store the value. ++ switch (assign_type) { ++ case VARIABLE: { ++ VariableProxy* proxy = expr->target()->AsVariableProxy(); ++ EmitVariableAssignment(proxy->var(), expr->op(), expr->AssignmentSlot(), ++ proxy->hole_check_mode()); ++ context()->Plug(eax); ++ break; ++ } ++ case NAMED_PROPERTY: ++ EmitNamedPropertyAssignment(expr); ++ break; ++ case KEYED_PROPERTY: ++ EmitKeyedPropertyAssignment(expr); ++ break; ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++} ++ ++void FullCodeGenerator::VisitSuspend(Suspend* expr) { ++ // Resumable functions are not supported. ++ UNREACHABLE(); ++} ++ ++void FullCodeGenerator::PushOperand(MemOperand operand) { ++ OperandStackDepthIncrement(1); ++ __ Push(operand); ++} ++ ++void FullCodeGenerator::EmitOperandStackDepthCheck() { ++ if (FLAG_debug_code) { ++ int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + ++ operand_stack_depth_ * kPointerSize; ++ __ mov(eax, ebp); ++ __ sub(eax, esp); ++ __ cmp(eax, Immediate(expected_diff)); ++ __ Assert(equal, kUnexpectedStackDepth); ++ } ++} ++ ++ ++void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { ++ PopOperand(edx); ++ Handle code = CodeFactory::BinaryOperation(isolate(), op).code(); ++ __ Call(code, RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ context()->Plug(eax); ++} ++ ++void FullCodeGenerator::EmitAssignment(Expression* expr, FeedbackSlot slot) { ++ DCHECK(expr->IsValidReferenceExpressionOrThis()); ++ ++ Property* prop = expr->AsProperty(); ++ LhsKind assign_type = Property::GetAssignType(prop); ++ ++ switch (assign_type) { ++ case VARIABLE: { ++ VariableProxy* proxy = expr->AsVariableProxy(); ++ EffectContext context(this); ++ EmitVariableAssignment(proxy->var(), Token::ASSIGN, slot, ++ proxy->hole_check_mode()); ++ break; ++ } ++ case NAMED_PROPERTY: { ++ PushOperand(eax); // Preserve value. ++ VisitForAccumulatorValue(prop->obj()); ++ __ Move(StoreDescriptor::ReceiverRegister(), eax); ++ PopOperand(StoreDescriptor::ValueRegister()); // Restore value. ++ CallStoreIC(slot, prop->key()->AsLiteral()->value()); ++ break; ++ } ++ case KEYED_PROPERTY: { ++ PushOperand(eax); // Preserve value. ++ VisitForStackValue(prop->obj()); ++ VisitForAccumulatorValue(prop->key()); ++ __ Move(StoreDescriptor::NameRegister(), eax); ++ PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver. ++ PopOperand(StoreDescriptor::ValueRegister()); // Restore value. ++ CallKeyedStoreIC(slot); ++ break; ++ } ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++ context()->Plug(eax); ++} ++ ++ ++void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( ++ Variable* var, MemOperand location) { ++ __ mov(location, eax); ++ if (var->IsContextSlot()) { ++ __ mov(edx, eax); ++ int offset = Context::SlotOffset(var->index()); ++ __ RecordWriteContextSlot(ecx, offset, edx, ebx, kDontSaveFPRegs); ++ } ++} ++ ++void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, ++ FeedbackSlot slot, ++ HoleCheckMode hole_check_mode) { ++ if (var->IsUnallocated()) { ++ // Global var, const, or let. ++ __ mov(StoreDescriptor::ReceiverRegister(), NativeContextOperand()); ++ __ mov(StoreDescriptor::ReceiverRegister(), ++ ContextOperand(StoreDescriptor::ReceiverRegister(), ++ Context::EXTENSION_INDEX)); ++ CallStoreIC(slot, var->name(), kStoreGlobal); ++ ++ } else if (IsLexicalVariableMode(var->mode()) && op != Token::INIT) { ++ DCHECK(!var->IsLookupSlot()); ++ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); ++ MemOperand location = VarOperand(var, ecx); ++ // Perform an initialization check for lexically declared variables. ++ if (hole_check_mode == HoleCheckMode::kRequired) { ++ Label assign; ++ __ mov(edx, location); ++ __ cmp(edx, isolate()->factory()->the_hole_value()); ++ __ j(not_equal, &assign, Label::kNear); ++ __ push(Immediate(var->name())); ++ __ CallRuntime(Runtime::kThrowReferenceError); ++ __ bind(&assign); ++ } ++ if (var->mode() != CONST) { ++ EmitStoreToStackLocalOrContextSlot(var, location); ++ } else if (var->throw_on_const_assignment(language_mode())) { ++ __ CallRuntime(Runtime::kThrowConstAssignError); ++ } ++ } else if (var->is_this() && var->mode() == CONST && op == Token::INIT) { ++ // Initializing assignment to const {this} needs a write barrier. ++ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); ++ Label uninitialized_this; ++ MemOperand location = VarOperand(var, ecx); ++ __ mov(edx, location); ++ __ cmp(edx, isolate()->factory()->the_hole_value()); ++ __ j(equal, &uninitialized_this); ++ __ push(Immediate(var->name())); ++ __ CallRuntime(Runtime::kThrowReferenceError); ++ __ bind(&uninitialized_this); ++ EmitStoreToStackLocalOrContextSlot(var, location); ++ ++ } else { ++ DCHECK(var->mode() != CONST || op == Token::INIT); ++ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); ++ DCHECK(!var->IsLookupSlot()); ++ // Assignment to var or initializing assignment to let/const in harmony ++ // mode. ++ MemOperand location = VarOperand(var, ecx); ++ EmitStoreToStackLocalOrContextSlot(var, location); ++ } ++} ++ ++ ++void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { ++ // Assignment to a property, using a named store IC. ++ // eax : value ++ // esp[0] : receiver ++ Property* prop = expr->target()->AsProperty(); ++ DCHECK(prop != NULL); ++ DCHECK(prop->key()->IsLiteral()); ++ ++ PopOperand(StoreDescriptor::ReceiverRegister()); ++ CallStoreIC(expr->AssignmentSlot(), prop->key()->AsLiteral()->value()); ++ context()->Plug(eax); ++} ++ ++ ++void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { ++ // Assignment to a property, using a keyed store IC. ++ // eax : value ++ // esp[0] : key ++ // esp[kPointerSize] : receiver ++ ++ PopOperand(StoreDescriptor::NameRegister()); // Key. ++ PopOperand(StoreDescriptor::ReceiverRegister()); ++ DCHECK(StoreDescriptor::ValueRegister().is(eax)); ++ CallKeyedStoreIC(expr->AssignmentSlot()); ++ context()->Plug(eax); ++} ++ ++// Code common for calls using the IC. ++void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { ++ Expression* callee = expr->expression(); ++ ++ // Get the target function. ++ ConvertReceiverMode convert_mode; ++ if (callee->IsVariableProxy()) { ++ { StackValueContext context(this); ++ EmitVariableLoad(callee->AsVariableProxy()); ++ } ++ // Push undefined as receiver. This is patched in the method prologue if it ++ // is a sloppy mode method. ++ PushOperand(isolate()->factory()->undefined_value()); ++ convert_mode = ConvertReceiverMode::kNullOrUndefined; ++ } else { ++ // Load the function from the receiver. ++ DCHECK(callee->IsProperty()); ++ DCHECK(!callee->AsProperty()->IsSuperAccess()); ++ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ EmitNamedPropertyLoad(callee->AsProperty()); ++ // Push the target function under the receiver. ++ PushOperand(Operand(esp, 0)); ++ __ mov(Operand(esp, kPointerSize), eax); ++ convert_mode = ConvertReceiverMode::kNotNullOrUndefined; ++ } ++ ++ EmitCall(expr, convert_mode); ++} ++ ++ ++// Code common for calls using the IC. ++void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, ++ Expression* key) { ++ // Load the key. ++ VisitForAccumulatorValue(key); ++ ++ Expression* callee = expr->expression(); ++ ++ // Load the function from the receiver. ++ DCHECK(callee->IsProperty()); ++ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ __ mov(LoadDescriptor::NameRegister(), eax); ++ EmitKeyedPropertyLoad(callee->AsProperty()); ++ ++ // Push the target function under the receiver. ++ PushOperand(Operand(esp, 0)); ++ __ mov(Operand(esp, kPointerSize), eax); ++ ++ EmitCall(expr, ConvertReceiverMode::kNotNullOrUndefined); ++} ++ ++ ++void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { ++ // Load the arguments. ++ ZoneList* args = expr->arguments(); ++ int arg_count = args->length(); ++ for (int i = 0; i < arg_count; i++) { ++ VisitForStackValue(args->at(i)); ++ } ++ ++ SetCallPosition(expr, expr->tail_call_mode()); ++ if (expr->tail_call_mode() == TailCallMode::kAllow) { ++ if (FLAG_trace) { ++ __ CallRuntime(Runtime::kTraceTailCall); ++ } ++ // Update profiling counters before the tail call since we will ++ // not return to this function. ++ EmitProfilingCounterHandlingForReturnSequence(true); ++ } ++ Handle code = ++ CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode()) ++ .code(); ++ __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); ++ __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); ++ __ Move(eax, Immediate(arg_count)); ++ CallIC(code); ++ OperandStackDepthDecrement(arg_count + 1); ++ ++ RestoreContext(); ++ context()->DropAndPlug(1, eax); ++} ++ ++void FullCodeGenerator::VisitCallNew(CallNew* expr) { ++ Comment cmnt(masm_, "[ CallNew"); ++ // According to ECMA-262, section 11.2.2, page 44, the function ++ // expression in new calls must be evaluated before the ++ // arguments. ++ ++ // Push constructor on the stack. If it's not a function it's used as ++ // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is ++ // ignored. ++ DCHECK(!expr->expression()->IsSuperPropertyReference()); ++ VisitForStackValue(expr->expression()); ++ ++ // Push the arguments ("left-to-right") on the stack. ++ ZoneList* args = expr->arguments(); ++ int arg_count = args->length(); ++ for (int i = 0; i < arg_count; i++) { ++ VisitForStackValue(args->at(i)); ++ } ++ ++ // Call the construct call builtin that handles allocation and ++ // constructor invocation. ++ SetConstructCallPosition(expr); ++ ++ // Load function and argument count into edi and eax. ++ __ Move(eax, Immediate(arg_count)); ++ __ mov(edi, Operand(esp, arg_count * kPointerSize)); ++ ++ // Record call targets in unoptimized code. ++ __ EmitLoadFeedbackVector(ebx); ++ __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); ++ ++ CallConstructStub stub(isolate()); ++ CallIC(stub.GetCode()); ++ OperandStackDepthDecrement(arg_count + 1); ++ RestoreContext(); ++ context()->Plug(eax); ++} ++ ++ ++void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ __ test(eax, Immediate(kSmiTagMask)); ++ Split(zero, if_true, if_false, fall_through); ++ ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::EmitIsJSReceiver(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ebx); ++ Split(above_equal, if_true, if_false, fall_through); ++ ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx); ++ Split(equal, if_true, if_false, fall_through); ++ ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, &if_true, ++ &if_false, &fall_through); ++ ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); ++ Split(equal, if_true, if_false, fall_through); ++ ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, &if_true, ++ &if_false, &fall_through); ++ ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); ++ Split(equal, if_true, if_false, fall_through); ++ ++ context()->Plug(if_true, if_false); ++} ++ ++void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 1); ++ Label done, null, function, non_function_constructor; ++ ++ VisitForAccumulatorValue(args->at(0)); ++ ++ // If the object is not a JSReceiver, we return null. ++ __ JumpIfSmi(eax, &null, Label::kNear); ++ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); ++ __ j(below, &null, Label::kNear); ++ ++ // Return 'Function' for JSFunction and JSBoundFunction objects. ++ __ CmpInstanceType(eax, FIRST_FUNCTION_TYPE); ++ STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); ++ __ j(above_equal, &function, Label::kNear); ++ ++ // Check if the constructor in the map is a JS function. ++ __ GetMapConstructor(eax, eax, ebx); ++ __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); ++ __ j(not_equal, &non_function_constructor, Label::kNear); ++ ++ // eax now contains the constructor function. Grab the ++ // instance class name from there. ++ __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); ++ __ jmp(&done, Label::kNear); ++ ++ // Non-JS objects have class null. ++ __ bind(&null); ++ __ mov(eax, isolate()->factory()->null_value()); ++ __ jmp(&done, Label::kNear); ++ ++ // Functions have class 'Function'. ++ __ bind(&function); ++ __ mov(eax, isolate()->factory()->Function_string()); ++ __ jmp(&done, Label::kNear); ++ ++ // Objects with a non-function constructor have class 'Object'. ++ __ bind(&non_function_constructor); ++ __ mov(eax, isolate()->factory()->Object_string()); ++ ++ // All done. ++ __ bind(&done); ++ ++ context()->Plug(eax); ++} ++ ++void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK(args->length() == 2); ++ ++ VisitForStackValue(args->at(0)); ++ VisitForAccumulatorValue(args->at(1)); ++ ++ Register object = ebx; ++ Register index = eax; ++ Register result = edx; ++ ++ PopOperand(object); ++ ++ Label need_conversion; ++ Label index_out_of_range; ++ Label done; ++ StringCharCodeAtGenerator generator(object, index, result, &need_conversion, ++ &need_conversion, &index_out_of_range); ++ generator.GenerateFast(masm_); ++ __ jmp(&done); ++ ++ __ bind(&index_out_of_range); ++ // When the index is out of range, the spec requires us to return ++ // NaN. ++ __ Move(result, Immediate(isolate()->factory()->nan_value())); ++ __ jmp(&done); ++ ++ __ bind(&need_conversion); ++ // Move the undefined value into the result register, which will ++ // trigger conversion. ++ __ Move(result, Immediate(isolate()->factory()->undefined_value())); ++ __ jmp(&done); ++ ++ NopRuntimeCallHelper call_helper; ++ generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); ++ ++ __ bind(&done); ++ context()->Plug(result); ++} ++ ++ ++void FullCodeGenerator::EmitCall(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK_LE(2, args->length()); ++ // Push target, receiver and arguments onto the stack. ++ for (Expression* const arg : *args) { ++ VisitForStackValue(arg); ++ } ++ // Move target to edi. ++ int const argc = args->length() - 2; ++ __ mov(edi, Operand(esp, (argc + 1) * kPointerSize)); ++ // Call the target. ++ __ mov(eax, Immediate(argc)); ++ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); ++ OperandStackDepthDecrement(argc + 1); ++ RestoreContext(); ++ // Discard the function left on TOS. ++ context()->DropAndPlug(1, eax); ++} ++ ++void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ DCHECK_EQ(1, args->length()); ++ VisitForAccumulatorValue(args->at(0)); ++ __ AssertFunction(eax); ++ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ mov(eax, FieldOperand(eax, Map::kPrototypeOffset)); ++ context()->Plug(eax); ++} ++ ++void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { ++ DCHECK(expr->arguments()->length() == 0); ++ ExternalReference debug_is_active = ++ ExternalReference::debug_is_active_address(isolate()); ++ __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); ++ __ SmiTag(eax); ++ context()->Plug(eax); ++} ++ ++ ++void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { ++ // Push function. ++ __ LoadGlobalFunction(expr->context_index(), eax); ++ PushOperand(eax); ++ ++ // Push undefined as receiver. ++ PushOperand(isolate()->factory()->undefined_value()); ++} ++ ++ ++void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { ++ ZoneList* args = expr->arguments(); ++ int arg_count = args->length(); ++ ++ SetCallPosition(expr); ++ __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); ++ __ Set(eax, arg_count); ++ __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined), ++ RelocInfo::CODE_TARGET); ++ OperandStackDepthDecrement(arg_count + 1); ++ RestoreContext(); ++} ++ ++ ++void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { ++ switch (expr->op()) { ++ case Token::DELETE: { ++ Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); ++ Property* property = expr->expression()->AsProperty(); ++ VariableProxy* proxy = expr->expression()->AsVariableProxy(); ++ ++ if (property != NULL) { ++ VisitForStackValue(property->obj()); ++ VisitForStackValue(property->key()); ++ PushOperand(Smi::FromInt(language_mode())); ++ CallRuntimeWithOperands(Runtime::kDeleteProperty); ++ context()->Plug(eax); ++ } else if (proxy != NULL) { ++ Variable* var = proxy->var(); ++ // Delete of an unqualified identifier is disallowed in strict mode but ++ // "delete this" is allowed. ++ bool is_this = var->is_this(); ++ DCHECK(is_sloppy(language_mode()) || is_this); ++ if (var->IsUnallocated()) { ++ __ mov(eax, NativeContextOperand()); ++ __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); ++ __ push(Immediate(var->name())); ++ __ Push(Smi::FromInt(SLOPPY)); ++ __ CallRuntime(Runtime::kDeleteProperty); ++ context()->Plug(eax); ++ } else { ++ DCHECK(!var->IsLookupSlot()); ++ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); ++ // Result of deleting non-global variables is false. 'this' is ++ // not really a variable, though we implement it as one. The ++ // subexpression does not have side effects. ++ context()->Plug(is_this); ++ } ++ } else { ++ // Result of deleting non-property, non-variable reference is true. ++ // The subexpression may have side effects. ++ VisitForEffect(expr->expression()); ++ context()->Plug(true); ++ } ++ break; ++ } ++ ++ case Token::VOID: { ++ Comment cmnt(masm_, "[ UnaryOperation (VOID)"); ++ VisitForEffect(expr->expression()); ++ context()->Plug(isolate()->factory()->undefined_value()); ++ break; ++ } ++ ++ case Token::NOT: { ++ Comment cmnt(masm_, "[ UnaryOperation (NOT)"); ++ if (context()->IsEffect()) { ++ // Unary NOT has no side effects so it's only necessary to visit the ++ // subexpression. Match the optimizing compiler by not branching. ++ VisitForEffect(expr->expression()); ++ } else if (context()->IsTest()) { ++ const TestContext* test = TestContext::cast(context()); ++ // The labels are swapped for the recursive call. ++ VisitForControl(expr->expression(), ++ test->false_label(), ++ test->true_label(), ++ test->fall_through()); ++ context()->Plug(test->true_label(), test->false_label()); ++ } else { ++ // We handle value contexts explicitly rather than simply visiting ++ // for control and plugging the control flow into the context, ++ // because we need to prepare a pair of extra administrative AST ids ++ // for the optimizing compiler. ++ DCHECK(context()->IsAccumulatorValue() || context()->IsStackValue()); ++ Label materialize_true, materialize_false, done; ++ VisitForControl(expr->expression(), ++ &materialize_false, ++ &materialize_true, ++ &materialize_true); ++ if (!context()->IsAccumulatorValue()) OperandStackDepthIncrement(1); ++ __ bind(&materialize_true); ++ if (context()->IsAccumulatorValue()) { ++ __ mov(eax, isolate()->factory()->true_value()); ++ } else { ++ __ Push(isolate()->factory()->true_value()); ++ } ++ __ jmp(&done, Label::kNear); ++ __ bind(&materialize_false); ++ if (context()->IsAccumulatorValue()) { ++ __ mov(eax, isolate()->factory()->false_value()); ++ } else { ++ __ Push(isolate()->factory()->false_value()); ++ } ++ __ bind(&done); ++ } ++ break; ++ } ++ ++ case Token::TYPEOF: { ++ Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); ++ { ++ AccumulatorValueContext context(this); ++ VisitForTypeofValue(expr->expression()); ++ } ++ __ mov(ebx, eax); ++ __ Call(isolate()->builtins()->Typeof(), RelocInfo::CODE_TARGET); ++ context()->Plug(eax); ++ break; ++ } ++ ++ default: ++ UNREACHABLE(); ++ } ++} ++ ++ ++void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ++ DCHECK(expr->expression()->IsValidReferenceExpressionOrThis()); ++ ++ Comment cmnt(masm_, "[ CountOperation"); ++ ++ Property* prop = expr->expression()->AsProperty(); ++ LhsKind assign_type = Property::GetAssignType(prop); ++ ++ // Evaluate expression and get value. ++ if (assign_type == VARIABLE) { ++ DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); ++ AccumulatorValueContext context(this); ++ EmitVariableLoad(expr->expression()->AsVariableProxy()); ++ } else { ++ // Reserve space for result of postfix operation. ++ if (expr->is_postfix() && !context()->IsEffect()) { ++ PushOperand(Smi::kZero); ++ } ++ switch (assign_type) { ++ case NAMED_PROPERTY: { ++ // Put the object both on the stack and in the register. ++ VisitForStackValue(prop->obj()); ++ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); ++ EmitNamedPropertyLoad(prop); ++ break; ++ } ++ ++ case KEYED_PROPERTY: { ++ VisitForStackValue(prop->obj()); ++ VisitForStackValue(prop->key()); ++ __ mov(LoadDescriptor::ReceiverRegister(), ++ Operand(esp, kPointerSize)); // Object. ++ __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); // Key. ++ EmitKeyedPropertyLoad(prop); ++ break; ++ } ++ ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ case VARIABLE: ++ UNREACHABLE(); ++ } ++ } ++ ++ // Convert old value into a number. ++ __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ ++ // Save result for postfix expressions. ++ if (expr->is_postfix()) { ++ if (!context()->IsEffect()) { ++ // Save the result on the stack. If we have a named or keyed property ++ // we store the result under the receiver that is currently on top ++ // of the stack. ++ switch (assign_type) { ++ case VARIABLE: ++ PushOperand(eax); ++ break; ++ case NAMED_PROPERTY: ++ __ mov(Operand(esp, kPointerSize), eax); ++ break; ++ case KEYED_PROPERTY: ++ __ mov(Operand(esp, 2 * kPointerSize), eax); ++ break; ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++ } ++ } ++ ++ SetExpressionPosition(expr); ++ ++ // Call stub for +1/-1. ++ __ mov(edx, eax); ++ __ mov(eax, Immediate(Smi::FromInt(1))); ++ Handle code = ++ CodeFactory::BinaryOperation(isolate(), expr->binary_op()).code(); ++ __ Call(code, RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ ++ // Store the value returned in eax. ++ switch (assign_type) { ++ case VARIABLE: { ++ VariableProxy* proxy = expr->expression()->AsVariableProxy(); ++ if (expr->is_postfix()) { ++ // Perform the assignment as if via '='. ++ { EffectContext context(this); ++ EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), ++ proxy->hole_check_mode()); ++ context.Plug(eax); ++ } ++ // For all contexts except EffectContext We have the result on ++ // top of the stack. ++ if (!context()->IsEffect()) { ++ context()->PlugTOS(); ++ } ++ } else { ++ // Perform the assignment as if via '='. ++ EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), ++ proxy->hole_check_mode()); ++ context()->Plug(eax); ++ } ++ break; ++ } ++ case NAMED_PROPERTY: { ++ PopOperand(StoreDescriptor::ReceiverRegister()); ++ CallStoreIC(expr->CountSlot(), prop->key()->AsLiteral()->value()); ++ if (expr->is_postfix()) { ++ if (!context()->IsEffect()) { ++ context()->PlugTOS(); ++ } ++ } else { ++ context()->Plug(eax); ++ } ++ break; ++ } ++ case KEYED_PROPERTY: { ++ PopOperand(StoreDescriptor::NameRegister()); ++ PopOperand(StoreDescriptor::ReceiverRegister()); ++ CallKeyedStoreIC(expr->CountSlot()); ++ if (expr->is_postfix()) { ++ // Result is on the stack ++ if (!context()->IsEffect()) { ++ context()->PlugTOS(); ++ } ++ } else { ++ context()->Plug(eax); ++ } ++ break; ++ } ++ case NAMED_SUPER_PROPERTY: ++ case KEYED_SUPER_PROPERTY: ++ UNREACHABLE(); ++ break; ++ } ++} ++ ++ ++void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, ++ Expression* sub_expr, ++ Handle check) { ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ { AccumulatorValueContext context(this); ++ VisitForTypeofValue(sub_expr); ++ } ++ ++ Factory* factory = isolate()->factory(); ++ if (String::Equals(check, factory->number_string())) { ++ __ JumpIfSmi(eax, if_true); ++ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), ++ isolate()->factory()->heap_number_map()); ++ Split(equal, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->string_string())) { ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); ++ Split(below, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->symbol_string())) { ++ __ JumpIfSmi(eax, if_false); ++ __ CmpObjectType(eax, SYMBOL_TYPE, edx); ++ Split(equal, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->boolean_string())) { ++ __ cmp(eax, isolate()->factory()->true_value()); ++ __ j(equal, if_true); ++ __ cmp(eax, isolate()->factory()->false_value()); ++ Split(equal, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->undefined_string())) { ++ __ cmp(eax, isolate()->factory()->null_value()); ++ __ j(equal, if_false); ++ __ JumpIfSmi(eax, if_false); ++ // Check for undetectable objects => true. ++ __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(edx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsUndetectable)); ++ Split(not_zero, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->function_string())) { ++ __ JumpIfSmi(eax, if_false); ++ // Check for callable and not undetectable objects => true. ++ __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ movzx_b(ecx, FieldOperand(edx, Map::kBitFieldOffset)); ++ __ and_(ecx, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)); ++ __ cmp(ecx, 1 << Map::kIsCallable); ++ Split(equal, if_true, if_false, fall_through); ++ } else if (String::Equals(check, factory->object_string())) { ++ __ JumpIfSmi(eax, if_false); ++ __ cmp(eax, isolate()->factory()->null_value()); ++ __ j(equal, if_true); ++ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, edx); ++ __ j(below, if_false); ++ // Check for callable or undetectable objects => false. ++ __ test_b(FieldOperand(edx, Map::kBitFieldOffset), ++ Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); ++ Split(zero, if_true, if_false, fall_through); ++ } else { ++ if (if_false != fall_through) __ jmp(if_false); ++ } ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { ++ Comment cmnt(masm_, "[ CompareOperation"); ++ ++ // First we try a fast inlined version of the compare when one of ++ // the operands is a literal. ++ if (TryLiteralCompare(expr)) return; ++ ++ // Always perform the comparison for its control flow. Pack the result ++ // into the expression's context after the comparison is performed. ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ Token::Value op = expr->op(); ++ VisitForStackValue(expr->left()); ++ switch (op) { ++ case Token::IN: ++ VisitForStackValue(expr->right()); ++ SetExpressionPosition(expr); ++ EmitHasProperty(); ++ __ cmp(eax, isolate()->factory()->true_value()); ++ Split(equal, if_true, if_false, fall_through); ++ break; ++ ++ case Token::INSTANCEOF: { ++ VisitForAccumulatorValue(expr->right()); ++ SetExpressionPosition(expr); ++ PopOperand(edx); ++ __ Call(isolate()->builtins()->InstanceOf(), RelocInfo::CODE_TARGET); ++ RestoreContext(); ++ __ cmp(eax, isolate()->factory()->true_value()); ++ Split(equal, if_true, if_false, fall_through); ++ break; ++ } ++ ++ default: { ++ VisitForAccumulatorValue(expr->right()); ++ SetExpressionPosition(expr); ++ Condition cc = CompareIC::ComputeCondition(op); ++ PopOperand(edx); ++ ++ bool inline_smi_code = ShouldInlineSmiCase(op); ++ JumpPatchSite patch_site(masm_); ++ if (inline_smi_code) { ++ Label slow_case; ++ __ mov(ecx, edx); ++ __ or_(ecx, eax); ++ patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); ++ __ cmp(edx, eax); ++ Split(cc, if_true, if_false, NULL); ++ __ bind(&slow_case); ++ } ++ ++ Handle ic = CodeFactory::CompareIC(isolate(), op).code(); ++ CallIC(ic); ++ patch_site.EmitPatchInfo(); ++ ++ __ test(eax, eax); ++ Split(cc, if_true, if_false, fall_through); ++ } ++ } ++ ++ // Convert the result of the comparison into one expected for this ++ // expression's context. ++ context()->Plug(if_true, if_false); ++} ++ ++ ++void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, ++ Expression* sub_expr, ++ NilValue nil) { ++ Label materialize_true, materialize_false; ++ Label* if_true = NULL; ++ Label* if_false = NULL; ++ Label* fall_through = NULL; ++ context()->PrepareTest(&materialize_true, &materialize_false, ++ &if_true, &if_false, &fall_through); ++ ++ VisitForAccumulatorValue(sub_expr); ++ ++ Handle nil_value = nil == kNullValue ++ ? isolate()->factory()->null_value() ++ : isolate()->factory()->undefined_value(); ++ if (expr->op() == Token::EQ_STRICT) { ++ __ cmp(eax, nil_value); ++ Split(equal, if_true, if_false, fall_through); ++ } else { ++ __ JumpIfSmi(eax, if_false); ++ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ test_b(FieldOperand(eax, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsUndetectable)); ++ Split(not_zero, if_true, if_false, fall_through); ++ } ++ context()->Plug(if_true, if_false); ++} ++ ++ ++Register FullCodeGenerator::result_register() { ++ return eax; ++} ++ ++ ++Register FullCodeGenerator::context_register() { ++ return esi; ++} ++ ++void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { ++ DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); ++ __ mov(value, Operand(ebp, frame_offset)); ++} ++ ++void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { ++ DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); ++ __ mov(Operand(ebp, frame_offset), value); ++} ++ ++ ++void FullCodeGenerator::LoadContextField(Register dst, int context_index) { ++ __ mov(dst, ContextOperand(esi, context_index)); ++} ++ ++ ++void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { ++ DeclarationScope* closure_scope = scope()->GetClosureScope(); ++ if (closure_scope->is_script_scope() || ++ closure_scope->is_module_scope()) { ++ // Contexts nested in the native context have a canonical empty function ++ // as their closure, not the anonymous closure containing the global ++ // code. ++ __ mov(eax, NativeContextOperand()); ++ PushOperand(ContextOperand(eax, Context::CLOSURE_INDEX)); ++ } else if (closure_scope->is_eval_scope()) { ++ // Contexts nested inside eval code have the same closure as the context ++ // calling eval, not the anonymous closure containing the eval code. ++ // Fetch it from the context. ++ PushOperand(ContextOperand(esi, Context::CLOSURE_INDEX)); ++ } else { ++ DCHECK(closure_scope->is_function_scope()); ++ PushOperand(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ } ++} ++ ++ ++#undef __ ++ ++ ++static const byte kJnsInstruction = 0x79; ++static const byte kJnsOffset = 0x11; ++static const byte kNopByteOne = 0x66; ++static const byte kNopByteTwo = 0x90; ++#ifdef DEBUG ++static const byte kCallInstruction = 0xe8; ++#endif ++ ++ ++void BackEdgeTable::PatchAt(Code* unoptimized_code, ++ Address pc, ++ BackEdgeState target_state, ++ Code* replacement_code) { ++ Address call_target_address = pc - kIntSize; ++ Address jns_instr_address = call_target_address - 3; ++ Address jns_offset_address = call_target_address - 2; ++ ++ switch (target_state) { ++ case INTERRUPT: ++ // sub , ;; Not changed ++ // jns ok ++ // call ++ // ok: ++ *jns_instr_address = kJnsInstruction; ++ *jns_offset_address = kJnsOffset; ++ break; ++ case ON_STACK_REPLACEMENT: ++ // sub , ;; Not changed ++ // nop ++ // nop ++ // call ++ // ok: ++ *jns_instr_address = kNopByteOne; ++ *jns_offset_address = kNopByteTwo; ++ break; ++ } ++ ++ Assembler::set_target_address_at(unoptimized_code->GetIsolate(), ++ call_target_address, unoptimized_code, ++ replacement_code->entry()); ++ unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch( ++ unoptimized_code, call_target_address, replacement_code); ++} ++ ++ ++BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState( ++ Isolate* isolate, ++ Code* unoptimized_code, ++ Address pc) { ++ Address call_target_address = pc - kIntSize; ++ Address jns_instr_address = call_target_address - 3; ++ DCHECK_EQ(kCallInstruction, *(call_target_address - 1)); ++ ++ if (*jns_instr_address == kJnsInstruction) { ++ DCHECK_EQ(kJnsOffset, *(call_target_address - 2)); ++ DCHECK_EQ(isolate->builtins()->InterruptCheck()->entry(), ++ Assembler::target_address_at(call_target_address, ++ unoptimized_code)); ++ return INTERRUPT; ++ } ++ ++ DCHECK_EQ(kNopByteOne, *jns_instr_address); ++ DCHECK_EQ(kNopByteTwo, *(call_target_address - 2)); ++ ++ DCHECK_EQ( ++ isolate->builtins()->OnStackReplacement()->entry(), ++ Assembler::target_address_at(call_target_address, unoptimized_code)); ++ return ON_STACK_REPLACEMENT; ++} ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 2017-12-25 17:42:57.211465705 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/gdb-jit.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/gdb-jit.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc 2017-12-25 17:42:57.213465676 +0100 +@@ -199,7 +199,7 @@ + struct MachOSectionHeader { + char sectname[16]; + char segname[16]; +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + uint32_t addr; + uint32_t size; + #else +@@ -507,7 +507,7 @@ + uint32_t cmd; + uint32_t cmdsize; + char segname[16]; +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + uint32_t vmaddr; + uint32_t vmsize; + uint32_t fileoff; +@@ -533,7 +533,7 @@ + Writer::Slot WriteHeader(Writer* w) { + DCHECK(w->position() == 0); + Writer::Slot header = w->CreateSlotHere(); +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + header->magic = 0xFEEDFACEu; + header->cputype = 7; // i386 + header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL +@@ -558,7 +558,7 @@ + uintptr_t code_size) { + Writer::Slot cmd = + w->CreateSlotHere(); +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + cmd->cmd = LC_SEGMENT_32; + #else + cmd->cmd = LC_SEGMENT_64; +@@ -646,7 +646,7 @@ + void WriteHeader(Writer* w) { + DCHECK(w->position() == 0); + Writer::Slot header = w->CreateSlotHere(); +-#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ ++#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \ + (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT)) + const uint8_t ident[16] = + { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +@@ -668,7 +668,7 @@ + #endif + memcpy(header->ident, ident, 16); + header->type = 1; +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + header->machine = 3; + #elif V8_TARGET_ARCH_X64 + // Processor identification value for x64 is 62 as defined in +@@ -783,8 +783,8 @@ + Binding binding() const { + return static_cast(info >> 4); + } +-#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ +- (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT) || \ ++#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \ ++ (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT) || \ + (V8_TARGET_ARCH_S390 && V8_TARGET_ARCH_32_BIT)) + struct SerializedLayout { + SerializedLayout(uint32_t name, +@@ -1146,7 +1146,7 @@ + w->Write(desc_->CodeStart() + desc_->CodeSize()); + Writer::Slot fb_block_size = w->CreateSlotHere(); + uintptr_t fb_block_start = w->position(); +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + w->Write(DW_OP_reg5); // The frame pointer's here on ia32 + #elif V8_TARGET_ARCH_X64 + w->Write(DW_OP_reg6); // and here on x64. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/globals.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/globals.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/globals.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/globals.h 2017-12-25 17:42:57.214465661 +0100 +@@ -167,7 +167,7 @@ + const int kPCOnStackSize = kRegisterSize; + const int kFPOnStackSize = kRegisterSize; + +-#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + const int kElidedFrameSlots = kPCOnStackSize / kPointerSize; + #else + const int kElidedFrameSlots = 0; +@@ -912,10 +912,16 @@ + }; + + // The mips architecture prior to revision 5 has inverted encoding for sNaN. ++// The x87 FPU convert the sNaN to qNaN automatically when loading sNaN from ++// memmory. ++// Use mips sNaN which is a not used qNaN in x87 port as sNaN to workaround this ++// issue ++// for some test cases. + #if (V8_TARGET_ARCH_MIPS && !defined(_MIPS_ARCH_MIPS32R6) && \ + (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) || \ + (V8_TARGET_ARCH_MIPS64 && !defined(_MIPS_ARCH_MIPS64R6) && \ +- (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) ++ (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) || \ ++ (V8_TARGET_ARCH_X87) + const uint32_t kHoleNanUpper32 = 0xFFFF7FFF; + const uint32_t kHoleNanLower32 = 0xFFFF7FFF; + #else +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 2017-12-25 17:42:57.214465661 +0100 +@@ -0,0 +1,40 @@ ++// Copyright 2014 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/ic/access-compiler.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm) ++ ++void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ++ Handle code) { ++ __ jmp(code, RelocInfo::CODE_TARGET); ++} ++ ++void PropertyAccessCompiler::InitializePlatformSpecific( ++ AccessCompilerData* data) { ++ Register receiver = LoadDescriptor::ReceiverRegister(); ++ Register name = LoadDescriptor::NameRegister(); ++ ++ // Load calling convention. ++ // receiver, name, scratch1, scratch2, scratch3. ++ Register load_registers[] = {receiver, name, ebx, eax, edi}; ++ ++ // Store calling convention. ++ // receiver, name, scratch1, scratch2. ++ Register store_registers[] = {receiver, name, ebx, edi}; ++ ++ data->Initialize(arraysize(load_registers), load_registers, ++ arraysize(store_registers), store_registers); ++} ++ ++#undef __ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2017-12-25 17:42:57.215465646 +0100 +@@ -0,0 +1,450 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/ic/handler-compiler.h" ++ ++#include "src/api-arguments.h" ++#include "src/field-type.h" ++#include "src/ic/call-optimization.h" ++#include "src/ic/ic.h" ++#include "src/isolate-inl.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm) ++ ++void NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt( ++ MacroAssembler* masm) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // If we generate a global code snippet for deoptimization only, remember ++ // the place to continue after deoptimization. ++ masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); ++ // Restore context register. ++ __ pop(esi); ++ } ++ __ ret(0); ++} ++ ++ ++void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, ++ Register slot) { ++ MacroAssembler* masm = this->masm(); ++ STATIC_ASSERT(LoadWithVectorDescriptor::kSlot < ++ LoadWithVectorDescriptor::kVector); ++ STATIC_ASSERT(StoreWithVectorDescriptor::kSlot < ++ StoreWithVectorDescriptor::kVector); ++ STATIC_ASSERT(StoreTransitionDescriptor::kSlot < ++ StoreTransitionDescriptor::kVector); ++ __ push(slot); ++ __ push(vector); ++} ++ ++ ++void PropertyHandlerCompiler::PopVectorAndSlot(Register vector, Register slot) { ++ MacroAssembler* masm = this->masm(); ++ __ pop(vector); ++ __ pop(slot); ++} ++ ++ ++void PropertyHandlerCompiler::DiscardVectorAndSlot() { ++ MacroAssembler* masm = this->masm(); ++ // Remove vector and slot. ++ __ add(esp, Immediate(2 * kPointerSize)); ++} ++ ++void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( ++ MacroAssembler* masm, Label* miss_label, Register receiver, ++ Handle name, Register scratch0, Register scratch1) { ++ DCHECK(name->IsUniqueName()); ++ DCHECK(!receiver.is(scratch0)); ++ Counters* counters = masm->isolate()->counters(); ++ __ IncrementCounter(counters->negative_lookups(), 1); ++ __ IncrementCounter(counters->negative_lookups_miss(), 1); ++ ++ __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); ++ ++ const int kInterceptorOrAccessCheckNeededMask = ++ (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); ++ ++ // Bail out if the receiver has a named interceptor or requires access checks. ++ __ test_b(FieldOperand(scratch0, Map::kBitFieldOffset), ++ Immediate(kInterceptorOrAccessCheckNeededMask)); ++ __ j(not_zero, miss_label); ++ ++ // Check that receiver is a JSObject. ++ __ CmpInstanceType(scratch0, FIRST_JS_RECEIVER_TYPE); ++ __ j(below, miss_label); ++ ++ // Load properties array. ++ Register properties = scratch0; ++ __ mov(properties, FieldOperand(receiver, JSObject::kPropertiesOrHashOffset)); ++ ++ // Check that the properties array is a dictionary. ++ __ cmp(FieldOperand(properties, HeapObject::kMapOffset), ++ Immediate(masm->isolate()->factory()->hash_table_map())); ++ __ j(not_equal, miss_label); ++ ++ Label done; ++ NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, ++ properties, name, scratch1); ++ __ bind(&done); ++ __ DecrementCounter(counters->negative_lookups_miss(), 1); ++} ++ ++// Generate call to api function. ++// This function uses push() to generate smaller, faster code than ++// the version above. It is an optimization that should will be removed ++// when api call ICs are generated in hydrogen. ++void PropertyHandlerCompiler::GenerateApiAccessorCall( ++ MacroAssembler* masm, const CallOptimization& optimization, ++ Handle receiver_map, Register receiver, Register scratch, ++ bool is_store, Register store_parameter, Register accessor_holder, ++ int accessor_index) { ++ DCHECK(!accessor_holder.is(scratch)); ++ // Copy return value. ++ __ pop(scratch); ++ ++ if (is_store) { ++ // Discard stack arguments. ++ __ add(esp, Immediate(StoreWithVectorDescriptor::kStackArgumentsCount * ++ kPointerSize)); ++ } ++ // Write the receiver and arguments to stack frame. ++ __ push(receiver); ++ if (is_store) { ++ DCHECK(!AreAliased(receiver, scratch, store_parameter)); ++ __ push(store_parameter); ++ } ++ __ push(scratch); ++ // Stack now matches JSFunction abi. ++ DCHECK(optimization.is_simple_api_call()); ++ ++ // Abi for CallApiCallbackStub. ++ Register callee = edi; ++ Register data = ebx; ++ Register holder = ecx; ++ Register api_function_address = edx; ++ scratch = no_reg; ++ ++ // Put callee in place. ++ __ LoadAccessor(callee, accessor_holder, accessor_index, ++ is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); ++ ++ // Put holder in place. ++ CallOptimization::HolderLookup holder_lookup; ++ optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); ++ switch (holder_lookup) { ++ case CallOptimization::kHolderIsReceiver: ++ __ Move(holder, receiver); ++ break; ++ case CallOptimization::kHolderFound: ++ __ mov(holder, FieldOperand(receiver, HeapObject::kMapOffset)); ++ __ mov(holder, FieldOperand(holder, Map::kPrototypeOffset)); ++ break; ++ case CallOptimization::kHolderNotFound: ++ UNREACHABLE(); ++ break; ++ } ++ ++ Isolate* isolate = masm->isolate(); ++ Handle api_call_info = optimization.api_call_info(); ++ bool call_data_undefined = false; ++ // Put call data in place. ++ if (api_call_info->data()->IsUndefined(isolate)) { ++ call_data_undefined = true; ++ __ mov(data, Immediate(isolate->factory()->undefined_value())); ++ } else { ++ if (optimization.is_constant_call()) { ++ __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); ++ __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); ++ } else { ++ __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); ++ } ++ __ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset)); ++ } ++ ++ // Put api_function_address in place. ++ Address function_address = v8::ToCData
(api_call_info->callback()); ++ __ mov(api_function_address, Immediate(function_address)); ++ ++ // Jump to stub. ++ CallApiCallbackStub stub(isolate, is_store, call_data_undefined, ++ !optimization.is_constant_call()); ++ __ TailCallStub(&stub); ++} ++ ++ ++// Generate code to check that a global property cell is empty. Create ++// the property cell at compilation time if no cell exists for the ++// property. ++void PropertyHandlerCompiler::GenerateCheckPropertyCell( ++ MacroAssembler* masm, Handle global, Handle name, ++ Register scratch, Label* miss) { ++ Handle cell = JSGlobalObject::EnsureEmptyPropertyCell( ++ global, name, PropertyCellType::kInvalidated); ++ Isolate* isolate = masm->isolate(); ++ DCHECK(cell->value()->IsTheHole(isolate)); ++ Handle weak_cell = isolate->factory()->NewWeakCell(cell); ++ __ LoadWeakValue(scratch, weak_cell, miss); ++ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), ++ Immediate(isolate->factory()->the_hole_value())); ++ __ j(not_equal, miss); ++} ++ ++ ++void NamedStoreHandlerCompiler::GenerateStoreViaSetter( ++ MacroAssembler* masm, Handle map, Register receiver, Register holder, ++ int accessor_index, int expected_arguments, Register scratch) { ++ // ----------- S t a t e ------------- ++ // -- esp[12] : value ++ // -- esp[8] : slot ++ // -- esp[4] : vector ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ LoadParameterFromStack(value(), Descriptor::kValue); ++ ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Save context register ++ __ push(esi); ++ // Save value register, so we can restore it later. ++ __ push(value()); ++ ++ if (accessor_index >= 0) { ++ DCHECK(!holder.is(scratch)); ++ DCHECK(!receiver.is(scratch)); ++ DCHECK(!value().is(scratch)); ++ // Call the JavaScript setter with receiver and value on the stack. ++ if (map->IsJSGlobalObjectMap()) { ++ __ mov(scratch, ++ FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); ++ receiver = scratch; ++ } ++ __ push(receiver); ++ __ push(value()); ++ __ LoadAccessor(edi, holder, accessor_index, ACCESSOR_SETTER); ++ __ Set(eax, 1); ++ __ Call(masm->isolate()->builtins()->CallFunction( ++ ConvertReceiverMode::kNotNullOrUndefined), ++ RelocInfo::CODE_TARGET); ++ } else { ++ // If we generate a global code snippet for deoptimization only, remember ++ // the place to continue after deoptimization. ++ masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); ++ } ++ ++ // We have to return the passed value, not the return value of the setter. ++ __ pop(eax); ++ // Restore context register. ++ __ pop(esi); ++ } ++ if (accessor_index >= 0) { ++ __ ret(StoreWithVectorDescriptor::kStackArgumentsCount * kPointerSize); ++ } else { ++ // If we generate a global code snippet for deoptimization only, don't try ++ // to drop stack arguments for the StoreIC because they are not a part of ++ // expression stack and deoptimizer does not reconstruct them. ++ __ ret(0); ++ } ++} ++ ++#undef __ ++#define __ ACCESS_MASM(masm()) ++ ++ ++void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, ++ Handle name) { ++ if (!label->is_unused()) { ++ __ bind(label); ++ __ mov(this->name(), Immediate(name)); ++ } ++} ++ ++void PropertyHandlerCompiler::GenerateAccessCheck( ++ Handle native_context_cell, Register scratch1, Register scratch2, ++ Label* miss, bool compare_native_contexts_only) { ++ Label done; ++ // Load current native context. ++ __ mov(scratch1, NativeContextOperand()); ++ // Load expected native context. ++ __ LoadWeakValue(scratch2, native_context_cell, miss); ++ __ cmp(scratch1, scratch2); ++ ++ if (!compare_native_contexts_only) { ++ __ j(equal, &done); ++ ++ // Compare security tokens of current and expected native contexts. ++ __ mov(scratch1, ContextOperand(scratch1, Context::SECURITY_TOKEN_INDEX)); ++ __ mov(scratch2, ContextOperand(scratch2, Context::SECURITY_TOKEN_INDEX)); ++ __ cmp(scratch1, scratch2); ++ } ++ __ j(not_equal, miss); ++ ++ __ bind(&done); ++} ++ ++Register PropertyHandlerCompiler::CheckPrototypes( ++ Register object_reg, Register holder_reg, Register scratch1, ++ Register scratch2, Handle name, Label* miss) { ++ Handle receiver_map = map(); ++ ++ // Make sure there's no overlap between holder and object registers. ++ DCHECK(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); ++ DCHECK(!scratch2.is(object_reg) && !scratch2.is(holder_reg) && ++ !scratch2.is(scratch1)); ++ ++ Handle validity_cell = ++ Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); ++ if (!validity_cell.is_null()) { ++ DCHECK_EQ(Smi::FromInt(Map::kPrototypeChainValid), validity_cell->value()); ++ // Operand::ForCell(...) points to the cell's payload! ++ __ cmp(Operand::ForCell(validity_cell), ++ Immediate(Smi::FromInt(Map::kPrototypeChainValid))); ++ __ j(not_equal, miss); ++ } ++ ++ // Keep track of the current object in register reg. ++ Register reg = object_reg; ++ int depth = 0; ++ ++ Handle current = Handle::null(); ++ if (receiver_map->IsJSGlobalObjectMap()) { ++ current = isolate()->global_object(); ++ } ++ ++ Handle current_map(receiver_map->GetPrototypeChainRootMap(isolate()), ++ isolate()); ++ Handle holder_map(holder()->map()); ++ // Traverse the prototype chain and check the maps in the prototype chain for ++ // fast and global objects or do negative lookup for normal objects. ++ while (!current_map.is_identical_to(holder_map)) { ++ ++depth; ++ ++ if (current_map->IsJSGlobalObjectMap()) { ++ GenerateCheckPropertyCell(masm(), Handle::cast(current), ++ name, scratch2, miss); ++ } else if (current_map->is_dictionary_map()) { ++ DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. ++ DCHECK(name->IsUniqueName()); ++ DCHECK(current.is_null() || ++ current->property_dictionary()->FindEntry(name) == ++ NameDictionary::kNotFound); ++ ++ if (depth > 1) { ++ Handle weak_cell = ++ Map::GetOrCreatePrototypeWeakCell(current, isolate()); ++ __ LoadWeakValue(reg, weak_cell, miss); ++ } ++ GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, ++ scratch2); ++ } ++ ++ reg = holder_reg; // From now on the object will be in holder_reg. ++ // Go to the next object in the prototype chain. ++ current = handle(JSObject::cast(current_map->prototype())); ++ current_map = handle(current->map()); ++ } ++ ++ DCHECK(!current_map->IsJSGlobalProxyMap()); ++ ++ // Log the check depth. ++ LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); ++ ++ if (depth != 0) { ++ Handle weak_cell = ++ Map::GetOrCreatePrototypeWeakCell(current, isolate()); ++ __ LoadWeakValue(reg, weak_cell, miss); ++ } ++ ++ // Return the register containing the holder. ++ return reg; ++} ++ ++ ++void NamedLoadHandlerCompiler::FrontendFooter(Handle name, Label* miss) { ++ if (!miss->is_unused()) { ++ Label success; ++ __ jmp(&success); ++ __ bind(miss); ++ if (IC::ShouldPushPopSlotAndVector(kind())) { ++ DCHECK(kind() == Code::LOAD_IC); ++ PopVectorAndSlot(); ++ } ++ TailCallBuiltin(masm(), MissBuiltin(kind())); ++ __ bind(&success); ++ } ++} ++ ++ ++void NamedStoreHandlerCompiler::FrontendFooter(Handle name, Label* miss) { ++ if (!miss->is_unused()) { ++ Label success; ++ __ jmp(&success); ++ GenerateRestoreName(miss, name); ++ DCHECK(!IC::ShouldPushPopSlotAndVector(kind())); ++ TailCallBuiltin(masm(), MissBuiltin(kind())); ++ __ bind(&success); ++ } ++} ++ ++void NamedStoreHandlerCompiler::ZapStackArgumentsRegisterAliases() { ++ // Zap register aliases of the arguments passed on the stack to ensure they ++ // are properly loaded by the handler (debug-only). ++ STATIC_ASSERT(Descriptor::kPassLastArgsOnStack); ++ STATIC_ASSERT(Descriptor::kStackArgumentsCount == 3); ++ __ mov(Descriptor::ValueRegister(), Immediate(kDebugZapValue)); ++ __ mov(Descriptor::SlotRegister(), Immediate(kDebugZapValue)); ++ __ mov(Descriptor::VectorRegister(), Immediate(kDebugZapValue)); ++} ++ ++Handle NamedStoreHandlerCompiler::CompileStoreCallback( ++ Handle object, Handle name, Handle callback, ++ LanguageMode language_mode) { ++ Register holder_reg = Frontend(name); ++ __ LoadParameterFromStack(value(), Descriptor::kValue); ++ ++ __ pop(scratch1()); // remove the return address ++ // Discard stack arguments. ++ __ add(esp, Immediate(StoreWithVectorDescriptor::kStackArgumentsCount * ++ kPointerSize)); ++ __ push(receiver()); ++ __ push(holder_reg); ++ // If the callback cannot leak, then push the callback directly, ++ // otherwise wrap it in a weak cell. ++ if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { ++ __ Push(callback); ++ } else { ++ Handle cell = isolate()->factory()->NewWeakCell(callback); ++ __ Push(cell); ++ } ++ __ Push(name); ++ __ push(value()); ++ __ push(Immediate(Smi::FromInt(language_mode))); ++ __ push(scratch1()); // restore return address ++ ++ // Do tail-call to the runtime system. ++ __ TailCallRuntime(Runtime::kStoreCallbackProperty); ++ ++ // Return the generated code. ++ return GetCode(kind(), name); ++} ++ ++ ++Register NamedStoreHandlerCompiler::value() { ++ return StoreDescriptor::ValueRegister(); ++} ++ ++ ++#undef __ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 2017-12-25 17:42:57.215465646 +0100 +@@ -0,0 +1,84 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/codegen.h" ++#include "src/ic/ic.h" ++#include "src/ic/stub-cache.h" ++ ++namespace v8 { ++namespace internal { ++ ++ ++Condition CompareIC::ComputeCondition(Token::Value op) { ++ switch (op) { ++ case Token::EQ_STRICT: ++ case Token::EQ: ++ return equal; ++ case Token::LT: ++ return less; ++ case Token::GT: ++ return greater; ++ case Token::LTE: ++ return less_equal; ++ case Token::GTE: ++ return greater_equal; ++ default: ++ UNREACHABLE(); ++ } ++} ++ ++ ++bool CompareIC::HasInlinedSmiCode(Address address) { ++ // The address of the instruction following the call. ++ Address test_instruction_address = ++ address + Assembler::kCallTargetAddressOffset; ++ ++ // If the instruction following the call is not a test al, nothing ++ // was inlined. ++ return *test_instruction_address == Assembler::kTestAlByte; ++} ++ ++ ++void PatchInlinedSmiCode(Isolate* isolate, Address address, ++ InlinedSmiCheck check) { ++ // The address of the instruction following the call. ++ Address test_instruction_address = ++ address + Assembler::kCallTargetAddressOffset; ++ ++ // If the instruction following the call is not a test al, nothing ++ // was inlined. ++ if (*test_instruction_address != Assembler::kTestAlByte) { ++ DCHECK(*test_instruction_address == Assembler::kNopByte); ++ return; ++ } ++ ++ Address delta_address = test_instruction_address + 1; ++ // The delta to the start of the map check instruction and the ++ // condition code uses at the patched jump. ++ uint8_t delta = *reinterpret_cast(delta_address); ++ if (FLAG_trace_ic) { ++ LOG(isolate, PatchIC(address, test_instruction_address, delta)); ++ } ++ ++ // Patch with a short conditional jump. Enabling means switching from a short ++ // jump-if-carry/not-carry to jump-if-zero/not-zero, whereas disabling is the ++ // reverse operation of that. ++ Address jmp_address = test_instruction_address - delta; ++ DCHECK((check == ENABLE_INLINED_SMI_CHECK) ++ ? (*jmp_address == Assembler::kJncShortOpcode || ++ *jmp_address == Assembler::kJcShortOpcode) ++ : (*jmp_address == Assembler::kJnzShortOpcode || ++ *jmp_address == Assembler::kJzShortOpcode)); ++ Condition cc = ++ (check == ENABLE_INLINED_SMI_CHECK) ++ ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) ++ : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); ++ *jmp_address = static_cast(Assembler::kJccShortPrefix | cc); ++} ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 2017-12-25 17:42:57.214465661 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-12-25 13:05:24.029939435 +0100 +@@ -106,7 +106,7 @@ + "/wd4996", # Deprecated function call. + ] + } +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + defines = [ "BUILDING_V8_SHARED" ] + } + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interface-descriptors.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interface-descriptors.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h 2017-12-25 17:42:57.215465646 +0100 +@@ -392,7 +392,7 @@ + static const Register ValueRegister(); + static const Register SlotRegister(); + +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + static const bool kPassLastArgsOnStack = true; + #else + static const bool kPassLastArgsOnStack = false; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2017-12-25 17:42:57.215465646 +0100 +@@ -1367,8 +1367,9 @@ + bool InterpreterAssembler::TargetSupportsUnalignedAccess() { + #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 + return false; +-#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \ +- V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC ++#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X87 || \ ++ V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || \ ++ V8_TARGET_ARCH_PPC + return true; + #else + #error "Unknown Architecture" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/log.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/log.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/log.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/log.cc 2017-12-25 17:42:57.216465632 +0100 +@@ -370,6 +370,8 @@ + const char arch[] = "ppc"; + #elif V8_TARGET_ARCH_MIPS + const char arch[] = "mips"; ++#elif V8_TARGET_ARCH_X87 ++ const char arch[] = "x87"; + #elif V8_TARGET_ARCH_ARM64 + const char arch[] = "arm64"; + #elif V8_TARGET_ARCH_S390 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/macro-assembler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/macro-assembler.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h 2017-12-25 17:42:57.216465632 +0100 +@@ -52,6 +52,8 @@ + #elif V8_TARGET_ARCH_S390 + #include "src/s390/constants-s390.h" + #include "src/s390/macro-assembler-s390.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/macro-assembler-x87.h" + #else + #error Unsupported target architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2017-12-25 17:42:57.217465617 +0100 +@@ -48,6 +48,8 @@ + #include "src/regexp/mips/regexp-macro-assembler-mips.h" + #elif V8_TARGET_ARCH_MIPS64 + #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/regexp/x87/regexp-macro-assembler-x87.h" + #else + #error Unsupported target architecture. + #endif +@@ -6760,6 +6762,9 @@ + #elif V8_TARGET_ARCH_MIPS64 + RegExpMacroAssemblerMIPS macro_assembler(isolate, zone, mode, + (data->capture_count + 1) * 2); ++#elif V8_TARGET_ARCH_X87 ++ RegExpMacroAssemblerX87 macro_assembler(isolate, zone, mode, ++ (data->capture_count + 1) * 2); + #else + #error "Unsupported architecture" + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 2017-12-25 17:42:57.217465617 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2017-12-25 17:42:57.217465617 +0100 +@@ -0,0 +1,1273 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/regexp/x87/regexp-macro-assembler-x87.h" ++ ++#include "src/log.h" ++#include "src/macro-assembler.h" ++#include "src/regexp/regexp-macro-assembler.h" ++#include "src/regexp/regexp-stack.h" ++#include "src/unicode.h" ++ ++namespace v8 { ++namespace internal { ++ ++#ifndef V8_INTERPRETED_REGEXP ++/* ++ * This assembler uses the following register assignment convention ++ * - edx : Current character. Must be loaded using LoadCurrentCharacter ++ * before using any of the dispatch methods. Temporarily stores the ++ * index of capture start after a matching pass for a global regexp. ++ * - edi : Current position in input, as negative offset from end of string. ++ * Please notice that this is the byte offset, not the character offset! ++ * - esi : end of input (points to byte after last character in input). ++ * - ebp : Frame pointer. Used to access arguments, local variables and ++ * RegExp registers. ++ * - esp : Points to tip of C stack. ++ * - ecx : Points to tip of backtrack stack ++ * ++ * The registers eax and ebx are free to use for computations. ++ * ++ * Each call to a public method should retain this convention. ++ * The stack will have the following structure: ++ * - Isolate* isolate (address of the current isolate) ++ * - direct_call (if 1, direct call from JavaScript code, if 0 ++ * call through the runtime system) ++ * - stack_area_base (high end of the memory area to use as ++ * backtracking stack) ++ * - capture array size (may fit multiple sets of matches) ++ * - int* capture_array (int[num_saved_registers_], for output). ++ * - end of input (address of end of string) ++ * - start of input (address of first character in string) ++ * - start index (character index of start) ++ * - String* input_string (location of a handle containing the string) ++ * --- frame alignment (if applicable) --- ++ * - return address ++ * ebp-> - old ebp ++ * - backup of caller esi ++ * - backup of caller edi ++ * - backup of caller ebx ++ * - success counter (only for global regexps to count matches). ++ * - Offset of location before start of input (effectively character ++ * string start - 1). Used to initialize capture registers to a ++ * non-position. ++ * - register 0 ebp[-4] (only positions must be stored in the first ++ * - register 1 ebp[-8] num_saved_registers_ registers) ++ * - ... ++ * ++ * The first num_saved_registers_ registers are initialized to point to ++ * "character -1" in the string (i.e., char_size() bytes before the first ++ * character of the string). The remaining registers starts out as garbage. ++ * ++ * The data up to the return address must be placed there by the calling ++ * code, by calling the code entry as cast to a function with the signature: ++ * int (*match)(String* input_string, ++ * int start_index, ++ * Address start, ++ * Address end, ++ * int* capture_output_array, ++ * int num_capture_registers, ++ * byte* stack_area_base, ++ * bool direct_call = false, ++ * Isolate* isolate); ++ */ ++ ++#define __ ACCESS_MASM(masm_) ++ ++RegExpMacroAssemblerX87::RegExpMacroAssemblerX87(Isolate* isolate, Zone* zone, ++ Mode mode, ++ int registers_to_save) ++ : NativeRegExpMacroAssembler(isolate, zone), ++ masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize, ++ CodeObjectRequired::kYes)), ++ mode_(mode), ++ num_registers_(registers_to_save), ++ num_saved_registers_(registers_to_save), ++ entry_label_(), ++ start_label_(), ++ success_label_(), ++ backtrack_label_(), ++ exit_label_() { ++ DCHECK_EQ(0, registers_to_save % 2); ++ __ jmp(&entry_label_); // We'll write the entry code later. ++ __ bind(&start_label_); // And then continue from here. ++} ++ ++ ++RegExpMacroAssemblerX87::~RegExpMacroAssemblerX87() { ++ delete masm_; ++ // Unuse labels in case we throw away the assembler without calling GetCode. ++ entry_label_.Unuse(); ++ start_label_.Unuse(); ++ success_label_.Unuse(); ++ backtrack_label_.Unuse(); ++ exit_label_.Unuse(); ++ check_preempt_label_.Unuse(); ++ stack_overflow_label_.Unuse(); ++} ++ ++ ++int RegExpMacroAssemblerX87::stack_limit_slack() { ++ return RegExpStack::kStackLimitSlack; ++} ++ ++ ++void RegExpMacroAssemblerX87::AdvanceCurrentPosition(int by) { ++ if (by != 0) { ++ __ add(edi, Immediate(by * char_size())); ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::AdvanceRegister(int reg, int by) { ++ DCHECK(reg >= 0); ++ DCHECK(reg < num_registers_); ++ if (by != 0) { ++ __ add(register_location(reg), Immediate(by)); ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::Backtrack() { ++ CheckPreemption(); ++ // Pop Code* offset from backtrack stack, add Code* and jump to location. ++ Pop(ebx); ++ __ add(ebx, Immediate(masm_->CodeObject())); ++ __ jmp(ebx); ++} ++ ++ ++void RegExpMacroAssemblerX87::Bind(Label* label) { ++ __ bind(label); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacter(uint32_t c, Label* on_equal) { ++ __ cmp(current_character(), c); ++ BranchOrBacktrack(equal, on_equal); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacterGT(uc16 limit, Label* on_greater) { ++ __ cmp(current_character(), limit); ++ BranchOrBacktrack(greater, on_greater); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckAtStart(Label* on_at_start) { ++ __ lea(eax, Operand(edi, -char_size())); ++ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); ++ BranchOrBacktrack(equal, on_at_start); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckNotAtStart(int cp_offset, ++ Label* on_not_at_start) { ++ __ lea(eax, Operand(edi, -char_size() + cp_offset * char_size())); ++ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); ++ BranchOrBacktrack(not_equal, on_not_at_start); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacterLT(uc16 limit, Label* on_less) { ++ __ cmp(current_character(), limit); ++ BranchOrBacktrack(less, on_less); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckGreedyLoop(Label* on_equal) { ++ Label fallthrough; ++ __ cmp(edi, Operand(backtrack_stackpointer(), 0)); ++ __ j(not_equal, &fallthrough); ++ __ add(backtrack_stackpointer(), Immediate(kPointerSize)); // Pop. ++ BranchOrBacktrack(no_condition, on_equal); ++ __ bind(&fallthrough); ++} ++ ++void RegExpMacroAssemblerX87::CheckNotBackReferenceIgnoreCase( ++ int start_reg, bool read_backward, bool unicode, Label* on_no_match) { ++ Label fallthrough; ++ __ mov(edx, register_location(start_reg)); // Index of start of capture ++ __ mov(ebx, register_location(start_reg + 1)); // Index of end of capture ++ __ sub(ebx, edx); // Length of capture. ++ ++ // At this point, the capture registers are either both set or both cleared. ++ // If the capture length is zero, then the capture is either empty or cleared. ++ // Fall through in both cases. ++ __ j(equal, &fallthrough); ++ ++ // Check that there are sufficient characters left in the input. ++ if (read_backward) { ++ __ mov(eax, Operand(ebp, kStringStartMinusOne)); ++ __ add(eax, ebx); ++ __ cmp(edi, eax); ++ BranchOrBacktrack(less_equal, on_no_match); ++ } else { ++ __ mov(eax, edi); ++ __ add(eax, ebx); ++ BranchOrBacktrack(greater, on_no_match); ++ } ++ ++ if (mode_ == LATIN1) { ++ Label success; ++ Label fail; ++ Label loop_increment; ++ // Save register contents to make the registers available below. ++ __ push(edi); ++ __ push(backtrack_stackpointer()); ++ // After this, the eax, ecx, and edi registers are available. ++ ++ __ add(edx, esi); // Start of capture ++ __ add(edi, esi); // Start of text to match against capture. ++ if (read_backward) { ++ __ sub(edi, ebx); // Offset by length when matching backwards. ++ } ++ __ add(ebx, edi); // End of text to match against capture. ++ ++ Label loop; ++ __ bind(&loop); ++ __ movzx_b(eax, Operand(edi, 0)); ++ __ cmpb_al(Operand(edx, 0)); ++ __ j(equal, &loop_increment); ++ ++ // Mismatch, try case-insensitive match (converting letters to lower-case). ++ __ or_(eax, 0x20); // Convert match character to lower-case. ++ __ lea(ecx, Operand(eax, -'a')); ++ __ cmp(ecx, static_cast('z' - 'a')); // Is eax a lowercase letter? ++ Label convert_capture; ++ __ j(below_equal, &convert_capture); // In range 'a'-'z'. ++ // Latin-1: Check for values in range [224,254] but not 247. ++ __ sub(ecx, Immediate(224 - 'a')); ++ __ cmp(ecx, Immediate(254 - 224)); ++ __ j(above, &fail); // Weren't Latin-1 letters. ++ __ cmp(ecx, Immediate(247 - 224)); // Check for 247. ++ __ j(equal, &fail); ++ __ bind(&convert_capture); ++ // Also convert capture character. ++ __ movzx_b(ecx, Operand(edx, 0)); ++ __ or_(ecx, 0x20); ++ ++ __ cmp(eax, ecx); ++ __ j(not_equal, &fail); ++ ++ __ bind(&loop_increment); ++ // Increment pointers into match and capture strings. ++ __ add(edx, Immediate(1)); ++ __ add(edi, Immediate(1)); ++ // Compare to end of match, and loop if not done. ++ __ cmp(edi, ebx); ++ __ j(below, &loop); ++ __ jmp(&success); ++ ++ __ bind(&fail); ++ // Restore original values before failing. ++ __ pop(backtrack_stackpointer()); ++ __ pop(edi); ++ BranchOrBacktrack(no_condition, on_no_match); ++ ++ __ bind(&success); ++ // Restore original value before continuing. ++ __ pop(backtrack_stackpointer()); ++ // Drop original value of character position. ++ __ add(esp, Immediate(kPointerSize)); ++ // Compute new value of character position after the matched part. ++ __ sub(edi, esi); ++ if (read_backward) { ++ // Subtract match length if we matched backward. ++ __ add(edi, register_location(start_reg)); ++ __ sub(edi, register_location(start_reg + 1)); ++ } ++ } else { ++ DCHECK(mode_ == UC16); ++ // Save registers before calling C function. ++ __ push(esi); ++ __ push(edi); ++ __ push(backtrack_stackpointer()); ++ __ push(ebx); ++ ++ static const int argument_count = 4; ++ __ PrepareCallCFunction(argument_count, ecx); ++ // Put arguments into allocated stack area, last argument highest on stack. ++ // Parameters are ++ // Address byte_offset1 - Address captured substring's start. ++ // Address byte_offset2 - Address of current character position. ++ // size_t byte_length - length of capture in bytes(!) ++// Isolate* isolate or 0 if unicode flag. ++ ++ // Set isolate. ++#ifdef V8_INTL_SUPPORT ++ if (unicode) { ++ __ mov(Operand(esp, 3 * kPointerSize), Immediate(0)); ++ } else // NOLINT ++#endif // V8_INTL_SUPPORT ++ { ++ __ mov(Operand(esp, 3 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ } ++ // Set byte_length. ++ __ mov(Operand(esp, 2 * kPointerSize), ebx); ++ // Set byte_offset2. ++ // Found by adding negative string-end offset of current position (edi) ++ // to end of string. ++ __ add(edi, esi); ++ if (read_backward) { ++ __ sub(edi, ebx); // Offset by length when matching backwards. ++ } ++ __ mov(Operand(esp, 1 * kPointerSize), edi); ++ // Set byte_offset1. ++ // Start of capture, where edx already holds string-end negative offset. ++ __ add(edx, esi); ++ __ mov(Operand(esp, 0 * kPointerSize), edx); ++ ++ { ++ AllowExternalCallThatCantCauseGC scope(masm_); ++ ExternalReference compare = ++ ExternalReference::re_case_insensitive_compare_uc16(isolate()); ++ __ CallCFunction(compare, argument_count); ++ } ++ // Pop original values before reacting on result value. ++ __ pop(ebx); ++ __ pop(backtrack_stackpointer()); ++ __ pop(edi); ++ __ pop(esi); ++ ++ // Check if function returned non-zero for success or zero for failure. ++ __ or_(eax, eax); ++ BranchOrBacktrack(zero, on_no_match); ++ // On success, advance position by length of capture. ++ if (read_backward) { ++ __ sub(edi, ebx); ++ } else { ++ __ add(edi, ebx); ++ } ++ } ++ __ bind(&fallthrough); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckNotBackReference(int start_reg, ++ bool read_backward, ++ Label* on_no_match) { ++ Label fallthrough; ++ Label success; ++ Label fail; ++ ++ // Find length of back-referenced capture. ++ __ mov(edx, register_location(start_reg)); ++ __ mov(eax, register_location(start_reg + 1)); ++ __ sub(eax, edx); // Length to check. ++ ++ // At this point, the capture registers are either both set or both cleared. ++ // If the capture length is zero, then the capture is either empty or cleared. ++ // Fall through in both cases. ++ __ j(equal, &fallthrough); ++ ++ // Check that there are sufficient characters left in the input. ++ if (read_backward) { ++ __ mov(ebx, Operand(ebp, kStringStartMinusOne)); ++ __ add(ebx, eax); ++ __ cmp(edi, ebx); ++ BranchOrBacktrack(less_equal, on_no_match); ++ } else { ++ __ mov(ebx, edi); ++ __ add(ebx, eax); ++ BranchOrBacktrack(greater, on_no_match); ++ } ++ ++ // Save register to make it available below. ++ __ push(backtrack_stackpointer()); ++ ++ // Compute pointers to match string and capture string ++ __ add(edx, esi); // Start of capture. ++ __ lea(ebx, Operand(esi, edi, times_1, 0)); // Start of match. ++ if (read_backward) { ++ __ sub(ebx, eax); // Offset by length when matching backwards. ++ } ++ __ lea(ecx, Operand(eax, ebx, times_1, 0)); // End of match ++ ++ Label loop; ++ __ bind(&loop); ++ if (mode_ == LATIN1) { ++ __ movzx_b(eax, Operand(edx, 0)); ++ __ cmpb_al(Operand(ebx, 0)); ++ } else { ++ DCHECK(mode_ == UC16); ++ __ movzx_w(eax, Operand(edx, 0)); ++ __ cmpw_ax(Operand(ebx, 0)); ++ } ++ __ j(not_equal, &fail); ++ // Increment pointers into capture and match string. ++ __ add(edx, Immediate(char_size())); ++ __ add(ebx, Immediate(char_size())); ++ // Check if we have reached end of match area. ++ __ cmp(ebx, ecx); ++ __ j(below, &loop); ++ __ jmp(&success); ++ ++ __ bind(&fail); ++ // Restore backtrack stackpointer. ++ __ pop(backtrack_stackpointer()); ++ BranchOrBacktrack(no_condition, on_no_match); ++ ++ __ bind(&success); ++ // Move current character position to position after match. ++ __ mov(edi, ecx); ++ __ sub(edi, esi); ++ if (read_backward) { ++ // Subtract match length if we matched backward. ++ __ add(edi, register_location(start_reg)); ++ __ sub(edi, register_location(start_reg + 1)); ++ } ++ // Restore backtrack stackpointer. ++ __ pop(backtrack_stackpointer()); ++ ++ __ bind(&fallthrough); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckNotCharacter(uint32_t c, ++ Label* on_not_equal) { ++ __ cmp(current_character(), c); ++ BranchOrBacktrack(not_equal, on_not_equal); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacterAfterAnd(uint32_t c, ++ uint32_t mask, ++ Label* on_equal) { ++ if (c == 0) { ++ __ test(current_character(), Immediate(mask)); ++ } else { ++ __ mov(eax, mask); ++ __ and_(eax, current_character()); ++ __ cmp(eax, c); ++ } ++ BranchOrBacktrack(equal, on_equal); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckNotCharacterAfterAnd(uint32_t c, ++ uint32_t mask, ++ Label* on_not_equal) { ++ if (c == 0) { ++ __ test(current_character(), Immediate(mask)); ++ } else { ++ __ mov(eax, mask); ++ __ and_(eax, current_character()); ++ __ cmp(eax, c); ++ } ++ BranchOrBacktrack(not_equal, on_not_equal); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckNotCharacterAfterMinusAnd( ++ uc16 c, ++ uc16 minus, ++ uc16 mask, ++ Label* on_not_equal) { ++ DCHECK(minus < String::kMaxUtf16CodeUnit); ++ __ lea(eax, Operand(current_character(), -minus)); ++ if (c == 0) { ++ __ test(eax, Immediate(mask)); ++ } else { ++ __ and_(eax, mask); ++ __ cmp(eax, c); ++ } ++ BranchOrBacktrack(not_equal, on_not_equal); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacterInRange( ++ uc16 from, ++ uc16 to, ++ Label* on_in_range) { ++ __ lea(eax, Operand(current_character(), -from)); ++ __ cmp(eax, to - from); ++ BranchOrBacktrack(below_equal, on_in_range); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckCharacterNotInRange( ++ uc16 from, ++ uc16 to, ++ Label* on_not_in_range) { ++ __ lea(eax, Operand(current_character(), -from)); ++ __ cmp(eax, to - from); ++ BranchOrBacktrack(above, on_not_in_range); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckBitInTable( ++ Handle table, ++ Label* on_bit_set) { ++ __ mov(eax, Immediate(table)); ++ Register index = current_character(); ++ if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) { ++ __ mov(ebx, kTableSize - 1); ++ __ and_(ebx, current_character()); ++ index = ebx; ++ } ++ __ cmpb(FieldOperand(eax, index, times_1, ByteArray::kHeaderSize), ++ Immediate(0)); ++ BranchOrBacktrack(not_equal, on_bit_set); ++} ++ ++ ++bool RegExpMacroAssemblerX87::CheckSpecialCharacterClass(uc16 type, ++ Label* on_no_match) { ++ // Range checks (c in min..max) are generally implemented by an unsigned ++ // (c - min) <= (max - min) check ++ switch (type) { ++ case 's': ++ // Match space-characters ++ if (mode_ == LATIN1) { ++ // One byte space characters are '\t'..'\r', ' ' and \u00a0. ++ Label success; ++ __ cmp(current_character(), ' '); ++ __ j(equal, &success, Label::kNear); ++ // Check range 0x09..0x0d ++ __ lea(eax, Operand(current_character(), -'\t')); ++ __ cmp(eax, '\r' - '\t'); ++ __ j(below_equal, &success, Label::kNear); ++ // \u00a0 (NBSP). ++ __ cmp(eax, 0x00a0 - '\t'); ++ BranchOrBacktrack(not_equal, on_no_match); ++ __ bind(&success); ++ return true; ++ } ++ return false; ++ case 'S': ++ // The emitted code for generic character classes is good enough. ++ return false; ++ case 'd': ++ // Match ASCII digits ('0'..'9') ++ __ lea(eax, Operand(current_character(), -'0')); ++ __ cmp(eax, '9' - '0'); ++ BranchOrBacktrack(above, on_no_match); ++ return true; ++ case 'D': ++ // Match non ASCII-digits ++ __ lea(eax, Operand(current_character(), -'0')); ++ __ cmp(eax, '9' - '0'); ++ BranchOrBacktrack(below_equal, on_no_match); ++ return true; ++ case '.': { ++ // Match non-newlines (not 0x0a('\n'), 0x0d('\r'), 0x2028 and 0x2029) ++ __ mov(eax, current_character()); ++ __ xor_(eax, Immediate(0x01)); ++ // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c ++ __ sub(eax, Immediate(0x0b)); ++ __ cmp(eax, 0x0c - 0x0b); ++ BranchOrBacktrack(below_equal, on_no_match); ++ if (mode_ == UC16) { ++ // Compare original value to 0x2028 and 0x2029, using the already ++ // computed (current_char ^ 0x01 - 0x0b). I.e., check for ++ // 0x201d (0x2028 - 0x0b) or 0x201e. ++ __ sub(eax, Immediate(0x2028 - 0x0b)); ++ __ cmp(eax, 0x2029 - 0x2028); ++ BranchOrBacktrack(below_equal, on_no_match); ++ } ++ return true; ++ } ++ case 'w': { ++ if (mode_ != LATIN1) { ++ // Table is 256 entries, so all Latin1 characters can be tested. ++ __ cmp(current_character(), Immediate('z')); ++ BranchOrBacktrack(above, on_no_match); ++ } ++ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. ++ ExternalReference word_map = ExternalReference::re_word_character_map(); ++ __ test_b(current_character(), ++ Operand::StaticArray(current_character(), times_1, word_map)); ++ BranchOrBacktrack(zero, on_no_match); ++ return true; ++ } ++ case 'W': { ++ Label done; ++ if (mode_ != LATIN1) { ++ // Table is 256 entries, so all Latin1 characters can be tested. ++ __ cmp(current_character(), Immediate('z')); ++ __ j(above, &done); ++ } ++ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. ++ ExternalReference word_map = ExternalReference::re_word_character_map(); ++ __ test_b(current_character(), ++ Operand::StaticArray(current_character(), times_1, word_map)); ++ BranchOrBacktrack(not_zero, on_no_match); ++ if (mode_ != LATIN1) { ++ __ bind(&done); ++ } ++ return true; ++ } ++ // Non-standard classes (with no syntactic shorthand) used internally. ++ case '*': ++ // Match any character. ++ return true; ++ case 'n': { ++ // Match newlines (0x0a('\n'), 0x0d('\r'), 0x2028 or 0x2029). ++ // The opposite of '.'. ++ __ mov(eax, current_character()); ++ __ xor_(eax, Immediate(0x01)); ++ // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c ++ __ sub(eax, Immediate(0x0b)); ++ __ cmp(eax, 0x0c - 0x0b); ++ if (mode_ == LATIN1) { ++ BranchOrBacktrack(above, on_no_match); ++ } else { ++ Label done; ++ BranchOrBacktrack(below_equal, &done); ++ DCHECK_EQ(UC16, mode_); ++ // Compare original value to 0x2028 and 0x2029, using the already ++ // computed (current_char ^ 0x01 - 0x0b). I.e., check for ++ // 0x201d (0x2028 - 0x0b) or 0x201e. ++ __ sub(eax, Immediate(0x2028 - 0x0b)); ++ __ cmp(eax, 1); ++ BranchOrBacktrack(above, on_no_match); ++ __ bind(&done); ++ } ++ return true; ++ } ++ // No custom implementation (yet): s(UC16), S(UC16). ++ default: ++ return false; ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::Fail() { ++ STATIC_ASSERT(FAILURE == 0); // Return value for failure is zero. ++ if (!global()) { ++ __ Move(eax, Immediate(FAILURE)); ++ } ++ __ jmp(&exit_label_); ++} ++ ++ ++Handle RegExpMacroAssemblerX87::GetCode(Handle source) { ++ Label return_eax; ++ // Finalize code - write the entry point code now we know how many ++ // registers we need. ++ ++ // Entry code: ++ __ bind(&entry_label_); ++ ++ // Tell the system that we have a stack frame. Because the type is MANUAL, no ++ // code is generated. ++ FrameScope scope(masm_, StackFrame::MANUAL); ++ ++ // Actually emit code to start a new stack frame. ++ __ push(ebp); ++ __ mov(ebp, esp); ++ // Save callee-save registers. Order here should correspond to order of ++ // kBackup_ebx etc. ++ __ push(esi); ++ __ push(edi); ++ __ push(ebx); // Callee-save on MacOS. ++ __ push(Immediate(0)); // Number of successful matches in a global regexp. ++ __ push(Immediate(0)); // Make room for "string start - 1" constant. ++ ++ // Check if we have space on the stack for registers. ++ Label stack_limit_hit; ++ Label stack_ok; ++ ++ ExternalReference stack_limit = ++ ExternalReference::address_of_stack_limit(isolate()); ++ __ mov(ecx, esp); ++ __ sub(ecx, Operand::StaticVariable(stack_limit)); ++ // Handle it if the stack pointer is already below the stack limit. ++ __ j(below_equal, &stack_limit_hit); ++ // Check if there is room for the variable number of registers above ++ // the stack limit. ++ __ cmp(ecx, num_registers_ * kPointerSize); ++ __ j(above_equal, &stack_ok); ++ // Exit with OutOfMemory exception. There is not enough space on the stack ++ // for our working registers. ++ __ mov(eax, EXCEPTION); ++ __ jmp(&return_eax); ++ ++ __ bind(&stack_limit_hit); ++ CallCheckStackGuardState(ebx); ++ __ or_(eax, eax); ++ // If returned value is non-zero, we exit with the returned value as result. ++ __ j(not_zero, &return_eax); ++ ++ __ bind(&stack_ok); ++ // Load start index for later use. ++ __ mov(ebx, Operand(ebp, kStartIndex)); ++ ++ // Allocate space on stack for registers. ++ __ sub(esp, Immediate(num_registers_ * kPointerSize)); ++ // Load string length. ++ __ mov(esi, Operand(ebp, kInputEnd)); ++ // Load input position. ++ __ mov(edi, Operand(ebp, kInputStart)); ++ // Set up edi to be negative offset from string end. ++ __ sub(edi, esi); ++ ++ // Set eax to address of char before start of the string. ++ // (effectively string position -1). ++ __ neg(ebx); ++ if (mode_ == UC16) { ++ __ lea(eax, Operand(edi, ebx, times_2, -char_size())); ++ } else { ++ __ lea(eax, Operand(edi, ebx, times_1, -char_size())); ++ } ++ // Store this value in a local variable, for use when clearing ++ // position registers. ++ __ mov(Operand(ebp, kStringStartMinusOne), eax); ++ ++#if V8_OS_WIN ++ // Ensure that we write to each stack page, in order. Skipping a page ++ // on Windows can cause segmentation faults. Assuming page size is 4k. ++ const int kPageSize = 4096; ++ const int kRegistersPerPage = kPageSize / kPointerSize; ++ for (int i = num_saved_registers_ + kRegistersPerPage - 1; ++ i < num_registers_; ++ i += kRegistersPerPage) { ++ __ mov(register_location(i), eax); // One write every page. ++ } ++#endif // V8_OS_WIN ++ ++ Label load_char_start_regexp, start_regexp; ++ // Load newline if index is at start, previous character otherwise. ++ __ cmp(Operand(ebp, kStartIndex), Immediate(0)); ++ __ j(not_equal, &load_char_start_regexp, Label::kNear); ++ __ mov(current_character(), '\n'); ++ __ jmp(&start_regexp, Label::kNear); ++ ++ // Global regexp restarts matching here. ++ __ bind(&load_char_start_regexp); ++ // Load previous char as initial value of current character register. ++ LoadCurrentCharacterUnchecked(-1, 1); ++ __ bind(&start_regexp); ++ ++ // Initialize on-stack registers. ++ if (num_saved_registers_ > 0) { // Always is, if generated from a regexp. ++ // Fill saved registers with initial value = start offset - 1 ++ // Fill in stack push order, to avoid accessing across an unwritten ++ // page (a problem on Windows). ++ if (num_saved_registers_ > 8) { ++ __ mov(ecx, kRegisterZero); ++ Label init_loop; ++ __ bind(&init_loop); ++ __ mov(Operand(ebp, ecx, times_1, 0), eax); ++ __ sub(ecx, Immediate(kPointerSize)); ++ __ cmp(ecx, kRegisterZero - num_saved_registers_ * kPointerSize); ++ __ j(greater, &init_loop); ++ } else { // Unroll the loop. ++ for (int i = 0; i < num_saved_registers_; i++) { ++ __ mov(register_location(i), eax); ++ } ++ } ++ } ++ ++ // Initialize backtrack stack pointer. ++ __ mov(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); ++ ++ __ jmp(&start_label_); ++ ++ // Exit code: ++ if (success_label_.is_linked()) { ++ // Save captures when successful. ++ __ bind(&success_label_); ++ if (num_saved_registers_ > 0) { ++ // copy captures to output ++ __ mov(ebx, Operand(ebp, kRegisterOutput)); ++ __ mov(ecx, Operand(ebp, kInputEnd)); ++ __ mov(edx, Operand(ebp, kStartIndex)); ++ __ sub(ecx, Operand(ebp, kInputStart)); ++ if (mode_ == UC16) { ++ __ lea(ecx, Operand(ecx, edx, times_2, 0)); ++ } else { ++ __ add(ecx, edx); ++ } ++ for (int i = 0; i < num_saved_registers_; i++) { ++ __ mov(eax, register_location(i)); ++ if (i == 0 && global_with_zero_length_check()) { ++ // Keep capture start in edx for the zero-length check later. ++ __ mov(edx, eax); ++ } ++ // Convert to index from start of string, not end. ++ __ add(eax, ecx); ++ if (mode_ == UC16) { ++ __ sar(eax, 1); // Convert byte index to character index. ++ } ++ __ mov(Operand(ebx, i * kPointerSize), eax); ++ } ++ } ++ ++ if (global()) { ++ // Restart matching if the regular expression is flagged as global. ++ // Increment success counter. ++ __ inc(Operand(ebp, kSuccessfulCaptures)); ++ // Capture results have been stored, so the number of remaining global ++ // output registers is reduced by the number of stored captures. ++ __ mov(ecx, Operand(ebp, kNumOutputRegisters)); ++ __ sub(ecx, Immediate(num_saved_registers_)); ++ // Check whether we have enough room for another set of capture results. ++ __ cmp(ecx, Immediate(num_saved_registers_)); ++ __ j(less, &exit_label_); ++ ++ __ mov(Operand(ebp, kNumOutputRegisters), ecx); ++ // Advance the location for output. ++ __ add(Operand(ebp, kRegisterOutput), ++ Immediate(num_saved_registers_ * kPointerSize)); ++ ++ // Prepare eax to initialize registers with its value in the next run. ++ __ mov(eax, Operand(ebp, kStringStartMinusOne)); ++ ++ if (global_with_zero_length_check()) { ++ // Special case for zero-length matches. ++ // edx: capture start index ++ __ cmp(edi, edx); ++ // Not a zero-length match, restart. ++ __ j(not_equal, &load_char_start_regexp); ++ // edi (offset from the end) is zero if we already reached the end. ++ __ test(edi, edi); ++ __ j(zero, &exit_label_, Label::kNear); ++ // Advance current position after a zero-length match. ++ Label advance; ++ __ bind(&advance); ++ if (mode_ == UC16) { ++ __ add(edi, Immediate(2)); ++ } else { ++ __ inc(edi); ++ } ++ if (global_unicode()) CheckNotInSurrogatePair(0, &advance); ++ } ++ __ jmp(&load_char_start_regexp); ++ } else { ++ __ mov(eax, Immediate(SUCCESS)); ++ } ++ } ++ ++ __ bind(&exit_label_); ++ if (global()) { ++ // Return the number of successful captures. ++ __ mov(eax, Operand(ebp, kSuccessfulCaptures)); ++ } ++ ++ __ bind(&return_eax); ++ // Skip esp past regexp registers. ++ __ lea(esp, Operand(ebp, kBackup_ebx)); ++ // Restore callee-save registers. ++ __ pop(ebx); ++ __ pop(edi); ++ __ pop(esi); ++ // Exit function frame, restore previous one. ++ __ pop(ebp); ++ __ ret(0); ++ ++ // Backtrack code (branch target for conditional backtracks). ++ if (backtrack_label_.is_linked()) { ++ __ bind(&backtrack_label_); ++ Backtrack(); ++ } ++ ++ Label exit_with_exception; ++ ++ // Preempt-code ++ if (check_preempt_label_.is_linked()) { ++ SafeCallTarget(&check_preempt_label_); ++ ++ __ push(backtrack_stackpointer()); ++ __ push(edi); ++ ++ CallCheckStackGuardState(ebx); ++ __ or_(eax, eax); ++ // If returning non-zero, we should end execution with the given ++ // result as return value. ++ __ j(not_zero, &return_eax); ++ ++ __ pop(edi); ++ __ pop(backtrack_stackpointer()); ++ // String might have moved: Reload esi from frame. ++ __ mov(esi, Operand(ebp, kInputEnd)); ++ SafeReturn(); ++ } ++ ++ // Backtrack stack overflow code. ++ if (stack_overflow_label_.is_linked()) { ++ SafeCallTarget(&stack_overflow_label_); ++ // Reached if the backtrack-stack limit has been hit. ++ ++ Label grow_failed; ++ // Save registers before calling C function ++ __ push(esi); ++ __ push(edi); ++ ++ // Call GrowStack(backtrack_stackpointer()) ++ static const int num_arguments = 3; ++ __ PrepareCallCFunction(num_arguments, ebx); ++ __ mov(Operand(esp, 2 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ __ lea(eax, Operand(ebp, kStackHighEnd)); ++ __ mov(Operand(esp, 1 * kPointerSize), eax); ++ __ mov(Operand(esp, 0 * kPointerSize), backtrack_stackpointer()); ++ ExternalReference grow_stack = ++ ExternalReference::re_grow_stack(isolate()); ++ __ CallCFunction(grow_stack, num_arguments); ++ // If return NULL, we have failed to grow the stack, and ++ // must exit with a stack-overflow exception. ++ __ or_(eax, eax); ++ __ j(equal, &exit_with_exception); ++ // Otherwise use return value as new stack pointer. ++ __ mov(backtrack_stackpointer(), eax); ++ // Restore saved registers and continue. ++ __ pop(edi); ++ __ pop(esi); ++ SafeReturn(); ++ } ++ ++ if (exit_with_exception.is_linked()) { ++ // If any of the code above needed to exit with an exception. ++ __ bind(&exit_with_exception); ++ // Exit with Result EXCEPTION(-1) to signal thrown exception. ++ __ mov(eax, EXCEPTION); ++ __ jmp(&return_eax); ++ } ++ ++ CodeDesc code_desc; ++ masm_->GetCode(&code_desc); ++ Handle code = ++ isolate()->factory()->NewCode(code_desc, ++ Code::ComputeFlags(Code::REGEXP), ++ masm_->CodeObject()); ++ PROFILE(masm_->isolate(), ++ RegExpCodeCreateEvent(AbstractCode::cast(*code), *source)); ++ return Handle::cast(code); ++} ++ ++ ++void RegExpMacroAssemblerX87::GoTo(Label* to) { ++ BranchOrBacktrack(no_condition, to); ++} ++ ++ ++void RegExpMacroAssemblerX87::IfRegisterGE(int reg, ++ int comparand, ++ Label* if_ge) { ++ __ cmp(register_location(reg), Immediate(comparand)); ++ BranchOrBacktrack(greater_equal, if_ge); ++} ++ ++ ++void RegExpMacroAssemblerX87::IfRegisterLT(int reg, ++ int comparand, ++ Label* if_lt) { ++ __ cmp(register_location(reg), Immediate(comparand)); ++ BranchOrBacktrack(less, if_lt); ++} ++ ++ ++void RegExpMacroAssemblerX87::IfRegisterEqPos(int reg, ++ Label* if_eq) { ++ __ cmp(edi, register_location(reg)); ++ BranchOrBacktrack(equal, if_eq); ++} ++ ++ ++RegExpMacroAssembler::IrregexpImplementation ++ RegExpMacroAssemblerX87::Implementation() { ++ return kX87Implementation; ++} ++ ++ ++void RegExpMacroAssemblerX87::LoadCurrentCharacter(int cp_offset, ++ Label* on_end_of_input, ++ bool check_bounds, ++ int characters) { ++ DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works) ++ if (check_bounds) { ++ if (cp_offset >= 0) { ++ CheckPosition(cp_offset + characters - 1, on_end_of_input); ++ } else { ++ CheckPosition(cp_offset, on_end_of_input); ++ } ++ } ++ LoadCurrentCharacterUnchecked(cp_offset, characters); ++} ++ ++ ++void RegExpMacroAssemblerX87::PopCurrentPosition() { ++ Pop(edi); ++} ++ ++ ++void RegExpMacroAssemblerX87::PopRegister(int register_index) { ++ Pop(eax); ++ __ mov(register_location(register_index), eax); ++} ++ ++ ++void RegExpMacroAssemblerX87::PushBacktrack(Label* label) { ++ Push(Immediate::CodeRelativeOffset(label)); ++ CheckStackLimit(); ++} ++ ++ ++void RegExpMacroAssemblerX87::PushCurrentPosition() { ++ Push(edi); ++} ++ ++ ++void RegExpMacroAssemblerX87::PushRegister(int register_index, ++ StackCheckFlag check_stack_limit) { ++ __ mov(eax, register_location(register_index)); ++ Push(eax); ++ if (check_stack_limit) CheckStackLimit(); ++} ++ ++ ++void RegExpMacroAssemblerX87::ReadCurrentPositionFromRegister(int reg) { ++ __ mov(edi, register_location(reg)); ++} ++ ++ ++void RegExpMacroAssemblerX87::ReadStackPointerFromRegister(int reg) { ++ __ mov(backtrack_stackpointer(), register_location(reg)); ++ __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); ++} ++ ++void RegExpMacroAssemblerX87::SetCurrentPositionFromEnd(int by) { ++ Label after_position; ++ __ cmp(edi, -by * char_size()); ++ __ j(greater_equal, &after_position, Label::kNear); ++ __ mov(edi, -by * char_size()); ++ // On RegExp code entry (where this operation is used), the character before ++ // the current position is expected to be already loaded. ++ // We have advanced the position, so it's safe to read backwards. ++ LoadCurrentCharacterUnchecked(-1, 1); ++ __ bind(&after_position); ++} ++ ++ ++void RegExpMacroAssemblerX87::SetRegister(int register_index, int to) { ++ DCHECK(register_index >= num_saved_registers_); // Reserved for positions! ++ __ mov(register_location(register_index), Immediate(to)); ++} ++ ++ ++bool RegExpMacroAssemblerX87::Succeed() { ++ __ jmp(&success_label_); ++ return global(); ++} ++ ++ ++void RegExpMacroAssemblerX87::WriteCurrentPositionToRegister(int reg, ++ int cp_offset) { ++ if (cp_offset == 0) { ++ __ mov(register_location(reg), edi); ++ } else { ++ __ lea(eax, Operand(edi, cp_offset * char_size())); ++ __ mov(register_location(reg), eax); ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::ClearRegisters(int reg_from, int reg_to) { ++ DCHECK(reg_from <= reg_to); ++ __ mov(eax, Operand(ebp, kStringStartMinusOne)); ++ for (int reg = reg_from; reg <= reg_to; reg++) { ++ __ mov(register_location(reg), eax); ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::WriteStackPointerToRegister(int reg) { ++ __ mov(eax, backtrack_stackpointer()); ++ __ sub(eax, Operand(ebp, kStackHighEnd)); ++ __ mov(register_location(reg), eax); ++} ++ ++ ++// Private methods: ++ ++void RegExpMacroAssemblerX87::CallCheckStackGuardState(Register scratch) { ++ static const int num_arguments = 3; ++ __ PrepareCallCFunction(num_arguments, scratch); ++ // RegExp code frame pointer. ++ __ mov(Operand(esp, 2 * kPointerSize), ebp); ++ // Code* of self. ++ __ mov(Operand(esp, 1 * kPointerSize), Immediate(masm_->CodeObject())); ++ // Next address on the stack (will be address of return address). ++ __ lea(eax, Operand(esp, -kPointerSize)); ++ __ mov(Operand(esp, 0 * kPointerSize), eax); ++ ExternalReference check_stack_guard = ++ ExternalReference::re_check_stack_guard_state(isolate()); ++ __ CallCFunction(check_stack_guard, num_arguments); ++} ++ ++ ++// Helper function for reading a value out of a stack frame. ++template ++static T& frame_entry(Address re_frame, int frame_offset) { ++ return reinterpret_cast(Memory::int32_at(re_frame + frame_offset)); ++} ++ ++ ++template ++static T* frame_entry_address(Address re_frame, int frame_offset) { ++ return reinterpret_cast(re_frame + frame_offset); ++} ++ ++ ++int RegExpMacroAssemblerX87::CheckStackGuardState(Address* return_address, ++ Code* re_code, ++ Address re_frame) { ++ return NativeRegExpMacroAssembler::CheckStackGuardState( ++ frame_entry(re_frame, kIsolate), ++ frame_entry(re_frame, kStartIndex), ++ frame_entry(re_frame, kDirectCall) == 1, return_address, re_code, ++ frame_entry_address(re_frame, kInputString), ++ frame_entry_address(re_frame, kInputStart), ++ frame_entry_address(re_frame, kInputEnd)); ++} ++ ++ ++Operand RegExpMacroAssemblerX87::register_location(int register_index) { ++ DCHECK(register_index < (1<<30)); ++ if (num_registers_ <= register_index) { ++ num_registers_ = register_index + 1; ++ } ++ return Operand(ebp, kRegisterZero - register_index * kPointerSize); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckPosition(int cp_offset, ++ Label* on_outside_input) { ++ if (cp_offset >= 0) { ++ __ cmp(edi, -cp_offset * char_size()); ++ BranchOrBacktrack(greater_equal, on_outside_input); ++ } else { ++ __ lea(eax, Operand(edi, cp_offset * char_size())); ++ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); ++ BranchOrBacktrack(less_equal, on_outside_input); ++ } ++} ++ ++ ++void RegExpMacroAssemblerX87::BranchOrBacktrack(Condition condition, ++ Label* to) { ++ if (condition < 0) { // No condition ++ if (to == NULL) { ++ Backtrack(); ++ return; ++ } ++ __ jmp(to); ++ return; ++ } ++ if (to == NULL) { ++ __ j(condition, &backtrack_label_); ++ return; ++ } ++ __ j(condition, to); ++} ++ ++ ++void RegExpMacroAssemblerX87::SafeCall(Label* to) { ++ Label return_to; ++ __ push(Immediate::CodeRelativeOffset(&return_to)); ++ __ jmp(to); ++ __ bind(&return_to); ++} ++ ++ ++void RegExpMacroAssemblerX87::SafeReturn() { ++ __ pop(ebx); ++ __ add(ebx, Immediate(masm_->CodeObject())); ++ __ jmp(ebx); ++} ++ ++ ++void RegExpMacroAssemblerX87::SafeCallTarget(Label* name) { ++ __ bind(name); ++} ++ ++ ++void RegExpMacroAssemblerX87::Push(Register source) { ++ DCHECK(!source.is(backtrack_stackpointer())); ++ // Notice: This updates flags, unlike normal Push. ++ __ sub(backtrack_stackpointer(), Immediate(kPointerSize)); ++ __ mov(Operand(backtrack_stackpointer(), 0), source); ++} ++ ++ ++void RegExpMacroAssemblerX87::Push(Immediate value) { ++ // Notice: This updates flags, unlike normal Push. ++ __ sub(backtrack_stackpointer(), Immediate(kPointerSize)); ++ __ mov(Operand(backtrack_stackpointer(), 0), value); ++} ++ ++ ++void RegExpMacroAssemblerX87::Pop(Register target) { ++ DCHECK(!target.is(backtrack_stackpointer())); ++ __ mov(target, Operand(backtrack_stackpointer(), 0)); ++ // Notice: This updates flags, unlike normal Pop. ++ __ add(backtrack_stackpointer(), Immediate(kPointerSize)); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckPreemption() { ++ // Check for preemption. ++ Label no_preempt; ++ ExternalReference stack_limit = ++ ExternalReference::address_of_stack_limit(isolate()); ++ __ cmp(esp, Operand::StaticVariable(stack_limit)); ++ __ j(above, &no_preempt); ++ ++ SafeCall(&check_preempt_label_); ++ ++ __ bind(&no_preempt); ++} ++ ++ ++void RegExpMacroAssemblerX87::CheckStackLimit() { ++ Label no_stack_overflow; ++ ExternalReference stack_limit = ++ ExternalReference::address_of_regexp_stack_limit(isolate()); ++ __ cmp(backtrack_stackpointer(), Operand::StaticVariable(stack_limit)); ++ __ j(above, &no_stack_overflow); ++ ++ SafeCall(&stack_overflow_label_); ++ ++ __ bind(&no_stack_overflow); ++} ++ ++ ++void RegExpMacroAssemblerX87::LoadCurrentCharacterUnchecked(int cp_offset, ++ int characters) { ++ if (mode_ == LATIN1) { ++ if (characters == 4) { ++ __ mov(current_character(), Operand(esi, edi, times_1, cp_offset)); ++ } else if (characters == 2) { ++ __ movzx_w(current_character(), Operand(esi, edi, times_1, cp_offset)); ++ } else { ++ DCHECK(characters == 1); ++ __ movzx_b(current_character(), Operand(esi, edi, times_1, cp_offset)); ++ } ++ } else { ++ DCHECK(mode_ == UC16); ++ if (characters == 2) { ++ __ mov(current_character(), ++ Operand(esi, edi, times_1, cp_offset * sizeof(uc16))); ++ } else { ++ DCHECK(characters == 1); ++ __ movzx_w(current_character(), ++ Operand(esi, edi, times_1, cp_offset * sizeof(uc16))); ++ } ++ } ++} ++ ++ ++#undef __ ++ ++#endif // V8_INTERPRETED_REGEXP ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 2017-12-25 17:42:57.218465603 +0100 +@@ -0,0 +1,204 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ ++#define V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ ++ ++#include "src/macro-assembler.h" ++#include "src/regexp/regexp-macro-assembler.h" ++#include "src/x87/assembler-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++#ifndef V8_INTERPRETED_REGEXP ++class RegExpMacroAssemblerX87: public NativeRegExpMacroAssembler { ++ public: ++ RegExpMacroAssemblerX87(Isolate* isolate, Zone* zone, Mode mode, ++ int registers_to_save); ++ virtual ~RegExpMacroAssemblerX87(); ++ virtual int stack_limit_slack(); ++ virtual void AdvanceCurrentPosition(int by); ++ virtual void AdvanceRegister(int reg, int by); ++ virtual void Backtrack(); ++ virtual void Bind(Label* label); ++ virtual void CheckAtStart(Label* on_at_start); ++ virtual void CheckCharacter(uint32_t c, Label* on_equal); ++ virtual void CheckCharacterAfterAnd(uint32_t c, ++ uint32_t mask, ++ Label* on_equal); ++ virtual void CheckCharacterGT(uc16 limit, Label* on_greater); ++ virtual void CheckCharacterLT(uc16 limit, Label* on_less); ++ // A "greedy loop" is a loop that is both greedy and with a simple ++ // body. It has a particularly simple implementation. ++ virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); ++ virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); ++ virtual void CheckNotBackReference(int start_reg, bool read_backward, ++ Label* on_no_match); ++ virtual void CheckNotBackReferenceIgnoreCase(int start_reg, ++ bool read_backward, bool unicode, ++ Label* on_no_match); ++ virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); ++ virtual void CheckNotCharacterAfterAnd(uint32_t c, ++ uint32_t mask, ++ Label* on_not_equal); ++ virtual void CheckNotCharacterAfterMinusAnd(uc16 c, ++ uc16 minus, ++ uc16 mask, ++ Label* on_not_equal); ++ virtual void CheckCharacterInRange(uc16 from, ++ uc16 to, ++ Label* on_in_range); ++ virtual void CheckCharacterNotInRange(uc16 from, ++ uc16 to, ++ Label* on_not_in_range); ++ virtual void CheckBitInTable(Handle table, Label* on_bit_set); ++ ++ // Checks whether the given offset from the current position is before ++ // the end of the string. ++ virtual void CheckPosition(int cp_offset, Label* on_outside_input); ++ virtual bool CheckSpecialCharacterClass(uc16 type, Label* on_no_match); ++ virtual void Fail(); ++ virtual Handle GetCode(Handle source); ++ virtual void GoTo(Label* label); ++ virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); ++ virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); ++ virtual void IfRegisterEqPos(int reg, Label* if_eq); ++ virtual IrregexpImplementation Implementation(); ++ virtual void LoadCurrentCharacter(int cp_offset, ++ Label* on_end_of_input, ++ bool check_bounds = true, ++ int characters = 1); ++ virtual void PopCurrentPosition(); ++ virtual void PopRegister(int register_index); ++ virtual void PushBacktrack(Label* label); ++ virtual void PushCurrentPosition(); ++ virtual void PushRegister(int register_index, ++ StackCheckFlag check_stack_limit); ++ virtual void ReadCurrentPositionFromRegister(int reg); ++ virtual void ReadStackPointerFromRegister(int reg); ++ virtual void SetCurrentPositionFromEnd(int by); ++ virtual void SetRegister(int register_index, int to); ++ virtual bool Succeed(); ++ virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); ++ virtual void ClearRegisters(int reg_from, int reg_to); ++ virtual void WriteStackPointerToRegister(int reg); ++ ++ // Called from RegExp if the stack-guard is triggered. ++ // If the code object is relocated, the return address is fixed before ++ // returning. ++ static int CheckStackGuardState(Address* return_address, ++ Code* re_code, ++ Address re_frame); ++ ++ private: ++ // Offsets from ebp of function parameters and stored registers. ++ static const int kFramePointer = 0; ++ // Above the frame pointer - function parameters and return address. ++ static const int kReturn_eip = kFramePointer + kPointerSize; ++ static const int kFrameAlign = kReturn_eip + kPointerSize; ++ // Parameters. ++ static const int kInputString = kFrameAlign; ++ static const int kStartIndex = kInputString + kPointerSize; ++ static const int kInputStart = kStartIndex + kPointerSize; ++ static const int kInputEnd = kInputStart + kPointerSize; ++ static const int kRegisterOutput = kInputEnd + kPointerSize; ++ // For the case of global regular expression, we have room to store at least ++ // one set of capture results. For the case of non-global regexp, we ignore ++ // this value. ++ static const int kNumOutputRegisters = kRegisterOutput + kPointerSize; ++ static const int kStackHighEnd = kNumOutputRegisters + kPointerSize; ++ static const int kDirectCall = kStackHighEnd + kPointerSize; ++ static const int kIsolate = kDirectCall + kPointerSize; ++ // Below the frame pointer - local stack variables. ++ // When adding local variables remember to push space for them in ++ // the frame in GetCode. ++ static const int kBackup_esi = kFramePointer - kPointerSize; ++ static const int kBackup_edi = kBackup_esi - kPointerSize; ++ static const int kBackup_ebx = kBackup_edi - kPointerSize; ++ static const int kSuccessfulCaptures = kBackup_ebx - kPointerSize; ++ static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; ++ // First register address. Following registers are below it on the stack. ++ static const int kRegisterZero = kStringStartMinusOne - kPointerSize; ++ ++ // Initial size of code buffer. ++ static const size_t kRegExpCodeSize = 1024; ++ ++ // Load a number of characters at the given offset from the ++ // current position, into the current-character register. ++ void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); ++ ++ // Check whether preemption has been requested. ++ void CheckPreemption(); ++ ++ // Check whether we are exceeding the stack limit on the backtrack stack. ++ void CheckStackLimit(); ++ ++ // Generate a call to CheckStackGuardState. ++ void CallCheckStackGuardState(Register scratch); ++ ++ // The ebp-relative location of a regexp register. ++ Operand register_location(int register_index); ++ ++ // The register containing the current character after LoadCurrentCharacter. ++ inline Register current_character() { return edx; } ++ ++ // The register containing the backtrack stack top. Provides a meaningful ++ // name to the register. ++ inline Register backtrack_stackpointer() { return ecx; } ++ ++ // Byte size of chars in the string to match (decided by the Mode argument) ++ inline int char_size() { return static_cast(mode_); } ++ ++ // Equivalent to a conditional branch to the label, unless the label ++ // is NULL, in which case it is a conditional Backtrack. ++ void BranchOrBacktrack(Condition condition, Label* to); ++ ++ // Call and return internally in the generated code in a way that ++ // is GC-safe (i.e., doesn't leave absolute code addresses on the stack) ++ inline void SafeCall(Label* to); ++ inline void SafeReturn(); ++ inline void SafeCallTarget(Label* name); ++ ++ // Pushes the value of a register on the backtrack stack. Decrements the ++ // stack pointer (ecx) by a word size and stores the register's value there. ++ inline void Push(Register source); ++ ++ // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) ++ // by a word size and stores the value there. ++ inline void Push(Immediate value); ++ ++ // Pops a value from the backtrack stack. Reads the word at the stack pointer ++ // (ecx) and increments it by a word size. ++ inline void Pop(Register target); ++ ++ Isolate* isolate() const { return masm_->isolate(); } ++ ++ MacroAssembler* masm_; ++ ++ // Which mode to generate code for (LATIN1 or UC16). ++ Mode mode_; ++ ++ // One greater than maximal register index actually used. ++ int num_registers_; ++ ++ // Number of registers to output at the end (the saved registers ++ // are always 0..num_saved_registers_-1) ++ int num_saved_registers_; ++ ++ // Labels used internally. ++ Label entry_label_; ++ Label start_label_; ++ Label success_label_; ++ Label backtrack_label_; ++ Label exit_label_; ++ Label check_preempt_label_; ++ Label stack_overflow_label_; ++}; ++#endif // V8_INTERPRETED_REGEXP ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc 2017-12-25 17:42:57.218465603 +0100 +@@ -74,6 +74,9 @@ + #if V8_TARGET_ARCH_IA32 + kMaxAllocatableGeneralRegisterCount, + kMaxAllocatableDoubleRegisterCount, ++#elif V8_TARGET_ARCH_X87 ++ kMaxAllocatableGeneralRegisterCount, ++ compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount, + #elif V8_TARGET_ARCH_X64 + kMaxAllocatableGeneralRegisterCount, + kMaxAllocatableDoubleRegisterCount, +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h 2017-12-25 17:42:57.218465603 +0100 +@@ -28,7 +28,8 @@ + static const int kMaxFPRegisters = 32; + + // Default RegisterConfigurations for the target architecture. +- // TODO(mstarzinger): Crankshaft is gone. ++ // TODO(X87): This distinction in RegisterConfigurations is temporary ++ // until x87 TF supports all of the registers that Crankshaft does. + static const RegisterConfiguration* Crankshaft(); + static const RegisterConfiguration* Turbofan(); + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/simulator.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/simulator.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/simulator.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/simulator.h 2017-12-25 17:42:57.218465603 +0100 +@@ -21,6 +21,8 @@ + #include "src/mips64/simulator-mips64.h" + #elif V8_TARGET_ARCH_S390 + #include "src/s390/simulator-s390.h" ++#elif V8_TARGET_ARCH_X87 ++#include "src/x87/simulator-x87.h" + #else + #error Unsupported target architecture. + #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/strtod.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/strtod.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc 2017-12-25 17:42:57.218465603 +0100 +@@ -154,7 +154,8 @@ + static bool DoubleStrtod(Vector trimmed, + int exponent, + double* result) { +-#if (V8_TARGET_ARCH_IA32 || defined(USE_SIMULATOR)) && !defined(_MSC_VER) ++#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 || defined(USE_SIMULATOR)) && \ ++ !defined(_MSC_VER) + // On x86 the floating-point stack can be 64 or 80 bits wide. If it is + // 80 bits wide (as is the case on Linux) then double-rounding occurs and the + // result is not accurate. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.cc 2017-12-25 17:42:57.218465603 +0100 +@@ -356,7 +356,8 @@ + } + } + +-#if V8_TARGET_ARCH_IA32 ++ ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + static void MemMoveWrapper(void* dest, const void* src, size_t size) { + memmove(dest, src, size); + } +@@ -410,7 +411,7 @@ + void init_memcopy_functions(Isolate* isolate) { + if (g_memcopy_functions_initialized) return; + g_memcopy_functions_initialized = true; +-#if V8_TARGET_ARCH_IA32 ++#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 + MemMoveFunction generated_memmove = CreateMemMoveFunction(isolate); + if (generated_memmove != NULL) { + memmove_function = generated_memmove; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.h 2017-12-25 17:42:57.218465603 +0100 +@@ -431,7 +431,7 @@ + // Initializes the codegen support that depends on CPU features. + void init_memcopy_functions(Isolate* isolate); + +-#if defined(V8_TARGET_ARCH_IA32) ++#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X87) + // Limit below which the extra overhead of the MemCopy function is likely + // to outweigh the benefits of faster copying. + const int kMinComplexMemCopy = 64; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-12-25 17:42:57.218465603 +0100 +@@ -279,6 +279,11 @@ + 'builtins/s390/builtins-s390.cc', + ], + }], ++ ['v8_target_arch=="x87"', { ++ 'sources': [ ### gcmole(arch:x87) ### ++ 'builtins/x87/builtins-x87.cc', ++ ], ++ }], + ['v8_enable_i18n_support==0', { + 'sources!': [ + 'builtins/builtins-intl-gen.cc', +@@ -1587,6 +1592,38 @@ + 'regexp/ia32/regexp-macro-assembler-ia32.h', + ], + }], ++ ['v8_target_arch=="x87"', { ++ 'sources': [ ### gcmole(arch:x87) ### ++ 'x87/assembler-x87-inl.h', ++ 'x87/assembler-x87.cc', ++ 'x87/assembler-x87.h', ++ 'x87/code-stubs-x87.cc', ++ 'x87/code-stubs-x87.h', ++ 'x87/codegen-x87.cc', ++ 'x87/codegen-x87.h', ++ 'x87/cpu-x87.cc', ++ 'x87/deoptimizer-x87.cc', ++ 'x87/disasm-x87.cc', ++ 'x87/frames-x87.cc', ++ 'x87/frames-x87.h', ++ 'x87/interface-descriptors-x87.cc', ++ 'x87/macro-assembler-x87.cc', ++ 'x87/macro-assembler-x87.h', ++ 'x87/simulator-x87.cc', ++ 'x87/simulator-x87.h', ++ 'compiler/x87/code-generator-x87.cc', ++ 'compiler/x87/instruction-codes-x87.h', ++ 'compiler/x87/instruction-scheduler-x87.cc', ++ 'compiler/x87/instruction-selector-x87.cc', ++ 'debug/x87/debug-x87.cc', ++ 'full-codegen/x87/full-codegen-x87.cc', ++ 'ic/x87/access-compiler-x87.cc', ++ 'ic/x87/handler-compiler-x87.cc', ++ 'ic/x87/ic-x87.cc', ++ 'regexp/x87/regexp-macro-assembler-x87.cc', ++ 'regexp/x87/regexp-macro-assembler-x87.h', ++ ], ++ }], + ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { + 'sources': [ ### gcmole(arch:mipsel) ### + 'mips/assembler-mips.cc', +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-25 17:42:57.219465588 +0100 +@@ -0,0 +1,2217 @@ ++// Copyright (c) 1994-2006 Sun Microsystems 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. ++// ++// - Redistribution in binary form must reproduce the above copyright ++// notice, this list of conditions and the following disclaimer in the ++// documentation and/or other materials provided with the ++// distribution. ++// ++// - Neither the name of Sun Microsystems or the names of contributors may ++// be used to endorse or promote products derived from this software without ++// specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ++// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ++// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ++// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ++// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR ++// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++// STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been modified ++// significantly by Google Inc. ++// Copyright 2012 the V8 project authors. All rights reserved. ++ ++#include "src/x87/assembler-x87.h" ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/base/bits.h" ++#include "src/base/cpu.h" ++#include "src/disassembler.h" ++#include "src/macro-assembler.h" ++#include "src/v8.h" ++ ++namespace v8 { ++namespace internal { ++ ++// ----------------------------------------------------------------------------- ++// Implementation of CpuFeatures ++ ++void CpuFeatures::ProbeImpl(bool cross_compile) { ++ base::CPU cpu; ++ ++ // Only use statically determined features for cross compile (snapshot). ++ if (cross_compile) return; ++} ++ ++ ++void CpuFeatures::PrintTarget() { } ++void CpuFeatures::PrintFeatures() { } ++ ++ ++// ----------------------------------------------------------------------------- ++// Implementation of Displacement ++ ++void Displacement::init(Label* L, Type type) { ++ DCHECK(!L->is_bound()); ++ int next = 0; ++ if (L->is_linked()) { ++ next = L->pos(); ++ DCHECK(next > 0); // Displacements must be at positions > 0 ++ } ++ // Ensure that we _never_ overflow the next field. ++ DCHECK(NextField::is_valid(Assembler::kMaximalBufferSize)); ++ data_ = NextField::encode(next) | TypeField::encode(type); ++} ++ ++ ++// ----------------------------------------------------------------------------- ++// Implementation of RelocInfo ++ ++ ++const int RelocInfo::kApplyMask = ++ RelocInfo::kCodeTargetMask | 1 << RelocInfo::RUNTIME_ENTRY | ++ 1 << RelocInfo::INTERNAL_REFERENCE | 1 << RelocInfo::CODE_AGE_SEQUENCE | ++ RelocInfo::kDebugBreakSlotMask; ++ ++ ++bool RelocInfo::IsCodedSpecially() { ++ // The deserializer needs to know whether a pointer is specially coded. Being ++ // specially coded on IA32 means that it is a relative address, as used by ++ // branch instructions. These are also the ones that need changing when a ++ // code object moves. ++ return (1 << rmode_) & kApplyMask; ++} ++ ++ ++bool RelocInfo::IsInConstantPool() { ++ return false; ++} ++ ++Address RelocInfo::wasm_memory_reference() { ++ DCHECK(IsWasmMemoryReference(rmode_)); ++ return Memory::Address_at(pc_); ++} ++ ++Address RelocInfo::wasm_global_reference() { ++ DCHECK(IsWasmGlobalReference(rmode_)); ++ return Memory::Address_at(pc_); ++} ++ ++uint32_t RelocInfo::wasm_memory_size_reference() { ++ DCHECK(IsWasmMemorySizeReference(rmode_)); ++ return Memory::uint32_at(pc_); ++} ++ ++uint32_t RelocInfo::wasm_function_table_size_reference() { ++ DCHECK(IsWasmFunctionTableSizeReference(rmode_)); ++ return Memory::uint32_at(pc_); ++} ++ ++void RelocInfo::unchecked_update_wasm_memory_reference( ++ Isolate* isolate, Address address, ICacheFlushMode icache_flush_mode) { ++ Memory::Address_at(pc_) = address; ++ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { ++ Assembler::FlushICache(isolate, pc_, sizeof(Address)); ++ } ++} ++ ++void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, ++ ICacheFlushMode icache_flush_mode) { ++ Memory::uint32_at(pc_) = size; ++ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { ++ Assembler::FlushICache(isolate, pc_, sizeof(uint32_t)); ++ } ++} ++ ++// ----------------------------------------------------------------------------- ++// Implementation of Operand ++ ++Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) { ++ // [base + disp/r] ++ if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) { ++ // [base] ++ set_modrm(0, base); ++ if (base.is(esp)) set_sib(times_1, esp, base); ++ } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) { ++ // [base + disp8] ++ set_modrm(1, base); ++ if (base.is(esp)) set_sib(times_1, esp, base); ++ set_disp8(disp); ++ } else { ++ // [base + disp/r] ++ set_modrm(2, base); ++ if (base.is(esp)) set_sib(times_1, esp, base); ++ set_dispr(disp, rmode); ++ } ++} ++ ++ ++Operand::Operand(Register base, ++ Register index, ++ ScaleFactor scale, ++ int32_t disp, ++ RelocInfo::Mode rmode) { ++ DCHECK(!index.is(esp)); // illegal addressing mode ++ // [base + index*scale + disp/r] ++ if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) { ++ // [base + index*scale] ++ set_modrm(0, esp); ++ set_sib(scale, index, base); ++ } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) { ++ // [base + index*scale + disp8] ++ set_modrm(1, esp); ++ set_sib(scale, index, base); ++ set_disp8(disp); ++ } else { ++ // [base + index*scale + disp/r] ++ set_modrm(2, esp); ++ set_sib(scale, index, base); ++ set_dispr(disp, rmode); ++ } ++} ++ ++ ++Operand::Operand(Register index, ++ ScaleFactor scale, ++ int32_t disp, ++ RelocInfo::Mode rmode) { ++ DCHECK(!index.is(esp)); // illegal addressing mode ++ // [index*scale + disp/r] ++ set_modrm(0, esp); ++ set_sib(scale, index, ebp); ++ set_dispr(disp, rmode); ++} ++ ++ ++bool Operand::is_reg(Register reg) const { ++ return ((buf_[0] & 0xF8) == 0xC0) // addressing mode is register only. ++ && ((buf_[0] & 0x07) == reg.code()); // register codes match. ++} ++ ++ ++bool Operand::is_reg_only() const { ++ return (buf_[0] & 0xF8) == 0xC0; // Addressing mode is register only. ++} ++ ++ ++Register Operand::reg() const { ++ DCHECK(is_reg_only()); ++ return Register::from_code(buf_[0] & 0x07); ++} ++ ++ ++// ----------------------------------------------------------------------------- ++// Implementation of Assembler. ++ ++// Emit a single byte. Must always be inlined. ++#define EMIT(x) \ ++ *pc_++ = (x) ++ ++Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) ++ : AssemblerBase(isolate_data, buffer, buffer_size) { ++// Clear the buffer in debug mode unless it was provided by the ++// caller in which case we can't be sure it's okay to overwrite ++// existing code in it; see CodePatcher::CodePatcher(...). ++#ifdef DEBUG ++ if (own_buffer_) { ++ memset(buffer_, 0xCC, buffer_size_); // int3 ++ } ++#endif ++ ++ reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); ++} ++ ++ ++void Assembler::GetCode(CodeDesc* desc) { ++ // Finalize code (at this point overflow() may be true, but the gap ensures ++ // that we are still not overlapping instructions and relocation info). ++ DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. ++ // Set up code descriptor. ++ desc->buffer = buffer_; ++ desc->buffer_size = buffer_size_; ++ desc->instr_size = pc_offset(); ++ desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); ++ desc->origin = this; ++ desc->constant_pool_size = 0; ++ desc->unwinding_info_size = 0; ++ desc->unwinding_info = nullptr; ++} ++ ++ ++void Assembler::Align(int m) { ++ DCHECK(base::bits::IsPowerOfTwo(m)); ++ int mask = m - 1; ++ int addr = pc_offset(); ++ Nop((m - (addr & mask)) & mask); ++} ++ ++ ++bool Assembler::IsNop(Address addr) { ++ Address a = addr; ++ while (*a == 0x66) a++; ++ if (*a == 0x90) return true; ++ if (a[0] == 0xf && a[1] == 0x1f) return true; ++ return false; ++} ++ ++ ++void Assembler::Nop(int bytes) { ++ EnsureSpace ensure_space(this); ++ ++ // Older CPUs that do not support SSE2 may not support multibyte NOP ++ // instructions. ++ for (; bytes > 0; bytes--) { ++ EMIT(0x90); ++ } ++ return; ++} ++ ++ ++void Assembler::CodeTargetAlign() { ++ Align(16); // Preferred alignment of jump targets on ia32. ++} ++ ++ ++void Assembler::cpuid() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xA2); ++} ++ ++ ++void Assembler::pushad() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x60); ++} ++ ++ ++void Assembler::popad() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x61); ++} ++ ++ ++void Assembler::pushfd() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x9C); ++} ++ ++ ++void Assembler::popfd() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x9D); ++} ++ ++ ++void Assembler::push(const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ if (x.is_int8()) { ++ EMIT(0x6a); ++ EMIT(x.x_); ++ } else { ++ EMIT(0x68); ++ emit(x); ++ } ++} ++ ++ ++void Assembler::push_imm32(int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x68); ++ emit(imm32); ++} ++ ++ ++void Assembler::push(Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x50 | src.code()); ++} ++ ++ ++void Assembler::push(const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFF); ++ emit_operand(esi, src); ++} ++ ++ ++void Assembler::pop(Register dst) { ++ DCHECK(reloc_info_writer.last_pc() != NULL); ++ EnsureSpace ensure_space(this); ++ EMIT(0x58 | dst.code()); ++} ++ ++ ++void Assembler::pop(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x8F); ++ emit_operand(eax, dst); ++} ++ ++ ++void Assembler::enter(const Immediate& size) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC8); ++ emit_w(size); ++ EMIT(0); ++} ++ ++ ++void Assembler::leave() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC9); ++} ++ ++ ++void Assembler::mov_b(Register dst, const Operand& src) { ++ CHECK(dst.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x8A); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::mov_b(const Operand& dst, const Immediate& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC6); ++ emit_operand(eax, dst); ++ EMIT(static_cast(src.x_)); ++} ++ ++ ++void Assembler::mov_b(const Operand& dst, int8_t imm8) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC6); ++ emit_operand(eax, dst); ++ EMIT(imm8); ++} ++ ++ ++void Assembler::mov_b(const Operand& dst, Register src) { ++ CHECK(src.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x88); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::mov_w(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x8B); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::mov_w(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x89); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::mov_w(const Operand& dst, int16_t imm16) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0xC7); ++ emit_operand(eax, dst); ++ EMIT(static_cast(imm16 & 0xff)); ++ EMIT(static_cast(imm16 >> 8)); ++} ++ ++ ++void Assembler::mov_w(const Operand& dst, const Immediate& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0xC7); ++ emit_operand(eax, dst); ++ EMIT(static_cast(src.x_ & 0xff)); ++ EMIT(static_cast(src.x_ >> 8)); ++} ++ ++ ++void Assembler::mov(Register dst, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xB8 | dst.code()); ++ emit(imm32); ++} ++ ++ ++void Assembler::mov(Register dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xB8 | dst.code()); ++ emit(x); ++} ++ ++ ++void Assembler::mov(Register dst, Handle handle) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xB8 | dst.code()); ++ emit(handle); ++} ++ ++ ++void Assembler::mov(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x8B); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::mov(Register dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x89); ++ EMIT(0xC0 | src.code() << 3 | dst.code()); ++} ++ ++ ++void Assembler::mov(const Operand& dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC7); ++ emit_operand(eax, dst); ++ emit(x); ++} ++ ++ ++void Assembler::mov(const Operand& dst, Handle handle) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xC7); ++ emit_operand(eax, dst); ++ emit(handle); ++} ++ ++ ++void Assembler::mov(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x89); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::movsx_b(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xBE); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::movsx_w(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xBF); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::movzx_b(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xB6); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::movzx_w(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xB7); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::cld() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFC); ++} ++ ++ ++void Assembler::rep_movs() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF3); ++ EMIT(0xA5); ++} ++ ++ ++void Assembler::rep_stos() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF3); ++ EMIT(0xAB); ++} ++ ++ ++void Assembler::stos() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xAB); ++} ++ ++ ++void Assembler::xchg(Register dst, Register src) { ++ EnsureSpace ensure_space(this); ++ if (src.is(eax) || dst.is(eax)) { // Single-byte encoding. ++ EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); ++ } else { ++ EMIT(0x87); ++ EMIT(0xC0 | src.code() << 3 | dst.code()); ++ } ++} ++ ++ ++void Assembler::xchg(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x87); ++ emit_operand(dst, src); ++} ++ ++void Assembler::xchg_b(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x86); ++ emit_operand(reg, op); ++} ++ ++void Assembler::xchg_w(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x87); ++ emit_operand(reg, op); ++} ++ ++void Assembler::lock() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF0); ++} ++ ++void Assembler::cmpxchg(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xB1); ++ emit_operand(src, dst); ++} ++ ++void Assembler::cmpxchg_b(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xB0); ++ emit_operand(src, dst); ++} ++ ++void Assembler::cmpxchg_w(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x0F); ++ EMIT(0xB1); ++ emit_operand(src, dst); ++} ++ ++void Assembler::adc(Register dst, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ emit_arith(2, Operand(dst), Immediate(imm32)); ++} ++ ++ ++void Assembler::adc(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x13); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::add(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x03); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::add(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x01); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::add(const Operand& dst, const Immediate& x) { ++ DCHECK(reloc_info_writer.last_pc() != NULL); ++ EnsureSpace ensure_space(this); ++ emit_arith(0, dst, x); ++} ++ ++ ++void Assembler::and_(Register dst, int32_t imm32) { ++ and_(dst, Immediate(imm32)); ++} ++ ++ ++void Assembler::and_(Register dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ emit_arith(4, Operand(dst), x); ++} ++ ++ ++void Assembler::and_(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x23); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::and_(const Operand& dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ emit_arith(4, dst, x); ++} ++ ++ ++void Assembler::and_(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x21); ++ emit_operand(src, dst); ++} ++ ++void Assembler::cmpb(const Operand& op, Immediate imm8) { ++ DCHECK(imm8.is_int8() || imm8.is_uint8()); ++ EnsureSpace ensure_space(this); ++ if (op.is_reg(eax)) { ++ EMIT(0x3C); ++ } else { ++ EMIT(0x80); ++ emit_operand(edi, op); // edi == 7 ++ } ++ emit_b(imm8); ++} ++ ++ ++void Assembler::cmpb(const Operand& op, Register reg) { ++ CHECK(reg.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x38); ++ emit_operand(reg, op); ++} ++ ++ ++void Assembler::cmpb(Register reg, const Operand& op) { ++ CHECK(reg.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x3A); ++ emit_operand(reg, op); ++} ++ ++ ++void Assembler::cmpw(const Operand& op, Immediate imm16) { ++ DCHECK(imm16.is_int16()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x81); ++ emit_operand(edi, op); ++ emit_w(imm16); ++} ++ ++void Assembler::cmpw(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x3B); ++ emit_operand(reg, op); ++} ++ ++void Assembler::cmpw(const Operand& op, Register reg) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x39); ++ emit_operand(reg, op); ++} ++ ++void Assembler::cmp(Register reg, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ emit_arith(7, Operand(reg), Immediate(imm32)); ++} ++ ++ ++void Assembler::cmp(Register reg, Handle handle) { ++ EnsureSpace ensure_space(this); ++ emit_arith(7, Operand(reg), Immediate(handle)); ++} ++ ++ ++void Assembler::cmp(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x3B); ++ emit_operand(reg, op); ++} ++ ++void Assembler::cmp(const Operand& op, Register reg) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x39); ++ emit_operand(reg, op); ++} ++ ++void Assembler::cmp(const Operand& op, const Immediate& imm) { ++ EnsureSpace ensure_space(this); ++ emit_arith(7, op, imm); ++} ++ ++ ++void Assembler::cmp(const Operand& op, Handle handle) { ++ EnsureSpace ensure_space(this); ++ emit_arith(7, op, Immediate(handle)); ++} ++ ++ ++void Assembler::cmpb_al(const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x38); // CMP r/m8, r8 ++ emit_operand(eax, op); // eax has same code as register al. ++} ++ ++ ++void Assembler::cmpw_ax(const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x39); // CMP r/m16, r16 ++ emit_operand(eax, op); // eax has same code as register ax. ++} ++ ++ ++void Assembler::dec_b(Register dst) { ++ CHECK(dst.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0xFE); ++ EMIT(0xC8 | dst.code()); ++} ++ ++ ++void Assembler::dec_b(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFE); ++ emit_operand(ecx, dst); ++} ++ ++ ++void Assembler::dec(Register dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x48 | dst.code()); ++} ++ ++ ++void Assembler::dec(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFF); ++ emit_operand(ecx, dst); ++} ++ ++ ++void Assembler::cdq() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x99); ++} ++ ++ ++void Assembler::idiv(const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ emit_operand(edi, src); ++} ++ ++ ++void Assembler::div(const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ emit_operand(esi, src); ++} ++ ++ ++void Assembler::imul(Register reg) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ EMIT(0xE8 | reg.code()); ++} ++ ++ ++void Assembler::imul(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xAF); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::imul(Register dst, Register src, int32_t imm32) { ++ imul(dst, Operand(src), imm32); ++} ++ ++ ++void Assembler::imul(Register dst, const Operand& src, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ if (is_int8(imm32)) { ++ EMIT(0x6B); ++ emit_operand(dst, src); ++ EMIT(imm32); ++ } else { ++ EMIT(0x69); ++ emit_operand(dst, src); ++ emit(imm32); ++ } ++} ++ ++ ++void Assembler::inc(Register dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x40 | dst.code()); ++} ++ ++ ++void Assembler::inc(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFF); ++ emit_operand(eax, dst); ++} ++ ++ ++void Assembler::lea(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x8D); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::mul(Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ EMIT(0xE0 | src.code()); ++} ++ ++ ++void Assembler::neg(Register dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ EMIT(0xD8 | dst.code()); ++} ++ ++ ++void Assembler::neg(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ emit_operand(ebx, dst); ++} ++ ++ ++void Assembler::not_(Register dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ EMIT(0xD0 | dst.code()); ++} ++ ++ ++void Assembler::not_(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ emit_operand(edx, dst); ++} ++ ++ ++void Assembler::or_(Register dst, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ emit_arith(1, Operand(dst), Immediate(imm32)); ++} ++ ++ ++void Assembler::or_(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0B); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::or_(const Operand& dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ emit_arith(1, dst, x); ++} ++ ++ ++void Assembler::or_(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x09); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::rcl(Register dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ EMIT(0xD0 | dst.code()); ++ } else { ++ EMIT(0xC1); ++ EMIT(0xD0 | dst.code()); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::rcr(Register dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ EMIT(0xD8 | dst.code()); ++ } else { ++ EMIT(0xC1); ++ EMIT(0xD8 | dst.code()); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::ror(const Operand& dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ emit_operand(ecx, dst); ++ } else { ++ EMIT(0xC1); ++ emit_operand(ecx, dst); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::ror_cl(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD3); ++ emit_operand(ecx, dst); ++} ++ ++ ++void Assembler::sar(const Operand& dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ emit_operand(edi, dst); ++ } else { ++ EMIT(0xC1); ++ emit_operand(edi, dst); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::sar_cl(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD3); ++ emit_operand(edi, dst); ++} ++ ++void Assembler::sbb(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x1B); ++ emit_operand(dst, src); ++} ++ ++void Assembler::shld(Register dst, Register src, uint8_t shift) { ++ DCHECK(is_uint5(shift)); ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xA4); ++ emit_operand(src, Operand(dst)); ++ EMIT(shift); ++} ++ ++void Assembler::shld_cl(Register dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xA5); ++ emit_operand(src, Operand(dst)); ++} ++ ++ ++void Assembler::shl(const Operand& dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ emit_operand(esp, dst); ++ } else { ++ EMIT(0xC1); ++ emit_operand(esp, dst); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::shl_cl(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD3); ++ emit_operand(esp, dst); ++} ++ ++void Assembler::shr(const Operand& dst, uint8_t imm8) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint5(imm8)); // illegal shift count ++ if (imm8 == 1) { ++ EMIT(0xD1); ++ emit_operand(ebp, dst); ++ } else { ++ EMIT(0xC1); ++ emit_operand(ebp, dst); ++ EMIT(imm8); ++ } ++} ++ ++ ++void Assembler::shr_cl(const Operand& dst) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD3); ++ emit_operand(ebp, dst); ++} ++ ++void Assembler::shrd(Register dst, Register src, uint8_t shift) { ++ DCHECK(is_uint5(shift)); ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xAC); ++ emit_operand(dst, Operand(src)); ++ EMIT(shift); ++} ++ ++void Assembler::shrd_cl(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xAD); ++ emit_operand(src, dst); ++} ++ ++void Assembler::sub(const Operand& dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ emit_arith(5, dst, x); ++} ++ ++ ++void Assembler::sub(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x2B); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::sub(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x29); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::test(Register reg, const Immediate& imm) { ++ if (imm.is_uint8()) { ++ test_b(reg, imm); ++ return; ++ } ++ ++ EnsureSpace ensure_space(this); ++ // This is not using emit_arith because test doesn't support ++ // sign-extension of 8-bit operands. ++ if (reg.is(eax)) { ++ EMIT(0xA9); ++ } else { ++ EMIT(0xF7); ++ EMIT(0xC0 | reg.code()); ++ } ++ emit(imm); ++} ++ ++ ++void Assembler::test(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x85); ++ emit_operand(reg, op); ++} ++ ++ ++void Assembler::test_b(Register reg, const Operand& op) { ++ CHECK(reg.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x84); ++ emit_operand(reg, op); ++} ++ ++ ++void Assembler::test(const Operand& op, const Immediate& imm) { ++ if (op.is_reg_only()) { ++ test(op.reg(), imm); ++ return; ++ } ++ if (imm.is_uint8()) { ++ return test_b(op, imm); ++ } ++ EnsureSpace ensure_space(this); ++ EMIT(0xF7); ++ emit_operand(eax, op); ++ emit(imm); ++} ++ ++void Assembler::test_b(Register reg, Immediate imm8) { ++ DCHECK(imm8.is_uint8()); ++ EnsureSpace ensure_space(this); ++ // Only use test against byte for registers that have a byte ++ // variant: eax, ebx, ecx, and edx. ++ if (reg.is(eax)) { ++ EMIT(0xA8); ++ emit_b(imm8); ++ } else if (reg.is_byte_register()) { ++ emit_arith_b(0xF6, 0xC0, reg, static_cast(imm8.x_)); ++ } else { ++ EMIT(0x66); ++ EMIT(0xF7); ++ EMIT(0xC0 | reg.code()); ++ emit_w(imm8); ++ } ++} ++ ++void Assembler::test_b(const Operand& op, Immediate imm8) { ++ if (op.is_reg_only()) { ++ test_b(op.reg(), imm8); ++ return; ++ } ++ EnsureSpace ensure_space(this); ++ EMIT(0xF6); ++ emit_operand(eax, op); ++ emit_b(imm8); ++} ++ ++void Assembler::test_w(Register reg, Immediate imm16) { ++ DCHECK(imm16.is_int16() || imm16.is_uint16()); ++ EnsureSpace ensure_space(this); ++ if (reg.is(eax)) { ++ EMIT(0xA9); ++ emit_w(imm16); ++ } else { ++ EMIT(0x66); ++ EMIT(0xF7); ++ EMIT(0xc0 | reg.code()); ++ emit_w(imm16); ++ } ++} ++ ++void Assembler::test_w(Register reg, const Operand& op) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0x85); ++ emit_operand(reg, op); ++} ++ ++void Assembler::test_w(const Operand& op, Immediate imm16) { ++ DCHECK(imm16.is_int16() || imm16.is_uint16()); ++ if (op.is_reg_only()) { ++ test_w(op.reg(), imm16); ++ return; ++ } ++ EnsureSpace ensure_space(this); ++ EMIT(0x66); ++ EMIT(0xF7); ++ emit_operand(eax, op); ++ emit_w(imm16); ++} ++ ++void Assembler::xor_(Register dst, int32_t imm32) { ++ EnsureSpace ensure_space(this); ++ emit_arith(6, Operand(dst), Immediate(imm32)); ++} ++ ++ ++void Assembler::xor_(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x33); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::xor_(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x31); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::xor_(const Operand& dst, const Immediate& x) { ++ EnsureSpace ensure_space(this); ++ emit_arith(6, dst, x); ++} ++ ++ ++void Assembler::bt(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xA3); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::bts(const Operand& dst, Register src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xAB); ++ emit_operand(src, dst); ++} ++ ++ ++void Assembler::bsr(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xBD); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::bsf(Register dst, const Operand& src) { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0xBC); ++ emit_operand(dst, src); ++} ++ ++ ++void Assembler::hlt() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xF4); ++} ++ ++ ++void Assembler::int3() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xCC); ++} ++ ++ ++void Assembler::nop() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x90); ++} ++ ++ ++void Assembler::ret(int imm16) { ++ EnsureSpace ensure_space(this); ++ DCHECK(is_uint16(imm16)); ++ if (imm16 == 0) { ++ EMIT(0xC3); ++ } else { ++ EMIT(0xC2); ++ EMIT(imm16 & 0xFF); ++ EMIT((imm16 >> 8) & 0xFF); ++ } ++} ++ ++ ++void Assembler::ud2() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0x0B); ++} ++ ++ ++// Labels refer to positions in the (to be) generated code. ++// There are bound, linked, and unused labels. ++// ++// Bound labels refer to known positions in the already ++// generated code. pos() is the position the label refers to. ++// ++// Linked labels refer to unknown positions in the code ++// to be generated; pos() is the position of the 32bit ++// Displacement of the last instruction using the label. ++ ++ ++void Assembler::print(Label* L) { ++ if (L->is_unused()) { ++ PrintF("unused label\n"); ++ } else if (L->is_bound()) { ++ PrintF("bound label to %d\n", L->pos()); ++ } else if (L->is_linked()) { ++ Label l = *L; ++ PrintF("unbound label"); ++ while (l.is_linked()) { ++ Displacement disp = disp_at(&l); ++ PrintF("@ %d ", l.pos()); ++ disp.print(); ++ PrintF("\n"); ++ disp.next(&l); ++ } ++ } else { ++ PrintF("label in inconsistent state (pos = %d)\n", L->pos_); ++ } ++} ++ ++ ++void Assembler::bind_to(Label* L, int pos) { ++ EnsureSpace ensure_space(this); ++ DCHECK(0 <= pos && pos <= pc_offset()); // must have a valid binding position ++ while (L->is_linked()) { ++ Displacement disp = disp_at(L); ++ int fixup_pos = L->pos(); ++ if (disp.type() == Displacement::CODE_ABSOLUTE) { ++ long_at_put(fixup_pos, reinterpret_cast(buffer_ + pos)); ++ internal_reference_positions_.push_back(fixup_pos); ++ } else if (disp.type() == Displacement::CODE_RELATIVE) { ++ // Relative to Code* heap object pointer. ++ long_at_put(fixup_pos, pos + Code::kHeaderSize - kHeapObjectTag); ++ } else { ++ if (disp.type() == Displacement::UNCONDITIONAL_JUMP) { ++ DCHECK(byte_at(fixup_pos - 1) == 0xE9); // jmp expected ++ } ++ // Relative address, relative to point after address. ++ int imm32 = pos - (fixup_pos + sizeof(int32_t)); ++ long_at_put(fixup_pos, imm32); ++ } ++ disp.next(L); ++ } ++ while (L->is_near_linked()) { ++ int fixup_pos = L->near_link_pos(); ++ int offset_to_next = ++ static_cast(*reinterpret_cast(addr_at(fixup_pos))); ++ DCHECK(offset_to_next <= 0); ++ // Relative address, relative to point after address. ++ int disp = pos - fixup_pos - sizeof(int8_t); ++ CHECK(0 <= disp && disp <= 127); ++ set_byte_at(fixup_pos, disp); ++ if (offset_to_next < 0) { ++ L->link_to(fixup_pos + offset_to_next, Label::kNear); ++ } else { ++ L->UnuseNear(); ++ } ++ } ++ L->bind_to(pos); ++} ++ ++ ++void Assembler::bind(Label* L) { ++ EnsureSpace ensure_space(this); ++ DCHECK(!L->is_bound()); // label can only be bound once ++ bind_to(L, pc_offset()); ++} ++ ++ ++void Assembler::call(Label* L) { ++ EnsureSpace ensure_space(this); ++ if (L->is_bound()) { ++ const int long_size = 5; ++ int offs = L->pos() - pc_offset(); ++ DCHECK(offs <= 0); ++ // 1110 1000 #32-bit disp. ++ EMIT(0xE8); ++ emit(offs - long_size); ++ } else { ++ // 1110 1000 #32-bit disp. ++ EMIT(0xE8); ++ emit_disp(L, Displacement::OTHER); ++ } ++} ++ ++ ++void Assembler::call(byte* entry, RelocInfo::Mode rmode) { ++ EnsureSpace ensure_space(this); ++ DCHECK(!RelocInfo::IsCodeTarget(rmode)); ++ EMIT(0xE8); ++ if (RelocInfo::IsRuntimeEntry(rmode)) { ++ emit(reinterpret_cast(entry), rmode); ++ } else { ++ emit(entry - (pc_ + sizeof(int32_t)), rmode); ++ } ++} ++ ++ ++int Assembler::CallSize(const Operand& adr) { ++ // Call size is 1 (opcode) + adr.len_ (operand). ++ return 1 + adr.len_; ++} ++ ++ ++void Assembler::call(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFF); ++ emit_operand(edx, adr); ++} ++ ++ ++int Assembler::CallSize(Handle code, RelocInfo::Mode rmode) { ++ return 1 /* EMIT */ + sizeof(uint32_t) /* emit */; ++} ++ ++ ++void Assembler::call(Handle code, ++ RelocInfo::Mode rmode, ++ TypeFeedbackId ast_id) { ++ EnsureSpace ensure_space(this); ++ DCHECK(RelocInfo::IsCodeTarget(rmode) ++ || rmode == RelocInfo::CODE_AGE_SEQUENCE); ++ EMIT(0xE8); ++ emit(code, rmode, ast_id); ++} ++ ++ ++void Assembler::jmp(Label* L, Label::Distance distance) { ++ EnsureSpace ensure_space(this); ++ if (L->is_bound()) { ++ const int short_size = 2; ++ const int long_size = 5; ++ int offs = L->pos() - pc_offset(); ++ DCHECK(offs <= 0); ++ if (is_int8(offs - short_size)) { ++ // 1110 1011 #8-bit disp. ++ EMIT(0xEB); ++ EMIT((offs - short_size) & 0xFF); ++ } else { ++ // 1110 1001 #32-bit disp. ++ EMIT(0xE9); ++ emit(offs - long_size); ++ } ++ } else if (distance == Label::kNear) { ++ EMIT(0xEB); ++ emit_near_disp(L); ++ } else { ++ // 1110 1001 #32-bit disp. ++ EMIT(0xE9); ++ emit_disp(L, Displacement::UNCONDITIONAL_JUMP); ++ } ++} ++ ++ ++void Assembler::jmp(byte* entry, RelocInfo::Mode rmode) { ++ EnsureSpace ensure_space(this); ++ DCHECK(!RelocInfo::IsCodeTarget(rmode)); ++ EMIT(0xE9); ++ if (RelocInfo::IsRuntimeEntry(rmode)) { ++ emit(reinterpret_cast(entry), rmode); ++ } else { ++ emit(entry - (pc_ + sizeof(int32_t)), rmode); ++ } ++} ++ ++ ++void Assembler::jmp(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xFF); ++ emit_operand(esp, adr); ++} ++ ++ ++void Assembler::jmp(Handle code, RelocInfo::Mode rmode) { ++ EnsureSpace ensure_space(this); ++ DCHECK(RelocInfo::IsCodeTarget(rmode)); ++ EMIT(0xE9); ++ emit(code, rmode); ++} ++ ++ ++void Assembler::j(Condition cc, Label* L, Label::Distance distance) { ++ EnsureSpace ensure_space(this); ++ DCHECK(0 <= cc && static_cast(cc) < 16); ++ if (L->is_bound()) { ++ const int short_size = 2; ++ const int long_size = 6; ++ int offs = L->pos() - pc_offset(); ++ DCHECK(offs <= 0); ++ if (is_int8(offs - short_size)) { ++ // 0111 tttn #8-bit disp ++ EMIT(0x70 | cc); ++ EMIT((offs - short_size) & 0xFF); ++ } else { ++ // 0000 1111 1000 tttn #32-bit disp ++ EMIT(0x0F); ++ EMIT(0x80 | cc); ++ emit(offs - long_size); ++ } ++ } else if (distance == Label::kNear) { ++ EMIT(0x70 | cc); ++ emit_near_disp(L); ++ } else { ++ // 0000 1111 1000 tttn #32-bit disp ++ // Note: could eliminate cond. jumps to this jump if condition ++ // is the same however, seems to be rather unlikely case. ++ EMIT(0x0F); ++ EMIT(0x80 | cc); ++ emit_disp(L, Displacement::OTHER); ++ } ++} ++ ++ ++void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) { ++ EnsureSpace ensure_space(this); ++ DCHECK((0 <= cc) && (static_cast(cc) < 16)); ++ // 0000 1111 1000 tttn #32-bit disp. ++ EMIT(0x0F); ++ EMIT(0x80 | cc); ++ if (RelocInfo::IsRuntimeEntry(rmode)) { ++ emit(reinterpret_cast(entry), rmode); ++ } else { ++ emit(entry - (pc_ + sizeof(int32_t)), rmode); ++ } ++} ++ ++ ++void Assembler::j(Condition cc, Handle code, RelocInfo::Mode rmode) { ++ EnsureSpace ensure_space(this); ++ // 0000 1111 1000 tttn #32-bit disp ++ EMIT(0x0F); ++ EMIT(0x80 | cc); ++ emit(code, rmode); ++} ++ ++ ++// FPU instructions. ++ ++void Assembler::fld(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD9, 0xC0, i); ++} ++ ++ ++void Assembler::fstp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDD, 0xD8, i); ++} ++ ++ ++void Assembler::fld1() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xE8); ++} ++ ++ ++void Assembler::fldpi() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xEB); ++} ++ ++ ++void Assembler::fldz() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xEE); ++} ++ ++ ++void Assembler::fldln2() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xED); ++} ++ ++ ++void Assembler::fld_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ emit_operand(eax, adr); ++} ++ ++ ++void Assembler::fld_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(eax, adr); ++} ++ ++ ++void Assembler::fstp_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ emit_operand(ebx, adr); ++} ++ ++ ++void Assembler::fst_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ emit_operand(edx, adr); ++} ++ ++ ++void Assembler::fldcw(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ emit_operand(ebp, adr); ++} ++ ++ ++void Assembler::fnstcw(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ emit_operand(edi, adr); ++} ++ ++ ++void Assembler::fstp_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(ebx, adr); ++} ++ ++ ++void Assembler::fst_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(edx, adr); ++} ++ ++ ++void Assembler::fild_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ emit_operand(eax, adr); ++} ++ ++ ++void Assembler::fild_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDF); ++ emit_operand(ebp, adr); ++} ++ ++ ++void Assembler::fistp_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ emit_operand(ebx, adr); ++} ++ ++ ++void Assembler::fisttp_s(const Operand& adr) { ++ DCHECK(IsEnabled(SSE3)); ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ emit_operand(ecx, adr); ++} ++ ++ ++void Assembler::fisttp_d(const Operand& adr) { ++ DCHECK(IsEnabled(SSE3)); ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(ecx, adr); ++} ++ ++ ++void Assembler::fist_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ emit_operand(edx, adr); ++} ++ ++ ++void Assembler::fistp_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDF); ++ emit_operand(edi, adr); ++} ++ ++ ++void Assembler::fabs() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xE1); ++} ++ ++ ++void Assembler::fchs() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xE0); ++} ++ ++ ++void Assembler::fsqrt() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xFA); ++} ++ ++ ++void Assembler::fcos() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xFF); ++} ++ ++ ++void Assembler::fsin() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xFE); ++} ++ ++ ++void Assembler::fptan() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF2); ++} ++ ++ ++void Assembler::fyl2x() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF1); ++} ++ ++ ++void Assembler::f2xm1() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF0); ++} ++ ++ ++void Assembler::fscale() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xFD); ++} ++ ++ ++void Assembler::fninit() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ EMIT(0xE3); ++} ++ ++ ++void Assembler::fadd(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDC, 0xC0, i); ++} ++ ++ ++void Assembler::fadd_i(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD8, 0xC0, i); ++} ++ ++ ++void Assembler::fadd_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(eax, adr); ++} ++ ++ ++void Assembler::fsub(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDC, 0xE8, i); ++} ++ ++ ++void Assembler::fsub_i(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD8, 0xE0, i); ++} ++ ++ ++void Assembler::fsubr_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(ebp, adr); ++} ++ ++ ++void Assembler::fsub_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(esp, adr); ++} ++ ++ ++void Assembler::fisub_s(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDA); ++ emit_operand(esp, adr); ++} ++ ++ ++void Assembler::fmul_i(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD8, 0xC8, i); ++} ++ ++ ++void Assembler::fmul(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDC, 0xC8, i); ++} ++ ++ ++void Assembler::fmul_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(ecx, adr); ++} ++ ++ ++void Assembler::fdiv(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDC, 0xF8, i); ++} ++ ++ ++void Assembler::fdiv_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(esi, adr); ++} ++ ++ ++void Assembler::fdivr_d(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDC); ++ emit_operand(edi, adr); ++} ++ ++ ++void Assembler::fdiv_i(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD8, 0xF0, i); ++} ++ ++ ++void Assembler::faddp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDE, 0xC0, i); ++} ++ ++ ++void Assembler::fsubp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDE, 0xE8, i); ++} ++ ++ ++void Assembler::fsubrp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDE, 0xE0, i); ++} ++ ++ ++void Assembler::fmulp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDE, 0xC8, i); ++} ++ ++ ++void Assembler::fdivp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDE, 0xF8, i); ++} ++ ++ ++void Assembler::fprem() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF8); ++} ++ ++ ++void Assembler::fprem1() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF5); ++} ++ ++ ++void Assembler::fxch(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xD9, 0xC8, i); ++} ++ ++ ++void Assembler::fincstp() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xF7); ++} ++ ++ ++void Assembler::ffree(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDD, 0xC0, i); ++} ++ ++ ++void Assembler::ftst() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xE4); ++} ++ ++ ++void Assembler::fxam() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xE5); ++} ++ ++ ++void Assembler::fucomp(int i) { ++ EnsureSpace ensure_space(this); ++ emit_farith(0xDD, 0xE8, i); ++} ++ ++ ++void Assembler::fucompp() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDA); ++ EMIT(0xE9); ++} ++ ++ ++void Assembler::fucomi(int i) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ EMIT(0xE8 + i); ++} ++ ++ ++void Assembler::fucomip() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDF); ++ EMIT(0xE9); ++} ++ ++ ++void Assembler::fcompp() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDE); ++ EMIT(0xD9); ++} ++ ++ ++void Assembler::fnstsw_ax() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDF); ++ EMIT(0xE0); ++} ++ ++ ++void Assembler::fwait() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x9B); ++} ++ ++ ++void Assembler::frndint() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xD9); ++ EMIT(0xFC); ++} ++ ++ ++void Assembler::fnclex() { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDB); ++ EMIT(0xE2); ++} ++ ++ ++void Assembler::fnsave(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(esi, adr); ++} ++ ++ ++void Assembler::frstor(const Operand& adr) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xDD); ++ emit_operand(esp, adr); ++} ++ ++ ++void Assembler::sahf() { ++ EnsureSpace ensure_space(this); ++ EMIT(0x9E); ++} ++ ++ ++void Assembler::setcc(Condition cc, Register reg) { ++ DCHECK(reg.is_byte_register()); ++ EnsureSpace ensure_space(this); ++ EMIT(0x0F); ++ EMIT(0x90 | cc); ++ EMIT(0xC0 | reg.code()); ++} ++ ++ ++void Assembler::GrowBuffer() { ++ DCHECK(buffer_overflow()); ++ if (!own_buffer_) FATAL("external code buffer is too small"); ++ ++ // Compute new buffer size. ++ CodeDesc desc; // the new buffer ++ desc.buffer_size = 2 * buffer_size_; ++ ++ // Some internal data structures overflow for very large buffers, ++ // they must ensure that kMaximalBufferSize is not too large. ++ if (desc.buffer_size > kMaximalBufferSize || ++ static_cast(desc.buffer_size) > ++ isolate()->heap()->MaxOldGenerationSize()) { ++ V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); ++ } ++ ++ // Set up new buffer. ++ desc.buffer = NewArray(desc.buffer_size); ++ desc.origin = this; ++ desc.instr_size = pc_offset(); ++ desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos()); ++ ++ // Clear the buffer in debug mode. Use 'int3' instructions to make ++ // sure to get into problems if we ever run uninitialized code. ++#ifdef DEBUG ++ memset(desc.buffer, 0xCC, desc.buffer_size); ++#endif ++ ++ // Copy the data. ++ int pc_delta = desc.buffer - buffer_; ++ int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); ++ MemMove(desc.buffer, buffer_, desc.instr_size); ++ MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(), ++ desc.reloc_size); ++ ++ DeleteArray(buffer_); ++ buffer_ = desc.buffer; ++ buffer_size_ = desc.buffer_size; ++ pc_ += pc_delta; ++ reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta, ++ reloc_info_writer.last_pc() + pc_delta); ++ ++ // Relocate internal references. ++ for (auto pos : internal_reference_positions_) { ++ int32_t* p = reinterpret_cast(buffer_ + pos); ++ *p += pc_delta; ++ } ++ ++ DCHECK(!buffer_overflow()); ++} ++ ++ ++void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) { ++ DCHECK(is_uint8(op1) && is_uint8(op2)); // wrong opcode ++ DCHECK(is_uint8(imm8)); ++ DCHECK((op1 & 0x01) == 0); // should be 8bit operation ++ EMIT(op1); ++ EMIT(op2 | dst.code()); ++ EMIT(imm8); ++} ++ ++ ++void Assembler::emit_arith(int sel, Operand dst, const Immediate& x) { ++ DCHECK((0 <= sel) && (sel <= 7)); ++ Register ireg = { sel }; ++ if (x.is_int8()) { ++ EMIT(0x83); // using a sign-extended 8-bit immediate. ++ emit_operand(ireg, dst); ++ EMIT(x.x_ & 0xFF); ++ } else if (dst.is_reg(eax)) { ++ EMIT((sel << 3) | 0x05); // short form if the destination is eax. ++ emit(x); ++ } else { ++ EMIT(0x81); // using a literal 32-bit immediate. ++ emit_operand(ireg, dst); ++ emit(x); ++ } ++} ++ ++ ++void Assembler::emit_operand(Register reg, const Operand& adr) { ++ const unsigned length = adr.len_; ++ DCHECK(length > 0); ++ ++ // Emit updated ModRM byte containing the given register. ++ pc_[0] = (adr.buf_[0] & ~0x38) | (reg.code() << 3); ++ ++ // Emit the rest of the encoded operand. ++ for (unsigned i = 1; i < length; i++) pc_[i] = adr.buf_[i]; ++ pc_ += length; ++ ++ // Emit relocation information if necessary. ++ if (length >= sizeof(int32_t) && !RelocInfo::IsNone(adr.rmode_)) { ++ pc_ -= sizeof(int32_t); // pc_ must be *at* disp32 ++ RecordRelocInfo(adr.rmode_); ++ if (adr.rmode_ == RelocInfo::INTERNAL_REFERENCE) { // Fixup for labels ++ emit_label(*reinterpret_cast(pc_)); ++ } else { ++ pc_ += sizeof(int32_t); ++ } ++ } ++} ++ ++ ++void Assembler::emit_label(Label* label) { ++ if (label->is_bound()) { ++ internal_reference_positions_.push_back(pc_offset()); ++ emit(reinterpret_cast(buffer_ + label->pos())); ++ } else { ++ emit_disp(label, Displacement::CODE_ABSOLUTE); ++ } ++} ++ ++ ++void Assembler::emit_farith(int b1, int b2, int i) { ++ DCHECK(is_uint8(b1) && is_uint8(b2)); // wrong opcode ++ DCHECK(0 <= i && i < 8); // illegal stack offset ++ EMIT(b1); ++ EMIT(b2 + i); ++} ++ ++ ++void Assembler::db(uint8_t data) { ++ EnsureSpace ensure_space(this); ++ EMIT(data); ++} ++ ++ ++void Assembler::dd(uint32_t data) { ++ EnsureSpace ensure_space(this); ++ emit(data); ++} ++ ++ ++void Assembler::dq(uint64_t data) { ++ EnsureSpace ensure_space(this); ++ emit_q(data); ++} ++ ++ ++void Assembler::dd(Label* label) { ++ EnsureSpace ensure_space(this); ++ RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); ++ emit_label(label); ++} ++ ++ ++void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { ++ DCHECK(!RelocInfo::IsNone(rmode)); ++ // Don't record external references unless the heap will be serialized. ++ if (rmode == RelocInfo::EXTERNAL_REFERENCE && ++ !serializer_enabled() && !emit_debug_code()) { ++ return; ++ } ++ RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); ++ reloc_info_writer.Write(&rinfo); ++} ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-25 17:42:57.220465573 +0100 +@@ -0,0 +1,1107 @@ ++// Copyright (c) 1994-2006 Sun Microsystems 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. ++// ++// - Redistribution in binary form must reproduce the above copyright ++// notice, this list of conditions and the following disclaimer in the ++// documentation and/or other materials provided with the distribution. ++// ++// - Neither the name of Sun Microsystems or the names of contributors may ++// be used to endorse or promote products derived from this software without ++// specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ++// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been ++// modified significantly by Google Inc. ++// Copyright 2011 the V8 project authors. All rights reserved. ++ ++// A light-weight IA32 Assembler. ++ ++#ifndef V8_X87_ASSEMBLER_X87_H_ ++#define V8_X87_ASSEMBLER_X87_H_ ++ ++#include ++ ++#include "src/assembler.h" ++#include "src/isolate.h" ++#include "src/utils.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define GENERAL_REGISTERS(V) \ ++ V(eax) \ ++ V(ecx) \ ++ V(edx) \ ++ V(ebx) \ ++ V(esp) \ ++ V(ebp) \ ++ V(esi) \ ++ V(edi) ++ ++#define ALLOCATABLE_GENERAL_REGISTERS(V) \ ++ V(eax) \ ++ V(ecx) \ ++ V(edx) \ ++ V(ebx) \ ++ V(esi) \ ++ V(edi) ++ ++#define DOUBLE_REGISTERS(V) \ ++ V(stX_0) \ ++ V(stX_1) \ ++ V(stX_2) \ ++ V(stX_3) \ ++ V(stX_4) \ ++ V(stX_5) \ ++ V(stX_6) \ ++ V(stX_7) ++ ++#define FLOAT_REGISTERS DOUBLE_REGISTERS ++#define SIMD128_REGISTERS DOUBLE_REGISTERS ++ ++#define ALLOCATABLE_DOUBLE_REGISTERS(V) \ ++ V(stX_0) \ ++ V(stX_1) \ ++ V(stX_2) \ ++ V(stX_3) \ ++ V(stX_4) \ ++ V(stX_5) ++ ++// CPU Registers. ++// ++// 1) We would prefer to use an enum, but enum values are assignment- ++// compatible with int, which has caused code-generation bugs. ++// ++// 2) We would prefer to use a class instead of a struct but we don't like ++// the register initialization to depend on the particular initialization ++// order (which appears to be different on OS X, Linux, and Windows for the ++// installed versions of C++ we tried). Using a struct permits C-style ++// "initialization". Also, the Register objects cannot be const as this ++// forces initialization stubs in MSVC, making us dependent on initialization ++// order. ++// ++// 3) By not using an enum, we are possibly preventing the compiler from ++// doing certain constant folds, which may significantly reduce the ++// code generated for some assembly instructions (because they boil down ++// to a few constants). If this is a problem, we could change the code ++// such that we use an enum in optimized mode, and the struct in debug ++// mode. This way we get the compile-time error checking in debug mode ++// and best performance in optimized code. ++// ++struct Register { ++ enum Code { ++#define REGISTER_CODE(R) kCode_##R, ++ GENERAL_REGISTERS(REGISTER_CODE) ++#undef REGISTER_CODE ++ kAfterLast, ++ kCode_no_reg = -1 ++ }; ++ ++ static const int kNumRegisters = Code::kAfterLast; ++ ++ static Register from_code(int code) { ++ DCHECK(code >= 0); ++ DCHECK(code < kNumRegisters); ++ Register r = {code}; ++ return r; ++ } ++ bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } ++ bool is(Register reg) const { return reg_code == reg.reg_code; } ++ int code() const { ++ DCHECK(is_valid()); ++ return reg_code; ++ } ++ int bit() const { ++ DCHECK(is_valid()); ++ return 1 << reg_code; ++ } ++ ++ bool is_byte_register() const { return reg_code <= 3; } ++ ++ // Unfortunately we can't make this private in a struct. ++ int reg_code; ++}; ++ ++ ++#define DECLARE_REGISTER(R) const Register R = {Register::kCode_##R}; ++GENERAL_REGISTERS(DECLARE_REGISTER) ++#undef DECLARE_REGISTER ++const Register no_reg = {Register::kCode_no_reg}; ++ ++static const bool kSimpleFPAliasing = true; ++static const bool kSimdMaskRegisters = false; ++ ++struct X87Register { ++ enum Code { ++#define REGISTER_CODE(R) kCode_##R, ++ DOUBLE_REGISTERS(REGISTER_CODE) ++#undef REGISTER_CODE ++ kAfterLast, ++ kCode_no_reg = -1 ++ }; ++ ++ static const int kMaxNumRegisters = Code::kAfterLast; ++ static const int kMaxNumAllocatableRegisters = 6; ++ ++ static X87Register from_code(int code) { ++ X87Register result = {code}; ++ return result; ++ } ++ ++ bool is_valid() const { return 0 <= reg_code && reg_code < kMaxNumRegisters; } ++ ++ int code() const { ++ DCHECK(is_valid()); ++ return reg_code; ++ } ++ ++ bool is(X87Register reg) const { return reg_code == reg.reg_code; } ++ ++ int reg_code; ++}; ++ ++typedef X87Register FloatRegister; ++ ++typedef X87Register DoubleRegister; ++ ++// TODO(x87) Define SIMD registers. ++typedef X87Register Simd128Register; ++ ++#define DECLARE_REGISTER(R) \ ++ const DoubleRegister R = {DoubleRegister::kCode_##R}; ++DOUBLE_REGISTERS(DECLARE_REGISTER) ++#undef DECLARE_REGISTER ++const DoubleRegister no_double_reg = {DoubleRegister::kCode_no_reg}; ++ ++enum Condition { ++ // any value < 0 is considered no_condition ++ no_condition = -1, ++ ++ overflow = 0, ++ no_overflow = 1, ++ below = 2, ++ above_equal = 3, ++ equal = 4, ++ not_equal = 5, ++ below_equal = 6, ++ above = 7, ++ negative = 8, ++ positive = 9, ++ parity_even = 10, ++ parity_odd = 11, ++ less = 12, ++ greater_equal = 13, ++ less_equal = 14, ++ greater = 15, ++ ++ // aliases ++ carry = below, ++ not_carry = above_equal, ++ zero = equal, ++ not_zero = not_equal, ++ sign = negative, ++ not_sign = positive ++}; ++ ++ ++// Returns the equivalent of !cc. ++// Negation of the default no_condition (-1) results in a non-default ++// no_condition value (-2). As long as tests for no_condition check ++// for condition < 0, this will work as expected. ++inline Condition NegateCondition(Condition cc) { ++ return static_cast(cc ^ 1); ++} ++ ++ ++// Commute a condition such that {a cond b == b cond' a}. ++inline Condition CommuteCondition(Condition cc) { ++ switch (cc) { ++ case below: ++ return above; ++ case above: ++ return below; ++ case above_equal: ++ return below_equal; ++ case below_equal: ++ return above_equal; ++ case less: ++ return greater; ++ case greater: ++ return less; ++ case greater_equal: ++ return less_equal; ++ case less_equal: ++ return greater_equal; ++ default: ++ return cc; ++ } ++} ++ ++ ++enum RoundingMode { ++ kRoundToNearest = 0x0, ++ kRoundDown = 0x1, ++ kRoundUp = 0x2, ++ kRoundToZero = 0x3 ++}; ++ ++ ++// ----------------------------------------------------------------------------- ++// Machine instruction Immediates ++ ++class Immediate BASE_EMBEDDED { ++ public: ++ inline explicit Immediate(int x); ++ inline explicit Immediate(const ExternalReference& ext); ++ inline explicit Immediate(Handle handle); ++ inline explicit Immediate(Smi* value); ++ inline explicit Immediate(Address addr); ++ inline explicit Immediate(Address x, RelocInfo::Mode rmode); ++ ++ static Immediate CodeRelativeOffset(Label* label) { ++ return Immediate(label); ++ } ++ ++ bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); } ++ bool is_int8() const { ++ return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); ++ } ++ bool is_uint8() const { ++ return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); ++ } ++ bool is_int16() const { ++ return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); ++ } ++ bool is_uint16() const { ++ return v8::internal::is_uint16(x_) && RelocInfo::IsNone(rmode_); ++ } ++ ++ private: ++ inline explicit Immediate(Label* value); ++ ++ int x_; ++ RelocInfo::Mode rmode_; ++ ++ friend class Operand; ++ friend class Assembler; ++ friend class MacroAssembler; ++}; ++ ++ ++// ----------------------------------------------------------------------------- ++// Machine instruction Operands ++ ++enum ScaleFactor { ++ times_1 = 0, ++ times_2 = 1, ++ times_4 = 2, ++ times_8 = 3, ++ times_int_size = times_4, ++ times_half_pointer_size = times_2, ++ times_pointer_size = times_4, ++ times_twice_pointer_size = times_8 ++}; ++ ++ ++class Operand BASE_EMBEDDED { ++ public: ++ // reg ++ INLINE(explicit Operand(Register reg)); ++ ++ // [disp/r] ++ INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); ++ ++ // [disp/r] ++ INLINE(explicit Operand(Immediate imm)); ++ ++ // [base + disp/r] ++ explicit Operand(Register base, int32_t disp, ++ RelocInfo::Mode rmode = RelocInfo::NONE32); ++ ++ // [base + index*scale + disp/r] ++ explicit Operand(Register base, ++ Register index, ++ ScaleFactor scale, ++ int32_t disp, ++ RelocInfo::Mode rmode = RelocInfo::NONE32); ++ ++ // [index*scale + disp/r] ++ explicit Operand(Register index, ++ ScaleFactor scale, ++ int32_t disp, ++ RelocInfo::Mode rmode = RelocInfo::NONE32); ++ ++ static Operand JumpTable(Register index, ScaleFactor scale, Label* table) { ++ return Operand(index, scale, reinterpret_cast(table), ++ RelocInfo::INTERNAL_REFERENCE); ++ } ++ ++ static Operand StaticVariable(const ExternalReference& ext) { ++ return Operand(reinterpret_cast(ext.address()), ++ RelocInfo::EXTERNAL_REFERENCE); ++ } ++ ++ static Operand StaticArray(Register index, ++ ScaleFactor scale, ++ const ExternalReference& arr) { ++ return Operand(index, scale, reinterpret_cast(arr.address()), ++ RelocInfo::EXTERNAL_REFERENCE); ++ } ++ ++ static Operand ForCell(Handle cell) { ++ AllowDeferredHandleDereference embedding_raw_address; ++ return Operand(reinterpret_cast(cell.location()), ++ RelocInfo::CELL); ++ } ++ ++ static Operand ForRegisterPlusImmediate(Register base, Immediate imm) { ++ return Operand(base, imm.x_, imm.rmode_); ++ } ++ ++ // Returns true if this Operand is a wrapper for the specified register. ++ bool is_reg(Register reg) const; ++ ++ // Returns true if this Operand is a wrapper for one register. ++ bool is_reg_only() const; ++ ++ // Asserts that this Operand is a wrapper for one register and returns the ++ // register. ++ Register reg() const; ++ ++ private: ++ // Set the ModRM byte without an encoded 'reg' register. The ++ // register is encoded later as part of the emit_operand operation. ++ inline void set_modrm(int mod, Register rm); ++ ++ inline void set_sib(ScaleFactor scale, Register index, Register base); ++ inline void set_disp8(int8_t disp); ++ inline void set_dispr(int32_t disp, RelocInfo::Mode rmode); ++ ++ byte buf_[6]; ++ // The number of bytes in buf_. ++ unsigned int len_; ++ // Only valid if len_ > 4. ++ RelocInfo::Mode rmode_; ++ ++ friend class Assembler; ++ friend class MacroAssembler; ++}; ++ ++ ++// ----------------------------------------------------------------------------- ++// A Displacement describes the 32bit immediate field of an instruction which ++// may be used together with a Label in order to refer to a yet unknown code ++// position. Displacements stored in the instruction stream are used to describe ++// the instruction and to chain a list of instructions using the same Label. ++// A Displacement contains 2 different fields: ++// ++// next field: position of next displacement in the chain (0 = end of list) ++// type field: instruction type ++// ++// A next value of null (0) indicates the end of a chain (note that there can ++// be no displacement at position zero, because there is always at least one ++// instruction byte before the displacement). ++// ++// Displacement _data field layout ++// ++// |31.....2|1......0| ++// [ next | type | ++ ++class Displacement BASE_EMBEDDED { ++ public: ++ enum Type { UNCONDITIONAL_JUMP, CODE_RELATIVE, OTHER, CODE_ABSOLUTE }; ++ ++ int data() const { return data_; } ++ Type type() const { return TypeField::decode(data_); } ++ void next(Label* L) const { ++ int n = NextField::decode(data_); ++ n > 0 ? L->link_to(n) : L->Unuse(); ++ } ++ void link_to(Label* L) { init(L, type()); } ++ ++ explicit Displacement(int data) { data_ = data; } ++ ++ Displacement(Label* L, Type type) { init(L, type); } ++ ++ void print() { ++ PrintF("%s (%x) ", (type() == UNCONDITIONAL_JUMP ? "jmp" : "[other]"), ++ NextField::decode(data_)); ++ } ++ ++ private: ++ int data_; ++ ++ class TypeField: public BitField {}; ++ class NextField: public BitField {}; ++ ++ void init(Label* L, Type type); ++}; ++ ++ ++class Assembler : public AssemblerBase { ++ private: ++ // We check before assembling an instruction that there is sufficient ++ // space to write an instruction and its relocation information. ++ // The relocation writer's position must be kGap bytes above the end of ++ // the generated instructions. This leaves enough space for the ++ // longest possible ia32 instruction, 15 bytes, and the longest possible ++ // relocation information encoding, RelocInfoWriter::kMaxLength == 16. ++ // (There is a 15 byte limit on ia32 instruction length that rules out some ++ // otherwise valid instructions.) ++ // This allows for a single, fast space check per instruction. ++ static const int kGap = 32; ++ ++ public: ++ // Create an assembler. Instructions and relocation information are emitted ++ // into a buffer, with the instructions starting from the beginning and the ++ // relocation information starting from the end of the buffer. See CodeDesc ++ // for a detailed comment on the layout (globals.h). ++ // ++ // If the provided buffer is NULL, the assembler allocates and grows its own ++ // buffer, and buffer_size determines the initial buffer size. The buffer is ++ // owned by the assembler and deallocated upon destruction of the assembler. ++ // ++ // If the provided buffer is not NULL, the assembler uses the provided buffer ++ // for code generation and assumes its size to be buffer_size. If the buffer ++ // is too small, a fatal error occurs. No deallocation of the buffer is done ++ // upon destruction of the assembler. ++ Assembler(Isolate* isolate, void* buffer, int buffer_size) ++ : Assembler(IsolateData(isolate), buffer, buffer_size) {} ++ Assembler(IsolateData isolate_data, void* buffer, int buffer_size); ++ virtual ~Assembler() { } ++ ++ // GetCode emits any pending (non-emitted) code and fills the descriptor ++ // desc. GetCode() is idempotent; it returns the same result if no other ++ // Assembler functions are invoked in between GetCode() calls. ++ void GetCode(CodeDesc* desc); ++ ++ // Read/Modify the code target in the branch/call instruction at pc. ++ // The isolate argument is unused (and may be nullptr) when skipping flushing. ++ inline static Address target_address_at(Address pc, Address constant_pool); ++ inline static void set_target_address_at( ++ Isolate* isolate, Address pc, Address constant_pool, Address target, ++ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); ++ static inline Address target_address_at(Address pc, Code* code); ++ static inline void set_target_address_at( ++ Isolate* isolate, Address pc, Code* code, Address target, ++ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); ++ ++ // Return the code target address at a call site from the return address ++ // of that call in the instruction stream. ++ inline static Address target_address_from_return_address(Address pc); ++ ++ // This sets the branch destination (which is in the instruction on x86). ++ // This is for calls and branches within generated code. ++ inline static void deserialization_set_special_target_at( ++ Isolate* isolate, Address instruction_payload, Code* code, ++ Address target) { ++ set_target_address_at(isolate, instruction_payload, code, target); ++ } ++ ++ // This sets the internal reference at the pc. ++ inline static void deserialization_set_target_internal_reference_at( ++ Isolate* isolate, Address pc, Address target, ++ RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); ++ ++ static const int kSpecialTargetSize = kPointerSize; ++ ++ // Distance between the address of the code target in the call instruction ++ // and the return address ++ static const int kCallTargetAddressOffset = kPointerSize; ++ ++ static const int kCallInstructionLength = 5; ++ ++ // The debug break slot must be able to contain a call instruction. ++ static const int kDebugBreakSlotLength = kCallInstructionLength; ++ ++ // Distance between start of patched debug break slot and the emitted address ++ // to jump to. ++ static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32. ++ ++ // One byte opcode for test al, 0xXX. ++ static const byte kTestAlByte = 0xA8; ++ // One byte opcode for nop. ++ static const byte kNopByte = 0x90; ++ ++ // One byte opcode for a short unconditional jump. ++ static const byte kJmpShortOpcode = 0xEB; ++ // One byte prefix for a short conditional jump. ++ static const byte kJccShortPrefix = 0x70; ++ static const byte kJncShortOpcode = kJccShortPrefix | not_carry; ++ static const byte kJcShortOpcode = kJccShortPrefix | carry; ++ static const byte kJnzShortOpcode = kJccShortPrefix | not_zero; ++ static const byte kJzShortOpcode = kJccShortPrefix | zero; ++ ++ ++ // --------------------------------------------------------------------------- ++ // Code generation ++ // ++ // - function names correspond one-to-one to ia32 instruction mnemonics ++ // - unless specified otherwise, instructions operate on 32bit operands ++ // - instructions on 8bit (byte) operands/registers have a trailing '_b' ++ // - instructions on 16bit (word) operands/registers have a trailing '_w' ++ // - naming conflicts with C++ keywords are resolved via a trailing '_' ++ ++ // NOTE ON INTERFACE: Currently, the interface is not very consistent ++ // in the sense that some operations (e.g. mov()) can be called in more ++ // the one way to generate the same instruction: The Register argument ++ // can in some cases be replaced with an Operand(Register) argument. ++ // This should be cleaned up and made more orthogonal. The questions ++ // is: should we always use Operands instead of Registers where an ++ // Operand is possible, or should we have a Register (overloaded) form ++ // instead? We must be careful to make sure that the selected instruction ++ // is obvious from the parameters to avoid hard-to-find code generation ++ // bugs. ++ ++ // Insert the smallest number of nop instructions ++ // possible to align the pc offset to a multiple ++ // of m. m must be a power of 2. ++ void Align(int m); ++ // Insert the smallest number of zero bytes possible to align the pc offset ++ // to a mulitple of m. m must be a power of 2 (>= 2). ++ void DataAlign(int m); ++ void Nop(int bytes = 1); ++ // Aligns code to something that's optimal for a jump target for the platform. ++ void CodeTargetAlign(); ++ ++ // Stack ++ void pushad(); ++ void popad(); ++ ++ void pushfd(); ++ void popfd(); ++ ++ void push(const Immediate& x); ++ void push_imm32(int32_t imm32); ++ void push(Register src); ++ void push(const Operand& src); ++ ++ void pop(Register dst); ++ void pop(const Operand& dst); ++ ++ void enter(const Immediate& size); ++ void leave(); ++ ++ // Moves ++ void mov_b(Register dst, Register src) { mov_b(dst, Operand(src)); } ++ void mov_b(Register dst, const Operand& src); ++ void mov_b(Register dst, int8_t imm8) { mov_b(Operand(dst), imm8); } ++ void mov_b(const Operand& dst, int8_t imm8); ++ void mov_b(const Operand& dst, const Immediate& src); ++ void mov_b(const Operand& dst, Register src); ++ ++ void mov_w(Register dst, const Operand& src); ++ void mov_w(const Operand& dst, Register src); ++ void mov_w(const Operand& dst, int16_t imm16); ++ void mov_w(const Operand& dst, const Immediate& src); ++ ++ ++ void mov(Register dst, int32_t imm32); ++ void mov(Register dst, const Immediate& x); ++ void mov(Register dst, Handle handle); ++ void mov(Register dst, const Operand& src); ++ void mov(Register dst, Register src); ++ void mov(const Operand& dst, const Immediate& x); ++ void mov(const Operand& dst, Handle handle); ++ void mov(const Operand& dst, Register src); ++ ++ void movsx_b(Register dst, Register src) { movsx_b(dst, Operand(src)); } ++ void movsx_b(Register dst, const Operand& src); ++ ++ void movsx_w(Register dst, Register src) { movsx_w(dst, Operand(src)); } ++ void movsx_w(Register dst, const Operand& src); ++ ++ void movzx_b(Register dst, Register src) { movzx_b(dst, Operand(src)); } ++ void movzx_b(Register dst, const Operand& src); ++ ++ void movzx_w(Register dst, Register src) { movzx_w(dst, Operand(src)); } ++ void movzx_w(Register dst, const Operand& src); ++ ++ // Flag management. ++ void cld(); ++ ++ // Repetitive string instructions. ++ void rep_movs(); ++ void rep_stos(); ++ void stos(); ++ ++ // Exchange ++ void xchg(Register dst, Register src); ++ void xchg(Register dst, const Operand& src); ++ void xchg_b(Register reg, const Operand& op); ++ void xchg_w(Register reg, const Operand& op); ++ ++ // Lock prefix ++ void lock(); ++ ++ // CompareExchange ++ void cmpxchg(const Operand& dst, Register src); ++ void cmpxchg_b(const Operand& dst, Register src); ++ void cmpxchg_w(const Operand& dst, Register src); ++ ++ // Arithmetics ++ void adc(Register dst, int32_t imm32); ++ void adc(Register dst, const Operand& src); ++ ++ void add(Register dst, Register src) { add(dst, Operand(src)); } ++ void add(Register dst, const Operand& src); ++ void add(const Operand& dst, Register src); ++ void add(Register dst, const Immediate& imm) { add(Operand(dst), imm); } ++ void add(const Operand& dst, const Immediate& x); ++ ++ void and_(Register dst, int32_t imm32); ++ void and_(Register dst, const Immediate& x); ++ void and_(Register dst, Register src) { and_(dst, Operand(src)); } ++ void and_(Register dst, const Operand& src); ++ void and_(const Operand& dst, Register src); ++ void and_(const Operand& dst, const Immediate& x); ++ ++ void cmpb(Register reg, Immediate imm8) { cmpb(Operand(reg), imm8); } ++ void cmpb(const Operand& op, Immediate imm8); ++ void cmpb(Register reg, const Operand& op); ++ void cmpb(const Operand& op, Register reg); ++ void cmpb(Register dst, Register src) { cmpb(Operand(dst), src); } ++ void cmpb_al(const Operand& op); ++ void cmpw_ax(const Operand& op); ++ void cmpw(const Operand& dst, Immediate src); ++ void cmpw(Register dst, Immediate src) { cmpw(Operand(dst), src); } ++ void cmpw(Register dst, const Operand& src); ++ void cmpw(Register dst, Register src) { cmpw(Operand(dst), src); } ++ void cmpw(const Operand& dst, Register src); ++ void cmp(Register reg, int32_t imm32); ++ void cmp(Register reg, Handle handle); ++ void cmp(Register reg0, Register reg1) { cmp(reg0, Operand(reg1)); } ++ void cmp(Register reg, const Operand& op); ++ void cmp(Register reg, const Immediate& imm) { cmp(Operand(reg), imm); } ++ void cmp(const Operand& op, Register reg); ++ void cmp(const Operand& op, const Immediate& imm); ++ void cmp(const Operand& op, Handle handle); ++ ++ void dec_b(Register dst); ++ void dec_b(const Operand& dst); ++ ++ void dec(Register dst); ++ void dec(const Operand& dst); ++ ++ void cdq(); ++ ++ void idiv(Register src) { idiv(Operand(src)); } ++ void idiv(const Operand& src); ++ void div(Register src) { div(Operand(src)); } ++ void div(const Operand& src); ++ ++ // Signed multiply instructions. ++ void imul(Register src); // edx:eax = eax * src. ++ void imul(Register dst, Register src) { imul(dst, Operand(src)); } ++ void imul(Register dst, const Operand& src); // dst = dst * src. ++ void imul(Register dst, Register src, int32_t imm32); // dst = src * imm32. ++ void imul(Register dst, const Operand& src, int32_t imm32); ++ ++ void inc(Register dst); ++ void inc(const Operand& dst); ++ ++ void lea(Register dst, const Operand& src); ++ ++ // Unsigned multiply instruction. ++ void mul(Register src); // edx:eax = eax * reg. ++ ++ void neg(Register dst); ++ void neg(const Operand& dst); ++ ++ void not_(Register dst); ++ void not_(const Operand& dst); ++ ++ void or_(Register dst, int32_t imm32); ++ void or_(Register dst, Register src) { or_(dst, Operand(src)); } ++ void or_(Register dst, const Operand& src); ++ void or_(const Operand& dst, Register src); ++ void or_(Register dst, const Immediate& imm) { or_(Operand(dst), imm); } ++ void or_(const Operand& dst, const Immediate& x); ++ ++ void rcl(Register dst, uint8_t imm8); ++ void rcr(Register dst, uint8_t imm8); ++ ++ void ror(Register dst, uint8_t imm8) { ror(Operand(dst), imm8); } ++ void ror(const Operand& dst, uint8_t imm8); ++ void ror_cl(Register dst) { ror_cl(Operand(dst)); } ++ void ror_cl(const Operand& dst); ++ ++ void sar(Register dst, uint8_t imm8) { sar(Operand(dst), imm8); } ++ void sar(const Operand& dst, uint8_t imm8); ++ void sar_cl(Register dst) { sar_cl(Operand(dst)); } ++ void sar_cl(const Operand& dst); ++ ++ void sbb(Register dst, const Operand& src); ++ ++ void shl(Register dst, uint8_t imm8) { shl(Operand(dst), imm8); } ++ void shl(const Operand& dst, uint8_t imm8); ++ void shl_cl(Register dst) { shl_cl(Operand(dst)); } ++ void shl_cl(const Operand& dst); ++ void shld(Register dst, Register src, uint8_t shift); ++ void shld_cl(Register dst, Register src); ++ ++ void shr(Register dst, uint8_t imm8) { shr(Operand(dst), imm8); } ++ void shr(const Operand& dst, uint8_t imm8); ++ void shr_cl(Register dst) { shr_cl(Operand(dst)); } ++ void shr_cl(const Operand& dst); ++ void shrd(Register dst, Register src, uint8_t shift); ++ void shrd_cl(Register dst, Register src) { shrd_cl(Operand(dst), src); } ++ void shrd_cl(const Operand& dst, Register src); ++ ++ void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } ++ void sub(const Operand& dst, const Immediate& x); ++ void sub(Register dst, Register src) { sub(dst, Operand(src)); } ++ void sub(Register dst, const Operand& src); ++ void sub(const Operand& dst, Register src); ++ ++ void test(Register reg, const Immediate& imm); ++ void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } ++ void test(Register reg, const Operand& op); ++ void test(const Operand& op, const Immediate& imm); ++ void test(const Operand& op, Register reg) { test(reg, op); } ++ void test_b(Register reg, const Operand& op); ++ void test_b(Register reg, Immediate imm8); ++ void test_b(const Operand& op, Immediate imm8); ++ void test_b(const Operand& op, Register reg) { test_b(reg, op); } ++ void test_b(Register dst, Register src) { test_b(dst, Operand(src)); } ++ void test_w(Register reg, const Operand& op); ++ void test_w(Register reg, Immediate imm16); ++ void test_w(const Operand& op, Immediate imm16); ++ void test_w(const Operand& op, Register reg) { test_w(reg, op); } ++ void test_w(Register dst, Register src) { test_w(dst, Operand(src)); } ++ ++ void xor_(Register dst, int32_t imm32); ++ void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } ++ void xor_(Register dst, const Operand& src); ++ void xor_(const Operand& dst, Register src); ++ void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); } ++ void xor_(const Operand& dst, const Immediate& x); ++ ++ // Bit operations. ++ void bt(const Operand& dst, Register src); ++ void bts(Register dst, Register src) { bts(Operand(dst), src); } ++ void bts(const Operand& dst, Register src); ++ void bsr(Register dst, Register src) { bsr(dst, Operand(src)); } ++ void bsr(Register dst, const Operand& src); ++ void bsf(Register dst, Register src) { bsf(dst, Operand(src)); } ++ void bsf(Register dst, const Operand& src); ++ ++ // Miscellaneous ++ void hlt(); ++ void int3(); ++ void nop(); ++ void ret(int imm16); ++ void ud2(); ++ ++ // Label operations & relative jumps (PPUM Appendix D) ++ // ++ // Takes a branch opcode (cc) and a label (L) and generates ++ // either a backward branch or a forward branch and links it ++ // to the label fixup chain. Usage: ++ // ++ // Label L; // unbound label ++ // j(cc, &L); // forward branch to unbound label ++ // bind(&L); // bind label to the current pc ++ // j(cc, &L); // backward branch to bound label ++ // bind(&L); // illegal: a label may be bound only once ++ // ++ // Note: The same Label can be used for forward and backward branches ++ // but it may be bound only once. ++ ++ void bind(Label* L); // binds an unbound label L to the current code position ++ ++ // Calls ++ void call(Label* L); ++ void call(byte* entry, RelocInfo::Mode rmode); ++ int CallSize(const Operand& adr); ++ void call(Register reg) { call(Operand(reg)); } ++ void call(const Operand& adr); ++ int CallSize(Handle code, RelocInfo::Mode mode); ++ void call(Handle code, ++ RelocInfo::Mode rmode, ++ TypeFeedbackId id = TypeFeedbackId::None()); ++ ++ // Jumps ++ // unconditional jump to L ++ void jmp(Label* L, Label::Distance distance = Label::kFar); ++ void jmp(byte* entry, RelocInfo::Mode rmode); ++ void jmp(Register reg) { jmp(Operand(reg)); } ++ void jmp(const Operand& adr); ++ void jmp(Handle code, RelocInfo::Mode rmode); ++ ++ // Conditional jumps ++ void j(Condition cc, ++ Label* L, ++ Label::Distance distance = Label::kFar); ++ void j(Condition cc, byte* entry, RelocInfo::Mode rmode); ++ void j(Condition cc, Handle code, ++ RelocInfo::Mode rmode = RelocInfo::CODE_TARGET); ++ ++ // Floating-point operations ++ void fld(int i); ++ void fstp(int i); ++ ++ void fld1(); ++ void fldz(); ++ void fldpi(); ++ void fldln2(); ++ ++ void fld_s(const Operand& adr); ++ void fld_d(const Operand& adr); ++ ++ void fstp_s(const Operand& adr); ++ void fst_s(const Operand& adr); ++ void fstp_d(const Operand& adr); ++ void fst_d(const Operand& adr); ++ ++ void fild_s(const Operand& adr); ++ void fild_d(const Operand& adr); ++ ++ void fist_s(const Operand& adr); ++ ++ void fistp_s(const Operand& adr); ++ void fistp_d(const Operand& adr); ++ ++ // The fisttp instructions require SSE3. ++ void fisttp_s(const Operand& adr); ++ void fisttp_d(const Operand& adr); ++ ++ void fabs(); ++ void fchs(); ++ void fsqrt(); ++ void fcos(); ++ void fsin(); ++ void fptan(); ++ void fyl2x(); ++ void f2xm1(); ++ void fscale(); ++ void fninit(); ++ ++ void fadd(int i); ++ void fadd_i(int i); ++ void fadd_d(const Operand& adr); ++ void fsub(int i); ++ void fsub_i(int i); ++ void fsub_d(const Operand& adr); ++ void fsubr_d(const Operand& adr); ++ void fmul(int i); ++ void fmul_d(const Operand& adr); ++ void fmul_i(int i); ++ void fdiv(int i); ++ void fdiv_d(const Operand& adr); ++ void fdivr_d(const Operand& adr); ++ void fdiv_i(int i); ++ ++ void fisub_s(const Operand& adr); ++ ++ void faddp(int i = 1); ++ void fsubp(int i = 1); ++ void fsubr(int i = 1); ++ void fsubrp(int i = 1); ++ void fmulp(int i = 1); ++ void fdivp(int i = 1); ++ void fprem(); ++ void fprem1(); ++ ++ void fxch(int i = 1); ++ void fincstp(); ++ void ffree(int i = 0); ++ ++ void ftst(); ++ void fxam(); ++ void fucomp(int i); ++ void fucompp(); ++ void fucomi(int i); ++ void fucomip(); ++ void fcompp(); ++ void fnstsw_ax(); ++ void fldcw(const Operand& adr); ++ void fnstcw(const Operand& adr); ++ void fwait(); ++ void fnclex(); ++ void fnsave(const Operand& adr); ++ void frstor(const Operand& adr); ++ ++ void frndint(); ++ ++ void sahf(); ++ void setcc(Condition cc, Register reg); ++ ++ void cpuid(); ++ ++ // TODO(lrn): Need SFENCE for movnt? ++ ++ // Check the code size generated from label to here. ++ int SizeOfCodeGeneratedSince(Label* label) { ++ return pc_offset() - label->pos(); ++ } ++ ++ // Mark address of a debug break slot. ++ void RecordDebugBreakSlot(RelocInfo::Mode mode); ++ ++ // Record a comment relocation entry that can be used by a disassembler. ++ // Use --code-comments to enable. ++ void RecordComment(const char* msg); ++ ++ // Record a deoptimization reason that can be used by a log or cpu profiler. ++ // Use --trace-deopt to enable. ++ void RecordDeoptReason(DeoptimizeReason reason, SourcePosition position, ++ int id); ++ ++ // Writes a single byte or word of data in the code stream. Used for ++ // inline tables, e.g., jump-tables. ++ void db(uint8_t data); ++ void dd(uint32_t data); ++ void dq(uint64_t data); ++ void dp(uintptr_t data) { dd(data); } ++ void dd(Label* label); ++ ++ // Check if there is less than kGap bytes available in the buffer. ++ // If this is the case, we need to grow the buffer before emitting ++ // an instruction or relocation information. ++ inline bool buffer_overflow() const { ++ return pc_ >= reloc_info_writer.pos() - kGap; ++ } ++ ++ // Get the number of bytes available in the buffer. ++ inline int available_space() const { return reloc_info_writer.pos() - pc_; } ++ ++ static bool IsNop(Address addr); ++ ++ int relocation_writer_size() { ++ return (buffer_ + buffer_size_) - reloc_info_writer.pos(); ++ } ++ ++ // Avoid overflows for displacements etc. ++ static const int kMaximalBufferSize = 512*MB; ++ ++ byte byte_at(int pos) { return buffer_[pos]; } ++ void set_byte_at(int pos, byte value) { buffer_[pos] = value; } ++ ++ void PatchConstantPoolAccessInstruction(int pc_offset, int offset, ++ ConstantPoolEntry::Access access, ++ ConstantPoolEntry::Type type) { ++ // No embedded constant pool support. ++ UNREACHABLE(); ++ } ++ ++ protected: ++ byte* addr_at(int pos) { return buffer_ + pos; } ++ ++ ++ private: ++ uint32_t long_at(int pos) { ++ return *reinterpret_cast(addr_at(pos)); ++ } ++ void long_at_put(int pos, uint32_t x) { ++ *reinterpret_cast(addr_at(pos)) = x; ++ } ++ ++ // code emission ++ void GrowBuffer(); ++ inline void emit(uint32_t x); ++ inline void emit(Handle handle); ++ inline void emit(uint32_t x, ++ RelocInfo::Mode rmode, ++ TypeFeedbackId id = TypeFeedbackId::None()); ++ inline void emit(Handle code, ++ RelocInfo::Mode rmode, ++ TypeFeedbackId id = TypeFeedbackId::None()); ++ inline void emit(const Immediate& x); ++ inline void emit_b(Immediate x); ++ inline void emit_w(const Immediate& x); ++ inline void emit_q(uint64_t x); ++ ++ // Emit the code-object-relative offset of the label's position ++ inline void emit_code_relative_offset(Label* label); ++ ++ // instruction generation ++ void emit_arith_b(int op1, int op2, Register dst, int imm8); ++ ++ // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) ++ // with a given destination expression and an immediate operand. It attempts ++ // to use the shortest encoding possible. ++ // sel specifies the /n in the modrm byte (see the Intel PRM). ++ void emit_arith(int sel, Operand dst, const Immediate& x); ++ ++ void emit_operand(Register reg, const Operand& adr); ++ ++ void emit_label(Label* label); ++ ++ void emit_farith(int b1, int b2, int i); ++ ++ // labels ++ void print(Label* L); ++ void bind_to(Label* L, int pos); ++ ++ // displacements ++ inline Displacement disp_at(Label* L); ++ inline void disp_at_put(Label* L, Displacement disp); ++ inline void emit_disp(Label* L, Displacement::Type type); ++ inline void emit_near_disp(Label* L); ++ ++ // record reloc info for current pc_ ++ void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); ++ ++ friend class CodePatcher; ++ friend class EnsureSpace; ++ ++ // Internal reference positions, required for (potential) patching in ++ // GrowBuffer(); contains only those internal references whose labels ++ // are already bound. ++ std::deque internal_reference_positions_; ++ ++ // code generation ++ RelocInfoWriter reloc_info_writer; ++}; ++ ++ ++// Helper class that ensures that there is enough space for generating ++// instructions and relocation information. The constructor makes ++// sure that there is enough space and (in debug mode) the destructor ++// checks that we did not generate too much. ++class EnsureSpace BASE_EMBEDDED { ++ public: ++ explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { ++ if (assembler_->buffer_overflow()) assembler_->GrowBuffer(); ++#ifdef DEBUG ++ space_before_ = assembler_->available_space(); ++#endif ++ } ++ ++#ifdef DEBUG ++ ~EnsureSpace() { ++ int bytes_generated = space_before_ - assembler_->available_space(); ++ DCHECK(bytes_generated < assembler_->kGap); ++ } ++#endif ++ ++ private: ++ Assembler* assembler_; ++#ifdef DEBUG ++ int space_before_; ++#endif ++}; ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_ASSEMBLER_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2017-12-25 17:42:57.219465588 +0100 +@@ -0,0 +1,546 @@ ++// Copyright (c) 1994-2006 Sun Microsystems 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. ++// ++// - Redistribution in binary form must reproduce the above copyright ++// notice, this list of conditions and the following disclaimer in the ++// documentation and/or other materials provided with the distribution. ++// ++// - Neither the name of Sun Microsystems or the names of contributors may ++// be used to endorse or promote products derived from this software without ++// specific prior written permission. ++// ++// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ++// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been ++// modified significantly by Google Inc. ++// Copyright 2012 the V8 project authors. All rights reserved. ++ ++// A light-weight IA32 Assembler. ++ ++#ifndef V8_X87_ASSEMBLER_X87_INL_H_ ++#define V8_X87_ASSEMBLER_X87_INL_H_ ++ ++#include "src/x87/assembler-x87.h" ++ ++#include "src/assembler.h" ++#include "src/debug/debug.h" ++#include "src/objects-inl.h" ++ ++namespace v8 { ++namespace internal { ++ ++bool CpuFeatures::SupportsCrankshaft() { return true; } ++ ++bool CpuFeatures::SupportsWasmSimd128() { return false; } ++ ++static const byte kCallOpcode = 0xE8; ++static const int kNoCodeAgeSequenceLength = 5; ++ ++ ++// The modes possibly affected by apply must be in kApplyMask. ++void RelocInfo::apply(intptr_t delta) { ++ if (IsRuntimeEntry(rmode_) || IsCodeTarget(rmode_)) { ++ int32_t* p = reinterpret_cast(pc_); ++ *p -= delta; // Relocate entry. ++ } else if (IsCodeAgeSequence(rmode_)) { ++ if (*pc_ == kCallOpcode) { ++ int32_t* p = reinterpret_cast(pc_ + 1); ++ *p -= delta; // Relocate entry. ++ } ++ } else if (IsDebugBreakSlot(rmode_) && IsPatchedDebugBreakSlotSequence()) { ++ // Special handling of a debug break slot when a break point is set (call ++ // instruction has been inserted). ++ int32_t* p = reinterpret_cast( ++ pc_ + Assembler::kPatchDebugBreakSlotAddressOffset); ++ *p -= delta; // Relocate entry. ++ } else if (IsInternalReference(rmode_)) { ++ // absolute code pointer inside code object moves with the code object. ++ int32_t* p = reinterpret_cast(pc_); ++ *p += delta; // Relocate entry. ++ } ++} ++ ++ ++Address RelocInfo::target_address() { ++ DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); ++ return Assembler::target_address_at(pc_, host_); ++} ++ ++Address RelocInfo::target_address_address() { ++ DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) ++ || rmode_ == EMBEDDED_OBJECT ++ || rmode_ == EXTERNAL_REFERENCE); ++ return reinterpret_cast
(pc_); ++} ++ ++ ++Address RelocInfo::constant_pool_entry_address() { ++ UNREACHABLE(); ++} ++ ++ ++int RelocInfo::target_address_size() { ++ return Assembler::kSpecialTargetSize; ++} ++ ++HeapObject* RelocInfo::target_object() { ++ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); ++ return HeapObject::cast(Memory::Object_at(pc_)); ++} ++ ++Handle RelocInfo::target_object_handle(Assembler* origin) { ++ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); ++ return Handle::cast(Memory::Object_Handle_at(pc_)); ++} ++ ++void RelocInfo::set_target_object(HeapObject* target, ++ WriteBarrierMode write_barrier_mode, ++ ICacheFlushMode icache_flush_mode) { ++ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); ++ Memory::Object_at(pc_) = target; ++ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { ++ Assembler::FlushICache(target->GetIsolate(), pc_, sizeof(Address)); ++ } ++ if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != nullptr) { ++ host()->GetHeap()->RecordWriteIntoCode(host(), this, target); ++ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, ++ target); ++ } ++} ++ ++ ++Address RelocInfo::target_external_reference() { ++ DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE); ++ return Memory::Address_at(pc_); ++} ++ ++ ++Address RelocInfo::target_internal_reference() { ++ DCHECK(rmode_ == INTERNAL_REFERENCE); ++ return Memory::Address_at(pc_); ++} ++ ++ ++Address RelocInfo::target_internal_reference_address() { ++ DCHECK(rmode_ == INTERNAL_REFERENCE); ++ return reinterpret_cast
(pc_); ++} ++ ++ ++Address RelocInfo::target_runtime_entry(Assembler* origin) { ++ DCHECK(IsRuntimeEntry(rmode_)); ++ return reinterpret_cast
(*reinterpret_cast(pc_)); ++} ++ ++void RelocInfo::set_target_runtime_entry(Isolate* isolate, Address target, ++ WriteBarrierMode write_barrier_mode, ++ ICacheFlushMode icache_flush_mode) { ++ DCHECK(IsRuntimeEntry(rmode_)); ++ if (target_address() != target) { ++ set_target_address(isolate, target, write_barrier_mode, icache_flush_mode); ++ } ++} ++ ++ ++Handle RelocInfo::target_cell_handle() { ++ DCHECK(rmode_ == RelocInfo::CELL); ++ Address address = Memory::Address_at(pc_); ++ return Handle(reinterpret_cast(address)); ++} ++ ++ ++Cell* RelocInfo::target_cell() { ++ DCHECK(rmode_ == RelocInfo::CELL); ++ return Cell::FromValueAddress(Memory::Address_at(pc_)); ++} ++ ++ ++void RelocInfo::set_target_cell(Cell* cell, ++ WriteBarrierMode write_barrier_mode, ++ ICacheFlushMode icache_flush_mode) { ++ DCHECK(cell->IsCell()); ++ DCHECK(rmode_ == RelocInfo::CELL); ++ Address address = cell->address() + Cell::kValueOffset; ++ Memory::Address_at(pc_) = address; ++ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { ++ Assembler::FlushICache(cell->GetIsolate(), pc_, sizeof(Address)); ++ } ++ if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { ++ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, ++ cell); ++ } ++} ++ ++Handle RelocInfo::code_age_stub_handle(Assembler* origin) { ++ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); ++ DCHECK(*pc_ == kCallOpcode); ++ return Handle::cast(Memory::Object_Handle_at(pc_ + 1)); ++} ++ ++ ++Code* RelocInfo::code_age_stub() { ++ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); ++ DCHECK(*pc_ == kCallOpcode); ++ return Code::GetCodeFromTargetAddress( ++ Assembler::target_address_at(pc_ + 1, host_)); ++} ++ ++ ++void RelocInfo::set_code_age_stub(Code* stub, ++ ICacheFlushMode icache_flush_mode) { ++ DCHECK(*pc_ == kCallOpcode); ++ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); ++ Assembler::set_target_address_at(stub->GetIsolate(), pc_ + 1, host_, ++ stub->instruction_start(), ++ icache_flush_mode); ++} ++ ++ ++Address RelocInfo::debug_call_address() { ++ DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); ++ Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; ++ return Assembler::target_address_at(location, host_); ++} ++ ++void RelocInfo::set_debug_call_address(Isolate* isolate, Address target) { ++ DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); ++ Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; ++ Assembler::set_target_address_at(isolate, location, host_, target); ++ if (host() != NULL) { ++ Code* target_code = Code::GetCodeFromTargetAddress(target); ++ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, ++ target_code); ++ } ++} ++ ++void RelocInfo::WipeOut(Isolate* isolate) { ++ if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || ++ IsInternalReference(rmode_)) { ++ Memory::Address_at(pc_) = NULL; ++ } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { ++ // Effectively write zero into the relocation. ++ Assembler::set_target_address_at(isolate, pc_, host_, ++ pc_ + sizeof(int32_t)); ++ } else { ++ UNREACHABLE(); ++ } ++} ++ ++template ++void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { ++ RelocInfo::Mode mode = rmode(); ++ if (mode == RelocInfo::EMBEDDED_OBJECT) { ++ visitor->VisitEmbeddedPointer(host(), this); ++ Assembler::FlushICache(isolate, pc_, sizeof(Address)); ++ } else if (RelocInfo::IsCodeTarget(mode)) { ++ visitor->VisitCodeTarget(host(), this); ++ } else if (mode == RelocInfo::CELL) { ++ visitor->VisitCellPointer(host(), this); ++ } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { ++ visitor->VisitExternalReference(host(), this); ++ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { ++ visitor->VisitInternalReference(host(), this); ++ } else if (RelocInfo::IsCodeAgeSequence(mode)) { ++ visitor->VisitCodeAgeSequence(host(), this); ++ } else if (RelocInfo::IsDebugBreakSlot(mode) && ++ IsPatchedDebugBreakSlotSequence()) { ++ visitor->VisitDebugTarget(host(), this); ++ } else if (IsRuntimeEntry(mode)) { ++ visitor->VisitRuntimeEntry(host(), this); ++ } ++} ++ ++ ++template ++void RelocInfo::Visit(Heap* heap) { ++ RelocInfo::Mode mode = rmode(); ++ if (mode == RelocInfo::EMBEDDED_OBJECT) { ++ StaticVisitor::VisitEmbeddedPointer(heap, this); ++ Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address)); ++ } else if (RelocInfo::IsCodeTarget(mode)) { ++ StaticVisitor::VisitCodeTarget(heap, this); ++ } else if (mode == RelocInfo::CELL) { ++ StaticVisitor::VisitCell(heap, this); ++ } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { ++ StaticVisitor::VisitExternalReference(this); ++ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { ++ StaticVisitor::VisitInternalReference(this); ++ } else if (RelocInfo::IsCodeAgeSequence(mode)) { ++ StaticVisitor::VisitCodeAgeSequence(heap, this); ++ } else if (RelocInfo::IsDebugBreakSlot(mode) && ++ IsPatchedDebugBreakSlotSequence()) { ++ StaticVisitor::VisitDebugTarget(heap, this); ++ } else if (IsRuntimeEntry(mode)) { ++ StaticVisitor::VisitRuntimeEntry(this); ++ } ++} ++ ++ ++ ++Immediate::Immediate(int x) { ++ x_ = x; ++ rmode_ = RelocInfo::NONE32; ++} ++ ++Immediate::Immediate(Address x, RelocInfo::Mode rmode) { ++ x_ = reinterpret_cast(x); ++ rmode_ = rmode; ++} ++ ++Immediate::Immediate(const ExternalReference& ext) { ++ x_ = reinterpret_cast(ext.address()); ++ rmode_ = RelocInfo::EXTERNAL_REFERENCE; ++} ++ ++ ++Immediate::Immediate(Label* internal_offset) { ++ x_ = reinterpret_cast(internal_offset); ++ rmode_ = RelocInfo::INTERNAL_REFERENCE; ++} ++ ++ ++Immediate::Immediate(Handle handle) { ++ AllowDeferredHandleDereference using_raw_address; ++ // Verify all Objects referred by code are NOT in new space. ++ Object* obj = *handle; ++ if (obj->IsHeapObject()) { ++ x_ = reinterpret_cast(handle.location()); ++ rmode_ = RelocInfo::EMBEDDED_OBJECT; ++ } else { ++ // no relocation needed ++ x_ = reinterpret_cast(obj); ++ rmode_ = RelocInfo::NONE32; ++ } ++} ++ ++ ++Immediate::Immediate(Smi* value) { ++ x_ = reinterpret_cast(value); ++ rmode_ = RelocInfo::NONE32; ++} ++ ++ ++Immediate::Immediate(Address addr) { ++ x_ = reinterpret_cast(addr); ++ rmode_ = RelocInfo::NONE32; ++} ++ ++ ++void Assembler::emit(uint32_t x) { ++ *reinterpret_cast(pc_) = x; ++ pc_ += sizeof(uint32_t); ++} ++ ++ ++void Assembler::emit_q(uint64_t x) { ++ *reinterpret_cast(pc_) = x; ++ pc_ += sizeof(uint64_t); ++} ++ ++ ++void Assembler::emit(Handle handle) { ++ AllowDeferredHandleDereference heap_object_check; ++ // Verify all Objects referred by code are NOT in new space. ++ Object* obj = *handle; ++ if (obj->IsHeapObject()) { ++ emit(reinterpret_cast(handle.location()), ++ RelocInfo::EMBEDDED_OBJECT); ++ } else { ++ // no relocation needed ++ emit(reinterpret_cast(obj)); ++ } ++} ++ ++ ++void Assembler::emit(uint32_t x, RelocInfo::Mode rmode, TypeFeedbackId id) { ++ if (rmode == RelocInfo::CODE_TARGET && !id.IsNone()) { ++ RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, id.ToInt()); ++ } else if (!RelocInfo::IsNone(rmode) ++ && rmode != RelocInfo::CODE_AGE_SEQUENCE) { ++ RecordRelocInfo(rmode); ++ } ++ emit(x); ++} ++ ++ ++void Assembler::emit(Handle code, ++ RelocInfo::Mode rmode, ++ TypeFeedbackId id) { ++ AllowDeferredHandleDereference embedding_raw_address; ++ emit(reinterpret_cast(code.location()), rmode, id); ++} ++ ++ ++void Assembler::emit(const Immediate& x) { ++ if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) { ++ Label* label = reinterpret_cast(x.x_); ++ emit_code_relative_offset(label); ++ return; ++ } ++ if (!RelocInfo::IsNone(x.rmode_)) RecordRelocInfo(x.rmode_); ++ emit(x.x_); ++} ++ ++ ++void Assembler::emit_code_relative_offset(Label* label) { ++ if (label->is_bound()) { ++ int32_t pos; ++ pos = label->pos() + Code::kHeaderSize - kHeapObjectTag; ++ emit(pos); ++ } else { ++ emit_disp(label, Displacement::CODE_RELATIVE); ++ } ++} ++ ++void Assembler::emit_b(Immediate x) { ++ DCHECK(x.is_int8() || x.is_uint8()); ++ uint8_t value = static_cast(x.x_); ++ *pc_++ = value; ++} ++ ++void Assembler::emit_w(const Immediate& x) { ++ DCHECK(RelocInfo::IsNone(x.rmode_)); ++ uint16_t value = static_cast(x.x_); ++ reinterpret_cast(pc_)[0] = value; ++ pc_ += sizeof(uint16_t); ++} ++ ++ ++Address Assembler::target_address_at(Address pc, Address constant_pool) { ++ return pc + sizeof(int32_t) + *reinterpret_cast(pc); ++} ++ ++ ++void Assembler::set_target_address_at(Isolate* isolate, Address pc, ++ Address constant_pool, Address target, ++ ICacheFlushMode icache_flush_mode) { ++ DCHECK_IMPLIES(isolate == nullptr, icache_flush_mode == SKIP_ICACHE_FLUSH); ++ int32_t* p = reinterpret_cast(pc); ++ *p = target - (pc + sizeof(int32_t)); ++ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { ++ Assembler::FlushICache(isolate, p, sizeof(int32_t)); ++ } ++} ++ ++Address Assembler::target_address_at(Address pc, Code* code) { ++ Address constant_pool = code ? code->constant_pool() : NULL; ++ return target_address_at(pc, constant_pool); ++} ++ ++void Assembler::set_target_address_at(Isolate* isolate, Address pc, Code* code, ++ Address target, ++ ICacheFlushMode icache_flush_mode) { ++ Address constant_pool = code ? code->constant_pool() : NULL; ++ set_target_address_at(isolate, pc, constant_pool, target, icache_flush_mode); ++} ++ ++Address Assembler::target_address_from_return_address(Address pc) { ++ return pc - kCallTargetAddressOffset; ++} ++ ++ ++Displacement Assembler::disp_at(Label* L) { ++ return Displacement(long_at(L->pos())); ++} ++ ++ ++void Assembler::disp_at_put(Label* L, Displacement disp) { ++ long_at_put(L->pos(), disp.data()); ++} ++ ++ ++void Assembler::emit_disp(Label* L, Displacement::Type type) { ++ Displacement disp(L, type); ++ L->link_to(pc_offset()); ++ emit(static_cast(disp.data())); ++} ++ ++ ++void Assembler::emit_near_disp(Label* L) { ++ byte disp = 0x00; ++ if (L->is_near_linked()) { ++ int offset = L->near_link_pos() - pc_offset(); ++ DCHECK(is_int8(offset)); ++ disp = static_cast(offset & 0xFF); ++ } ++ L->link_to(pc_offset(), Label::kNear); ++ *pc_++ = disp; ++} ++ ++ ++void Assembler::deserialization_set_target_internal_reference_at( ++ Isolate* isolate, Address pc, Address target, RelocInfo::Mode mode) { ++ Memory::Address_at(pc) = target; ++} ++ ++ ++void Operand::set_modrm(int mod, Register rm) { ++ DCHECK((mod & -4) == 0); ++ buf_[0] = mod << 6 | rm.code(); ++ len_ = 1; ++} ++ ++ ++void Operand::set_sib(ScaleFactor scale, Register index, Register base) { ++ DCHECK(len_ == 1); ++ DCHECK((scale & -4) == 0); ++ // Use SIB with no index register only for base esp. ++ DCHECK(!index.is(esp) || base.is(esp)); ++ buf_[1] = scale << 6 | index.code() << 3 | base.code(); ++ len_ = 2; ++} ++ ++ ++void Operand::set_disp8(int8_t disp) { ++ DCHECK(len_ == 1 || len_ == 2); ++ *reinterpret_cast(&buf_[len_++]) = disp; ++} ++ ++ ++void Operand::set_dispr(int32_t disp, RelocInfo::Mode rmode) { ++ DCHECK(len_ == 1 || len_ == 2); ++ int32_t* p = reinterpret_cast(&buf_[len_]); ++ *p = disp; ++ len_ += sizeof(int32_t); ++ rmode_ = rmode; ++} ++ ++Operand::Operand(Register reg) { ++ // reg ++ set_modrm(3, reg); ++} ++ ++ ++Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { ++ // [disp/r] ++ set_modrm(0, ebp); ++ set_dispr(disp, rmode); ++} ++ ++ ++Operand::Operand(Immediate imm) { ++ // [disp/r] ++ set_modrm(0, ebp); ++ set_dispr(imm.x_, imm.rmode_); ++} ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_ASSEMBLER_X87_INL_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-25 17:42:57.221465559 +0100 +@@ -0,0 +1,381 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "src/x87/codegen-x87.h" ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/codegen.h" ++#include "src/heap/heap.h" ++#include "src/macro-assembler.h" ++ ++namespace v8 { ++namespace internal { ++ ++ ++// ------------------------------------------------------------------------- ++// Platform-specific RuntimeCallHelper functions. ++ ++void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { ++ masm->EnterFrame(StackFrame::INTERNAL); ++ DCHECK(!masm->has_frame()); ++ masm->set_has_frame(true); ++} ++ ++ ++void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const { ++ masm->LeaveFrame(StackFrame::INTERNAL); ++ DCHECK(masm->has_frame()); ++ masm->set_has_frame(false); ++} ++ ++ ++#define __ masm. ++ ++ ++UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { ++ size_t actual_size; ++ // Allocate buffer in executable space. ++ byte* buffer = ++ static_cast(base::OS::Allocate(1 * KB, &actual_size, true)); ++ if (buffer == nullptr) return nullptr; ++ ++ MacroAssembler masm(isolate, buffer, static_cast(actual_size), ++ CodeObjectRequired::kNo); ++ // Load double input into registers. ++ __ fld_d(MemOperand(esp, 4)); ++ __ X87SetFPUCW(0x027F); ++ __ fsqrt(); ++ __ X87SetFPUCW(0x037F); ++ __ Ret(); ++ ++ CodeDesc desc; ++ masm.GetCode(&desc); ++ DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); ++ ++ Assembler::FlushICache(isolate, buffer, actual_size); ++ base::OS::ProtectCode(buffer, actual_size); ++ return FUNCTION_CAST(buffer); ++} ++ ++ ++// Helper functions for CreateMemMoveFunction. ++#undef __ ++#define __ ACCESS_MASM(masm) ++ ++enum Direction { FORWARD, BACKWARD }; ++enum Alignment { MOVE_ALIGNED, MOVE_UNALIGNED }; ++ ++ ++void MemMoveEmitPopAndReturn(MacroAssembler* masm) { ++ __ pop(esi); ++ __ pop(edi); ++ __ ret(0); ++} ++ ++ ++#undef __ ++#define __ masm. ++ ++ ++class LabelConverter { ++ public: ++ explicit LabelConverter(byte* buffer) : buffer_(buffer) {} ++ int32_t address(Label* l) const { ++ return reinterpret_cast(buffer_) + l->pos(); ++ } ++ private: ++ byte* buffer_; ++}; ++ ++ ++MemMoveFunction CreateMemMoveFunction(Isolate* isolate) { ++ size_t actual_size; ++ // Allocate buffer in executable space. ++ byte* buffer = ++ static_cast(base::OS::Allocate(1 * KB, &actual_size, true)); ++ if (buffer == nullptr) return nullptr; ++ MacroAssembler masm(isolate, buffer, static_cast(actual_size), ++ CodeObjectRequired::kNo); ++ LabelConverter conv(buffer); ++ ++ // Generated code is put into a fixed, unmovable buffer, and not into ++ // the V8 heap. We can't, and don't, refer to any relocatable addresses ++ // (e.g. the JavaScript nan-object). ++ ++ // 32-bit C declaration function calls pass arguments on stack. ++ ++ // Stack layout: ++ // esp[12]: Third argument, size. ++ // esp[8]: Second argument, source pointer. ++ // esp[4]: First argument, destination pointer. ++ // esp[0]: return address ++ ++ const int kDestinationOffset = 1 * kPointerSize; ++ const int kSourceOffset = 2 * kPointerSize; ++ const int kSizeOffset = 3 * kPointerSize; ++ ++ int stack_offset = 0; // Update if we change the stack height. ++ ++ Label backward, backward_much_overlap; ++ Label forward_much_overlap, small_size, medium_size, pop_and_return; ++ __ push(edi); ++ __ push(esi); ++ stack_offset += 2 * kPointerSize; ++ Register dst = edi; ++ Register src = esi; ++ Register count = ecx; ++ __ mov(dst, Operand(esp, stack_offset + kDestinationOffset)); ++ __ mov(src, Operand(esp, stack_offset + kSourceOffset)); ++ __ mov(count, Operand(esp, stack_offset + kSizeOffset)); ++ ++ __ cmp(dst, src); ++ __ j(equal, &pop_and_return); ++ ++ // No SSE2. ++ Label forward; ++ __ cmp(count, 0); ++ __ j(equal, &pop_and_return); ++ __ cmp(dst, src); ++ __ j(above, &backward); ++ __ jmp(&forward); ++ { ++ // Simple forward copier. ++ Label forward_loop_1byte, forward_loop_4byte; ++ __ bind(&forward_loop_4byte); ++ __ mov(eax, Operand(src, 0)); ++ __ sub(count, Immediate(4)); ++ __ add(src, Immediate(4)); ++ __ mov(Operand(dst, 0), eax); ++ __ add(dst, Immediate(4)); ++ __ bind(&forward); // Entry point. ++ __ cmp(count, 3); ++ __ j(above, &forward_loop_4byte); ++ __ bind(&forward_loop_1byte); ++ __ cmp(count, 0); ++ __ j(below_equal, &pop_and_return); ++ __ mov_b(eax, Operand(src, 0)); ++ __ dec(count); ++ __ inc(src); ++ __ mov_b(Operand(dst, 0), eax); ++ __ inc(dst); ++ __ jmp(&forward_loop_1byte); ++ } ++ { ++ // Simple backward copier. ++ Label backward_loop_1byte, backward_loop_4byte, entry_shortcut; ++ __ bind(&backward); ++ __ add(src, count); ++ __ add(dst, count); ++ __ cmp(count, 3); ++ __ j(below_equal, &entry_shortcut); ++ ++ __ bind(&backward_loop_4byte); ++ __ sub(src, Immediate(4)); ++ __ sub(count, Immediate(4)); ++ __ mov(eax, Operand(src, 0)); ++ __ sub(dst, Immediate(4)); ++ __ mov(Operand(dst, 0), eax); ++ __ cmp(count, 3); ++ __ j(above, &backward_loop_4byte); ++ __ bind(&backward_loop_1byte); ++ __ cmp(count, 0); ++ __ j(below_equal, &pop_and_return); ++ __ bind(&entry_shortcut); ++ __ dec(src); ++ __ dec(count); ++ __ mov_b(eax, Operand(src, 0)); ++ __ dec(dst); ++ __ mov_b(Operand(dst, 0), eax); ++ __ jmp(&backward_loop_1byte); ++ } ++ ++ __ bind(&pop_and_return); ++ MemMoveEmitPopAndReturn(&masm); ++ ++ CodeDesc desc; ++ masm.GetCode(&desc); ++ DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); ++ Assembler::FlushICache(isolate, buffer, actual_size); ++ base::OS::ProtectCode(buffer, actual_size); ++ // TODO(jkummerow): It would be nice to register this code creation event ++ // with the PROFILE / GDBJIT system. ++ return FUNCTION_CAST(buffer); ++} ++ ++ ++#undef __ ++ ++// ------------------------------------------------------------------------- ++// Code generators ++ ++#define __ ACCESS_MASM(masm) ++ ++void StringCharLoadGenerator::Generate(MacroAssembler* masm, ++ Factory* factory, ++ Register string, ++ Register index, ++ Register result, ++ Label* call_runtime) { ++ Label indirect_string_loaded; ++ __ bind(&indirect_string_loaded); ++ ++ // Fetch the instance type of the receiver into result register. ++ __ mov(result, FieldOperand(string, HeapObject::kMapOffset)); ++ __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset)); ++ ++ // We need special handling for indirect strings. ++ Label check_sequential; ++ __ test(result, Immediate(kIsIndirectStringMask)); ++ __ j(zero, &check_sequential, Label::kNear); ++ ++ // Dispatch on the indirect string shape: slice or cons. ++ Label cons_string, thin_string; ++ __ and_(result, Immediate(kStringRepresentationMask)); ++ __ cmp(result, Immediate(kConsStringTag)); ++ __ j(equal, &cons_string, Label::kNear); ++ __ cmp(result, Immediate(kThinStringTag)); ++ __ j(equal, &thin_string, Label::kNear); ++ ++ // Handle slices. ++ __ mov(result, FieldOperand(string, SlicedString::kOffsetOffset)); ++ __ SmiUntag(result); ++ __ add(index, result); ++ __ mov(string, FieldOperand(string, SlicedString::kParentOffset)); ++ __ jmp(&indirect_string_loaded); ++ ++ // Handle thin strings. ++ __ bind(&thin_string); ++ __ mov(string, FieldOperand(string, ThinString::kActualOffset)); ++ __ jmp(&indirect_string_loaded); ++ ++ // Handle cons strings. ++ // Check whether the right hand side is the empty string (i.e. if ++ // this is really a flat string in a cons string). If that is not ++ // the case we would rather go to the runtime system now to flatten ++ // the string. ++ __ bind(&cons_string); ++ __ cmp(FieldOperand(string, ConsString::kSecondOffset), ++ Immediate(factory->empty_string())); ++ __ j(not_equal, call_runtime); ++ __ mov(string, FieldOperand(string, ConsString::kFirstOffset)); ++ __ jmp(&indirect_string_loaded); ++ ++ // Distinguish sequential and external strings. Only these two string ++ // representations can reach here (slices and flat cons strings have been ++ // reduced to the underlying sequential or external string). ++ Label seq_string; ++ __ bind(&check_sequential); ++ STATIC_ASSERT(kSeqStringTag == 0); ++ __ test(result, Immediate(kStringRepresentationMask)); ++ __ j(zero, &seq_string, Label::kNear); ++ ++ // Handle external strings. ++ Label one_byte_external, done; ++ if (FLAG_debug_code) { ++ // Assert that we do not have a cons or slice (indirect strings) here. ++ // Sequential strings have already been ruled out. ++ __ test(result, Immediate(kIsIndirectStringMask)); ++ __ Assert(zero, kExternalStringExpectedButNotFound); ++ } ++ // Rule out short external strings. ++ STATIC_ASSERT(kShortExternalStringTag != 0); ++ __ test_b(result, Immediate(kShortExternalStringMask)); ++ __ j(not_zero, call_runtime); ++ // Check encoding. ++ STATIC_ASSERT(kTwoByteStringTag == 0); ++ __ test_b(result, Immediate(kStringEncodingMask)); ++ __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); ++ __ j(not_equal, &one_byte_external, Label::kNear); ++ // Two-byte string. ++ __ movzx_w(result, Operand(result, index, times_2, 0)); ++ __ jmp(&done, Label::kNear); ++ __ bind(&one_byte_external); ++ // One-byte string. ++ __ movzx_b(result, Operand(result, index, times_1, 0)); ++ __ jmp(&done, Label::kNear); ++ ++ // Dispatch on the encoding: one-byte or two-byte. ++ Label one_byte; ++ __ bind(&seq_string); ++ STATIC_ASSERT((kStringEncodingMask & kOneByteStringTag) != 0); ++ STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); ++ __ test(result, Immediate(kStringEncodingMask)); ++ __ j(not_zero, &one_byte, Label::kNear); ++ ++ // Two-byte string. ++ // Load the two-byte character code into the result register. ++ __ movzx_w(result, FieldOperand(string, ++ index, ++ times_2, ++ SeqTwoByteString::kHeaderSize)); ++ __ jmp(&done, Label::kNear); ++ ++ // One-byte string. ++ // Load the byte into the result register. ++ __ bind(&one_byte); ++ __ movzx_b(result, FieldOperand(string, ++ index, ++ times_1, ++ SeqOneByteString::kHeaderSize)); ++ __ bind(&done); ++} ++ ++ ++#undef __ ++ ++ ++CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { ++ USE(isolate); ++ DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); ++ CodePatcher patcher(isolate, young_sequence_.start(), ++ young_sequence_.length()); ++ patcher.masm()->push(ebp); ++ patcher.masm()->mov(ebp, esp); ++ patcher.masm()->push(esi); ++ patcher.masm()->push(edi); ++} ++ ++ ++#ifdef DEBUG ++bool CodeAgingHelper::IsOld(byte* candidate) const { ++ return *candidate == kCallOpcode; ++} ++#endif ++ ++ ++bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { ++ bool result = isolate->code_aging_helper()->IsYoung(sequence); ++ DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); ++ return result; ++} ++ ++Code::Age Code::GetCodeAge(Isolate* isolate, byte* sequence) { ++ if (IsYoungSequence(isolate, sequence)) return kNoAgeCodeAge; ++ ++ sequence++; // Skip the kCallOpcode byte ++ Address target_address = sequence + *reinterpret_cast(sequence) + ++ Assembler::kCallTargetAddressOffset; ++ Code* stub = GetCodeFromTargetAddress(target_address); ++ return GetAgeOfCodeAgeStub(stub); ++} ++ ++void Code::PatchPlatformCodeAge(Isolate* isolate, byte* sequence, ++ Code::Age age) { ++ uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); ++ if (age == kNoAgeCodeAge) { ++ isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); ++ Assembler::FlushICache(isolate, sequence, young_length); ++ } else { ++ Code* stub = GetCodeAgeStub(isolate, age); ++ CodePatcher patcher(isolate, sequence, young_length); ++ patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); ++ } ++} ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 2017-12-25 17:42:57.221465559 +0100 +@@ -0,0 +1,33 @@ ++// Copyright 2011 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_X87_CODEGEN_X87_H_ ++#define V8_X87_CODEGEN_X87_H_ ++ ++#include "src/macro-assembler.h" ++ ++namespace v8 { ++namespace internal { ++ ++ ++class StringCharLoadGenerator : public AllStatic { ++ public: ++ // Generates the code for handling different string types and loading the ++ // indexed character into |result|. We expect |index| as untagged input and ++ // |result| as untagged output. ++ static void Generate(MacroAssembler* masm, ++ Factory* factory, ++ Register string, ++ Register index, ++ Register result, ++ Label* call_runtime); ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(StringCharLoadGenerator); ++}; ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_CODEGEN_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-25 17:42:57.221465559 +0100 +@@ -0,0 +1,3428 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/code-stubs.h" ++#include "src/api-arguments.h" ++#include "src/base/bits.h" ++#include "src/bootstrapper.h" ++#include "src/codegen.h" ++#include "src/ic/handler-compiler.h" ++#include "src/ic/ic.h" ++#include "src/ic/stub-cache.h" ++#include "src/isolate.h" ++#include "src/regexp/jsregexp.h" ++#include "src/regexp/regexp-macro-assembler.h" ++#include "src/runtime/runtime.h" ++#include "src/x87/code-stubs-x87.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++#define __ ACCESS_MASM(masm) ++ ++void ArrayNArgumentsConstructorStub::Generate(MacroAssembler* masm) { ++ __ pop(ecx); ++ __ mov(MemOperand(esp, eax, times_4, 0), edi); ++ __ push(edi); ++ __ push(ebx); ++ __ push(ecx); ++ __ add(eax, Immediate(3)); ++ __ TailCallRuntime(Runtime::kNewArray); ++} ++ ++ ++void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { ++ // We don't allow a GC during a store buffer overflow so there is no need to ++ // store the registers in any particular way, but we do have to store and ++ // restore them. ++ __ pushad(); ++ if (save_doubles()) { ++ // Save FPU stat in m108byte. ++ __ sub(esp, Immediate(108)); ++ __ fnsave(Operand(esp, 0)); ++ } ++ const int argument_count = 1; ++ ++ AllowExternalCallThatCantCauseGC scope(masm); ++ __ PrepareCallCFunction(argument_count, ecx); ++ __ mov(Operand(esp, 0 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ __ CallCFunction( ++ ExternalReference::store_buffer_overflow_function(isolate()), ++ argument_count); ++ if (save_doubles()) { ++ // Restore FPU stat in m108byte. ++ __ frstor(Operand(esp, 0)); ++ __ add(esp, Immediate(108)); ++ } ++ __ popad(); ++ __ ret(0); ++} ++ ++ ++class FloatingPointHelper : public AllStatic { ++ public: ++ enum ArgLocation { ++ ARGS_ON_STACK, ++ ARGS_IN_REGISTERS ++ }; ++ ++ // Code pattern for loading a floating point value. Input value must ++ // be either a smi or a heap number object (fp value). Requirements: ++ // operand in register number. Returns operand as floating point number ++ // on FPU stack. ++ static void LoadFloatOperand(MacroAssembler* masm, Register number); ++ ++ // Test if operands are smi or number objects (fp). Requirements: ++ // operand_1 in eax, operand_2 in edx; falls through on float ++ // operands, jumps to the non_float label otherwise. ++ static void CheckFloatOperands(MacroAssembler* masm, ++ Label* non_float, ++ Register scratch); ++}; ++ ++ ++void DoubleToIStub::Generate(MacroAssembler* masm) { ++ Register input_reg = this->source(); ++ Register final_result_reg = this->destination(); ++ DCHECK(is_truncating()); ++ ++ Label check_negative, process_64_bits, done, done_no_stash; ++ ++ int double_offset = offset(); ++ ++ // Account for return address and saved regs if input is esp. ++ if (input_reg.is(esp)) double_offset += 3 * kPointerSize; ++ ++ MemOperand mantissa_operand(MemOperand(input_reg, double_offset)); ++ MemOperand exponent_operand(MemOperand(input_reg, ++ double_offset + kDoubleSize / 2)); ++ ++ Register scratch1; ++ { ++ Register scratch_candidates[3] = { ebx, edx, edi }; ++ for (int i = 0; i < 3; i++) { ++ scratch1 = scratch_candidates[i]; ++ if (!final_result_reg.is(scratch1) && !input_reg.is(scratch1)) break; ++ } ++ } ++ // Since we must use ecx for shifts below, use some other register (eax) ++ // to calculate the result if ecx is the requested return register. ++ Register result_reg = final_result_reg.is(ecx) ? eax : final_result_reg; ++ // Save ecx if it isn't the return register and therefore volatile, or if it ++ // is the return register, then save the temp register we use in its stead for ++ // the result. ++ Register save_reg = final_result_reg.is(ecx) ? eax : ecx; ++ __ push(scratch1); ++ __ push(save_reg); ++ ++ bool stash_exponent_copy = !input_reg.is(esp); ++ __ mov(scratch1, mantissa_operand); ++ __ mov(ecx, exponent_operand); ++ if (stash_exponent_copy) __ push(ecx); ++ ++ __ and_(ecx, HeapNumber::kExponentMask); ++ __ shr(ecx, HeapNumber::kExponentShift); ++ __ lea(result_reg, MemOperand(ecx, -HeapNumber::kExponentBias)); ++ __ cmp(result_reg, Immediate(HeapNumber::kMantissaBits)); ++ __ j(below, &process_64_bits); ++ ++ // Result is entirely in lower 32-bits of mantissa ++ int delta = HeapNumber::kExponentBias + Double::kPhysicalSignificandSize; ++ __ sub(ecx, Immediate(delta)); ++ __ xor_(result_reg, result_reg); ++ __ cmp(ecx, Immediate(31)); ++ __ j(above, &done); ++ __ shl_cl(scratch1); ++ __ jmp(&check_negative); ++ ++ __ bind(&process_64_bits); ++ // Result must be extracted from shifted 32-bit mantissa ++ __ sub(ecx, Immediate(delta)); ++ __ neg(ecx); ++ if (stash_exponent_copy) { ++ __ mov(result_reg, MemOperand(esp, 0)); ++ } else { ++ __ mov(result_reg, exponent_operand); ++ } ++ __ and_(result_reg, ++ Immediate(static_cast(Double::kSignificandMask >> 32))); ++ __ add(result_reg, ++ Immediate(static_cast(Double::kHiddenBit >> 32))); ++ __ shrd_cl(scratch1, result_reg); ++ __ shr_cl(result_reg); ++ __ test(ecx, Immediate(32)); ++ { ++ Label skip_mov; ++ __ j(equal, &skip_mov, Label::kNear); ++ __ mov(scratch1, result_reg); ++ __ bind(&skip_mov); ++ } ++ ++ // If the double was negative, negate the integer result. ++ __ bind(&check_negative); ++ __ mov(result_reg, scratch1); ++ __ neg(result_reg); ++ if (stash_exponent_copy) { ++ __ cmp(MemOperand(esp, 0), Immediate(0)); ++ } else { ++ __ cmp(exponent_operand, Immediate(0)); ++ } ++ { ++ Label skip_mov; ++ __ j(less_equal, &skip_mov, Label::kNear); ++ __ mov(result_reg, scratch1); ++ __ bind(&skip_mov); ++ } ++ ++ // Restore registers ++ __ bind(&done); ++ if (stash_exponent_copy) { ++ __ add(esp, Immediate(kDoubleSize / 2)); ++ } ++ __ bind(&done_no_stash); ++ if (!final_result_reg.is(result_reg)) { ++ DCHECK(final_result_reg.is(ecx)); ++ __ mov(final_result_reg, result_reg); ++ } ++ __ pop(save_reg); ++ __ pop(scratch1); ++ __ ret(0); ++} ++ ++ ++void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm, ++ Register number) { ++ Label load_smi, done; ++ ++ __ JumpIfSmi(number, &load_smi, Label::kNear); ++ __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); ++ __ jmp(&done, Label::kNear); ++ ++ __ bind(&load_smi); ++ __ SmiUntag(number); ++ __ push(number); ++ __ fild_s(Operand(esp, 0)); ++ __ pop(number); ++ ++ __ bind(&done); ++} ++ ++ ++void FloatingPointHelper::CheckFloatOperands(MacroAssembler* masm, ++ Label* non_float, ++ Register scratch) { ++ Label test_other, done; ++ // Test if both operands are floats or smi -> scratch=k_is_float; ++ // Otherwise scratch = k_not_float. ++ __ JumpIfSmi(edx, &test_other, Label::kNear); ++ __ mov(scratch, FieldOperand(edx, HeapObject::kMapOffset)); ++ Factory* factory = masm->isolate()->factory(); ++ __ cmp(scratch, factory->heap_number_map()); ++ __ j(not_equal, non_float); // argument in edx is not a number -> NaN ++ ++ __ bind(&test_other); ++ __ JumpIfSmi(eax, &done, Label::kNear); ++ __ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ cmp(scratch, factory->heap_number_map()); ++ __ j(not_equal, non_float); // argument in eax is not a number -> NaN ++ ++ // Fall-through: Both operands are numbers. ++ __ bind(&done); ++} ++ ++ ++void MathPowStub::Generate(MacroAssembler* masm) { ++ const Register scratch = ecx; ++ ++ // Load the double_exponent into x87 FPU ++ __ fld_d(Operand(esp, 0 * kDoubleSize + 4)); ++ // Load the double_base into x87 FPU ++ __ fld_d(Operand(esp, 1 * kDoubleSize + 4)); ++ ++ // Call ieee754 runtime directly. ++ { ++ AllowExternalCallThatCantCauseGC scope(masm); ++ __ PrepareCallCFunction(4, scratch); ++ // Put the double_base parameter in call stack ++ __ fstp_d(Operand(esp, 0 * kDoubleSize)); ++ // Put the double_exponent parameter in call stack ++ __ fstp_d(Operand(esp, 1 * kDoubleSize)); ++ __ CallCFunction(ExternalReference::power_double_double_function(isolate()), ++ 4); ++ } ++ // Return value is in st(0) on ia32. ++ __ ret(0); ++} ++ ++ ++static int NegativeComparisonResult(Condition cc) { ++ DCHECK(cc != equal); ++ DCHECK((cc == less) || (cc == less_equal) ++ || (cc == greater) || (cc == greater_equal)); ++ return (cc == greater || cc == greater_equal) ? LESS : GREATER; ++} ++ ++ ++static void CheckInputType(MacroAssembler* masm, Register input, ++ CompareICState::State expected, Label* fail) { ++ Label ok; ++ if (expected == CompareICState::SMI) { ++ __ JumpIfNotSmi(input, fail); ++ } else if (expected == CompareICState::NUMBER) { ++ __ JumpIfSmi(input, &ok); ++ __ cmp(FieldOperand(input, HeapObject::kMapOffset), ++ Immediate(masm->isolate()->factory()->heap_number_map())); ++ __ j(not_equal, fail); ++ } ++ // We could be strict about internalized/non-internalized here, but as long as ++ // hydrogen doesn't care, the stub doesn't have to care either. ++ __ bind(&ok); ++} ++ ++ ++static void BranchIfNotInternalizedString(MacroAssembler* masm, ++ Label* label, ++ Register object, ++ Register scratch) { ++ __ JumpIfSmi(object, label); ++ __ mov(scratch, FieldOperand(object, HeapObject::kMapOffset)); ++ __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); ++ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); ++ __ test(scratch, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); ++ __ j(not_zero, label); ++} ++ ++ ++void CompareICStub::GenerateGeneric(MacroAssembler* masm) { ++ Label runtime_call, check_unequal_objects; ++ Condition cc = GetCondition(); ++ ++ Label miss; ++ CheckInputType(masm, edx, left(), &miss); ++ CheckInputType(masm, eax, right(), &miss); ++ ++ // Compare two smis. ++ Label non_smi, smi_done; ++ __ mov(ecx, edx); ++ __ or_(ecx, eax); ++ __ JumpIfNotSmi(ecx, &non_smi, Label::kNear); ++ __ sub(edx, eax); // Return on the result of the subtraction. ++ __ j(no_overflow, &smi_done, Label::kNear); ++ __ not_(edx); // Correct sign in case of overflow. edx is never 0 here. ++ __ bind(&smi_done); ++ __ mov(eax, edx); ++ __ ret(0); ++ __ bind(&non_smi); ++ ++ // NOTICE! This code is only reached after a smi-fast-case check, so ++ // it is certain that at least one operand isn't a smi. ++ ++ // Identical objects can be compared fast, but there are some tricky cases ++ // for NaN and undefined. ++ Label generic_heap_number_comparison; ++ { ++ Label not_identical; ++ __ cmp(eax, edx); ++ __ j(not_equal, ¬_identical); ++ ++ if (cc != equal) { ++ // Check for undefined. undefined OP undefined is false even though ++ // undefined == undefined. ++ __ cmp(edx, isolate()->factory()->undefined_value()); ++ Label check_for_nan; ++ __ j(not_equal, &check_for_nan, Label::kNear); ++ __ Move(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); ++ __ ret(0); ++ __ bind(&check_for_nan); ++ } ++ ++ // Test for NaN. Compare heap numbers in a general way, ++ // to handle NaNs correctly. ++ __ cmp(FieldOperand(edx, HeapObject::kMapOffset), ++ Immediate(isolate()->factory()->heap_number_map())); ++ __ j(equal, &generic_heap_number_comparison, Label::kNear); ++ if (cc != equal) { ++ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); ++ // Call runtime on identical JSObjects. Otherwise return equal. ++ __ cmpb(ecx, Immediate(FIRST_JS_RECEIVER_TYPE)); ++ __ j(above_equal, &runtime_call, Label::kFar); ++ // Call runtime on identical symbols since we need to throw a TypeError. ++ __ cmpb(ecx, Immediate(SYMBOL_TYPE)); ++ __ j(equal, &runtime_call, Label::kFar); ++ } ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ ret(0); ++ ++ ++ __ bind(¬_identical); ++ } ++ ++ // Strict equality can quickly decide whether objects are equal. ++ // Non-strict object equality is slower, so it is handled later in the stub. ++ if (cc == equal && strict()) { ++ Label slow; // Fallthrough label. ++ Label not_smis; ++ // If we're doing a strict equality comparison, we don't have to do ++ // type conversion, so we generate code to do fast comparison for objects ++ // and oddballs. Non-smi numbers and strings still go through the usual ++ // slow-case code. ++ // If either is a Smi (we know that not both are), then they can only ++ // be equal if the other is a HeapNumber. If so, use the slow case. ++ STATIC_ASSERT(kSmiTag == 0); ++ DCHECK_EQ(static_cast(0), Smi::kZero); ++ __ mov(ecx, Immediate(kSmiTagMask)); ++ __ and_(ecx, eax); ++ __ test(ecx, edx); ++ __ j(not_zero, ¬_smis, Label::kNear); ++ // One operand is a smi. ++ ++ // Check whether the non-smi is a heap number. ++ STATIC_ASSERT(kSmiTagMask == 1); ++ // ecx still holds eax & kSmiTag, which is either zero or one. ++ __ sub(ecx, Immediate(0x01)); ++ __ mov(ebx, edx); ++ __ xor_(ebx, eax); ++ __ and_(ebx, ecx); // ebx holds either 0 or eax ^ edx. ++ __ xor_(ebx, eax); ++ // if eax was smi, ebx is now edx, else eax. ++ ++ // Check if the non-smi operand is a heap number. ++ __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), ++ Immediate(isolate()->factory()->heap_number_map())); ++ // If heap number, handle it in the slow case. ++ __ j(equal, &slow, Label::kNear); ++ // Return non-equal (ebx is not zero) ++ __ mov(eax, ebx); ++ __ ret(0); ++ ++ __ bind(¬_smis); ++ // If either operand is a JSObject or an oddball value, then they are not ++ // equal since their pointers are different ++ // There is no test for undetectability in strict equality. ++ ++ // Get the type of the first operand. ++ // If the first object is a JS object, we have done pointer comparison. ++ Label first_non_object; ++ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(below, &first_non_object, Label::kNear); ++ ++ // Return non-zero (eax is not zero) ++ Label return_not_equal; ++ STATIC_ASSERT(kHeapObjectTag != 0); ++ __ bind(&return_not_equal); ++ __ ret(0); ++ ++ __ bind(&first_non_object); ++ // Check for oddballs: true, false, null, undefined. ++ __ CmpInstanceType(ecx, ODDBALL_TYPE); ++ __ j(equal, &return_not_equal); ++ ++ __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(above_equal, &return_not_equal); ++ ++ // Check for oddballs: true, false, null, undefined. ++ __ CmpInstanceType(ecx, ODDBALL_TYPE); ++ __ j(equal, &return_not_equal); ++ ++ // Fall through to the general case. ++ __ bind(&slow); ++ } ++ ++ // Generate the number comparison code. ++ Label non_number_comparison; ++ Label unordered; ++ __ bind(&generic_heap_number_comparison); ++ FloatingPointHelper::CheckFloatOperands( ++ masm, &non_number_comparison, ebx); ++ FloatingPointHelper::LoadFloatOperand(masm, eax); ++ FloatingPointHelper::LoadFloatOperand(masm, edx); ++ __ FCmp(); ++ ++ // Don't base result on EFLAGS when a NaN is involved. ++ __ j(parity_even, &unordered, Label::kNear); ++ ++ Label below_label, above_label; ++ // Return a result of -1, 0, or 1, based on EFLAGS. ++ __ j(below, &below_label, Label::kNear); ++ __ j(above, &above_label, Label::kNear); ++ ++ __ Move(eax, Immediate(0)); ++ __ ret(0); ++ ++ __ bind(&below_label); ++ __ mov(eax, Immediate(Smi::FromInt(-1))); ++ __ ret(0); ++ ++ __ bind(&above_label); ++ __ mov(eax, Immediate(Smi::FromInt(1))); ++ __ ret(0); ++ ++ // If one of the numbers was NaN, then the result is always false. ++ // The cc is never not-equal. ++ __ bind(&unordered); ++ DCHECK(cc != not_equal); ++ if (cc == less || cc == less_equal) { ++ __ mov(eax, Immediate(Smi::FromInt(1))); ++ } else { ++ __ mov(eax, Immediate(Smi::FromInt(-1))); ++ } ++ __ ret(0); ++ ++ // The number comparison code did not provide a valid result. ++ __ bind(&non_number_comparison); ++ ++ // Fast negative check for internalized-to-internalized equality. ++ Label check_for_strings; ++ if (cc == equal) { ++ BranchIfNotInternalizedString(masm, &check_for_strings, eax, ecx); ++ BranchIfNotInternalizedString(masm, &check_for_strings, edx, ecx); ++ ++ // We've already checked for object identity, so if both operands ++ // are internalized they aren't equal. Register eax already holds a ++ // non-zero value, which indicates not equal, so just return. ++ __ ret(0); ++ } ++ ++ __ bind(&check_for_strings); ++ ++ __ JumpIfNotBothSequentialOneByteStrings(edx, eax, ecx, ebx, ++ &check_unequal_objects); ++ ++ // Inline comparison of one-byte strings. ++ if (cc == equal) { ++ StringHelper::GenerateFlatOneByteStringEquals(masm, edx, eax, ecx, ebx); ++ } else { ++ StringHelper::GenerateCompareFlatOneByteStrings(masm, edx, eax, ecx, ebx, ++ edi); ++ } ++#ifdef DEBUG ++ __ Abort(kUnexpectedFallThroughFromStringComparison); ++#endif ++ ++ __ bind(&check_unequal_objects); ++ if (cc == equal && !strict()) { ++ // Non-strict equality. Objects are unequal if ++ // they are both JSObjects and not undetectable, ++ // and their pointers are different. ++ Label return_equal, return_unequal, undetectable; ++ // At most one is a smi, so we can test for smi by adding the two. ++ // A smi plus a heap object has the low bit set, a heap object plus ++ // a heap object has the low bit clear. ++ STATIC_ASSERT(kSmiTag == 0); ++ STATIC_ASSERT(kSmiTagMask == 1); ++ __ lea(ecx, Operand(eax, edx, times_1, 0)); ++ __ test(ecx, Immediate(kSmiTagMask)); ++ __ j(not_zero, &runtime_call); ++ ++ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); ++ ++ __ test_b(FieldOperand(ebx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsUndetectable)); ++ __ j(not_zero, &undetectable, Label::kNear); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsUndetectable)); ++ __ j(not_zero, &return_unequal, Label::kNear); ++ ++ __ CmpInstanceType(ebx, FIRST_JS_RECEIVER_TYPE); ++ __ j(below, &runtime_call, Label::kNear); ++ __ CmpInstanceType(ecx, FIRST_JS_RECEIVER_TYPE); ++ __ j(below, &runtime_call, Label::kNear); ++ ++ __ bind(&return_unequal); ++ // Return non-equal by returning the non-zero object pointer in eax. ++ __ ret(0); // eax, edx were pushed ++ ++ __ bind(&undetectable); ++ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), ++ Immediate(1 << Map::kIsUndetectable)); ++ __ j(zero, &return_unequal, Label::kNear); ++ ++ // If both sides are JSReceivers, then the result is false according to ++ // the HTML specification, which says that only comparisons with null or ++ // undefined are affected by special casing for document.all. ++ __ CmpInstanceType(ebx, ODDBALL_TYPE); ++ __ j(zero, &return_equal, Label::kNear); ++ __ CmpInstanceType(ecx, ODDBALL_TYPE); ++ __ j(not_zero, &return_unequal, Label::kNear); ++ ++ __ bind(&return_equal); ++ __ Move(eax, Immediate(EQUAL)); ++ __ ret(0); // eax, edx were pushed ++ } ++ __ bind(&runtime_call); ++ ++ if (cc == equal) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(esi); ++ __ Call(strict() ? isolate()->builtins()->StrictEqual() ++ : isolate()->builtins()->Equal(), ++ RelocInfo::CODE_TARGET); ++ __ Pop(esi); ++ } ++ // Turn true into 0 and false into some non-zero value. ++ STATIC_ASSERT(EQUAL == 0); ++ __ sub(eax, Immediate(isolate()->factory()->true_value())); ++ __ Ret(); ++ } else { ++ // Push arguments below the return address. ++ __ pop(ecx); ++ __ push(edx); ++ __ push(eax); ++ __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); ++ ++ // Restore return address on the stack. ++ __ push(ecx); ++ // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) ++ // tagged as a small integer. ++ __ TailCallRuntime(Runtime::kCompare); ++ } ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { ++ // eax : number of arguments to the construct function ++ // ebx : feedback vector ++ // edx : slot in feedback vector (Smi) ++ // edi : the function to call ++ ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Number-of-arguments register must be smi-tagged to call out. ++ __ SmiTag(eax); ++ __ push(eax); ++ __ push(edi); ++ __ push(edx); ++ __ push(ebx); ++ __ push(esi); ++ ++ __ CallStub(stub); ++ ++ __ pop(esi); ++ __ pop(ebx); ++ __ pop(edx); ++ __ pop(edi); ++ __ pop(eax); ++ __ SmiUntag(eax); ++ } ++} ++ ++ ++static void GenerateRecordCallTarget(MacroAssembler* masm) { ++ // Cache the called function in a feedback vector slot. Cache states ++ // are uninitialized, monomorphic (indicated by a JSFunction), and ++ // megamorphic. ++ // eax : number of arguments to the construct function ++ // ebx : feedback vector ++ // edx : slot in feedback vector (Smi) ++ // edi : the function to call ++ Isolate* isolate = masm->isolate(); ++ Label initialize, done, miss, megamorphic, not_array_function; ++ ++ // Load the cache state into ecx. ++ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, ++ FixedArray::kHeaderSize)); ++ ++ // A monomorphic cache hit or an already megamorphic state: invoke the ++ // function without changing the state. ++ // We don't know if ecx is a WeakCell or a Symbol, but it's harmless to read ++ // at this position in a symbol (see static asserts in feedback-vector.h). ++ Label check_allocation_site; ++ __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); ++ __ j(equal, &done, Label::kFar); ++ __ CompareRoot(ecx, Heap::kmegamorphic_symbolRootIndex); ++ __ j(equal, &done, Label::kFar); ++ __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), ++ Heap::kWeakCellMapRootIndex); ++ __ j(not_equal, &check_allocation_site); ++ ++ // If the weak cell is cleared, we have a new chance to become monomorphic. ++ __ JumpIfSmi(FieldOperand(ecx, WeakCell::kValueOffset), &initialize); ++ __ jmp(&megamorphic); ++ ++ __ bind(&check_allocation_site); ++ // If we came here, we need to see if we are the array function. ++ // If we didn't have a matching function, and we didn't find the megamorph ++ // sentinel, then we have in the slot either some other function or an ++ // AllocationSite. ++ __ CompareRoot(FieldOperand(ecx, 0), Heap::kAllocationSiteMapRootIndex); ++ __ j(not_equal, &miss); ++ ++ // Make sure the function is the Array() function ++ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); ++ __ cmp(edi, ecx); ++ __ j(not_equal, &megamorphic); ++ __ jmp(&done, Label::kFar); ++ ++ __ bind(&miss); ++ ++ // A monomorphic miss (i.e, here the cache is not uninitialized) goes ++ // megamorphic. ++ __ CompareRoot(ecx, Heap::kuninitialized_symbolRootIndex); ++ __ j(equal, &initialize); ++ // MegamorphicSentinel is an immortal immovable object (undefined) so no ++ // write-barrier is needed. ++ __ bind(&megamorphic); ++ __ mov( ++ FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), ++ Immediate(FeedbackVector::MegamorphicSentinel(isolate))); ++ __ jmp(&done, Label::kFar); ++ ++ // An uninitialized cache is patched with the function or sentinel to ++ // indicate the ElementsKind if function is the Array constructor. ++ __ bind(&initialize); ++ // Make sure the function is the Array() function ++ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); ++ __ cmp(edi, ecx); ++ __ j(not_equal, ¬_array_function); ++ ++ // The target function is the Array constructor, ++ // Create an AllocationSite if we don't already have it, store it in the ++ // slot. ++ CreateAllocationSiteStub create_stub(isolate); ++ CallStubInRecordCallTarget(masm, &create_stub); ++ __ jmp(&done); ++ ++ __ bind(¬_array_function); ++ CreateWeakCellStub weak_cell_stub(isolate); ++ CallStubInRecordCallTarget(masm, &weak_cell_stub); ++ ++ __ bind(&done); ++ // Increment the call count for all function calls. ++ __ add(FieldOperand(ebx, edx, times_half_pointer_size, ++ FixedArray::kHeaderSize + kPointerSize), ++ Immediate(Smi::FromInt(1))); ++} ++ ++ ++void CallConstructStub::Generate(MacroAssembler* masm) { ++ // eax : number of arguments ++ // ebx : feedback vector ++ // edx : slot in feedback vector (Smi, for RecordCallTarget) ++ // edi : constructor function ++ ++ Label non_function; ++ // Check that function is not a smi. ++ __ JumpIfSmi(edi, &non_function); ++ // Check that function is a JSFunction. ++ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); ++ __ j(not_equal, &non_function); ++ ++ GenerateRecordCallTarget(masm); ++ ++ Label feedback_register_initialized; ++ // Put the AllocationSite from the feedback vector into ebx, or undefined. ++ __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, ++ FixedArray::kHeaderSize)); ++ Handle allocation_site_map = isolate()->factory()->allocation_site_map(); ++ __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); ++ __ j(equal, &feedback_register_initialized); ++ __ mov(ebx, isolate()->factory()->undefined_value()); ++ __ bind(&feedback_register_initialized); ++ ++ __ AssertUndefinedOrAllocationSite(ebx); ++ ++ // Pass new target to construct stub. ++ __ mov(edx, edi); ++ ++ // Tail call to the function-specific construct stub (still in the caller ++ // context at this point). ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); ++ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); ++ __ jmp(ecx); ++ ++ __ bind(&non_function); ++ __ mov(edx, edi); ++ __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); ++} ++ ++static void IncrementCallCount(MacroAssembler* masm, Register feedback_vector, ++ Register slot) { ++ __ add(FieldOperand(feedback_vector, slot, times_half_pointer_size, ++ FixedArray::kHeaderSize + kPointerSize), ++ Immediate(Smi::FromInt(1))); ++} ++ ++void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { ++ // eax - number of arguments ++ // edi - function ++ // edx - slot id ++ // ebx - vector ++ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); ++ __ cmp(edi, ecx); ++ __ j(not_equal, miss); ++ ++ // Reload ecx. ++ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, ++ FixedArray::kHeaderSize)); ++ ++ // Increment the call count for monomorphic function calls. ++ IncrementCallCount(masm, ebx, edx); ++ ++ __ mov(ebx, ecx); ++ __ mov(edx, edi); ++ ArrayConstructorStub stub(masm->isolate()); ++ __ TailCallStub(&stub); ++ ++ // Unreachable. ++} ++ ++ ++void CallICStub::Generate(MacroAssembler* masm) { ++ // edi - number of arguments ++ // edi - function ++ // edx - slot id ++ // ebx - vector ++ Isolate* isolate = masm->isolate(); ++ Label extra_checks_or_miss, call, call_function, call_count_incremented; ++ ++ // The checks. First, does edi match the recorded monomorphic target? ++ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, ++ FixedArray::kHeaderSize)); ++ ++ // We don't know that we have a weak cell. We might have a private symbol ++ // or an AllocationSite, but the memory is safe to examine. ++ // AllocationSite::kTransitionInfoOrBoilerplateOffset - contains a Smi or ++ // pointer to FixedArray. WeakCell::kValueOffset - contains a JSFunction or ++ // Smi(0) Symbol::kHashFieldSlot - if the low bit is 1, then the hash is not ++ // computed, meaning that it can't appear to be a pointer. If the low bit is ++ // 0, then hash is computed, but the 0 bit prevents the field from appearing ++ // to be a pointer. ++ STATIC_ASSERT(WeakCell::kSize >= kPointerSize); ++ STATIC_ASSERT(AllocationSite::kTransitionInfoOrBoilerplateOffset == ++ WeakCell::kValueOffset && ++ WeakCell::kValueOffset == Symbol::kHashFieldSlot); ++ ++ __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); ++ __ j(not_equal, &extra_checks_or_miss); ++ ++ // The compare above could have been a SMI/SMI comparison. Guard against this ++ // convincing us that we have a monomorphic JSFunction. ++ __ JumpIfSmi(edi, &extra_checks_or_miss); ++ ++ __ bind(&call_function); ++ ++ // Increment the call count for monomorphic function calls. ++ IncrementCallCount(masm, ebx, edx); ++ ++ __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), ++ tail_call_mode()), ++ RelocInfo::CODE_TARGET); ++ ++ __ bind(&extra_checks_or_miss); ++ Label uninitialized, miss, not_allocation_site; ++ ++ __ cmp(ecx, Immediate(FeedbackVector::MegamorphicSentinel(isolate))); ++ __ j(equal, &call); ++ ++ // Check if we have an allocation site. ++ __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), ++ Heap::kAllocationSiteMapRootIndex); ++ __ j(not_equal, ¬_allocation_site); ++ ++ // We have an allocation site. ++ HandleArrayCase(masm, &miss); ++ ++ __ bind(¬_allocation_site); ++ ++ // The following cases attempt to handle MISS cases without going to the ++ // runtime. ++ if (FLAG_trace_ic) { ++ __ jmp(&miss); ++ } ++ ++ __ cmp(ecx, Immediate(FeedbackVector::UninitializedSentinel(isolate))); ++ __ j(equal, &uninitialized); ++ ++ // We are going megamorphic. If the feedback is a JSFunction, it is fine ++ // to handle it here. More complex cases are dealt with in the runtime. ++ __ AssertNotSmi(ecx); ++ __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); ++ __ j(not_equal, &miss); ++ __ mov( ++ FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), ++ Immediate(FeedbackVector::MegamorphicSentinel(isolate))); ++ ++ __ bind(&call); ++ ++ // Increment the call count for megamorphic function calls. ++ IncrementCallCount(masm, ebx, edx); ++ ++ __ bind(&call_count_incremented); ++ ++ __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()), ++ RelocInfo::CODE_TARGET); ++ ++ __ bind(&uninitialized); ++ ++ // We are going monomorphic, provided we actually have a JSFunction. ++ __ JumpIfSmi(edi, &miss); ++ ++ // Goto miss case if we do not have a function. ++ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); ++ __ j(not_equal, &miss); ++ ++ // Make sure the function is not the Array() function, which requires special ++ // behavior on MISS. ++ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); ++ __ cmp(edi, ecx); ++ __ j(equal, &miss); ++ ++ // Make sure the function belongs to the same native context. ++ __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); ++ __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); ++ __ cmp(ecx, NativeContextOperand()); ++ __ j(not_equal, &miss); ++ ++ // Store the function. Use a stub since we need a frame for allocation. ++ // eax - number of arguments ++ // ebx - vector ++ // edx - slot ++ // edi - function ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ CreateWeakCellStub create_stub(isolate); ++ __ SmiTag(eax); ++ __ push(eax); ++ __ push(ebx); ++ __ push(edx); ++ __ push(edi); ++ __ push(esi); ++ __ CallStub(&create_stub); ++ __ pop(esi); ++ __ pop(edi); ++ __ pop(edx); ++ __ pop(ebx); ++ __ pop(eax); ++ __ SmiUntag(eax); ++ } ++ ++ __ jmp(&call_function); ++ ++ // We are here because tracing is on or we encountered a MISS case we can't ++ // handle here. ++ __ bind(&miss); ++ GenerateMiss(masm); ++ ++ __ jmp(&call_count_incremented); ++ ++ // Unreachable ++ __ int3(); ++} ++ ++ ++void CallICStub::GenerateMiss(MacroAssembler* masm) { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Preserve the number of arguments. ++ __ SmiTag(eax); ++ __ push(eax); ++ ++ // Push the function and feedback info. ++ __ push(edi); ++ __ push(ebx); ++ __ push(edx); ++ ++ // Call the entry. ++ __ CallRuntime(Runtime::kCallIC_Miss); ++ ++ // Move result to edi and exit the internal frame. ++ __ mov(edi, eax); ++ ++ // Restore number of arguments. ++ __ pop(eax); ++ __ SmiUntag(eax); ++} ++ ++ ++bool CEntryStub::NeedsImmovableCode() { ++ return false; ++} ++ ++ ++void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { ++ CEntryStub::GenerateAheadOfTime(isolate); ++ StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); ++ // It is important that the store buffer overflow stubs are generated first. ++ CommonArrayConstructorStub::GenerateStubsAheadOfTime(isolate); ++ CreateAllocationSiteStub::GenerateAheadOfTime(isolate); ++ CreateWeakCellStub::GenerateAheadOfTime(isolate); ++ StoreFastElementStub::GenerateAheadOfTime(isolate); ++} ++ ++ ++void CodeStub::GenerateFPStubs(Isolate* isolate) { ++ CEntryStub save_doubles(isolate, 1, kSaveFPRegs); ++ // Stubs might already be in the snapshot, detect that and don't regenerate, ++ // which would lead to code stub initialization state being messed up. ++ Code* save_doubles_code; ++ if (!save_doubles.FindCodeInCache(&save_doubles_code)) { ++ save_doubles_code = *(save_doubles.GetCode()); ++ } ++} ++ ++ ++void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { ++ CEntryStub stub(isolate, 1, kDontSaveFPRegs); ++ stub.GetCode(); ++} ++ ++ ++void CEntryStub::Generate(MacroAssembler* masm) { ++ // eax: number of arguments including receiver ++ // ebx: pointer to C function (C callee-saved) ++ // ebp: frame pointer (restored after C call) ++ // esp: stack pointer (restored after C call) ++ // esi: current context (C callee-saved) ++ // edi: JS function of the caller (C callee-saved) ++ // ++ // If argv_in_register(): ++ // ecx: pointer to the first argument ++ ++ ProfileEntryHookStub::MaybeCallEntryHook(masm); ++ ++ // Reserve space on the stack for the three arguments passed to the call. If ++ // result size is greater than can be returned in registers, also reserve ++ // space for the hidden argument for the result location, and space for the ++ // result itself. ++ int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); ++ ++ // Enter the exit frame that transitions from JavaScript to C++. ++ if (argv_in_register()) { ++ DCHECK(!save_doubles()); ++ DCHECK(!is_builtin_exit()); ++ __ EnterApiExitFrame(arg_stack_space); ++ ++ // Move argc and argv into the correct registers. ++ __ mov(esi, ecx); ++ __ mov(edi, eax); ++ } else { ++ __ EnterExitFrame( ++ arg_stack_space, save_doubles(), ++ is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT); ++ } ++ ++ // ebx: pointer to C function (C callee-saved) ++ // ebp: frame pointer (restored after C call) ++ // esp: stack pointer (restored after C call) ++ // edi: number of arguments including receiver (C callee-saved) ++ // esi: pointer to the first argument (C callee-saved) ++ ++ // Result returned in eax, or eax+edx if result size is 2. ++ ++ // Check stack alignment. ++ if (FLAG_debug_code) { ++ __ CheckStackAlignment(); ++ } ++ // Call C function. ++ if (result_size() <= 2) { ++ __ mov(Operand(esp, 0 * kPointerSize), edi); // argc. ++ __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. ++ __ mov(Operand(esp, 2 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ } else { ++ DCHECK_EQ(3, result_size()); ++ // Pass a pointer to the result location as the first argument. ++ __ lea(eax, Operand(esp, 4 * kPointerSize)); ++ __ mov(Operand(esp, 0 * kPointerSize), eax); ++ __ mov(Operand(esp, 1 * kPointerSize), edi); // argc. ++ __ mov(Operand(esp, 2 * kPointerSize), esi); // argv. ++ __ mov(Operand(esp, 3 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ } ++ __ call(ebx); ++ ++ if (result_size() > 2) { ++ DCHECK_EQ(3, result_size()); ++#ifndef _WIN32 ++ // Restore the "hidden" argument on the stack which was popped by caller. ++ __ sub(esp, Immediate(kPointerSize)); ++#endif ++ // Read result values stored on stack. Result is stored above the arguments. ++ __ mov(kReturnRegister0, Operand(esp, 4 * kPointerSize)); ++ __ mov(kReturnRegister1, Operand(esp, 5 * kPointerSize)); ++ __ mov(kReturnRegister2, Operand(esp, 6 * kPointerSize)); ++ } ++ // Result is in eax, edx:eax or edi:edx:eax - do not destroy these registers! ++ ++ // Check result for exception sentinel. ++ Label exception_returned; ++ __ cmp(eax, isolate()->factory()->exception()); ++ __ j(equal, &exception_returned); ++ ++ // Check that there is no pending exception, otherwise we ++ // should have returned the exception sentinel. ++ if (FLAG_debug_code) { ++ __ push(edx); ++ __ mov(edx, Immediate(isolate()->factory()->the_hole_value())); ++ Label okay; ++ ExternalReference pending_exception_address( ++ IsolateAddressId::kPendingExceptionAddress, isolate()); ++ __ cmp(edx, Operand::StaticVariable(pending_exception_address)); ++ // Cannot use check here as it attempts to generate call into runtime. ++ __ j(equal, &okay, Label::kNear); ++ __ int3(); ++ __ bind(&okay); ++ __ pop(edx); ++ } ++ ++ // Exit the JavaScript to C++ exit frame. ++ __ LeaveExitFrame(save_doubles(), !argv_in_register()); ++ __ ret(0); ++ ++ // Handling of exception. ++ __ bind(&exception_returned); ++ ++ ExternalReference pending_handler_context_address( ++ IsolateAddressId::kPendingHandlerContextAddress, isolate()); ++ ExternalReference pending_handler_code_address( ++ IsolateAddressId::kPendingHandlerCodeAddress, isolate()); ++ ExternalReference pending_handler_offset_address( ++ IsolateAddressId::kPendingHandlerOffsetAddress, isolate()); ++ ExternalReference pending_handler_fp_address( ++ IsolateAddressId::kPendingHandlerFPAddress, isolate()); ++ ExternalReference pending_handler_sp_address( ++ IsolateAddressId::kPendingHandlerSPAddress, isolate()); ++ ++ // Ask the runtime for help to determine the handler. This will set eax to ++ // contain the current pending exception, don't clobber it. ++ ExternalReference find_handler(Runtime::kUnwindAndFindExceptionHandler, ++ isolate()); ++ { ++ FrameScope scope(masm, StackFrame::MANUAL); ++ __ PrepareCallCFunction(3, eax); ++ __ mov(Operand(esp, 0 * kPointerSize), Immediate(0)); // argc. ++ __ mov(Operand(esp, 1 * kPointerSize), Immediate(0)); // argv. ++ __ mov(Operand(esp, 2 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ __ CallCFunction(find_handler, 3); ++ } ++ ++ // Retrieve the handler context, SP and FP. ++ __ mov(esi, Operand::StaticVariable(pending_handler_context_address)); ++ __ mov(esp, Operand::StaticVariable(pending_handler_sp_address)); ++ __ mov(ebp, Operand::StaticVariable(pending_handler_fp_address)); ++ ++ // If the handler is a JS frame, restore the context to the frame. Note that ++ // the context will be set to (esi == 0) for non-JS frames. ++ Label skip; ++ __ test(esi, esi); ++ __ j(zero, &skip, Label::kNear); ++ __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi); ++ __ bind(&skip); ++ ++ // Compute the handler entry address and jump to it. ++ __ mov(edi, Operand::StaticVariable(pending_handler_code_address)); ++ __ mov(edx, Operand::StaticVariable(pending_handler_offset_address)); ++ // Check whether it's a turbofanned exception handler code before jump to it. ++ Label not_turbo; ++ __ push(eax); ++ __ mov(eax, Operand(edi, Code::kKindSpecificFlags1Offset - kHeapObjectTag)); ++ __ and_(eax, Immediate(1 << Code::kIsTurbofannedBit)); ++ __ j(zero, ¬_turbo); ++ __ fninit(); ++ __ fld1(); ++ __ bind(¬_turbo); ++ __ pop(eax); ++ __ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize)); ++ __ jmp(edi); ++} ++ ++ ++void JSEntryStub::Generate(MacroAssembler* masm) { ++ Label invoke, handler_entry, exit; ++ Label not_outermost_js, not_outermost_js_2; ++ ++ ProfileEntryHookStub::MaybeCallEntryHook(masm); ++ ++ // Set up frame. ++ __ push(ebp); ++ __ mov(ebp, esp); ++ ++ // Push marker in two places. ++ int marker = type(); ++ __ push(Immediate(Smi::FromInt(marker))); // marker ++ ExternalReference context_address(IsolateAddressId::kContextAddress, ++ isolate()); ++ __ push(Operand::StaticVariable(context_address)); // context ++ // Save callee-saved registers (C calling conventions). ++ __ push(edi); ++ __ push(esi); ++ __ push(ebx); ++ ++ // Save copies of the top frame descriptor on the stack. ++ ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate()); ++ __ push(Operand::StaticVariable(c_entry_fp)); ++ ++ // If this is the outermost JS call, set js_entry_sp value. ++ ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate()); ++ __ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0)); ++ __ j(not_equal, ¬_outermost_js, Label::kNear); ++ __ mov(Operand::StaticVariable(js_entry_sp), ebp); ++ __ push(Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); ++ __ jmp(&invoke, Label::kNear); ++ __ bind(¬_outermost_js); ++ __ push(Immediate(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME))); ++ ++ // Jump to a faked try block that does the invoke, with a faked catch ++ // block that sets the pending exception. ++ __ jmp(&invoke); ++ __ bind(&handler_entry); ++ handler_offset_ = handler_entry.pos(); ++ // Caught exception: Store result (exception) in the pending exception ++ // field in the JSEnv and return a failure sentinel. ++ ExternalReference pending_exception( ++ IsolateAddressId::kPendingExceptionAddress, isolate()); ++ __ mov(Operand::StaticVariable(pending_exception), eax); ++ __ mov(eax, Immediate(isolate()->factory()->exception())); ++ __ jmp(&exit); ++ ++ // Invoke: Link this frame into the handler chain. ++ __ bind(&invoke); ++ __ PushStackHandler(); ++ ++ // Fake a receiver (NULL). ++ __ push(Immediate(0)); // receiver ++ ++ // Invoke the function by calling through JS entry trampoline builtin and ++ // pop the faked function when we return. Notice that we cannot store a ++ // reference to the trampoline code directly in this stub, because the ++ // builtin stubs may not have been generated yet. ++ if (type() == StackFrame::ENTRY_CONSTRUCT) { ++ ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, ++ isolate()); ++ __ mov(edx, Immediate(construct_entry)); ++ } else { ++ ExternalReference entry(Builtins::kJSEntryTrampoline, isolate()); ++ __ mov(edx, Immediate(entry)); ++ } ++ __ mov(edx, Operand(edx, 0)); // deref address ++ __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); ++ __ call(edx); ++ ++ // Unlink this frame from the handler chain. ++ __ PopStackHandler(); ++ ++ __ bind(&exit); ++ // Check if the current stack frame is marked as the outermost JS frame. ++ __ pop(ebx); ++ __ cmp(ebx, Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); ++ __ j(not_equal, ¬_outermost_js_2); ++ __ mov(Operand::StaticVariable(js_entry_sp), Immediate(0)); ++ __ bind(¬_outermost_js_2); ++ ++ // Restore the top frame descriptor from the stack. ++ __ pop(Operand::StaticVariable( ++ ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()))); ++ ++ // Restore callee-saved registers (C calling conventions). ++ __ pop(ebx); ++ __ pop(esi); ++ __ pop(edi); ++ __ add(esp, Immediate(2 * kPointerSize)); // remove markers ++ ++ // Restore frame pointer and return. ++ __ pop(ebp); ++ __ ret(0); ++} ++ ++ ++// ------------------------------------------------------------------------- ++// StringCharCodeAtGenerator ++ ++void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { ++ // If the receiver is a smi trigger the non-string case. ++ if (check_mode_ == RECEIVER_IS_UNKNOWN) { ++ __ JumpIfSmi(object_, receiver_not_string_); ++ ++ // Fetch the instance type of the receiver into result register. ++ __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); ++ __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); ++ // If the receiver is not a string trigger the non-string case. ++ __ test(result_, Immediate(kIsNotStringMask)); ++ __ j(not_zero, receiver_not_string_); ++ } ++ ++ // If the index is non-smi trigger the non-smi case. ++ __ JumpIfNotSmi(index_, &index_not_smi_); ++ __ bind(&got_smi_index_); ++ ++ // Check for index out of range. ++ __ cmp(index_, FieldOperand(object_, String::kLengthOffset)); ++ __ j(above_equal, index_out_of_range_); ++ ++ __ SmiUntag(index_); ++ ++ Factory* factory = masm->isolate()->factory(); ++ StringCharLoadGenerator::Generate( ++ masm, factory, object_, index_, result_, &call_runtime_); ++ ++ __ SmiTag(result_); ++ __ bind(&exit_); ++} ++ ++ ++void StringCharCodeAtGenerator::GenerateSlow( ++ MacroAssembler* masm, EmbedMode embed_mode, ++ const RuntimeCallHelper& call_helper) { ++ __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); ++ ++ // Index is not a smi. ++ __ bind(&index_not_smi_); ++ // If index is a heap number, try converting it to an integer. ++ __ CheckMap(index_, ++ masm->isolate()->factory()->heap_number_map(), ++ index_not_number_, ++ DONT_DO_SMI_CHECK); ++ call_helper.BeforeCall(masm); ++ if (embed_mode == PART_OF_IC_HANDLER) { ++ __ push(LoadWithVectorDescriptor::VectorRegister()); ++ __ push(LoadDescriptor::SlotRegister()); ++ } ++ __ push(object_); ++ __ push(index_); // Consumed by runtime conversion function. ++ __ CallRuntime(Runtime::kNumberToSmi); ++ if (!index_.is(eax)) { ++ // Save the conversion result before the pop instructions below ++ // have a chance to overwrite it. ++ __ mov(index_, eax); ++ } ++ __ pop(object_); ++ if (embed_mode == PART_OF_IC_HANDLER) { ++ __ pop(LoadDescriptor::SlotRegister()); ++ __ pop(LoadWithVectorDescriptor::VectorRegister()); ++ } ++ // Reload the instance type. ++ __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); ++ __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); ++ call_helper.AfterCall(masm); ++ // If index is still not a smi, it must be out of range. ++ STATIC_ASSERT(kSmiTag == 0); ++ __ JumpIfNotSmi(index_, index_out_of_range_); ++ // Otherwise, return to the fast path. ++ __ jmp(&got_smi_index_); ++ ++ // Call runtime. We get here when the receiver is a string and the ++ // index is a number, but the code of getting the actual character ++ // is too complex (e.g., when the string needs to be flattened). ++ __ bind(&call_runtime_); ++ call_helper.BeforeCall(masm); ++ __ push(object_); ++ __ SmiTag(index_); ++ __ push(index_); ++ __ CallRuntime(Runtime::kStringCharCodeAtRT); ++ if (!result_.is(eax)) { ++ __ mov(result_, eax); ++ } ++ call_helper.AfterCall(masm); ++ __ jmp(&exit_); ++ ++ __ Abort(kUnexpectedFallthroughFromCharCodeAtSlowCase); ++} ++ ++void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, ++ Register left, ++ Register right, ++ Register scratch1, ++ Register scratch2) { ++ Register length = scratch1; ++ ++ // Compare lengths. ++ Label strings_not_equal, check_zero_length; ++ __ mov(length, FieldOperand(left, String::kLengthOffset)); ++ __ cmp(length, FieldOperand(right, String::kLengthOffset)); ++ __ j(equal, &check_zero_length, Label::kNear); ++ __ bind(&strings_not_equal); ++ __ Move(eax, Immediate(Smi::FromInt(NOT_EQUAL))); ++ __ ret(0); ++ ++ // Check if the length is zero. ++ Label compare_chars; ++ __ bind(&check_zero_length); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ test(length, length); ++ __ j(not_zero, &compare_chars, Label::kNear); ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ ret(0); ++ ++ // Compare characters. ++ __ bind(&compare_chars); ++ GenerateOneByteCharsCompareLoop(masm, left, right, length, scratch2, ++ &strings_not_equal, Label::kNear); ++ ++ // Characters are equal. ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ ret(0); ++} ++ ++ ++void StringHelper::GenerateCompareFlatOneByteStrings( ++ MacroAssembler* masm, Register left, Register right, Register scratch1, ++ Register scratch2, Register scratch3) { ++ Counters* counters = masm->isolate()->counters(); ++ __ IncrementCounter(counters->string_compare_native(), 1); ++ ++ // Find minimum length. ++ Label left_shorter; ++ __ mov(scratch1, FieldOperand(left, String::kLengthOffset)); ++ __ mov(scratch3, scratch1); ++ __ sub(scratch3, FieldOperand(right, String::kLengthOffset)); ++ ++ Register length_delta = scratch3; ++ ++ __ j(less_equal, &left_shorter, Label::kNear); ++ // Right string is shorter. Change scratch1 to be length of right string. ++ __ sub(scratch1, length_delta); ++ __ bind(&left_shorter); ++ ++ Register min_length = scratch1; ++ ++ // If either length is zero, just compare lengths. ++ Label compare_lengths; ++ __ test(min_length, min_length); ++ __ j(zero, &compare_lengths, Label::kNear); ++ ++ // Compare characters. ++ Label result_not_equal; ++ GenerateOneByteCharsCompareLoop(masm, left, right, min_length, scratch2, ++ &result_not_equal, Label::kNear); ++ ++ // Compare lengths - strings up to min-length are equal. ++ __ bind(&compare_lengths); ++ __ test(length_delta, length_delta); ++ Label length_not_equal; ++ __ j(not_zero, &length_not_equal, Label::kNear); ++ ++ // Result is EQUAL. ++ STATIC_ASSERT(EQUAL == 0); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ ret(0); ++ ++ Label result_greater; ++ Label result_less; ++ __ bind(&length_not_equal); ++ __ j(greater, &result_greater, Label::kNear); ++ __ jmp(&result_less, Label::kNear); ++ __ bind(&result_not_equal); ++ __ j(above, &result_greater, Label::kNear); ++ __ bind(&result_less); ++ ++ // Result is LESS. ++ __ Move(eax, Immediate(Smi::FromInt(LESS))); ++ __ ret(0); ++ ++ // Result is GREATER. ++ __ bind(&result_greater); ++ __ Move(eax, Immediate(Smi::FromInt(GREATER))); ++ __ ret(0); ++} ++ ++ ++void StringHelper::GenerateOneByteCharsCompareLoop( ++ MacroAssembler* masm, Register left, Register right, Register length, ++ Register scratch, Label* chars_not_equal, ++ Label::Distance chars_not_equal_near) { ++ // Change index to run from -length to -1 by adding length to string ++ // start. This means that loop ends when index reaches zero, which ++ // doesn't need an additional compare. ++ __ SmiUntag(length); ++ __ lea(left, ++ FieldOperand(left, length, times_1, SeqOneByteString::kHeaderSize)); ++ __ lea(right, ++ FieldOperand(right, length, times_1, SeqOneByteString::kHeaderSize)); ++ __ neg(length); ++ Register index = length; // index = -length; ++ ++ // Compare loop. ++ Label loop; ++ __ bind(&loop); ++ __ mov_b(scratch, Operand(left, index, times_1, 0)); ++ __ cmpb(scratch, Operand(right, index, times_1, 0)); ++ __ j(not_equal, chars_not_equal, chars_not_equal_near); ++ __ inc(index); ++ __ j(not_zero, &loop); ++} ++ ++ ++void CompareICStub::GenerateBooleans(MacroAssembler* masm) { ++ DCHECK_EQ(CompareICState::BOOLEAN, state()); ++ Label miss; ++ Label::Distance const miss_distance = ++ masm->emit_debug_code() ? Label::kFar : Label::kNear; ++ ++ __ JumpIfSmi(edx, &miss, miss_distance); ++ __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); ++ __ JumpIfSmi(eax, &miss, miss_distance); ++ __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ JumpIfNotRoot(ecx, Heap::kBooleanMapRootIndex, &miss, miss_distance); ++ __ JumpIfNotRoot(ebx, Heap::kBooleanMapRootIndex, &miss, miss_distance); ++ if (!Token::IsEqualityOp(op())) { ++ __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset)); ++ __ AssertSmi(eax); ++ __ mov(edx, FieldOperand(edx, Oddball::kToNumberOffset)); ++ __ AssertSmi(edx); ++ __ xchg(eax, edx); ++ } ++ __ sub(eax, edx); ++ __ Ret(); ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateSmis(MacroAssembler* masm) { ++ DCHECK(state() == CompareICState::SMI); ++ Label miss; ++ __ mov(ecx, edx); ++ __ or_(ecx, eax); ++ __ JumpIfNotSmi(ecx, &miss, Label::kNear); ++ ++ if (GetCondition() == equal) { ++ // For equality we do not care about the sign of the result. ++ __ sub(eax, edx); ++ } else { ++ Label done; ++ __ sub(edx, eax); ++ __ j(no_overflow, &done, Label::kNear); ++ // Correct sign of result in case of overflow. ++ __ not_(edx); ++ __ bind(&done); ++ __ mov(eax, edx); ++ } ++ __ ret(0); ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateNumbers(MacroAssembler* masm) { ++ DCHECK(state() == CompareICState::NUMBER); ++ ++ Label generic_stub, check_left; ++ Label unordered, maybe_undefined1, maybe_undefined2; ++ Label miss; ++ ++ if (left() == CompareICState::SMI) { ++ __ JumpIfNotSmi(edx, &miss); ++ } ++ if (right() == CompareICState::SMI) { ++ __ JumpIfNotSmi(eax, &miss); ++ } ++ ++ // Inlining the double comparison and falling back to the general compare ++ // stub if NaN is involved or SSE2 or CMOV is unsupported. ++ __ JumpIfSmi(eax, &check_left, Label::kNear); ++ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), ++ isolate()->factory()->heap_number_map()); ++ __ j(not_equal, &maybe_undefined1, Label::kNear); ++ ++ __ bind(&check_left); ++ __ JumpIfSmi(edx, &generic_stub, Label::kNear); ++ __ cmp(FieldOperand(edx, HeapObject::kMapOffset), ++ isolate()->factory()->heap_number_map()); ++ __ j(not_equal, &maybe_undefined2, Label::kNear); ++ ++ __ bind(&unordered); ++ __ bind(&generic_stub); ++ CompareICStub stub(isolate(), op(), CompareICState::GENERIC, ++ CompareICState::GENERIC, CompareICState::GENERIC); ++ __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); ++ ++ __ bind(&maybe_undefined1); ++ if (Token::IsOrderedRelationalCompareOp(op())) { ++ __ cmp(eax, Immediate(isolate()->factory()->undefined_value())); ++ __ j(not_equal, &miss); ++ __ JumpIfSmi(edx, &unordered); ++ __ CmpObjectType(edx, HEAP_NUMBER_TYPE, ecx); ++ __ j(not_equal, &maybe_undefined2, Label::kNear); ++ __ jmp(&unordered); ++ } ++ ++ __ bind(&maybe_undefined2); ++ if (Token::IsOrderedRelationalCompareOp(op())) { ++ __ cmp(edx, Immediate(isolate()->factory()->undefined_value())); ++ __ j(equal, &unordered); ++ } ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) { ++ DCHECK(state() == CompareICState::INTERNALIZED_STRING); ++ DCHECK(GetCondition() == equal); ++ ++ // Registers containing left and right operands respectively. ++ Register left = edx; ++ Register right = eax; ++ Register tmp1 = ecx; ++ Register tmp2 = ebx; ++ ++ // Check that both operands are heap objects. ++ Label miss; ++ __ mov(tmp1, left); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ and_(tmp1, right); ++ __ JumpIfSmi(tmp1, &miss, Label::kNear); ++ ++ // Check that both operands are internalized strings. ++ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); ++ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); ++ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); ++ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); ++ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); ++ __ or_(tmp1, tmp2); ++ __ test(tmp1, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); ++ __ j(not_zero, &miss, Label::kNear); ++ ++ // Internalized strings are compared by identity. ++ Label done; ++ __ cmp(left, right); ++ // Make sure eax is non-zero. At this point input operands are ++ // guaranteed to be non-zero. ++ DCHECK(right.is(eax)); ++ __ j(not_equal, &done, Label::kNear); ++ STATIC_ASSERT(EQUAL == 0); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ bind(&done); ++ __ ret(0); ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) { ++ DCHECK(state() == CompareICState::UNIQUE_NAME); ++ DCHECK(GetCondition() == equal); ++ ++ // Registers containing left and right operands respectively. ++ Register left = edx; ++ Register right = eax; ++ Register tmp1 = ecx; ++ Register tmp2 = ebx; ++ ++ // Check that both operands are heap objects. ++ Label miss; ++ __ mov(tmp1, left); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ and_(tmp1, right); ++ __ JumpIfSmi(tmp1, &miss, Label::kNear); ++ ++ // Check that both operands are unique names. This leaves the instance ++ // types loaded in tmp1 and tmp2. ++ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); ++ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); ++ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); ++ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); ++ ++ __ JumpIfNotUniqueNameInstanceType(tmp1, &miss, Label::kNear); ++ __ JumpIfNotUniqueNameInstanceType(tmp2, &miss, Label::kNear); ++ ++ // Unique names are compared by identity. ++ Label done; ++ __ cmp(left, right); ++ // Make sure eax is non-zero. At this point input operands are ++ // guaranteed to be non-zero. ++ DCHECK(right.is(eax)); ++ __ j(not_equal, &done, Label::kNear); ++ STATIC_ASSERT(EQUAL == 0); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ bind(&done); ++ __ ret(0); ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateStrings(MacroAssembler* masm) { ++ DCHECK(state() == CompareICState::STRING); ++ Label miss; ++ ++ bool equality = Token::IsEqualityOp(op()); ++ ++ // Registers containing left and right operands respectively. ++ Register left = edx; ++ Register right = eax; ++ Register tmp1 = ecx; ++ Register tmp2 = ebx; ++ Register tmp3 = edi; ++ ++ // Check that both operands are heap objects. ++ __ mov(tmp1, left); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ and_(tmp1, right); ++ __ JumpIfSmi(tmp1, &miss); ++ ++ // Check that both operands are strings. This leaves the instance ++ // types loaded in tmp1 and tmp2. ++ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); ++ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); ++ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); ++ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); ++ __ mov(tmp3, tmp1); ++ STATIC_ASSERT(kNotStringTag != 0); ++ __ or_(tmp3, tmp2); ++ __ test(tmp3, Immediate(kIsNotStringMask)); ++ __ j(not_zero, &miss); ++ ++ // Fast check for identical strings. ++ Label not_same; ++ __ cmp(left, right); ++ __ j(not_equal, ¬_same, Label::kNear); ++ STATIC_ASSERT(EQUAL == 0); ++ STATIC_ASSERT(kSmiTag == 0); ++ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); ++ __ ret(0); ++ ++ // Handle not identical strings. ++ __ bind(¬_same); ++ ++ // Check that both strings are internalized. If they are, we're done ++ // because we already know they are not identical. But in the case of ++ // non-equality compare, we still need to determine the order. We ++ // also know they are both strings. ++ if (equality) { ++ Label do_compare; ++ STATIC_ASSERT(kInternalizedTag == 0); ++ __ or_(tmp1, tmp2); ++ __ test(tmp1, Immediate(kIsNotInternalizedMask)); ++ __ j(not_zero, &do_compare, Label::kNear); ++ // Make sure eax is non-zero. At this point input operands are ++ // guaranteed to be non-zero. ++ DCHECK(right.is(eax)); ++ __ ret(0); ++ __ bind(&do_compare); ++ } ++ ++ // Check that both strings are sequential one-byte. ++ Label runtime; ++ __ JumpIfNotBothSequentialOneByteStrings(left, right, tmp1, tmp2, &runtime); ++ ++ // Compare flat one byte strings. Returns when done. ++ if (equality) { ++ StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, ++ tmp2); ++ } else { ++ StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, ++ tmp2, tmp3); ++ } ++ ++ // Handle more complex cases in runtime. ++ __ bind(&runtime); ++ if (equality) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(left); ++ __ Push(right); ++ __ CallRuntime(Runtime::kStringEqual); ++ } ++ __ sub(eax, Immediate(masm->isolate()->factory()->true_value())); ++ __ Ret(); ++ } else { ++ __ pop(tmp1); // Return address. ++ __ push(left); ++ __ push(right); ++ __ push(tmp1); ++ __ TailCallRuntime(Runtime::kStringCompare); ++ } ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateReceivers(MacroAssembler* masm) { ++ DCHECK_EQ(CompareICState::RECEIVER, state()); ++ Label miss; ++ __ mov(ecx, edx); ++ __ and_(ecx, eax); ++ __ JumpIfSmi(ecx, &miss, Label::kNear); ++ ++ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(below, &miss, Label::kNear); ++ __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(below, &miss, Label::kNear); ++ ++ DCHECK_EQ(equal, GetCondition()); ++ __ sub(eax, edx); ++ __ ret(0); ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) { ++ Label miss; ++ Handle cell = Map::WeakCellForMap(known_map_); ++ __ mov(ecx, edx); ++ __ and_(ecx, eax); ++ __ JumpIfSmi(ecx, &miss, Label::kNear); ++ ++ __ GetWeakValue(edi, cell); ++ __ cmp(edi, FieldOperand(eax, HeapObject::kMapOffset)); ++ __ j(not_equal, &miss, Label::kNear); ++ __ cmp(edi, FieldOperand(edx, HeapObject::kMapOffset)); ++ __ j(not_equal, &miss, Label::kNear); ++ ++ if (Token::IsEqualityOp(op())) { ++ __ sub(eax, edx); ++ __ ret(0); ++ } else { ++ __ PopReturnAddressTo(ecx); ++ __ Push(edx); ++ __ Push(eax); ++ __ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition())))); ++ __ PushReturnAddressFrom(ecx); ++ __ TailCallRuntime(Runtime::kCompare); ++ } ++ ++ __ bind(&miss); ++ GenerateMiss(masm); ++} ++ ++ ++void CompareICStub::GenerateMiss(MacroAssembler* masm) { ++ { ++ // Call the runtime system in a fresh internal frame. ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ push(edx); // Preserve edx and eax. ++ __ push(eax); ++ __ push(edx); // And also use them as the arguments. ++ __ push(eax); ++ __ push(Immediate(Smi::FromInt(op()))); ++ __ CallRuntime(Runtime::kCompareIC_Miss); ++ // Compute the entry point of the rewritten stub. ++ __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); ++ __ pop(eax); ++ __ pop(edx); ++ } ++ ++ // Do a tail call to the rewritten stub. ++ __ jmp(edi); ++} ++ ++ ++// Helper function used to check that the dictionary doesn't contain ++// the property. This function may return false negatives, so miss_label ++// must always call a backup property check that is complete. ++// This function is safe to call if the receiver has fast properties. ++// Name must be a unique name and receiver must be a heap object. ++void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, ++ Label* miss, ++ Label* done, ++ Register properties, ++ Handle name, ++ Register r0) { ++ DCHECK(name->IsUniqueName()); ++ ++ // If names of slots in range from 1 to kProbes - 1 for the hash value are ++ // not equal to the name and kProbes-th slot is not used (its name is the ++ // undefined value), it guarantees the hash table doesn't contain the ++ // property. It's true even if some slots represent deleted properties ++ // (their names are the hole value). ++ for (int i = 0; i < kInlinedProbes; i++) { ++ // Compute the masked index: (hash + i + i * i) & mask. ++ Register index = r0; ++ // Capacity is smi 2^n. ++ __ mov(index, FieldOperand(properties, kCapacityOffset)); ++ __ dec(index); ++ __ and_(index, ++ Immediate(Smi::FromInt(name->Hash() + ++ NameDictionary::GetProbeOffset(i)))); ++ ++ // Scale the index by multiplying by the entry size. ++ STATIC_ASSERT(NameDictionary::kEntrySize == 3); ++ __ lea(index, Operand(index, index, times_2, 0)); // index *= 3. ++ Register entity_name = r0; ++ // Having undefined at this place means the name is not contained. ++ STATIC_ASSERT(kSmiTagSize == 1); ++ __ mov(entity_name, Operand(properties, index, times_half_pointer_size, ++ kElementsStartOffset - kHeapObjectTag)); ++ __ cmp(entity_name, masm->isolate()->factory()->undefined_value()); ++ __ j(equal, done); ++ ++ // Stop if found the property. ++ __ cmp(entity_name, Handle(name)); ++ __ j(equal, miss); ++ ++ Label good; ++ // Check for the hole and skip. ++ __ cmp(entity_name, masm->isolate()->factory()->the_hole_value()); ++ __ j(equal, &good, Label::kNear); ++ ++ // Check if the entry name is not a unique name. ++ __ mov(entity_name, FieldOperand(entity_name, HeapObject::kMapOffset)); ++ __ JumpIfNotUniqueNameInstanceType( ++ FieldOperand(entity_name, Map::kInstanceTypeOffset), miss); ++ __ bind(&good); ++ } ++ ++ NameDictionaryLookupStub stub(masm->isolate(), properties, r0, r0, ++ NEGATIVE_LOOKUP); ++ __ push(Immediate(Handle(name))); ++ __ push(Immediate(name->Hash())); ++ __ CallStub(&stub); ++ __ test(r0, r0); ++ __ j(not_zero, miss); ++ __ jmp(done); ++} ++ ++void NameDictionaryLookupStub::Generate(MacroAssembler* masm) { ++ // This stub overrides SometimesSetsUpAFrame() to return false. That means ++ // we cannot call anything that could cause a GC from this stub. ++ // Stack frame on entry: ++ // esp[0 * kPointerSize]: return address. ++ // esp[1 * kPointerSize]: key's hash. ++ // esp[2 * kPointerSize]: key. ++ // Registers: ++ // dictionary_: NameDictionary to probe. ++ // result_: used as scratch. ++ // index_: will hold an index of entry if lookup is successful. ++ // might alias with result_. ++ // Returns: ++ // result_ is zero if lookup failed, non zero otherwise. ++ ++ Label in_dictionary, maybe_in_dictionary, not_in_dictionary; ++ ++ Register scratch = result(); ++ ++ __ mov(scratch, FieldOperand(dictionary(), kCapacityOffset)); ++ __ dec(scratch); ++ __ SmiUntag(scratch); ++ __ push(scratch); ++ ++ // If names of slots in range from 1 to kProbes - 1 for the hash value are ++ // not equal to the name and kProbes-th slot is not used (its name is the ++ // undefined value), it guarantees the hash table doesn't contain the ++ // property. It's true even if some slots represent deleted properties ++ // (their names are the null value). ++ for (int i = kInlinedProbes; i < kTotalProbes; i++) { ++ // Compute the masked index: (hash + i + i * i) & mask. ++ __ mov(scratch, Operand(esp, 2 * kPointerSize)); ++ if (i > 0) { ++ __ add(scratch, Immediate(NameDictionary::GetProbeOffset(i))); ++ } ++ __ and_(scratch, Operand(esp, 0)); ++ ++ // Scale the index by multiplying by the entry size. ++ STATIC_ASSERT(NameDictionary::kEntrySize == 3); ++ __ lea(index(), Operand(scratch, scratch, times_2, 0)); // index *= 3. ++ ++ // Having undefined at this place means the name is not contained. ++ STATIC_ASSERT(kSmiTagSize == 1); ++ __ mov(scratch, Operand(dictionary(), index(), times_pointer_size, ++ kElementsStartOffset - kHeapObjectTag)); ++ __ cmp(scratch, isolate()->factory()->undefined_value()); ++ __ j(equal, ¬_in_dictionary); ++ ++ // Stop if found the property. ++ __ cmp(scratch, Operand(esp, 3 * kPointerSize)); ++ __ j(equal, &in_dictionary); ++ ++ if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { ++ // If we hit a key that is not a unique name during negative ++ // lookup we have to bailout as this key might be equal to the ++ // key we are looking for. ++ ++ // Check if the entry name is not a unique name. ++ __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); ++ __ JumpIfNotUniqueNameInstanceType( ++ FieldOperand(scratch, Map::kInstanceTypeOffset), ++ &maybe_in_dictionary); ++ } ++ } ++ ++ __ bind(&maybe_in_dictionary); ++ // If we are doing negative lookup then probing failure should be ++ // treated as a lookup success. For positive lookup probing failure ++ // should be treated as lookup failure. ++ if (mode() == POSITIVE_LOOKUP) { ++ __ mov(result(), Immediate(0)); ++ __ Drop(1); ++ __ ret(2 * kPointerSize); ++ } ++ ++ __ bind(&in_dictionary); ++ __ mov(result(), Immediate(1)); ++ __ Drop(1); ++ __ ret(2 * kPointerSize); ++ ++ __ bind(¬_in_dictionary); ++ __ mov(result(), Immediate(0)); ++ __ Drop(1); ++ __ ret(2 * kPointerSize); ++} ++ ++ ++void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( ++ Isolate* isolate) { ++ StoreBufferOverflowStub stub(isolate, kDontSaveFPRegs); ++ stub.GetCode(); ++ StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); ++ stub2.GetCode(); ++} ++ ++ ++// Takes the input in 3 registers: address_ value_ and object_. A pointer to ++// the value has just been written into the object, now this stub makes sure ++// we keep the GC informed. The word in the object where the value has been ++// written is in the address register. ++void RecordWriteStub::Generate(MacroAssembler* masm) { ++ Label skip_to_incremental_noncompacting; ++ Label skip_to_incremental_compacting; ++ ++ // The first two instructions are generated with labels so as to get the ++ // offset fixed up correctly by the bind(Label*) call. We patch it back and ++ // forth between a compare instructions (a nop in this position) and the ++ // real branch when we start and stop incremental heap marking. ++ __ jmp(&skip_to_incremental_noncompacting, Label::kNear); ++ __ jmp(&skip_to_incremental_compacting, Label::kFar); ++ ++ if (remembered_set_action() == EMIT_REMEMBERED_SET) { ++ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), ++ MacroAssembler::kReturnAtEnd); ++ } else { ++ __ ret(0); ++ } ++ ++ __ bind(&skip_to_incremental_noncompacting); ++ GenerateIncremental(masm, INCREMENTAL); ++ ++ __ bind(&skip_to_incremental_compacting); ++ GenerateIncremental(masm, INCREMENTAL_COMPACTION); ++ ++ // Initial mode of the stub is expected to be STORE_BUFFER_ONLY. ++ // Will be checked in IncrementalMarking::ActivateGeneratedStub. ++ masm->set_byte_at(0, kTwoByteNopInstruction); ++ masm->set_byte_at(2, kFiveByteNopInstruction); ++} ++ ++ ++void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) { ++ regs_.Save(masm); ++ ++ if (remembered_set_action() == EMIT_REMEMBERED_SET) { ++ Label dont_need_remembered_set; ++ ++ __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); ++ __ JumpIfNotInNewSpace(regs_.scratch0(), // Value. ++ regs_.scratch0(), ++ &dont_need_remembered_set); ++ ++ __ JumpIfInNewSpace(regs_.object(), regs_.scratch0(), ++ &dont_need_remembered_set); ++ ++ // First notify the incremental marker if necessary, then update the ++ // remembered set. ++ CheckNeedsToInformIncrementalMarker( ++ masm, ++ kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, ++ mode); ++ InformIncrementalMarker(masm); ++ regs_.Restore(masm); ++ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), ++ MacroAssembler::kReturnAtEnd); ++ ++ __ bind(&dont_need_remembered_set); ++ } ++ ++ CheckNeedsToInformIncrementalMarker( ++ masm, ++ kReturnOnNoNeedToInformIncrementalMarker, ++ mode); ++ InformIncrementalMarker(masm); ++ regs_.Restore(masm); ++ __ ret(0); ++} ++ ++ ++void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) { ++ regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode()); ++ int argument_count = 3; ++ __ PrepareCallCFunction(argument_count, regs_.scratch0()); ++ __ mov(Operand(esp, 0 * kPointerSize), regs_.object()); ++ __ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot. ++ __ mov(Operand(esp, 2 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ ++ AllowExternalCallThatCantCauseGC scope(masm); ++ __ CallCFunction( ++ ExternalReference::incremental_marking_record_write_function(isolate()), ++ argument_count); ++ ++ regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode()); ++} ++ ++ ++void RecordWriteStub::CheckNeedsToInformIncrementalMarker( ++ MacroAssembler* masm, ++ OnNoNeedToInformIncrementalMarker on_no_need, ++ Mode mode) { ++ Label need_incremental, need_incremental_pop_object; ++ ++#ifndef V8_CONCURRENT_MARKING ++ Label object_is_black; ++ // Let's look at the color of the object: If it is not black we don't have ++ // to inform the incremental marker. ++ __ JumpIfBlack(regs_.object(), ++ regs_.scratch0(), ++ regs_.scratch1(), ++ &object_is_black, ++ Label::kNear); ++ ++ regs_.Restore(masm); ++ if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { ++ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), ++ MacroAssembler::kReturnAtEnd); ++ } else { ++ __ ret(0); ++ } ++ ++ __ bind(&object_is_black); ++#endif ++ ++ // Get the value from the slot. ++ __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); ++ ++ if (mode == INCREMENTAL_COMPACTION) { ++ Label ensure_not_white; ++ ++ __ CheckPageFlag(regs_.scratch0(), // Contains value. ++ regs_.scratch1(), // Scratch. ++ MemoryChunk::kEvacuationCandidateMask, ++ zero, ++ &ensure_not_white, ++ Label::kNear); ++ ++ __ CheckPageFlag(regs_.object(), ++ regs_.scratch1(), // Scratch. ++ MemoryChunk::kSkipEvacuationSlotsRecordingMask, ++ not_zero, ++ &ensure_not_white, ++ Label::kNear); ++ ++ __ jmp(&need_incremental); ++ ++ __ bind(&ensure_not_white); ++ } ++ ++ // We need an extra register for this, so we push the object register ++ // temporarily. ++ __ push(regs_.object()); ++ __ JumpIfWhite(regs_.scratch0(), // The value. ++ regs_.scratch1(), // Scratch. ++ regs_.object(), // Scratch. ++ &need_incremental_pop_object, Label::kNear); ++ __ pop(regs_.object()); ++ ++ regs_.Restore(masm); ++ if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { ++ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), ++ MacroAssembler::kReturnAtEnd); ++ } else { ++ __ ret(0); ++ } ++ ++ __ bind(&need_incremental_pop_object); ++ __ pop(regs_.object()); ++ ++ __ bind(&need_incremental); ++ ++ // Fall through when we need to inform the incremental marker. ++} ++ ++ ++void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { ++ if (masm->isolate()->function_entry_hook() != NULL) { ++ ProfileEntryHookStub stub(masm->isolate()); ++ masm->CallStub(&stub); ++ } ++} ++ ++void ProfileEntryHookStub::Generate(MacroAssembler* masm) { ++ // Save volatile registers. ++ const int kNumSavedRegisters = 3; ++ __ push(eax); ++ __ push(ecx); ++ __ push(edx); ++ ++ // Calculate and push the original stack pointer. ++ __ lea(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); ++ __ push(eax); ++ ++ // Retrieve our return address and use it to calculate the calling ++ // function's address. ++ __ mov(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); ++ __ sub(eax, Immediate(Assembler::kCallInstructionLength)); ++ __ push(eax); ++ ++ // Call the entry hook. ++ DCHECK(isolate()->function_entry_hook() != NULL); ++ __ call(FUNCTION_ADDR(isolate()->function_entry_hook()), ++ RelocInfo::RUNTIME_ENTRY); ++ __ add(esp, Immediate(2 * kPointerSize)); ++ ++ // Restore ecx. ++ __ pop(edx); ++ __ pop(ecx); ++ __ pop(eax); ++ ++ __ ret(0); ++} ++ ++template ++static void CreateArrayDispatch(MacroAssembler* masm, ++ AllocationSiteOverrideMode mode) { ++ if (mode == DISABLE_ALLOCATION_SITES) { ++ T stub(masm->isolate(), GetInitialFastElementsKind(), mode); ++ __ TailCallStub(&stub); ++ } else if (mode == DONT_OVERRIDE) { ++ int last_index = ++ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); ++ for (int i = 0; i <= last_index; ++i) { ++ Label next; ++ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); ++ __ cmp(edx, kind); ++ __ j(not_equal, &next); ++ T stub(masm->isolate(), kind); ++ __ TailCallStub(&stub); ++ __ bind(&next); ++ } ++ ++ // If we reached this point there is a problem. ++ __ Abort(kUnexpectedElementsKindInArrayConstructor); ++ } else { ++ UNREACHABLE(); ++ } ++} ++ ++static void CreateArrayDispatchOneArgument(MacroAssembler* masm, ++ AllocationSiteOverrideMode mode) { ++ // ebx - allocation site (if mode != DISABLE_ALLOCATION_SITES) ++ // edx - kind (if mode != DISABLE_ALLOCATION_SITES) ++ // eax - number of arguments ++ // edi - constructor? ++ // esp[0] - return address ++ // esp[4] - last argument ++ Label normal_sequence; ++ if (mode == DONT_OVERRIDE) { ++ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); ++ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); ++ STATIC_ASSERT(PACKED_ELEMENTS == 2); ++ STATIC_ASSERT(HOLEY_ELEMENTS == 3); ++ STATIC_ASSERT(PACKED_DOUBLE_ELEMENTS == 4); ++ STATIC_ASSERT(HOLEY_DOUBLE_ELEMENTS == 5); ++ ++ // is the low bit set? If so, we are holey and that is good. ++ __ test_b(edx, Immediate(1)); ++ __ j(not_zero, &normal_sequence); ++ } ++ ++ // look at the first argument ++ __ mov(ecx, Operand(esp, kPointerSize)); ++ __ test(ecx, ecx); ++ __ j(zero, &normal_sequence); ++ ++ if (mode == DISABLE_ALLOCATION_SITES) { ++ ElementsKind initial = GetInitialFastElementsKind(); ++ ElementsKind holey_initial = GetHoleyElementsKind(initial); ++ ++ ArraySingleArgumentConstructorStub stub_holey( ++ masm->isolate(), holey_initial, DISABLE_ALLOCATION_SITES); ++ __ TailCallStub(&stub_holey); ++ ++ __ bind(&normal_sequence); ++ ArraySingleArgumentConstructorStub stub(masm->isolate(), initial, ++ DISABLE_ALLOCATION_SITES); ++ __ TailCallStub(&stub); ++ } else if (mode == DONT_OVERRIDE) { ++ // We are going to create a holey array, but our kind is non-holey. ++ // Fix kind and retry. ++ __ inc(edx); ++ ++ if (FLAG_debug_code) { ++ Handle allocation_site_map = ++ masm->isolate()->factory()->allocation_site_map(); ++ __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); ++ __ Assert(equal, kExpectedAllocationSite); ++ } ++ ++ // Save the resulting elements kind in type info. We can't just store r3 ++ // in the AllocationSite::transition_info field because elements kind is ++ // restricted to a portion of the field...upper bits need to be left alone. ++ STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); ++ __ add( ++ FieldOperand(ebx, AllocationSite::kTransitionInfoOrBoilerplateOffset), ++ Immediate(Smi::FromInt(kFastElementsKindPackedToHoley))); ++ ++ __ bind(&normal_sequence); ++ int last_index = ++ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); ++ for (int i = 0; i <= last_index; ++i) { ++ Label next; ++ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); ++ __ cmp(edx, kind); ++ __ j(not_equal, &next); ++ ArraySingleArgumentConstructorStub stub(masm->isolate(), kind); ++ __ TailCallStub(&stub); ++ __ bind(&next); ++ } ++ ++ // If we reached this point there is a problem. ++ __ Abort(kUnexpectedElementsKindInArrayConstructor); ++ } else { ++ UNREACHABLE(); ++ } ++} ++ ++template ++static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { ++ int to_index = ++ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); ++ for (int i = 0; i <= to_index; ++i) { ++ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); ++ T stub(isolate, kind); ++ stub.GetCode(); ++ if (AllocationSite::ShouldTrack(kind)) { ++ T stub1(isolate, kind, DISABLE_ALLOCATION_SITES); ++ stub1.GetCode(); ++ } ++ } ++} ++ ++void CommonArrayConstructorStub::GenerateStubsAheadOfTime(Isolate* isolate) { ++ ArrayConstructorStubAheadOfTimeHelper( ++ isolate); ++ ArrayConstructorStubAheadOfTimeHelper( ++ isolate); ++ ArrayNArgumentsConstructorStub stub(isolate); ++ stub.GetCode(); ++ ++ ElementsKind kinds[2] = {PACKED_ELEMENTS, HOLEY_ELEMENTS}; ++ for (int i = 0; i < 2; i++) { ++ // For internal arrays we only need a few things ++ InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[i]); ++ stubh1.GetCode(); ++ InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[i]); ++ stubh2.GetCode(); ++ } ++} ++ ++void ArrayConstructorStub::GenerateDispatchToArrayStub( ++ MacroAssembler* masm, AllocationSiteOverrideMode mode) { ++ Label not_zero_case, not_one_case; ++ __ test(eax, eax); ++ __ j(not_zero, ¬_zero_case); ++ CreateArrayDispatch(masm, mode); ++ ++ __ bind(¬_zero_case); ++ __ cmp(eax, 1); ++ __ j(greater, ¬_one_case); ++ CreateArrayDispatchOneArgument(masm, mode); ++ ++ __ bind(¬_one_case); ++ ArrayNArgumentsConstructorStub stub(masm->isolate()); ++ __ TailCallStub(&stub); ++} ++ ++void ArrayConstructorStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc (only if argument_count() is ANY or MORE_THAN_ONE) ++ // -- ebx : AllocationSite or undefined ++ // -- edi : constructor ++ // -- edx : Original constructor ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // ----------------------------------- ++ if (FLAG_debug_code) { ++ // The array construct code is only set for the global and natives ++ // builtin Array functions which always have maps. ++ ++ // Initial map for the builtin Array function should be a map. ++ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); ++ // Will both indicate a NULL and a Smi. ++ __ test(ecx, Immediate(kSmiTagMask)); ++ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); ++ __ CmpObjectType(ecx, MAP_TYPE, ecx); ++ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); ++ ++ // We should either have undefined in ebx or a valid AllocationSite ++ __ AssertUndefinedOrAllocationSite(ebx); ++ } ++ ++ Label subclassing; ++ ++ // Enter the context of the Array function. ++ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ __ cmp(edx, edi); ++ __ j(not_equal, &subclassing); ++ ++ Label no_info; ++ // If the feedback vector is the undefined value call an array constructor ++ // that doesn't use AllocationSites. ++ __ cmp(ebx, isolate()->factory()->undefined_value()); ++ __ j(equal, &no_info); ++ ++ // Only look at the lower 16 bits of the transition info. ++ __ mov(edx, ++ FieldOperand(ebx, AllocationSite::kTransitionInfoOrBoilerplateOffset)); ++ __ SmiUntag(edx); ++ STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); ++ __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask)); ++ GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); ++ ++ __ bind(&no_info); ++ GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); ++ ++ // Subclassing. ++ __ bind(&subclassing); ++ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); ++ __ add(eax, Immediate(3)); ++ __ PopReturnAddressTo(ecx); ++ __ Push(edx); ++ __ Push(ebx); ++ __ PushReturnAddressFrom(ecx); ++ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); ++} ++ ++void InternalArrayConstructorStub::GenerateCase(MacroAssembler* masm, ++ ElementsKind kind) { ++ Label not_zero_case, not_one_case; ++ Label normal_sequence; ++ ++ __ test(eax, eax); ++ __ j(not_zero, ¬_zero_case); ++ InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); ++ __ TailCallStub(&stub0); ++ ++ __ bind(¬_zero_case); ++ __ cmp(eax, 1); ++ __ j(greater, ¬_one_case); ++ ++ if (IsFastPackedElementsKind(kind)) { ++ // We might need to create a holey array ++ // look at the first argument ++ __ mov(ecx, Operand(esp, kPointerSize)); ++ __ test(ecx, ecx); ++ __ j(zero, &normal_sequence); ++ ++ InternalArraySingleArgumentConstructorStub stub1_holey( ++ isolate(), GetHoleyElementsKind(kind)); ++ __ TailCallStub(&stub1_holey); ++ } ++ ++ __ bind(&normal_sequence); ++ InternalArraySingleArgumentConstructorStub stub1(isolate(), kind); ++ __ TailCallStub(&stub1); ++ ++ __ bind(¬_one_case); ++ ArrayNArgumentsConstructorStub stubN(isolate()); ++ __ TailCallStub(&stubN); ++} ++ ++void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- eax : argc ++ // -- edi : constructor ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // ----------------------------------- ++ ++ if (FLAG_debug_code) { ++ // The array construct code is only set for the global and natives ++ // builtin Array functions which always have maps. ++ ++ // Initial map for the builtin Array function should be a map. ++ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); ++ // Will both indicate a NULL and a Smi. ++ __ test(ecx, Immediate(kSmiTagMask)); ++ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); ++ __ CmpObjectType(ecx, MAP_TYPE, ecx); ++ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); ++ } ++ ++ // Figure out the right elements kind ++ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); ++ ++ // Load the map's "bit field 2" into |result|. We only need the first byte, ++ // but the following masking takes care of that anyway. ++ __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); ++ // Retrieve elements_kind from bit field 2. ++ __ DecodeField(ecx); ++ ++ if (FLAG_debug_code) { ++ Label done; ++ __ cmp(ecx, Immediate(PACKED_ELEMENTS)); ++ __ j(equal, &done); ++ __ cmp(ecx, Immediate(HOLEY_ELEMENTS)); ++ __ Assert(equal, kInvalidElementsKindForInternalArrayOrInternalPackedArray); ++ __ bind(&done); ++ } ++ ++ Label fast_elements_case; ++ __ cmp(ecx, Immediate(PACKED_ELEMENTS)); ++ __ j(equal, &fast_elements_case); ++ GenerateCase(masm, HOLEY_ELEMENTS); ++ ++ __ bind(&fast_elements_case); ++ GenerateCase(masm, PACKED_ELEMENTS); ++} ++ ++void FastNewRestParameterStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edi : function ++ // -- esi : context ++ // -- ebp : frame pointer ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // Make edx point to the JavaScript frame. ++ __ mov(edx, ebp); ++ if (skip_stub_frame()) { ++ // For Ignition we need to skip the handler/stub frame to reach the ++ // JavaScript frame for the function. ++ __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); ++ } ++ if (FLAG_debug_code) { ++ Label ok; ++ __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); ++ __ j(equal, &ok); ++ __ Abort(kInvalidFrameForFastNewRestArgumentsStub); ++ __ bind(&ok); ++ } ++ ++ // Check if we have rest parameters (only possible if we have an ++ // arguments adaptor frame below the function frame). ++ Label no_rest_parameters; ++ __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); ++ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(not_equal, &no_rest_parameters, Label::kNear); ++ ++ // Check if the arguments adaptor frame contains more arguments than ++ // specified by the function's internal formal parameter count. ++ Label rest_parameters; ++ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ sub(eax, ++ FieldOperand(ecx, SharedFunctionInfo::kFormalParameterCountOffset)); ++ __ j(greater, &rest_parameters); ++ ++ // Return an empty rest parameter array. ++ __ bind(&no_rest_parameters); ++ { ++ // ----------- S t a t e ------------- ++ // -- esi : context ++ // -- esp[0] : return address ++ // ----------------------------------- ++ ++ // Allocate an empty rest parameter array. ++ Label allocate, done_allocate; ++ __ Allocate(JSArray::kSize, eax, edx, ecx, &allocate, NO_ALLOCATION_FLAGS); ++ __ bind(&done_allocate); ++ ++ // Setup the rest parameter array in rax. ++ __ LoadGlobalFunction(Context::JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX, ecx); ++ __ mov(FieldOperand(eax, JSArray::kMapOffset), ecx); ++ __ mov(ecx, isolate()->factory()->empty_fixed_array()); ++ __ mov(FieldOperand(eax, JSArray::kPropertiesOrHashOffset), ecx); ++ __ mov(FieldOperand(eax, JSArray::kElementsOffset), ecx); ++ __ mov(FieldOperand(eax, JSArray::kLengthOffset), Immediate(Smi::kZero)); ++ STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); ++ __ Ret(); ++ ++ // Fall back to %AllocateInNewSpace. ++ __ bind(&allocate); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ Push(Smi::FromInt(JSArray::kSize)); ++ __ CallRuntime(Runtime::kAllocateInNewSpace); ++ } ++ __ jmp(&done_allocate); ++ } ++ ++ __ bind(&rest_parameters); ++ { ++ // Compute the pointer to the first rest parameter (skippping the receiver). ++ __ lea(ebx, ++ Operand(ebx, eax, times_half_pointer_size, ++ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); ++ ++ // ----------- S t a t e ------------- ++ // -- esi : context ++ // -- eax : number of rest parameters (tagged) ++ // -- ebx : pointer to first rest parameters ++ // -- esp[0] : return address ++ // ----------------------------------- ++ ++ // Allocate space for the rest parameter array plus the backing store. ++ Label allocate, done_allocate; ++ __ lea(ecx, Operand(eax, times_half_pointer_size, ++ JSArray::kSize + FixedArray::kHeaderSize)); ++ __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); ++ __ bind(&done_allocate); ++ ++ // Setup the elements array in edx. ++ __ mov(FieldOperand(edx, FixedArray::kMapOffset), ++ isolate()->factory()->fixed_array_map()); ++ __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); ++ { ++ Label loop, done_loop; ++ __ Move(ecx, Smi::kZero); ++ __ bind(&loop); ++ __ cmp(ecx, eax); ++ __ j(equal, &done_loop, Label::kNear); ++ __ mov(edi, Operand(ebx, 0 * kPointerSize)); ++ __ mov(FieldOperand(edx, ecx, times_half_pointer_size, ++ FixedArray::kHeaderSize), ++ edi); ++ __ sub(ebx, Immediate(1 * kPointerSize)); ++ __ add(ecx, Immediate(Smi::FromInt(1))); ++ __ jmp(&loop); ++ __ bind(&done_loop); ++ } ++ ++ // Setup the rest parameter array in edi. ++ __ lea(edi, ++ Operand(edx, eax, times_half_pointer_size, FixedArray::kHeaderSize)); ++ __ LoadGlobalFunction(Context::JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX, ecx); ++ __ mov(FieldOperand(edi, JSArray::kMapOffset), ecx); ++ __ mov(FieldOperand(edi, JSArray::kPropertiesOrHashOffset), ++ isolate()->factory()->empty_fixed_array()); ++ __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx); ++ __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax); ++ STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); ++ __ mov(eax, edi); ++ __ Ret(); ++ ++ // Fall back to %AllocateInNewSpace (if not too big). ++ Label too_big_for_new_space; ++ __ bind(&allocate); ++ __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); ++ __ j(greater, &too_big_for_new_space); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ SmiTag(ecx); ++ __ Push(eax); ++ __ Push(ebx); ++ __ Push(ecx); ++ __ CallRuntime(Runtime::kAllocateInNewSpace); ++ __ mov(edx, eax); ++ __ Pop(ebx); ++ __ Pop(eax); ++ } ++ __ jmp(&done_allocate); ++ ++ // Fall back to %NewRestParameter. ++ __ bind(&too_big_for_new_space); ++ __ PopReturnAddressTo(ecx); ++ // We reload the function from the caller frame due to register pressure ++ // within this stub. This is the slow path, hence reloading is preferable. ++ if (skip_stub_frame()) { ++ // For Ignition we need to skip the handler/stub frame to reach the ++ // JavaScript frame for the function. ++ __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); ++ } else { ++ __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); ++ } ++ __ PushReturnAddressFrom(ecx); ++ __ TailCallRuntime(Runtime::kNewRestParameter); ++ } ++} ++ ++void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edi : function ++ // -- esi : context ++ // -- ebp : frame pointer ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // Make ecx point to the JavaScript frame. ++ __ mov(ecx, ebp); ++ if (skip_stub_frame()) { ++ // For Ignition we need to skip the handler/stub frame to reach the ++ // JavaScript frame for the function. ++ __ mov(ecx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); ++ } ++ if (FLAG_debug_code) { ++ Label ok; ++ __ cmp(edi, Operand(ecx, StandardFrameConstants::kFunctionOffset)); ++ __ j(equal, &ok); ++ __ Abort(kInvalidFrameForFastNewSloppyArgumentsStub); ++ __ bind(&ok); ++ } ++ ++ // TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub. ++ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(ebx, ++ FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); ++ __ lea(edx, Operand(ecx, ebx, times_half_pointer_size, ++ StandardFrameConstants::kCallerSPOffset)); ++ ++ // ebx : number of parameters (tagged) ++ // edx : parameters pointer ++ // edi : function ++ // ecx : JavaScript frame pointer. ++ // esp[0] : return address ++ ++ // Check if the calling frame is an arguments adaptor frame. ++ Label adaptor_frame, try_allocate, runtime; ++ __ mov(eax, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); ++ __ mov(eax, Operand(eax, CommonFrameConstants::kContextOrFrameTypeOffset)); ++ __ cmp(eax, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(equal, &adaptor_frame, Label::kNear); ++ ++ // No adaptor, parameter count = argument count. ++ __ mov(ecx, ebx); ++ __ push(ebx); ++ __ jmp(&try_allocate, Label::kNear); ++ ++ // We have an adaptor frame. Patch the parameters pointer. ++ __ bind(&adaptor_frame); ++ __ push(ebx); ++ __ mov(edx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); ++ __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ lea(edx, ++ Operand(edx, ecx, times_2, StandardFrameConstants::kCallerSPOffset)); ++ ++ // ebx = parameter count (tagged) ++ // ecx = argument count (smi-tagged) ++ // Compute the mapped parameter count = min(ebx, ecx) in ebx. ++ __ cmp(ebx, ecx); ++ __ j(less_equal, &try_allocate, Label::kNear); ++ __ mov(ebx, ecx); ++ ++ // Save mapped parameter count and function. ++ __ bind(&try_allocate); ++ __ push(edi); ++ __ push(ebx); ++ ++ // Compute the sizes of backing store, parameter map, and arguments object. ++ // 1. Parameter map, has 2 extra words containing context and backing store. ++ const int kParameterMapHeaderSize = ++ FixedArray::kHeaderSize + 2 * kPointerSize; ++ Label no_parameter_map; ++ __ test(ebx, ebx); ++ __ j(zero, &no_parameter_map, Label::kNear); ++ __ lea(ebx, Operand(ebx, times_2, kParameterMapHeaderSize)); ++ __ bind(&no_parameter_map); ++ ++ // 2. Backing store. ++ __ lea(ebx, Operand(ebx, ecx, times_2, FixedArray::kHeaderSize)); ++ ++ // 3. Arguments object. ++ __ add(ebx, Immediate(JSSloppyArgumentsObject::kSize)); ++ ++ // Do the allocation of all three objects in one go. ++ __ Allocate(ebx, eax, edi, no_reg, &runtime, NO_ALLOCATION_FLAGS); ++ ++ // eax = address of new object(s) (tagged) ++ // ecx = argument count (smi-tagged) ++ // esp[0] = mapped parameter count (tagged) ++ // esp[4] = function ++ // esp[8] = parameter count (tagged) ++ // Get the arguments map from the current native context into edi. ++ Label has_mapped_parameters, instantiate; ++ __ mov(edi, NativeContextOperand()); ++ __ mov(ebx, Operand(esp, 0 * kPointerSize)); ++ __ test(ebx, ebx); ++ __ j(not_zero, &has_mapped_parameters, Label::kNear); ++ __ mov( ++ edi, ++ Operand(edi, Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX))); ++ __ jmp(&instantiate, Label::kNear); ++ ++ __ bind(&has_mapped_parameters); ++ __ mov(edi, Operand(edi, Context::SlotOffset( ++ Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX))); ++ __ bind(&instantiate); ++ ++ // eax = address of new object (tagged) ++ // ebx = mapped parameter count (tagged) ++ // ecx = argument count (smi-tagged) ++ // edi = address of arguments map (tagged) ++ // esp[0] = mapped parameter count (tagged) ++ // esp[4] = function ++ // esp[8] = parameter count (tagged) ++ // Copy the JS object part. ++ __ mov(FieldOperand(eax, JSObject::kMapOffset), edi); ++ __ mov(FieldOperand(eax, JSObject::kPropertiesOrHashOffset), ++ masm->isolate()->factory()->empty_fixed_array()); ++ __ mov(FieldOperand(eax, JSObject::kElementsOffset), ++ masm->isolate()->factory()->empty_fixed_array()); ++ ++ // Set up the callee in-object property. ++ STATIC_ASSERT(JSSloppyArgumentsObject::kCalleeIndex == 1); ++ __ mov(edi, Operand(esp, 1 * kPointerSize)); ++ __ AssertNotSmi(edi); ++ __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kCalleeOffset), edi); ++ ++ // Use the length (smi tagged) and set that as an in-object property too. ++ __ AssertSmi(ecx); ++ __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kLengthOffset), ecx); ++ ++ // Set up the elements pointer in the allocated arguments object. ++ // If we allocated a parameter map, edi will point there, otherwise to the ++ // backing store. ++ __ lea(edi, Operand(eax, JSSloppyArgumentsObject::kSize)); ++ __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi); ++ ++ // eax = address of new object (tagged) ++ // ebx = mapped parameter count (tagged) ++ // ecx = argument count (tagged) ++ // edx = address of receiver argument ++ // edi = address of parameter map or backing store (tagged) ++ // esp[0] = mapped parameter count (tagged) ++ // esp[4] = function ++ // esp[8] = parameter count (tagged) ++ // Free two registers. ++ __ push(edx); ++ __ push(eax); ++ ++ // Initialize parameter map. If there are no mapped arguments, we're done. ++ Label skip_parameter_map; ++ __ test(ebx, ebx); ++ __ j(zero, &skip_parameter_map); ++ ++ __ mov(FieldOperand(edi, FixedArray::kMapOffset), ++ Immediate(isolate()->factory()->sloppy_arguments_elements_map())); ++ __ lea(eax, Operand(ebx, reinterpret_cast(Smi::FromInt(2)))); ++ __ mov(FieldOperand(edi, FixedArray::kLengthOffset), eax); ++ __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 0 * kPointerSize), esi); ++ __ lea(eax, Operand(edi, ebx, times_2, kParameterMapHeaderSize)); ++ __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 1 * kPointerSize), eax); ++ ++ // Copy the parameter slots and the holes in the arguments. ++ // We need to fill in mapped_parameter_count slots. They index the context, ++ // where parameters are stored in reverse order, at ++ // MIN_CONTEXT_SLOTS .. MIN_CONTEXT_SLOTS+parameter_count-1 ++ // The mapped parameter thus need to get indices ++ // MIN_CONTEXT_SLOTS+parameter_count-1 .. ++ // MIN_CONTEXT_SLOTS+parameter_count-mapped_parameter_count ++ // We loop from right to left. ++ Label parameters_loop, parameters_test; ++ __ push(ecx); ++ __ mov(eax, Operand(esp, 3 * kPointerSize)); ++ __ mov(ebx, Immediate(Smi::FromInt(Context::MIN_CONTEXT_SLOTS))); ++ __ add(ebx, Operand(esp, 5 * kPointerSize)); ++ __ sub(ebx, eax); ++ __ mov(ecx, isolate()->factory()->the_hole_value()); ++ __ mov(edx, edi); ++ __ lea(edi, Operand(edi, eax, times_2, kParameterMapHeaderSize)); ++ // eax = loop variable (tagged) ++ // ebx = mapping index (tagged) ++ // ecx = the hole value ++ // edx = address of parameter map (tagged) ++ // edi = address of backing store (tagged) ++ // esp[0] = argument count (tagged) ++ // esp[4] = address of new object (tagged) ++ // esp[8] = address of receiver argument ++ // esp[12] = mapped parameter count (tagged) ++ // esp[16] = function ++ // esp[20] = parameter count (tagged) ++ __ jmp(¶meters_test, Label::kNear); ++ ++ __ bind(¶meters_loop); ++ __ sub(eax, Immediate(Smi::FromInt(1))); ++ __ mov(FieldOperand(edx, eax, times_2, kParameterMapHeaderSize), ebx); ++ __ mov(FieldOperand(edi, eax, times_2, FixedArray::kHeaderSize), ecx); ++ __ add(ebx, Immediate(Smi::FromInt(1))); ++ __ bind(¶meters_test); ++ __ test(eax, eax); ++ __ j(not_zero, ¶meters_loop, Label::kNear); ++ __ pop(ecx); ++ ++ __ bind(&skip_parameter_map); ++ ++ // ecx = argument count (tagged) ++ // edi = address of backing store (tagged) ++ // esp[0] = address of new object (tagged) ++ // esp[4] = address of receiver argument ++ // esp[8] = mapped parameter count (tagged) ++ // esp[12] = function ++ // esp[16] = parameter count (tagged) ++ // Copy arguments header and remaining slots (if there are any). ++ __ mov(FieldOperand(edi, FixedArray::kMapOffset), ++ Immediate(isolate()->factory()->fixed_array_map())); ++ __ mov(FieldOperand(edi, FixedArray::kLengthOffset), ecx); ++ ++ Label arguments_loop, arguments_test; ++ __ mov(ebx, Operand(esp, 2 * kPointerSize)); ++ __ mov(edx, Operand(esp, 1 * kPointerSize)); ++ __ sub(edx, ebx); // Is there a smarter way to do negative scaling? ++ __ sub(edx, ebx); ++ __ jmp(&arguments_test, Label::kNear); ++ ++ __ bind(&arguments_loop); ++ __ sub(edx, Immediate(kPointerSize)); ++ __ mov(eax, Operand(edx, 0)); ++ __ mov(FieldOperand(edi, ebx, times_2, FixedArray::kHeaderSize), eax); ++ __ add(ebx, Immediate(Smi::FromInt(1))); ++ ++ __ bind(&arguments_test); ++ __ cmp(ebx, ecx); ++ __ j(less, &arguments_loop, Label::kNear); ++ ++ // Restore. ++ __ pop(eax); // Address of arguments object. ++ __ Drop(4); ++ ++ // Return. ++ __ ret(0); ++ ++ // Do the runtime call to allocate the arguments object. ++ __ bind(&runtime); ++ __ pop(eax); // Remove saved mapped parameter count. ++ __ pop(edi); // Pop saved function. ++ __ pop(eax); // Remove saved parameter count. ++ __ pop(eax); // Pop return address. ++ __ push(edi); // Push function. ++ __ push(edx); // Push parameters pointer. ++ __ push(ecx); // Push parameter count. ++ __ push(eax); // Push return address. ++ __ TailCallRuntime(Runtime::kNewSloppyArguments); ++} ++ ++void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edi : function ++ // -- esi : context ++ // -- ebp : frame pointer ++ // -- esp[0] : return address ++ // ----------------------------------- ++ __ AssertFunction(edi); ++ ++ // Make edx point to the JavaScript frame. ++ __ mov(edx, ebp); ++ if (skip_stub_frame()) { ++ // For Ignition we need to skip the handler/stub frame to reach the ++ // JavaScript frame for the function. ++ __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); ++ } ++ if (FLAG_debug_code) { ++ Label ok; ++ __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); ++ __ j(equal, &ok); ++ __ Abort(kInvalidFrameForFastNewStrictArgumentsStub); ++ __ bind(&ok); ++ } ++ ++ // Check if we have an arguments adaptor frame below the function frame. ++ Label arguments_adaptor, arguments_done; ++ __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); ++ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ j(equal, &arguments_adaptor, Label::kNear); ++ { ++ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(eax, ++ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); ++ __ lea(ebx, ++ Operand(edx, eax, times_half_pointer_size, ++ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); ++ } ++ __ jmp(&arguments_done, Label::kNear); ++ __ bind(&arguments_adaptor); ++ { ++ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ lea(ebx, ++ Operand(ebx, eax, times_half_pointer_size, ++ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); ++ } ++ __ bind(&arguments_done); ++ ++ // ----------- S t a t e ------------- ++ // -- eax : number of arguments (tagged) ++ // -- ebx : pointer to the first argument ++ // -- esi : context ++ // -- esp[0] : return address ++ // ----------------------------------- ++ ++ // Allocate space for the strict arguments object plus the backing store. ++ Label allocate, done_allocate; ++ __ lea(ecx, ++ Operand(eax, times_half_pointer_size, ++ JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize)); ++ __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); ++ __ bind(&done_allocate); ++ ++ // Setup the elements array in edx. ++ __ mov(FieldOperand(edx, FixedArray::kMapOffset), ++ isolate()->factory()->fixed_array_map()); ++ __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); ++ { ++ Label loop, done_loop; ++ __ Move(ecx, Smi::kZero); ++ __ bind(&loop); ++ __ cmp(ecx, eax); ++ __ j(equal, &done_loop, Label::kNear); ++ __ mov(edi, Operand(ebx, 0 * kPointerSize)); ++ __ mov(FieldOperand(edx, ecx, times_half_pointer_size, ++ FixedArray::kHeaderSize), ++ edi); ++ __ sub(ebx, Immediate(1 * kPointerSize)); ++ __ add(ecx, Immediate(Smi::FromInt(1))); ++ __ jmp(&loop); ++ __ bind(&done_loop); ++ } ++ ++ // Setup the rest parameter array in edi. ++ __ lea(edi, ++ Operand(edx, eax, times_half_pointer_size, FixedArray::kHeaderSize)); ++ __ LoadGlobalFunction(Context::STRICT_ARGUMENTS_MAP_INDEX, ecx); ++ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kMapOffset), ecx); ++ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kPropertiesOrHashOffset), ++ isolate()->factory()->empty_fixed_array()); ++ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx); ++ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax); ++ STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); ++ __ mov(eax, edi); ++ __ Ret(); ++ ++ // Fall back to %AllocateInNewSpace (if not too big). ++ Label too_big_for_new_space; ++ __ bind(&allocate); ++ __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); ++ __ j(greater, &too_big_for_new_space); ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ SmiTag(ecx); ++ __ Push(eax); ++ __ Push(ebx); ++ __ Push(ecx); ++ __ CallRuntime(Runtime::kAllocateInNewSpace); ++ __ mov(edx, eax); ++ __ Pop(ebx); ++ __ Pop(eax); ++ } ++ __ jmp(&done_allocate); ++ ++ // Fall back to %NewStrictArguments. ++ __ bind(&too_big_for_new_space); ++ __ PopReturnAddressTo(ecx); ++ // We reload the function from the caller frame due to register pressure ++ // within this stub. This is the slow path, hence reloading is preferable. ++ if (skip_stub_frame()) { ++ // For Ignition we need to skip the handler/stub frame to reach the ++ // JavaScript frame for the function. ++ __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); ++ } else { ++ __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); ++ } ++ __ PushReturnAddressFrom(ecx); ++ __ TailCallRuntime(Runtime::kNewStrictArguments); ++} ++ ++// Generates an Operand for saving parameters after PrepareCallApiFunction. ++static Operand ApiParameterOperand(int index) { ++ return Operand(esp, index * kPointerSize); ++} ++ ++ ++// Prepares stack to put arguments (aligns and so on). Reserves ++// space for return value if needed (assumes the return value is a handle). ++// Arguments must be stored in ApiParameterOperand(0), ApiParameterOperand(1) ++// etc. Saves context (esi). If space was reserved for return value then ++// stores the pointer to the reserved slot into esi. ++static void PrepareCallApiFunction(MacroAssembler* masm, int argc) { ++ __ EnterApiExitFrame(argc); ++ if (__ emit_debug_code()) { ++ __ mov(esi, Immediate(bit_cast(kZapValue))); ++ } ++} ++ ++ ++// Calls an API function. Allocates HandleScope, extracts returned value ++// from handle and propagates exceptions. Clobbers ebx, edi and ++// caller-save registers. Restores context. On return removes ++// stack_space * kPointerSize (GCed). ++static void CallApiFunctionAndReturn(MacroAssembler* masm, ++ Register function_address, ++ ExternalReference thunk_ref, ++ Operand thunk_last_arg, int stack_space, ++ Operand* stack_space_operand, ++ Operand return_value_operand, ++ Operand* context_restore_operand) { ++ Isolate* isolate = masm->isolate(); ++ ++ ExternalReference next_address = ++ ExternalReference::handle_scope_next_address(isolate); ++ ExternalReference limit_address = ++ ExternalReference::handle_scope_limit_address(isolate); ++ ExternalReference level_address = ++ ExternalReference::handle_scope_level_address(isolate); ++ ++ DCHECK(edx.is(function_address)); ++ // Allocate HandleScope in callee-save registers. ++ __ mov(ebx, Operand::StaticVariable(next_address)); ++ __ mov(edi, Operand::StaticVariable(limit_address)); ++ __ add(Operand::StaticVariable(level_address), Immediate(1)); ++ ++ if (FLAG_log_timer_events) { ++ FrameScope frame(masm, StackFrame::MANUAL); ++ __ PushSafepointRegisters(); ++ __ PrepareCallCFunction(1, eax); ++ __ mov(Operand(esp, 0), ++ Immediate(ExternalReference::isolate_address(isolate))); ++ __ CallCFunction(ExternalReference::log_enter_external_function(isolate), ++ 1); ++ __ PopSafepointRegisters(); ++ } ++ ++ ++ Label profiler_disabled; ++ Label end_profiler_check; ++ __ mov(eax, Immediate(ExternalReference::is_profiling_address(isolate))); ++ __ cmpb(Operand(eax, 0), Immediate(0)); ++ __ j(zero, &profiler_disabled); ++ ++ // Additional parameter is the address of the actual getter function. ++ __ mov(thunk_last_arg, function_address); ++ // Call the api function. ++ __ mov(eax, Immediate(thunk_ref)); ++ __ call(eax); ++ __ jmp(&end_profiler_check); ++ ++ __ bind(&profiler_disabled); ++ // Call the api function. ++ __ call(function_address); ++ __ bind(&end_profiler_check); ++ ++ if (FLAG_log_timer_events) { ++ FrameScope frame(masm, StackFrame::MANUAL); ++ __ PushSafepointRegisters(); ++ __ PrepareCallCFunction(1, eax); ++ __ mov(Operand(esp, 0), ++ Immediate(ExternalReference::isolate_address(isolate))); ++ __ CallCFunction(ExternalReference::log_leave_external_function(isolate), ++ 1); ++ __ PopSafepointRegisters(); ++ } ++ ++ Label prologue; ++ // Load the value from ReturnValue ++ __ mov(eax, return_value_operand); ++ ++ Label promote_scheduled_exception; ++ Label delete_allocated_handles; ++ Label leave_exit_frame; ++ ++ __ bind(&prologue); ++ // No more valid handles (the result handle was the last one). Restore ++ // previous handle scope. ++ __ mov(Operand::StaticVariable(next_address), ebx); ++ __ sub(Operand::StaticVariable(level_address), Immediate(1)); ++ __ Assert(above_equal, kInvalidHandleScopeLevel); ++ __ cmp(edi, Operand::StaticVariable(limit_address)); ++ __ j(not_equal, &delete_allocated_handles); ++ ++ // Leave the API exit frame. ++ __ bind(&leave_exit_frame); ++ bool restore_context = context_restore_operand != NULL; ++ if (restore_context) { ++ __ mov(esi, *context_restore_operand); ++ } ++ if (stack_space_operand != nullptr) { ++ __ mov(ebx, *stack_space_operand); ++ } ++ __ LeaveApiExitFrame(!restore_context); ++ ++ // Check if the function scheduled an exception. ++ ExternalReference scheduled_exception_address = ++ ExternalReference::scheduled_exception_address(isolate); ++ __ cmp(Operand::StaticVariable(scheduled_exception_address), ++ Immediate(isolate->factory()->the_hole_value())); ++ __ j(not_equal, &promote_scheduled_exception); ++ ++#if DEBUG ++ // Check if the function returned a valid JavaScript value. ++ Label ok; ++ Register return_value = eax; ++ Register map = ecx; ++ ++ __ JumpIfSmi(return_value, &ok, Label::kNear); ++ __ mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); ++ ++ __ CmpInstanceType(map, LAST_NAME_TYPE); ++ __ j(below_equal, &ok, Label::kNear); ++ ++ __ CmpInstanceType(map, FIRST_JS_RECEIVER_TYPE); ++ __ j(above_equal, &ok, Label::kNear); ++ ++ __ cmp(map, isolate->factory()->heap_number_map()); ++ __ j(equal, &ok, Label::kNear); ++ ++ __ cmp(return_value, isolate->factory()->undefined_value()); ++ __ j(equal, &ok, Label::kNear); ++ ++ __ cmp(return_value, isolate->factory()->true_value()); ++ __ j(equal, &ok, Label::kNear); ++ ++ __ cmp(return_value, isolate->factory()->false_value()); ++ __ j(equal, &ok, Label::kNear); ++ ++ __ cmp(return_value, isolate->factory()->null_value()); ++ __ j(equal, &ok, Label::kNear); ++ ++ __ Abort(kAPICallReturnedInvalidObject); ++ ++ __ bind(&ok); ++#endif ++ ++ if (stack_space_operand != nullptr) { ++ DCHECK_EQ(0, stack_space); ++ __ pop(ecx); ++ __ add(esp, ebx); ++ __ jmp(ecx); ++ } else { ++ __ ret(stack_space * kPointerSize); ++ } ++ ++ // Re-throw by promoting a scheduled exception. ++ __ bind(&promote_scheduled_exception); ++ __ TailCallRuntime(Runtime::kPromoteScheduledException); ++ ++ // HandleScope limit has changed. Delete allocated extensions. ++ ExternalReference delete_extensions = ++ ExternalReference::delete_handle_scope_extensions(isolate); ++ __ bind(&delete_allocated_handles); ++ __ mov(Operand::StaticVariable(limit_address), edi); ++ __ mov(edi, eax); ++ __ mov(Operand(esp, 0), ++ Immediate(ExternalReference::isolate_address(isolate))); ++ __ mov(eax, Immediate(delete_extensions)); ++ __ call(eax); ++ __ mov(eax, edi); ++ __ jmp(&leave_exit_frame); ++} ++ ++void CallApiCallbackStub::Generate(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- edi : callee ++ // -- ebx : call_data ++ // -- ecx : holder ++ // -- edx : api_function_address ++ // -- esi : context ++ // -- ++ // -- esp[0] : return address ++ // -- esp[4] : last argument ++ // -- ... ++ // -- esp[argc * 4] : first argument ++ // -- esp[(argc + 1) * 4] : receiver ++ // ----------------------------------- ++ ++ Register callee = edi; ++ Register call_data = ebx; ++ Register holder = ecx; ++ Register api_function_address = edx; ++ Register context = esi; ++ Register return_address = eax; ++ ++ typedef FunctionCallbackArguments FCA; ++ ++ STATIC_ASSERT(FCA::kContextSaveIndex == 6); ++ STATIC_ASSERT(FCA::kCalleeIndex == 5); ++ STATIC_ASSERT(FCA::kDataIndex == 4); ++ STATIC_ASSERT(FCA::kReturnValueOffset == 3); ++ STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); ++ STATIC_ASSERT(FCA::kIsolateIndex == 1); ++ STATIC_ASSERT(FCA::kHolderIndex == 0); ++ STATIC_ASSERT(FCA::kNewTargetIndex == 7); ++ STATIC_ASSERT(FCA::kArgsLength == 8); ++ ++ __ pop(return_address); ++ ++ // new target ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ ++ // context save. ++ __ push(context); ++ ++ // callee ++ __ push(callee); ++ ++ // call data ++ __ push(call_data); ++ ++ Register scratch = call_data; ++ if (!call_data_undefined()) { ++ // return value ++ __ push(Immediate(masm->isolate()->factory()->undefined_value())); ++ // return value default ++ __ push(Immediate(masm->isolate()->factory()->undefined_value())); ++ } else { ++ // return value ++ __ push(scratch); ++ // return value default ++ __ push(scratch); ++ } ++ // isolate ++ __ push(Immediate(reinterpret_cast(masm->isolate()))); ++ // holder ++ __ push(holder); ++ ++ __ mov(scratch, esp); ++ ++ // push return address ++ __ push(return_address); ++ ++ if (!is_lazy()) { ++ // load context from callee ++ __ mov(context, FieldOperand(callee, JSFunction::kContextOffset)); ++ } ++ ++ // API function gets reference to the v8::Arguments. If CPU profiler ++ // is enabled wrapper function will be called and we need to pass ++ // address of the callback as additional parameter, always allocate ++ // space for it. ++ const int kApiArgc = 1 + 1; ++ ++ // Allocate the v8::Arguments structure in the arguments' space since ++ // it's not controlled by GC. ++ const int kApiStackSpace = 3; ++ ++ PrepareCallApiFunction(masm, kApiArgc + kApiStackSpace); ++ ++ // FunctionCallbackInfo::implicit_args_. ++ __ mov(ApiParameterOperand(2), scratch); ++ __ add(scratch, Immediate((argc() + FCA::kArgsLength - 1) * kPointerSize)); ++ // FunctionCallbackInfo::values_. ++ __ mov(ApiParameterOperand(3), scratch); ++ // FunctionCallbackInfo::length_. ++ __ Move(ApiParameterOperand(4), Immediate(argc())); ++ ++ // v8::InvocationCallback's argument. ++ __ lea(scratch, ApiParameterOperand(2)); ++ __ mov(ApiParameterOperand(0), scratch); ++ ++ ExternalReference thunk_ref = ++ ExternalReference::invoke_function_callback(masm->isolate()); ++ ++ Operand context_restore_operand(ebp, ++ (2 + FCA::kContextSaveIndex) * kPointerSize); ++ // Stores return the first js argument ++ int return_value_offset = 0; ++ if (is_store()) { ++ return_value_offset = 2 + FCA::kArgsLength; ++ } else { ++ return_value_offset = 2 + FCA::kReturnValueOffset; ++ } ++ Operand return_value_operand(ebp, return_value_offset * kPointerSize); ++ int stack_space = 0; ++ Operand length_operand = ApiParameterOperand(4); ++ Operand* stack_space_operand = &length_operand; ++ stack_space = argc() + FCA::kArgsLength + 1; ++ stack_space_operand = nullptr; ++ CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, ++ ApiParameterOperand(1), stack_space, ++ stack_space_operand, return_value_operand, ++ &context_restore_operand); ++} ++ ++ ++void CallApiGetterStub::Generate(MacroAssembler* masm) { ++ // Build v8::PropertyCallbackInfo::args_ array on the stack and push property ++ // name below the exit frame to make GC aware of them. ++ STATIC_ASSERT(PropertyCallbackArguments::kShouldThrowOnErrorIndex == 0); ++ STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 1); ++ STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 2); ++ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 3); ++ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 4); ++ STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 5); ++ STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 6); ++ STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 7); ++ ++ Register receiver = ApiGetterDescriptor::ReceiverRegister(); ++ Register holder = ApiGetterDescriptor::HolderRegister(); ++ Register callback = ApiGetterDescriptor::CallbackRegister(); ++ Register scratch = ebx; ++ DCHECK(!AreAliased(receiver, holder, callback, scratch)); ++ ++ __ pop(scratch); // Pop return address to extend the frame. ++ __ push(receiver); ++ __ push(FieldOperand(callback, AccessorInfo::kDataOffset)); ++ __ PushRoot(Heap::kUndefinedValueRootIndex); // ReturnValue ++ // ReturnValue default value ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ __ push(Immediate(ExternalReference::isolate_address(isolate()))); ++ __ push(holder); ++ __ push(Immediate(Smi::kZero)); // should_throw_on_error -> false ++ __ push(FieldOperand(callback, AccessorInfo::kNameOffset)); ++ __ push(scratch); // Restore return address. ++ ++ // v8::PropertyCallbackInfo::args_ array and name handle. ++ const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; ++ ++ // Allocate v8::PropertyCallbackInfo object, arguments for callback and ++ // space for optional callback address parameter (in case CPU profiler is ++ // active) in non-GCed stack space. ++ const int kApiArgc = 3 + 1; ++ ++ // Load address of v8::PropertyAccessorInfo::args_ array. ++ __ lea(scratch, Operand(esp, 2 * kPointerSize)); ++ ++ PrepareCallApiFunction(masm, kApiArgc); ++ // Create v8::PropertyCallbackInfo object on the stack and initialize ++ // it's args_ field. ++ Operand info_object = ApiParameterOperand(3); ++ __ mov(info_object, scratch); ++ ++ // Name as handle. ++ __ sub(scratch, Immediate(kPointerSize)); ++ __ mov(ApiParameterOperand(0), scratch); ++ // Arguments pointer. ++ __ lea(scratch, info_object); ++ __ mov(ApiParameterOperand(1), scratch); ++ // Reserve space for optional callback address parameter. ++ Operand thunk_last_arg = ApiParameterOperand(2); ++ ++ ExternalReference thunk_ref = ++ ExternalReference::invoke_accessor_getter_callback(isolate()); ++ ++ __ mov(scratch, FieldOperand(callback, AccessorInfo::kJsGetterOffset)); ++ Register function_address = edx; ++ __ mov(function_address, ++ FieldOperand(scratch, Foreign::kForeignAddressOffset)); ++ // +3 is to skip prolog, return address and name handle. ++ Operand return_value_operand( ++ ebp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); ++ CallApiFunctionAndReturn(masm, function_address, thunk_ref, thunk_last_arg, ++ kStackUnwindSpace, nullptr, return_value_operand, ++ NULL); ++} ++ ++#undef __ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 2017-12-25 17:42:57.221465559 +0100 +@@ -0,0 +1,351 @@ ++// Copyright 2011 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_X87_CODE_STUBS_X87_H_ ++#define V8_X87_CODE_STUBS_X87_H_ ++ ++namespace v8 { ++namespace internal { ++ ++ ++void ArrayNativeCode(MacroAssembler* masm, ++ bool construct_call, ++ Label* call_generic_code); ++ ++ ++class StringHelper : public AllStatic { ++ public: ++ // Compares two flat one byte strings and returns result in eax. ++ static void GenerateCompareFlatOneByteStrings(MacroAssembler* masm, ++ Register left, Register right, ++ Register scratch1, ++ Register scratch2, ++ Register scratch3); ++ ++ // Compares two flat one byte strings for equality and returns result in eax. ++ static void GenerateFlatOneByteStringEquals(MacroAssembler* masm, ++ Register left, Register right, ++ Register scratch1, ++ Register scratch2); ++ ++ private: ++ static void GenerateOneByteCharsCompareLoop( ++ MacroAssembler* masm, Register left, Register right, Register length, ++ Register scratch, Label* chars_not_equal, ++ Label::Distance chars_not_equal_near = Label::kFar); ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); ++}; ++ ++ ++class NameDictionaryLookupStub: public PlatformCodeStub { ++ public: ++ enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; ++ ++ NameDictionaryLookupStub(Isolate* isolate, Register dictionary, ++ Register result, Register index, LookupMode mode) ++ : PlatformCodeStub(isolate) { ++ minor_key_ = DictionaryBits::encode(dictionary.code()) | ++ ResultBits::encode(result.code()) | ++ IndexBits::encode(index.code()) | LookupModeBits::encode(mode); ++ } ++ ++ static void GenerateNegativeLookup(MacroAssembler* masm, ++ Label* miss, ++ Label* done, ++ Register properties, ++ Handle name, ++ Register r0); ++ ++ bool SometimesSetsUpAFrame() override { return false; } ++ ++ private: ++ static const int kInlinedProbes = 4; ++ static const int kTotalProbes = 20; ++ ++ static const int kCapacityOffset = ++ NameDictionary::kHeaderSize + ++ NameDictionary::kCapacityIndex * kPointerSize; ++ ++ static const int kElementsStartOffset = ++ NameDictionary::kHeaderSize + ++ NameDictionary::kElementsStartIndex * kPointerSize; ++ ++ Register dictionary() const { ++ return Register::from_code(DictionaryBits::decode(minor_key_)); ++ } ++ ++ Register result() const { ++ return Register::from_code(ResultBits::decode(minor_key_)); ++ } ++ ++ Register index() const { ++ return Register::from_code(IndexBits::decode(minor_key_)); ++ } ++ ++ LookupMode mode() const { return LookupModeBits::decode(minor_key_); } ++ ++ class DictionaryBits: public BitField {}; ++ class ResultBits: public BitField {}; ++ class IndexBits: public BitField {}; ++ class LookupModeBits: public BitField {}; ++ ++ DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); ++ DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); ++}; ++ ++ ++class RecordWriteStub: public PlatformCodeStub { ++ public: ++ RecordWriteStub(Isolate* isolate, Register object, Register value, ++ Register address, RememberedSetAction remembered_set_action, ++ SaveFPRegsMode fp_mode) ++ : PlatformCodeStub(isolate), ++ regs_(object, // An input reg. ++ address, // An input reg. ++ value) { // One scratch reg. ++ minor_key_ = ObjectBits::encode(object.code()) | ++ ValueBits::encode(value.code()) | ++ AddressBits::encode(address.code()) | ++ RememberedSetActionBits::encode(remembered_set_action) | ++ SaveFPRegsModeBits::encode(fp_mode); ++ } ++ ++ RecordWriteStub(uint32_t key, Isolate* isolate) ++ : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} ++ ++ enum Mode { ++ STORE_BUFFER_ONLY, ++ INCREMENTAL, ++ INCREMENTAL_COMPACTION ++ }; ++ ++ bool SometimesSetsUpAFrame() override { return false; } ++ ++ static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. ++ static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. ++ ++ static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. ++ static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. ++ ++ static Mode GetMode(Code* stub) { ++ byte first_instruction = stub->instruction_start()[0]; ++ byte second_instruction = stub->instruction_start()[2]; ++ ++ if (first_instruction == kTwoByteJumpInstruction) { ++ return INCREMENTAL; ++ } ++ ++ DCHECK(first_instruction == kTwoByteNopInstruction); ++ ++ if (second_instruction == kFiveByteJumpInstruction) { ++ return INCREMENTAL_COMPACTION; ++ } ++ ++ DCHECK(second_instruction == kFiveByteNopInstruction); ++ ++ return STORE_BUFFER_ONLY; ++ } ++ ++ static void Patch(Code* stub, Mode mode) { ++ switch (mode) { ++ case STORE_BUFFER_ONLY: ++ DCHECK(GetMode(stub) == INCREMENTAL || ++ GetMode(stub) == INCREMENTAL_COMPACTION); ++ stub->instruction_start()[0] = kTwoByteNopInstruction; ++ stub->instruction_start()[2] = kFiveByteNopInstruction; ++ break; ++ case INCREMENTAL: ++ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); ++ stub->instruction_start()[0] = kTwoByteJumpInstruction; ++ break; ++ case INCREMENTAL_COMPACTION: ++ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); ++ stub->instruction_start()[0] = kTwoByteNopInstruction; ++ stub->instruction_start()[2] = kFiveByteJumpInstruction; ++ break; ++ } ++ DCHECK(GetMode(stub) == mode); ++ Assembler::FlushICache(stub->GetIsolate(), stub->instruction_start(), 7); ++ } ++ ++ DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); ++ ++ private: ++ // This is a helper class for freeing up 3 scratch registers, where the third ++ // is always ecx (needed for shift operations). The input is two registers ++ // that must be preserved and one scratch register provided by the caller. ++ class RegisterAllocation { ++ public: ++ RegisterAllocation(Register object, ++ Register address, ++ Register scratch0) ++ : object_orig_(object), ++ address_orig_(address), ++ scratch0_orig_(scratch0), ++ object_(object), ++ address_(address), ++ scratch0_(scratch0) { ++ DCHECK(!AreAliased(scratch0, object, address, no_reg)); ++ scratch1_ = GetRegThatIsNotEcxOr(object_, address_, scratch0_); ++ if (scratch0.is(ecx)) { ++ scratch0_ = GetRegThatIsNotEcxOr(object_, address_, scratch1_); ++ } ++ if (object.is(ecx)) { ++ object_ = GetRegThatIsNotEcxOr(address_, scratch0_, scratch1_); ++ } ++ if (address.is(ecx)) { ++ address_ = GetRegThatIsNotEcxOr(object_, scratch0_, scratch1_); ++ } ++ DCHECK(!AreAliased(scratch0_, object_, address_, ecx)); ++ } ++ ++ void Save(MacroAssembler* masm) { ++ DCHECK(!address_orig_.is(object_)); ++ DCHECK(object_.is(object_orig_) || address_.is(address_orig_)); ++ DCHECK(!AreAliased(object_, address_, scratch1_, scratch0_)); ++ DCHECK(!AreAliased(object_orig_, address_, scratch1_, scratch0_)); ++ DCHECK(!AreAliased(object_, address_orig_, scratch1_, scratch0_)); ++ // We don't have to save scratch0_orig_ because it was given to us as ++ // a scratch register. But if we had to switch to a different reg then ++ // we should save the new scratch0_. ++ if (!scratch0_.is(scratch0_orig_)) masm->push(scratch0_); ++ if (!ecx.is(scratch0_orig_) && ++ !ecx.is(object_orig_) && ++ !ecx.is(address_orig_)) { ++ masm->push(ecx); ++ } ++ masm->push(scratch1_); ++ if (!address_.is(address_orig_)) { ++ masm->push(address_); ++ masm->mov(address_, address_orig_); ++ } ++ if (!object_.is(object_orig_)) { ++ masm->push(object_); ++ masm->mov(object_, object_orig_); ++ } ++ } ++ ++ void Restore(MacroAssembler* masm) { ++ // These will have been preserved the entire time, so we just need to move ++ // them back. Only in one case is the orig_ reg different from the plain ++ // one, since only one of them can alias with ecx. ++ if (!object_.is(object_orig_)) { ++ masm->mov(object_orig_, object_); ++ masm->pop(object_); ++ } ++ if (!address_.is(address_orig_)) { ++ masm->mov(address_orig_, address_); ++ masm->pop(address_); ++ } ++ masm->pop(scratch1_); ++ if (!ecx.is(scratch0_orig_) && ++ !ecx.is(object_orig_) && ++ !ecx.is(address_orig_)) { ++ masm->pop(ecx); ++ } ++ if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); ++ } ++ ++ // If we have to call into C then we need to save and restore all caller- ++ // saved registers that were not already preserved. The caller saved ++ // registers are eax, ecx and edx. The three scratch registers (incl. ecx) ++ // will be restored by other means so we don't bother pushing them here. ++ void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { ++ masm->PushCallerSaved(mode, ecx, scratch0_, scratch1_); ++ } ++ ++ inline void RestoreCallerSaveRegisters(MacroAssembler* masm, ++ SaveFPRegsMode mode) { ++ masm->PopCallerSaved(mode, ecx, scratch0_, scratch1_); ++ } ++ ++ inline Register object() { return object_; } ++ inline Register address() { return address_; } ++ inline Register scratch0() { return scratch0_; } ++ inline Register scratch1() { return scratch1_; } ++ ++ private: ++ Register object_orig_; ++ Register address_orig_; ++ Register scratch0_orig_; ++ Register object_; ++ Register address_; ++ Register scratch0_; ++ Register scratch1_; ++ // Third scratch register is always ecx. ++ ++ Register GetRegThatIsNotEcxOr(Register r1, ++ Register r2, ++ Register r3) { ++ for (int i = 0; i < Register::kNumRegisters; i++) { ++ if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) { ++ Register candidate = Register::from_code(i); ++ if (candidate.is(ecx)) continue; ++ if (candidate.is(r1)) continue; ++ if (candidate.is(r2)) continue; ++ if (candidate.is(r3)) continue; ++ return candidate; ++ } ++ } ++ UNREACHABLE(); ++ } ++ friend class RecordWriteStub; ++ }; ++ ++ enum OnNoNeedToInformIncrementalMarker { ++ kReturnOnNoNeedToInformIncrementalMarker, ++ kUpdateRememberedSetOnNoNeedToInformIncrementalMarker ++ }; ++ ++ inline Major MajorKey() const final { return RecordWrite; } ++ ++ void Generate(MacroAssembler* masm) override; ++ void GenerateIncremental(MacroAssembler* masm, Mode mode); ++ void CheckNeedsToInformIncrementalMarker( ++ MacroAssembler* masm, ++ OnNoNeedToInformIncrementalMarker on_no_need, ++ Mode mode); ++ void InformIncrementalMarker(MacroAssembler* masm); ++ ++ void Activate(Code* code) override { ++ code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); ++ } ++ ++ Register object() const { ++ return Register::from_code(ObjectBits::decode(minor_key_)); ++ } ++ ++ Register value() const { ++ return Register::from_code(ValueBits::decode(minor_key_)); ++ } ++ ++ Register address() const { ++ return Register::from_code(AddressBits::decode(minor_key_)); ++ } ++ ++ RememberedSetAction remembered_set_action() const { ++ return RememberedSetActionBits::decode(minor_key_); ++ } ++ ++ SaveFPRegsMode save_fp_regs_mode() const { ++ return SaveFPRegsModeBits::decode(minor_key_); ++ } ++ ++ class ObjectBits: public BitField {}; ++ class ValueBits: public BitField {}; ++ class AddressBits: public BitField {}; ++ class RememberedSetActionBits: public BitField {}; ++ class SaveFPRegsModeBits : public BitField {}; ++ ++ RegisterAllocation regs_; ++ ++ DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); ++}; ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_CODE_STUBS_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 2017-12-25 17:42:57.221465559 +0100 +@@ -0,0 +1,43 @@ ++// Copyright 2011 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// CPU specific code for ia32 independent of OS goes here. ++ ++#ifdef __GNUC__ ++#include "src/third_party/valgrind/valgrind.h" ++#endif ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/assembler.h" ++#include "src/macro-assembler.h" ++ ++namespace v8 { ++namespace internal { ++ ++void CpuFeatures::FlushICache(void* start, size_t size) { ++ // No need to flush the instruction cache on Intel. On Intel instruction ++ // cache flushing is only necessary when multiple cores running the same ++ // code simultaneously. V8 (and JavaScript) is single threaded and when code ++ // is patched on an intel CPU the core performing the patching will have its ++ // own instruction cache updated automatically. ++ ++ // If flushing of the instruction cache becomes necessary Windows has the ++ // API function FlushInstructionCache. ++ ++ // By default, valgrind only checks the stack for writes that might need to ++ // invalidate already cached translated code. This leads to random ++ // instability when code patches or moves are sometimes unnoticed. One ++ // solution is to run valgrind with --smc-check=all, but this comes at a big ++ // performance cost. We can notify valgrind to invalidate its cache. ++#ifdef VALGRIND_DISCARD_TRANSLATIONS ++ unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size); ++ USE(res); ++#endif ++} ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2017-12-25 17:42:57.222465544 +0100 +@@ -0,0 +1,412 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/codegen.h" ++#include "src/deoptimizer.h" ++#include "src/full-codegen/full-codegen.h" ++#include "src/register-configuration.h" ++#include "src/safepoint-table.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++const int Deoptimizer::table_entry_size_ = 10; ++ ++ ++int Deoptimizer::patch_size() { ++ return Assembler::kCallInstructionLength; ++} ++ ++ ++void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle code) { ++ Isolate* isolate = code->GetIsolate(); ++ HandleScope scope(isolate); ++ ++ // Compute the size of relocation information needed for the code ++ // patching in Deoptimizer::PatchCodeForDeoptimization below. ++ int min_reloc_size = 0; ++ int prev_pc_offset = 0; ++ DeoptimizationInputData* deopt_data = ++ DeoptimizationInputData::cast(code->deoptimization_data()); ++ for (int i = 0; i < deopt_data->DeoptCount(); i++) { ++ int pc_offset = deopt_data->Pc(i)->value(); ++ if (pc_offset == -1) continue; ++ pc_offset = pc_offset + 1; // We will encode the pc offset after the call. ++ DCHECK_GE(pc_offset, prev_pc_offset); ++ int pc_delta = pc_offset - prev_pc_offset; ++ // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes ++ // if encodable with small pc delta encoding and up to 6 bytes ++ // otherwise. ++ if (pc_delta <= RelocInfo::kMaxSmallPCDelta) { ++ min_reloc_size += 2; ++ } else { ++ min_reloc_size += 6; ++ } ++ prev_pc_offset = pc_offset; ++ } ++ ++ // If the relocation information is not big enough we create a new ++ // relocation info object that is padded with comments to make it ++ // big enough for lazy doptimization. ++ int reloc_length = code->relocation_info()->length(); ++ if (min_reloc_size > reloc_length) { ++ int comment_reloc_size = RelocInfo::kMinRelocCommentSize; ++ // Padding needed. ++ int min_padding = min_reloc_size - reloc_length; ++ // Number of comments needed to take up at least that much space. ++ int additional_comments = ++ (min_padding + comment_reloc_size - 1) / comment_reloc_size; ++ // Actual padding size. ++ int padding = additional_comments * comment_reloc_size; ++ // Allocate new relocation info and copy old relocation to the end ++ // of the new relocation info array because relocation info is ++ // written and read backwards. ++ Factory* factory = isolate->factory(); ++ Handle new_reloc = ++ factory->NewByteArray(reloc_length + padding, TENURED); ++ MemCopy(new_reloc->GetDataStartAddress() + padding, ++ code->relocation_info()->GetDataStartAddress(), reloc_length); ++ // Create a relocation writer to write the comments in the padding ++ // space. Use position 0 for everything to ensure short encoding. ++ RelocInfoWriter reloc_info_writer( ++ new_reloc->GetDataStartAddress() + padding, 0); ++ intptr_t comment_string ++ = reinterpret_cast(RelocInfo::kFillerCommentString); ++ RelocInfo rinfo(isolate, 0, RelocInfo::COMMENT, comment_string, NULL); ++ for (int i = 0; i < additional_comments; ++i) { ++#ifdef DEBUG ++ byte* pos_before = reloc_info_writer.pos(); ++#endif ++ reloc_info_writer.Write(&rinfo); ++ DCHECK(RelocInfo::kMinRelocCommentSize == ++ pos_before - reloc_info_writer.pos()); ++ } ++ // Replace relocation information on the code object. ++ code->set_relocation_info(*new_reloc); ++ } ++} ++ ++ ++void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { ++ Address code_start_address = code->instruction_start(); ++ ++ // Fail hard and early if we enter this code object again. ++ byte* pointer = code->FindCodeAgeSequence(); ++ if (pointer != NULL) { ++ pointer += kNoCodeAgeSequenceLength; ++ } else { ++ pointer = code->instruction_start(); ++ } ++ CodePatcher patcher(isolate, pointer, 1); ++ patcher.masm()->int3(); ++ ++ DeoptimizationInputData* data = ++ DeoptimizationInputData::cast(code->deoptimization_data()); ++ int osr_offset = data->OsrPcOffset()->value(); ++ if (osr_offset > 0) { ++ CodePatcher osr_patcher(isolate, code_start_address + osr_offset, 1); ++ osr_patcher.masm()->int3(); ++ } ++ ++ // We will overwrite the code's relocation info in-place. Relocation info ++ // is written backward. The relocation info is the payload of a byte ++ // array. Later on we will slide this to the start of the byte array and ++ // create a filler object in the remaining space. ++ ByteArray* reloc_info = code->relocation_info(); ++ Address reloc_end_address = reloc_info->address() + reloc_info->Size(); ++ RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address); ++ ++ // Since the call is a relative encoding, write new ++ // reloc info. We do not need any of the existing reloc info because the ++ // existing code will not be used again (we zap it in debug builds). ++ // ++ // Emit call to lazy deoptimization at all lazy deopt points. ++ DeoptimizationInputData* deopt_data = ++ DeoptimizationInputData::cast(code->deoptimization_data()); ++#ifdef DEBUG ++ Address prev_call_address = NULL; ++#endif ++ // For each LLazyBailout instruction insert a call to the corresponding ++ // deoptimization entry. ++ for (int i = 0; i < deopt_data->DeoptCount(); i++) { ++ if (deopt_data->Pc(i)->value() == -1) continue; ++ // Patch lazy deoptimization entry. ++ Address call_address = code_start_address + deopt_data->Pc(i)->value(); ++ CodePatcher patcher(isolate, call_address, patch_size()); ++ Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); ++ patcher.masm()->call(deopt_entry, RelocInfo::NONE32); ++ // We use RUNTIME_ENTRY for deoptimization bailouts. ++ RelocInfo rinfo(isolate, call_address + 1, // 1 after the call opcode. ++ RelocInfo::RUNTIME_ENTRY, ++ reinterpret_cast(deopt_entry), NULL); ++ reloc_info_writer.Write(&rinfo); ++ DCHECK_GE(reloc_info_writer.pos(), ++ reloc_info->address() + ByteArray::kHeaderSize); ++ DCHECK(prev_call_address == NULL || ++ call_address >= prev_call_address + patch_size()); ++ DCHECK(call_address + patch_size() <= code->instruction_end()); ++#ifdef DEBUG ++ prev_call_address = call_address; ++#endif ++ } ++ ++ // Move the relocation info to the beginning of the byte array. ++ const int new_reloc_length = reloc_end_address - reloc_info_writer.pos(); ++ MemMove(code->relocation_start(), reloc_info_writer.pos(), new_reloc_length); ++ ++ // Right trim the relocation info to free up remaining space. ++ const int delta = reloc_info->length() - new_reloc_length; ++ if (delta > 0) { ++ isolate->heap()->RightTrimFixedArray(reloc_info, delta); ++ } ++} ++ ++ ++#define __ masm()-> ++ ++void Deoptimizer::TableEntryGenerator::Generate() { ++ GeneratePrologue(); ++ ++ // Save all general purpose registers before messing with them. ++ const int kNumberOfRegisters = Register::kNumRegisters; ++ ++ const int kDoubleRegsSize = kDoubleSize * X87Register::kMaxNumRegisters; ++ ++ // Reserve space for x87 fp registers. ++ __ sub(esp, Immediate(kDoubleRegsSize)); ++ ++ __ pushad(); ++ ++ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, ++ isolate()); ++ __ mov(Operand::StaticVariable(c_entry_fp_address), ebp); ++ ++ // GP registers are safe to use now. ++ // Save used x87 fp registers in correct position of previous reserve space. ++ Label loop, done; ++ // Get the layout of x87 stack. ++ __ sub(esp, Immediate(kPointerSize)); ++ __ fistp_s(MemOperand(esp, 0)); ++ __ pop(eax); ++ // Preserve stack layout in edi ++ __ mov(edi, eax); ++ // Get the x87 stack depth, the first 3 bits. ++ __ mov(ecx, eax); ++ __ and_(ecx, 0x7); ++ __ j(zero, &done, Label::kNear); ++ ++ __ bind(&loop); ++ __ shr(eax, 0x3); ++ __ mov(ebx, eax); ++ __ and_(ebx, 0x7); // Extract the st_x index into ebx. ++ // Pop TOS to the correct position. The disp(0x20) is due to pushad. ++ // The st_i should be saved to (esp + ebx * kDoubleSize + 0x20). ++ __ fstp_d(Operand(esp, ebx, times_8, 0x20)); ++ __ dec(ecx); // Decrease stack depth. ++ __ j(not_zero, &loop, Label::kNear); ++ __ bind(&done); ++ ++ const int kSavedRegistersAreaSize = ++ kNumberOfRegisters * kPointerSize + kDoubleRegsSize; ++ ++ // Get the bailout id from the stack. ++ __ mov(ebx, Operand(esp, kSavedRegistersAreaSize)); ++ ++ // Get the address of the location in the code object ++ // and compute the fp-to-sp delta in register edx. ++ __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); ++ __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize)); ++ ++ __ sub(edx, ebp); ++ __ neg(edx); ++ ++ __ push(edi); ++ // Allocate a new deoptimizer object. ++ __ PrepareCallCFunction(6, eax); ++ __ mov(eax, Immediate(0)); ++ Label context_check; ++ __ mov(edi, Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset)); ++ __ JumpIfSmi(edi, &context_check); ++ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ bind(&context_check); ++ __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. ++ __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. ++ __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. ++ __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. ++ __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. ++ __ mov(Operand(esp, 5 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ { ++ AllowExternalCallThatCantCauseGC scope(masm()); ++ __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); ++ } ++ ++ __ pop(edi); ++ ++ // Preserve deoptimizer object in register eax and get the input ++ // frame descriptor pointer. ++ __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); ++ ++ // Fill in the input registers. ++ for (int i = kNumberOfRegisters - 1; i >= 0; i--) { ++ int offset = (i * kPointerSize) + FrameDescription::registers_offset(); ++ __ pop(Operand(ebx, offset)); ++ } ++ ++ int double_regs_offset = FrameDescription::double_registers_offset(); ++ const RegisterConfiguration* config = RegisterConfiguration::Crankshaft(); ++ // Fill in the double input registers. ++ for (int i = 0; i < X87Register::kMaxNumAllocatableRegisters; ++i) { ++ int code = config->GetAllocatableDoubleCode(i); ++ int dst_offset = code * kDoubleSize + double_regs_offset; ++ int src_offset = code * kDoubleSize; ++ __ fld_d(Operand(esp, src_offset)); ++ __ fstp_d(Operand(ebx, dst_offset)); ++ } ++ ++ // Clear FPU all exceptions. ++ // TODO(ulan): Find out why the TOP register is not zero here in some cases, ++ // and check that the generated code never deoptimizes with unbalanced stack. ++ __ fnclex(); ++ ++ // Remove the bailout id, return address and the double registers. ++ __ add(esp, Immediate(kDoubleRegsSize + 2 * kPointerSize)); ++ ++ // Compute a pointer to the unwinding limit in register ecx; that is ++ // the first stack slot not part of the input frame. ++ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset())); ++ __ add(ecx, esp); ++ ++ // Unwind the stack down to - but not including - the unwinding ++ // limit and copy the contents of the activation frame to the input ++ // frame description. ++ __ lea(edx, Operand(ebx, FrameDescription::frame_content_offset())); ++ Label pop_loop_header; ++ __ jmp(&pop_loop_header); ++ Label pop_loop; ++ __ bind(&pop_loop); ++ __ pop(Operand(edx, 0)); ++ __ add(edx, Immediate(sizeof(uint32_t))); ++ __ bind(&pop_loop_header); ++ __ cmp(ecx, esp); ++ __ j(not_equal, &pop_loop); ++ ++ // Compute the output frame in the deoptimizer. ++ __ push(edi); ++ __ push(eax); ++ __ PrepareCallCFunction(1, ebx); ++ __ mov(Operand(esp, 0 * kPointerSize), eax); ++ { ++ AllowExternalCallThatCantCauseGC scope(masm()); ++ __ CallCFunction( ++ ExternalReference::compute_output_frames_function(isolate()), 1); ++ } ++ __ pop(eax); ++ __ pop(edi); ++ __ mov(esp, Operand(eax, Deoptimizer::caller_frame_top_offset())); ++ ++ // Replace the current (input) frame with the output frames. ++ Label outer_push_loop, inner_push_loop, ++ outer_loop_header, inner_loop_header; ++ // Outer loop state: eax = current FrameDescription**, edx = one past the ++ // last FrameDescription**. ++ __ mov(edx, Operand(eax, Deoptimizer::output_count_offset())); ++ __ mov(eax, Operand(eax, Deoptimizer::output_offset())); ++ __ lea(edx, Operand(eax, edx, times_4, 0)); ++ __ jmp(&outer_loop_header); ++ __ bind(&outer_push_loop); ++ // Inner loop state: ebx = current FrameDescription*, ecx = loop index. ++ __ mov(ebx, Operand(eax, 0)); ++ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset())); ++ __ jmp(&inner_loop_header); ++ __ bind(&inner_push_loop); ++ __ sub(ecx, Immediate(sizeof(uint32_t))); ++ __ push(Operand(ebx, ecx, times_1, FrameDescription::frame_content_offset())); ++ __ bind(&inner_loop_header); ++ __ test(ecx, ecx); ++ __ j(not_zero, &inner_push_loop); ++ __ add(eax, Immediate(kPointerSize)); ++ __ bind(&outer_loop_header); ++ __ cmp(eax, edx); ++ __ j(below, &outer_push_loop); ++ ++ ++ // In case of a failed STUB, we have to restore the x87 stack. ++ // x87 stack layout is in edi. ++ Label loop2, done2; ++ // Get the x87 stack depth, the first 3 bits. ++ __ mov(ecx, edi); ++ __ and_(ecx, 0x7); ++ __ j(zero, &done2, Label::kNear); ++ ++ __ lea(ecx, Operand(ecx, ecx, times_2, 0)); ++ __ bind(&loop2); ++ __ mov(eax, edi); ++ __ shr_cl(eax); ++ __ and_(eax, 0x7); ++ __ fld_d(Operand(ebx, eax, times_8, double_regs_offset)); ++ __ sub(ecx, Immediate(0x3)); ++ __ j(not_zero, &loop2, Label::kNear); ++ __ bind(&done2); ++ ++ // Push state, pc, and continuation from the last output frame. ++ __ push(Operand(ebx, FrameDescription::state_offset())); ++ __ push(Operand(ebx, FrameDescription::pc_offset())); ++ __ push(Operand(ebx, FrameDescription::continuation_offset())); ++ ++ ++ // Push the registers from the last output frame. ++ for (int i = 0; i < kNumberOfRegisters; i++) { ++ int offset = (i * kPointerSize) + FrameDescription::registers_offset(); ++ __ push(Operand(ebx, offset)); ++ } ++ ++ // Restore the registers from the stack. ++ __ popad(); ++ ++ // Return to the continuation point. ++ __ ret(0); ++} ++ ++ ++void Deoptimizer::TableEntryGenerator::GeneratePrologue() { ++ // Create a sequence of deoptimization entries. ++ Label done; ++ for (int i = 0; i < count(); i++) { ++ int start = masm()->pc_offset(); ++ USE(start); ++ __ push_imm32(i); ++ __ jmp(&done); ++ DCHECK(masm()->pc_offset() - start == table_entry_size_); ++ } ++ __ bind(&done); ++} ++ ++ ++void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { ++ SetFrameSlot(offset, value); ++} ++ ++ ++void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { ++ SetFrameSlot(offset, value); ++} ++ ++ ++void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { ++ // No embedded constant pool support. ++ UNREACHABLE(); ++} ++ ++ ++#undef __ ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 2017-12-25 17:42:57.222465544 +0100 +@@ -0,0 +1,1874 @@ ++// Copyright 2011 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include ++#include ++#include ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/base/compiler-specific.h" ++#include "src/disasm.h" ++ ++namespace disasm { ++ ++enum OperandOrder { ++ UNSET_OP_ORDER = 0, ++ REG_OPER_OP_ORDER, ++ OPER_REG_OP_ORDER ++}; ++ ++ ++//------------------------------------------------------------------ ++// Tables ++//------------------------------------------------------------------ ++struct ByteMnemonic { ++ int b; // -1 terminates, otherwise must be in range (0..255) ++ const char* mnem; ++ OperandOrder op_order_; ++}; ++ ++static const ByteMnemonic two_operands_instr[] = { ++ {0x01, "add", OPER_REG_OP_ORDER}, {0x03, "add", REG_OPER_OP_ORDER}, ++ {0x09, "or", OPER_REG_OP_ORDER}, {0x0B, "or", REG_OPER_OP_ORDER}, ++ {0x13, "adc", REG_OPER_OP_ORDER}, {0x1B, "sbb", REG_OPER_OP_ORDER}, ++ {0x21, "and", OPER_REG_OP_ORDER}, {0x23, "and", REG_OPER_OP_ORDER}, ++ {0x29, "sub", OPER_REG_OP_ORDER}, {0x2A, "subb", REG_OPER_OP_ORDER}, ++ {0x2B, "sub", REG_OPER_OP_ORDER}, {0x31, "xor", OPER_REG_OP_ORDER}, ++ {0x33, "xor", REG_OPER_OP_ORDER}, {0x38, "cmpb", OPER_REG_OP_ORDER}, ++ {0x39, "cmp", OPER_REG_OP_ORDER}, {0x3A, "cmpb", REG_OPER_OP_ORDER}, ++ {0x3B, "cmp", REG_OPER_OP_ORDER}, {0x84, "test_b", REG_OPER_OP_ORDER}, ++ {0x85, "test", REG_OPER_OP_ORDER}, {0x86, "xchg_b", REG_OPER_OP_ORDER}, ++ {0x87, "xchg", REG_OPER_OP_ORDER}, {0x8A, "mov_b", REG_OPER_OP_ORDER}, ++ {0x8B, "mov", REG_OPER_OP_ORDER}, {0x8D, "lea", REG_OPER_OP_ORDER}, ++ {-1, "", UNSET_OP_ORDER}}; ++ ++static const ByteMnemonic zero_operands_instr[] = { ++ {0xC3, "ret", UNSET_OP_ORDER}, ++ {0xC9, "leave", UNSET_OP_ORDER}, ++ {0x90, "nop", UNSET_OP_ORDER}, ++ {0xF4, "hlt", UNSET_OP_ORDER}, ++ {0xCC, "int3", UNSET_OP_ORDER}, ++ {0x60, "pushad", UNSET_OP_ORDER}, ++ {0x61, "popad", UNSET_OP_ORDER}, ++ {0x9C, "pushfd", UNSET_OP_ORDER}, ++ {0x9D, "popfd", UNSET_OP_ORDER}, ++ {0x9E, "sahf", UNSET_OP_ORDER}, ++ {0x99, "cdq", UNSET_OP_ORDER}, ++ {0x9B, "fwait", UNSET_OP_ORDER}, ++ {0xFC, "cld", UNSET_OP_ORDER}, ++ {0xAB, "stos", UNSET_OP_ORDER}, ++ {-1, "", UNSET_OP_ORDER} ++}; ++ ++ ++static const ByteMnemonic call_jump_instr[] = { ++ {0xE8, "call", UNSET_OP_ORDER}, ++ {0xE9, "jmp", UNSET_OP_ORDER}, ++ {-1, "", UNSET_OP_ORDER} ++}; ++ ++ ++static const ByteMnemonic short_immediate_instr[] = { ++ {0x05, "add", UNSET_OP_ORDER}, ++ {0x0D, "or", UNSET_OP_ORDER}, ++ {0x15, "adc", UNSET_OP_ORDER}, ++ {0x25, "and", UNSET_OP_ORDER}, ++ {0x2D, "sub", UNSET_OP_ORDER}, ++ {0x35, "xor", UNSET_OP_ORDER}, ++ {0x3D, "cmp", UNSET_OP_ORDER}, ++ {-1, "", UNSET_OP_ORDER} ++}; ++ ++ ++// Generally we don't want to generate these because they are subject to partial ++// register stalls. They are included for completeness and because the cmp ++// variant is used by the RecordWrite stub. Because it does not update the ++// register it is not subject to partial register stalls. ++static ByteMnemonic byte_immediate_instr[] = { ++ {0x0c, "or", UNSET_OP_ORDER}, ++ {0x24, "and", UNSET_OP_ORDER}, ++ {0x34, "xor", UNSET_OP_ORDER}, ++ {0x3c, "cmp", UNSET_OP_ORDER}, ++ {-1, "", UNSET_OP_ORDER} ++}; ++ ++ ++static const char* const jump_conditional_mnem[] = { ++ /*0*/ "jo", "jno", "jc", "jnc", ++ /*4*/ "jz", "jnz", "jna", "ja", ++ /*8*/ "js", "jns", "jpe", "jpo", ++ /*12*/ "jl", "jnl", "jng", "jg" ++}; ++ ++ ++static const char* const set_conditional_mnem[] = { ++ /*0*/ "seto", "setno", "setc", "setnc", ++ /*4*/ "setz", "setnz", "setna", "seta", ++ /*8*/ "sets", "setns", "setpe", "setpo", ++ /*12*/ "setl", "setnl", "setng", "setg" ++}; ++ ++ ++static const char* const conditional_move_mnem[] = { ++ /*0*/ "cmovo", "cmovno", "cmovc", "cmovnc", ++ /*4*/ "cmovz", "cmovnz", "cmovna", "cmova", ++ /*8*/ "cmovs", "cmovns", "cmovpe", "cmovpo", ++ /*12*/ "cmovl", "cmovnl", "cmovng", "cmovg" ++}; ++ ++ ++enum InstructionType { ++ NO_INSTR, ++ ZERO_OPERANDS_INSTR, ++ TWO_OPERANDS_INSTR, ++ JUMP_CONDITIONAL_SHORT_INSTR, ++ REGISTER_INSTR, ++ MOVE_REG_INSTR, ++ CALL_JUMP_INSTR, ++ SHORT_IMMEDIATE_INSTR, ++ BYTE_IMMEDIATE_INSTR ++}; ++ ++ ++struct InstructionDesc { ++ const char* mnem; ++ InstructionType type; ++ OperandOrder op_order_; ++}; ++ ++ ++class InstructionTable { ++ public: ++ InstructionTable(); ++ const InstructionDesc& Get(byte x) const { return instructions_[x]; } ++ static InstructionTable* get_instance() { ++ static InstructionTable table; ++ return &table; ++ } ++ ++ private: ++ InstructionDesc instructions_[256]; ++ void Clear(); ++ void Init(); ++ void CopyTable(const ByteMnemonic bm[], InstructionType type); ++ void SetTableRange(InstructionType type, ++ byte start, ++ byte end, ++ const char* mnem); ++ void AddJumpConditionalShort(); ++}; ++ ++ ++InstructionTable::InstructionTable() { ++ Clear(); ++ Init(); ++} ++ ++ ++void InstructionTable::Clear() { ++ for (int i = 0; i < 256; i++) { ++ instructions_[i].mnem = ""; ++ instructions_[i].type = NO_INSTR; ++ instructions_[i].op_order_ = UNSET_OP_ORDER; ++ } ++} ++ ++ ++void InstructionTable::Init() { ++ CopyTable(two_operands_instr, TWO_OPERANDS_INSTR); ++ CopyTable(zero_operands_instr, ZERO_OPERANDS_INSTR); ++ CopyTable(call_jump_instr, CALL_JUMP_INSTR); ++ CopyTable(short_immediate_instr, SHORT_IMMEDIATE_INSTR); ++ CopyTable(byte_immediate_instr, BYTE_IMMEDIATE_INSTR); ++ AddJumpConditionalShort(); ++ SetTableRange(REGISTER_INSTR, 0x40, 0x47, "inc"); ++ SetTableRange(REGISTER_INSTR, 0x48, 0x4F, "dec"); ++ SetTableRange(REGISTER_INSTR, 0x50, 0x57, "push"); ++ SetTableRange(REGISTER_INSTR, 0x58, 0x5F, "pop"); ++ SetTableRange(REGISTER_INSTR, 0x91, 0x97, "xchg eax,"); // 0x90 is nop. ++ SetTableRange(MOVE_REG_INSTR, 0xB8, 0xBF, "mov"); ++} ++ ++ ++void InstructionTable::CopyTable(const ByteMnemonic bm[], ++ InstructionType type) { ++ for (int i = 0; bm[i].b >= 0; i++) { ++ InstructionDesc* id = &instructions_[bm[i].b]; ++ id->mnem = bm[i].mnem; ++ id->op_order_ = bm[i].op_order_; ++ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. ++ id->type = type; ++ } ++} ++ ++ ++void InstructionTable::SetTableRange(InstructionType type, ++ byte start, ++ byte end, ++ const char* mnem) { ++ for (byte b = start; b <= end; b++) { ++ InstructionDesc* id = &instructions_[b]; ++ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. ++ id->mnem = mnem; ++ id->type = type; ++ } ++} ++ ++ ++void InstructionTable::AddJumpConditionalShort() { ++ for (byte b = 0x70; b <= 0x7F; b++) { ++ InstructionDesc* id = &instructions_[b]; ++ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. ++ id->mnem = jump_conditional_mnem[b & 0x0F]; ++ id->type = JUMP_CONDITIONAL_SHORT_INSTR; ++ } ++} ++ ++ ++// The X87 disassembler implementation. ++class DisassemblerX87 { ++ public: ++ DisassemblerX87(const NameConverter& converter, ++ bool abort_on_unimplemented = true) ++ : converter_(converter), ++ instruction_table_(InstructionTable::get_instance()), ++ tmp_buffer_pos_(0), ++ abort_on_unimplemented_(abort_on_unimplemented) { ++ tmp_buffer_[0] = '\0'; ++ } ++ ++ virtual ~DisassemblerX87() {} ++ ++ // Writes one disassembled instruction into 'buffer' (0-terminated). ++ // Returns the length of the disassembled machine instruction in bytes. ++ int InstructionDecode(v8::internal::Vector buffer, byte* instruction); ++ ++ private: ++ const NameConverter& converter_; ++ InstructionTable* instruction_table_; ++ v8::internal::EmbeddedVector tmp_buffer_; ++ unsigned int tmp_buffer_pos_; ++ bool abort_on_unimplemented_; ++ ++ enum { ++ eax = 0, ++ ecx = 1, ++ edx = 2, ++ ebx = 3, ++ esp = 4, ++ ebp = 5, ++ esi = 6, ++ edi = 7 ++ }; ++ ++ ++ enum ShiftOpcodeExtension { ++ kROL = 0, ++ kROR = 1, ++ kRCL = 2, ++ kRCR = 3, ++ kSHL = 4, ++ KSHR = 5, ++ kSAR = 7 ++ }; ++ ++ ++ const char* NameOfCPURegister(int reg) const { ++ return converter_.NameOfCPURegister(reg); ++ } ++ ++ ++ const char* NameOfByteCPURegister(int reg) const { ++ return converter_.NameOfByteCPURegister(reg); ++ } ++ ++ ++ const char* NameOfXMMRegister(int reg) const { ++ return converter_.NameOfXMMRegister(reg); ++ } ++ ++ ++ const char* NameOfAddress(byte* addr) const { ++ return converter_.NameOfAddress(addr); ++ } ++ ++ ++ // Disassembler helper functions. ++ static void get_modrm(byte data, int* mod, int* regop, int* rm) { ++ *mod = (data >> 6) & 3; ++ *regop = (data & 0x38) >> 3; ++ *rm = data & 7; ++ } ++ ++ ++ static void get_sib(byte data, int* scale, int* index, int* base) { ++ *scale = (data >> 6) & 3; ++ *index = (data >> 3) & 7; ++ *base = data & 7; ++ } ++ ++ typedef const char* (DisassemblerX87::*RegisterNameMapping)(int reg) const; ++ ++ int PrintRightOperandHelper(byte* modrmp, RegisterNameMapping register_name); ++ int PrintRightOperand(byte* modrmp); ++ int PrintRightByteOperand(byte* modrmp); ++ int PrintRightXMMOperand(byte* modrmp); ++ int PrintOperands(const char* mnem, OperandOrder op_order, byte* data); ++ int PrintImmediateOp(byte* data); ++ int F7Instruction(byte* data); ++ int D1D3C1Instruction(byte* data); ++ int JumpShort(byte* data); ++ int JumpConditional(byte* data, const char* comment); ++ int JumpConditionalShort(byte* data, const char* comment); ++ int SetCC(byte* data); ++ int CMov(byte* data); ++ int FPUInstruction(byte* data); ++ int MemoryFPUInstruction(int escape_opcode, int regop, byte* modrm_start); ++ int RegisterFPUInstruction(int escape_opcode, byte modrm_byte); ++ PRINTF_FORMAT(2, 3) void AppendToBuffer(const char* format, ...); ++ ++ void UnimplementedInstruction() { ++ if (abort_on_unimplemented_) { ++ UNIMPLEMENTED(); ++ } else { ++ AppendToBuffer("'Unimplemented Instruction'"); ++ } ++ } ++}; ++ ++ ++void DisassemblerX87::AppendToBuffer(const char* format, ...) { ++ v8::internal::Vector buf = tmp_buffer_ + tmp_buffer_pos_; ++ va_list args; ++ va_start(args, format); ++ int result = v8::internal::VSNPrintF(buf, format, args); ++ va_end(args); ++ tmp_buffer_pos_ += result; ++} ++ ++int DisassemblerX87::PrintRightOperandHelper( ++ byte* modrmp, ++ RegisterNameMapping direct_register_name) { ++ int mod, regop, rm; ++ get_modrm(*modrmp, &mod, ®op, &rm); ++ RegisterNameMapping register_name = (mod == 3) ? direct_register_name : ++ &DisassemblerX87::NameOfCPURegister; ++ switch (mod) { ++ case 0: ++ if (rm == ebp) { ++ int32_t disp = *reinterpret_cast(modrmp+1); ++ AppendToBuffer("[0x%x]", disp); ++ return 5; ++ } else if (rm == esp) { ++ byte sib = *(modrmp + 1); ++ int scale, index, base; ++ get_sib(sib, &scale, &index, &base); ++ if (index == esp && base == esp && scale == 0 /*times_1*/) { ++ AppendToBuffer("[%s]", (this->*register_name)(rm)); ++ return 2; ++ } else if (base == ebp) { ++ int32_t disp = *reinterpret_cast(modrmp + 2); ++ AppendToBuffer("[%s*%d%s0x%x]", ++ (this->*register_name)(index), ++ 1 << scale, ++ disp < 0 ? "-" : "+", ++ disp < 0 ? -disp : disp); ++ return 6; ++ } else if (index != esp && base != ebp) { ++ // [base+index*scale] ++ AppendToBuffer("[%s+%s*%d]", ++ (this->*register_name)(base), ++ (this->*register_name)(index), ++ 1 << scale); ++ return 2; ++ } else { ++ UnimplementedInstruction(); ++ return 1; ++ } ++ } else { ++ AppendToBuffer("[%s]", (this->*register_name)(rm)); ++ return 1; ++ } ++ break; ++ case 1: // fall through ++ case 2: ++ if (rm == esp) { ++ byte sib = *(modrmp + 1); ++ int scale, index, base; ++ get_sib(sib, &scale, &index, &base); ++ int disp = mod == 2 ? *reinterpret_cast(modrmp + 2) ++ : *reinterpret_cast(modrmp + 2); ++ if (index == base && index == rm /*esp*/ && scale == 0 /*times_1*/) { ++ AppendToBuffer("[%s%s0x%x]", ++ (this->*register_name)(rm), ++ disp < 0 ? "-" : "+", ++ disp < 0 ? -disp : disp); ++ } else { ++ AppendToBuffer("[%s+%s*%d%s0x%x]", ++ (this->*register_name)(base), ++ (this->*register_name)(index), ++ 1 << scale, ++ disp < 0 ? "-" : "+", ++ disp < 0 ? -disp : disp); ++ } ++ return mod == 2 ? 6 : 3; ++ } else { ++ // No sib. ++ int disp = mod == 2 ? *reinterpret_cast(modrmp + 1) ++ : *reinterpret_cast(modrmp + 1); ++ AppendToBuffer("[%s%s0x%x]", ++ (this->*register_name)(rm), ++ disp < 0 ? "-" : "+", ++ disp < 0 ? -disp : disp); ++ return mod == 2 ? 5 : 2; ++ } ++ break; ++ case 3: ++ AppendToBuffer("%s", (this->*register_name)(rm)); ++ return 1; ++ default: ++ UnimplementedInstruction(); ++ return 1; ++ } ++ UNREACHABLE(); ++} ++ ++ ++int DisassemblerX87::PrintRightOperand(byte* modrmp) { ++ return PrintRightOperandHelper(modrmp, &DisassemblerX87::NameOfCPURegister); ++} ++ ++ ++int DisassemblerX87::PrintRightByteOperand(byte* modrmp) { ++ return PrintRightOperandHelper(modrmp, ++ &DisassemblerX87::NameOfByteCPURegister); ++} ++ ++ ++int DisassemblerX87::PrintRightXMMOperand(byte* modrmp) { ++ return PrintRightOperandHelper(modrmp, ++ &DisassemblerX87::NameOfXMMRegister); ++} ++ ++ ++// Returns number of bytes used including the current *data. ++// Writes instruction's mnemonic, left and right operands to 'tmp_buffer_'. ++int DisassemblerX87::PrintOperands(const char* mnem, ++ OperandOrder op_order, ++ byte* data) { ++ byte modrm = *data; ++ int mod, regop, rm; ++ get_modrm(modrm, &mod, ®op, &rm); ++ int advance = 0; ++ switch (op_order) { ++ case REG_OPER_OP_ORDER: { ++ AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); ++ advance = PrintRightOperand(data); ++ break; ++ } ++ case OPER_REG_OP_ORDER: { ++ AppendToBuffer("%s ", mnem); ++ advance = PrintRightOperand(data); ++ AppendToBuffer(",%s", NameOfCPURegister(regop)); ++ break; ++ } ++ default: ++ UNREACHABLE(); ++ break; ++ } ++ return advance; ++} ++ ++ ++// Returns number of bytes used by machine instruction, including *data byte. ++// Writes immediate instructions to 'tmp_buffer_'. ++int DisassemblerX87::PrintImmediateOp(byte* data) { ++ bool sign_extension_bit = (*data & 0x02) != 0; ++ byte modrm = *(data+1); ++ int mod, regop, rm; ++ get_modrm(modrm, &mod, ®op, &rm); ++ const char* mnem = "Imm???"; ++ switch (regop) { ++ case 0: mnem = "add"; break; ++ case 1: mnem = "or"; break; ++ case 2: mnem = "adc"; break; ++ case 4: mnem = "and"; break; ++ case 5: mnem = "sub"; break; ++ case 6: mnem = "xor"; break; ++ case 7: mnem = "cmp"; break; ++ default: UnimplementedInstruction(); ++ } ++ AppendToBuffer("%s ", mnem); ++ int count = PrintRightOperand(data+1); ++ if (sign_extension_bit) { ++ AppendToBuffer(",0x%x", *(data + 1 + count)); ++ return 1 + count + 1 /*int8*/; ++ } else { ++ AppendToBuffer(",0x%x", *reinterpret_cast(data + 1 + count)); ++ return 1 + count + 4 /*int32_t*/; ++ } ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::F7Instruction(byte* data) { ++ DCHECK_EQ(0xF7, *data); ++ byte modrm = *++data; ++ int mod, regop, rm; ++ get_modrm(modrm, &mod, ®op, &rm); ++ const char* mnem = NULL; ++ switch (regop) { ++ case 0: ++ mnem = "test"; ++ break; ++ case 2: ++ mnem = "not"; ++ break; ++ case 3: ++ mnem = "neg"; ++ break; ++ case 4: ++ mnem = "mul"; ++ break; ++ case 5: ++ mnem = "imul"; ++ break; ++ case 6: ++ mnem = "div"; ++ break; ++ case 7: ++ mnem = "idiv"; ++ break; ++ default: ++ UnimplementedInstruction(); ++ } ++ AppendToBuffer("%s ", mnem); ++ int count = PrintRightOperand(data); ++ if (regop == 0) { ++ AppendToBuffer(",0x%x", *reinterpret_cast(data + count)); ++ count += 4; ++ } ++ return 1 + count; ++} ++ ++ ++int DisassemblerX87::D1D3C1Instruction(byte* data) { ++ byte op = *data; ++ DCHECK(op == 0xD1 || op == 0xD3 || op == 0xC1); ++ byte modrm = *++data; ++ int mod, regop, rm; ++ get_modrm(modrm, &mod, ®op, &rm); ++ int imm8 = -1; ++ const char* mnem = NULL; ++ switch (regop) { ++ case kROL: ++ mnem = "rol"; ++ break; ++ case kROR: ++ mnem = "ror"; ++ break; ++ case kRCL: ++ mnem = "rcl"; ++ break; ++ case kRCR: ++ mnem = "rcr"; ++ break; ++ case kSHL: ++ mnem = "shl"; ++ break; ++ case KSHR: ++ mnem = "shr"; ++ break; ++ case kSAR: ++ mnem = "sar"; ++ break; ++ default: ++ UnimplementedInstruction(); ++ } ++ AppendToBuffer("%s ", mnem); ++ int count = PrintRightOperand(data); ++ if (op == 0xD1) { ++ imm8 = 1; ++ } else if (op == 0xC1) { ++ imm8 = *(data + 1); ++ count++; ++ } else if (op == 0xD3) { ++ // Shift/rotate by cl. ++ } ++ if (imm8 >= 0) { ++ AppendToBuffer(",%d", imm8); ++ } else { ++ AppendToBuffer(",cl"); ++ } ++ return 1 + count; ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::JumpShort(byte* data) { ++ DCHECK_EQ(0xEB, *data); ++ byte b = *(data+1); ++ byte* dest = data + static_cast(b) + 2; ++ AppendToBuffer("jmp %s", NameOfAddress(dest)); ++ return 2; ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::JumpConditional(byte* data, const char* comment) { ++ DCHECK_EQ(0x0F, *data); ++ byte cond = *(data+1) & 0x0F; ++ byte* dest = data + *reinterpret_cast(data+2) + 6; ++ const char* mnem = jump_conditional_mnem[cond]; ++ AppendToBuffer("%s %s", mnem, NameOfAddress(dest)); ++ if (comment != NULL) { ++ AppendToBuffer(", %s", comment); ++ } ++ return 6; // includes 0x0F ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::JumpConditionalShort(byte* data, const char* comment) { ++ byte cond = *data & 0x0F; ++ byte b = *(data+1); ++ byte* dest = data + static_cast(b) + 2; ++ const char* mnem = jump_conditional_mnem[cond]; ++ AppendToBuffer("%s %s", mnem, NameOfAddress(dest)); ++ if (comment != NULL) { ++ AppendToBuffer(", %s", comment); ++ } ++ return 2; ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::SetCC(byte* data) { ++ DCHECK_EQ(0x0F, *data); ++ byte cond = *(data+1) & 0x0F; ++ const char* mnem = set_conditional_mnem[cond]; ++ AppendToBuffer("%s ", mnem); ++ PrintRightByteOperand(data+2); ++ return 3; // Includes 0x0F. ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::CMov(byte* data) { ++ DCHECK_EQ(0x0F, *data); ++ byte cond = *(data + 1) & 0x0F; ++ const char* mnem = conditional_move_mnem[cond]; ++ int op_size = PrintOperands(mnem, REG_OPER_OP_ORDER, data + 2); ++ return 2 + op_size; // includes 0x0F ++} ++ ++ ++// Returns number of bytes used, including *data. ++int DisassemblerX87::FPUInstruction(byte* data) { ++ byte escape_opcode = *data; ++ DCHECK_EQ(0xD8, escape_opcode & 0xF8); ++ byte modrm_byte = *(data+1); ++ ++ if (modrm_byte >= 0xC0) { ++ return RegisterFPUInstruction(escape_opcode, modrm_byte); ++ } else { ++ return MemoryFPUInstruction(escape_opcode, modrm_byte, data+1); ++ } ++} ++ ++int DisassemblerX87::MemoryFPUInstruction(int escape_opcode, ++ int modrm_byte, ++ byte* modrm_start) { ++ const char* mnem = "?"; ++ int regop = (modrm_byte >> 3) & 0x7; // reg/op field of modrm byte. ++ switch (escape_opcode) { ++ case 0xD9: switch (regop) { ++ case 0: mnem = "fld_s"; break; ++ case 2: mnem = "fst_s"; break; ++ case 3: mnem = "fstp_s"; break; ++ case 5: ++ mnem = "fldcw"; ++ break; ++ case 7: ++ mnem = "fnstcw"; ++ break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDB: switch (regop) { ++ case 0: mnem = "fild_s"; break; ++ case 1: mnem = "fisttp_s"; break; ++ case 2: mnem = "fist_s"; break; ++ case 3: mnem = "fistp_s"; break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDC: ++ switch (regop) { ++ case 0: ++ mnem = "fadd_d"; ++ break; ++ case 1: ++ mnem = "fmul_d"; ++ break; ++ case 4: ++ mnem = "fsub_d"; ++ break; ++ case 5: ++ mnem = "fsubr_d"; ++ break; ++ case 6: ++ mnem = "fdiv_d"; ++ break; ++ case 7: ++ mnem = "fdivr_d"; ++ break; ++ default: ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDD: switch (regop) { ++ case 0: mnem = "fld_d"; break; ++ case 1: mnem = "fisttp_d"; break; ++ case 2: mnem = "fst_d"; break; ++ case 3: mnem = "fstp_d"; break; ++ case 4: ++ mnem = "frstor"; ++ break; ++ case 6: ++ mnem = "fnsave"; ++ break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDF: switch (regop) { ++ case 5: mnem = "fild_d"; break; ++ case 7: mnem = "fistp_d"; break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ default: UnimplementedInstruction(); ++ } ++ AppendToBuffer("%s ", mnem); ++ int count = PrintRightOperand(modrm_start); ++ return count + 1; ++} ++ ++int DisassemblerX87::RegisterFPUInstruction(int escape_opcode, ++ byte modrm_byte) { ++ bool has_register = false; // Is the FPU register encoded in modrm_byte? ++ const char* mnem = "?"; ++ ++ switch (escape_opcode) { ++ case 0xD8: ++ has_register = true; ++ switch (modrm_byte & 0xF8) { ++ case 0xC0: mnem = "fadd_i"; break; ++ case 0xE0: mnem = "fsub_i"; break; ++ case 0xC8: mnem = "fmul_i"; break; ++ case 0xF0: mnem = "fdiv_i"; break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xD9: ++ switch (modrm_byte & 0xF8) { ++ case 0xC0: ++ mnem = "fld"; ++ has_register = true; ++ break; ++ case 0xC8: ++ mnem = "fxch"; ++ has_register = true; ++ break; ++ default: ++ switch (modrm_byte) { ++ case 0xE0: mnem = "fchs"; break; ++ case 0xE1: mnem = "fabs"; break; ++ case 0xE4: mnem = "ftst"; break; ++ case 0xE8: mnem = "fld1"; break; ++ case 0xEB: mnem = "fldpi"; break; ++ case 0xED: mnem = "fldln2"; break; ++ case 0xEE: mnem = "fldz"; break; ++ case 0xF0: mnem = "f2xm1"; break; ++ case 0xF1: mnem = "fyl2x"; break; ++ case 0xF4: mnem = "fxtract"; break; ++ case 0xF5: mnem = "fprem1"; break; ++ case 0xF7: mnem = "fincstp"; break; ++ case 0xF8: mnem = "fprem"; break; ++ case 0xFC: mnem = "frndint"; break; ++ case 0xFD: mnem = "fscale"; break; ++ case 0xFE: mnem = "fsin"; break; ++ case 0xFF: mnem = "fcos"; break; ++ default: UnimplementedInstruction(); ++ } ++ } ++ break; ++ ++ case 0xDA: ++ if (modrm_byte == 0xE9) { ++ mnem = "fucompp"; ++ } else { ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDB: ++ if ((modrm_byte & 0xF8) == 0xE8) { ++ mnem = "fucomi"; ++ has_register = true; ++ } else if (modrm_byte == 0xE2) { ++ mnem = "fclex"; ++ } else if (modrm_byte == 0xE3) { ++ mnem = "fninit"; ++ } else { ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDC: ++ has_register = true; ++ switch (modrm_byte & 0xF8) { ++ case 0xC0: mnem = "fadd"; break; ++ case 0xE8: mnem = "fsub"; break; ++ case 0xC8: mnem = "fmul"; break; ++ case 0xF8: mnem = "fdiv"; break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDD: ++ has_register = true; ++ switch (modrm_byte & 0xF8) { ++ case 0xC0: mnem = "ffree"; break; ++ case 0xD0: mnem = "fst"; break; ++ case 0xD8: mnem = "fstp"; break; ++ default: UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xDE: ++ if (modrm_byte == 0xD9) { ++ mnem = "fcompp"; ++ } else { ++ has_register = true; ++ switch (modrm_byte & 0xF8) { ++ case 0xC0: mnem = "faddp"; break; ++ case 0xE8: mnem = "fsubp"; break; ++ case 0xC8: mnem = "fmulp"; break; ++ case 0xF8: mnem = "fdivp"; break; ++ default: UnimplementedInstruction(); ++ } ++ } ++ break; ++ ++ case 0xDF: ++ if (modrm_byte == 0xE0) { ++ mnem = "fnstsw_ax"; ++ } else if ((modrm_byte & 0xF8) == 0xE8) { ++ mnem = "fucomip"; ++ has_register = true; ++ } ++ break; ++ ++ default: UnimplementedInstruction(); ++ } ++ ++ if (has_register) { ++ AppendToBuffer("%s st%d", mnem, modrm_byte & 0x7); ++ } else { ++ AppendToBuffer("%s", mnem); ++ } ++ return 2; ++} ++ ++ ++// Mnemonics for instructions 0xF0 byte. ++// Returns NULL if the instruction is not handled here. ++static const char* F0Mnem(byte f0byte) { ++ switch (f0byte) { ++ case 0x0B: ++ return "ud2"; ++ case 0x18: ++ return "prefetch"; ++ case 0xA2: ++ return "cpuid"; ++ case 0xBE: ++ return "movsx_b"; ++ case 0xBF: ++ return "movsx_w"; ++ case 0xB6: ++ return "movzx_b"; ++ case 0xB7: ++ return "movzx_w"; ++ case 0xAF: ++ return "imul"; ++ case 0xA4: ++ return "shld"; ++ case 0xA5: ++ return "shld"; ++ case 0xAD: ++ return "shrd"; ++ case 0xAC: ++ return "shrd"; // 3-operand version. ++ case 0xAB: ++ return "bts"; ++ case 0xB0: ++ return "cmpxchg_b"; ++ case 0xB1: ++ return "cmpxchg"; ++ case 0xBC: ++ return "bsf"; ++ case 0xBD: ++ return "bsr"; ++ default: return NULL; ++ } ++} ++ ++ ++// Disassembled instruction '*instr' and writes it into 'out_buffer'. ++int DisassemblerX87::InstructionDecode(v8::internal::Vector out_buffer, ++ byte* instr) { ++ tmp_buffer_pos_ = 0; // starting to write as position 0 ++ byte* data = instr; ++ // Check for hints. ++ const char* branch_hint = NULL; ++ // We use these two prefixes only with branch prediction ++ if (*data == 0x3E /*ds*/) { ++ branch_hint = "predicted taken"; ++ data++; ++ } else if (*data == 0x2E /*cs*/) { ++ branch_hint = "predicted not taken"; ++ data++; ++ } else if (*data == 0xF0 /*lock*/) { ++ AppendToBuffer("lock "); ++ data++; ++ } ++ ++ bool processed = true; // Will be set to false if the current instruction ++ // is not in 'instructions' table. ++ const InstructionDesc& idesc = instruction_table_->Get(*data); ++ switch (idesc.type) { ++ case ZERO_OPERANDS_INSTR: ++ AppendToBuffer("%s", idesc.mnem); ++ data++; ++ break; ++ ++ case TWO_OPERANDS_INSTR: ++ data++; ++ data += PrintOperands(idesc.mnem, idesc.op_order_, data); ++ break; ++ ++ case JUMP_CONDITIONAL_SHORT_INSTR: ++ data += JumpConditionalShort(data, branch_hint); ++ break; ++ ++ case REGISTER_INSTR: ++ AppendToBuffer("%s %s", idesc.mnem, NameOfCPURegister(*data & 0x07)); ++ data++; ++ break; ++ ++ case MOVE_REG_INSTR: { ++ byte* addr = reinterpret_cast(*reinterpret_cast(data+1)); ++ AppendToBuffer("mov %s,%s", ++ NameOfCPURegister(*data & 0x07), ++ NameOfAddress(addr)); ++ data += 5; ++ break; ++ } ++ ++ case CALL_JUMP_INSTR: { ++ byte* addr = data + *reinterpret_cast(data+1) + 5; ++ AppendToBuffer("%s %s", idesc.mnem, NameOfAddress(addr)); ++ data += 5; ++ break; ++ } ++ ++ case SHORT_IMMEDIATE_INSTR: { ++ byte* addr = reinterpret_cast(*reinterpret_cast(data+1)); ++ AppendToBuffer("%s eax,%s", idesc.mnem, NameOfAddress(addr)); ++ data += 5; ++ break; ++ } ++ ++ case BYTE_IMMEDIATE_INSTR: { ++ AppendToBuffer("%s al,0x%x", idesc.mnem, data[1]); ++ data += 2; ++ break; ++ } ++ ++ case NO_INSTR: ++ processed = false; ++ break; ++ ++ default: ++ UNIMPLEMENTED(); // This type is not implemented. ++ } ++ //---------------------------- ++ if (!processed) { ++ switch (*data) { ++ case 0xC2: ++ AppendToBuffer("ret 0x%x", *reinterpret_cast(data+1)); ++ data += 3; ++ break; ++ ++ case 0x6B: { ++ data++; ++ data += PrintOperands("imul", REG_OPER_OP_ORDER, data); ++ AppendToBuffer(",%d", *data); ++ data++; ++ } break; ++ ++ case 0x69: { ++ data++; ++ data += PrintOperands("imul", REG_OPER_OP_ORDER, data); ++ AppendToBuffer(",%d", *reinterpret_cast(data)); ++ data += 4; ++ } ++ break; ++ ++ case 0xF6: ++ { data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (regop == eax) { ++ AppendToBuffer("test_b "); ++ data += PrintRightByteOperand(data); ++ int32_t imm = *data; ++ AppendToBuffer(",0x%x", imm); ++ data++; ++ } else { ++ UnimplementedInstruction(); ++ } ++ } ++ break; ++ ++ case 0x81: // fall through ++ case 0x83: // 0x81 with sign extension bit set ++ data += PrintImmediateOp(data); ++ break; ++ ++ case 0x0F: ++ { byte f0byte = data[1]; ++ const char* f0mnem = F0Mnem(f0byte); ++ if (f0byte == 0x18) { ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ const char* suffix[] = {"nta", "1", "2", "3"}; ++ AppendToBuffer("%s%s ", f0mnem, suffix[regop & 0x03]); ++ data += PrintRightOperand(data); ++ } else if (f0byte == 0x1F && data[2] == 0) { ++ AppendToBuffer("nop"); // 3 byte nop. ++ data += 3; ++ } else if (f0byte == 0x1F && data[2] == 0x40 && data[3] == 0) { ++ AppendToBuffer("nop"); // 4 byte nop. ++ data += 4; ++ } else if (f0byte == 0x1F && data[2] == 0x44 && data[3] == 0 && ++ data[4] == 0) { ++ AppendToBuffer("nop"); // 5 byte nop. ++ data += 5; ++ } else if (f0byte == 0x1F && data[2] == 0x80 && data[3] == 0 && ++ data[4] == 0 && data[5] == 0 && data[6] == 0) { ++ AppendToBuffer("nop"); // 7 byte nop. ++ data += 7; ++ } else if (f0byte == 0x1F && data[2] == 0x84 && data[3] == 0 && ++ data[4] == 0 && data[5] == 0 && data[6] == 0 && ++ data[7] == 0) { ++ AppendToBuffer("nop"); // 8 byte nop. ++ data += 8; ++ } else if (f0byte == 0x0B || f0byte == 0xA2 || f0byte == 0x31) { ++ AppendToBuffer("%s", f0mnem); ++ data += 2; ++ } else if (f0byte == 0x28) { ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movaps %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (f0byte >= 0x53 && f0byte <= 0x5F) { ++ const char* const pseudo_op[] = { ++ "rcpps", ++ "andps", ++ "andnps", ++ "orps", ++ "xorps", ++ "addps", ++ "mulps", ++ "cvtps2pd", ++ "cvtdq2ps", ++ "subps", ++ "minps", ++ "divps", ++ "maxps", ++ }; ++ ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("%s %s,", ++ pseudo_op[f0byte - 0x53], ++ NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (f0byte == 0x50) { ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movmskps %s,%s", ++ NameOfCPURegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (f0byte== 0xC6) { ++ // shufps xmm, xmm/m128, imm8 ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("shufps %s,%s,%d", ++ NameOfXMMRegister(rm), ++ NameOfXMMRegister(regop), ++ static_cast(imm8)); ++ data += 2; ++ } else if ((f0byte & 0xF0) == 0x80) { ++ data += JumpConditional(data, branch_hint); ++ } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || ++ f0byte == 0xB7 || f0byte == 0xAF) { ++ data += 2; ++ data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); ++ } else if ((f0byte & 0xF0) == 0x90) { ++ data += SetCC(data); ++ } else if ((f0byte & 0xF0) == 0x40) { ++ data += CMov(data); ++ } else if (f0byte == 0xA4 || f0byte == 0xAC) { ++ // shld, shrd ++ data += 2; ++ AppendToBuffer("%s ", f0mnem); ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ data += 2; ++ AppendToBuffer("%s,%s,%d", NameOfCPURegister(rm), ++ NameOfCPURegister(regop), static_cast(imm8)); ++ } else if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) { ++ // shrd_cl, shld_cl, bts ++ data += 2; ++ AppendToBuffer("%s ", f0mnem); ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightOperand(data); ++ if (f0byte == 0xAB) { ++ AppendToBuffer(",%s", NameOfCPURegister(regop)); ++ } else { ++ AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); ++ } ++ } else if (f0byte == 0xB0) { ++ // cmpxchg_b ++ data += 2; ++ AppendToBuffer("%s ", f0mnem); ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightOperand(data); ++ AppendToBuffer(",%s", NameOfByteCPURegister(regop)); ++ } else if (f0byte == 0xB1) { ++ // cmpxchg ++ data += 2; ++ data += PrintOperands(f0mnem, OPER_REG_OP_ORDER, data); ++ } else if (f0byte == 0xBC) { ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop)); ++ data += PrintRightOperand(data); ++ } else if (f0byte == 0xBD) { ++ data += 2; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop)); ++ data += PrintRightOperand(data); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } ++ break; ++ ++ case 0x8F: ++ { data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (regop == eax) { ++ AppendToBuffer("pop "); ++ data += PrintRightOperand(data); ++ } ++ } ++ break; ++ ++ case 0xFF: ++ { data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ const char* mnem = NULL; ++ switch (regop) { ++ case esi: mnem = "push"; break; ++ case eax: mnem = "inc"; break; ++ case ecx: mnem = "dec"; break; ++ case edx: mnem = "call"; break; ++ case esp: mnem = "jmp"; break; ++ default: mnem = "???"; ++ } ++ AppendToBuffer("%s ", mnem); ++ data += PrintRightOperand(data); ++ } ++ break; ++ ++ case 0xC7: // imm32, fall through ++ case 0xC6: // imm8 ++ { bool is_byte = *data == 0xC6; ++ data++; ++ if (is_byte) { ++ AppendToBuffer("%s ", "mov_b"); ++ data += PrintRightByteOperand(data); ++ int32_t imm = *data; ++ AppendToBuffer(",0x%x", imm); ++ data++; ++ } else { ++ AppendToBuffer("%s ", "mov"); ++ data += PrintRightOperand(data); ++ int32_t imm = *reinterpret_cast(data); ++ AppendToBuffer(",0x%x", imm); ++ data += 4; ++ } ++ } ++ break; ++ ++ case 0x80: ++ { data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ const char* mnem = NULL; ++ switch (regop) { ++ case 5: mnem = "subb"; break; ++ case 7: mnem = "cmpb"; break; ++ default: UnimplementedInstruction(); ++ } ++ AppendToBuffer("%s ", mnem); ++ data += PrintRightByteOperand(data); ++ int32_t imm = *data; ++ AppendToBuffer(",0x%x", imm); ++ data++; ++ } ++ break; ++ ++ case 0x88: // 8bit, fall through ++ case 0x89: // 32bit ++ { bool is_byte = *data == 0x88; ++ int mod, regop, rm; ++ data++; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (is_byte) { ++ AppendToBuffer("%s ", "mov_b"); ++ data += PrintRightByteOperand(data); ++ AppendToBuffer(",%s", NameOfByteCPURegister(regop)); ++ } else { ++ AppendToBuffer("%s ", "mov"); ++ data += PrintRightOperand(data); ++ AppendToBuffer(",%s", NameOfCPURegister(regop)); ++ } ++ } ++ break; ++ ++ case 0x66: // prefix ++ while (*data == 0x66) data++; ++ if (*data == 0xf && data[1] == 0x1f) { ++ AppendToBuffer("nop"); // 0x66 prefix ++ } else if (*data == 0x39) { ++ data++; ++ data += PrintOperands("cmpw", OPER_REG_OP_ORDER, data); ++ } else if (*data == 0x3B) { ++ data++; ++ data += PrintOperands("cmpw", REG_OPER_OP_ORDER, data); ++ } else if (*data == 0x81) { ++ data++; ++ AppendToBuffer("cmpw "); ++ data += PrintRightOperand(data); ++ int imm = *reinterpret_cast(data); ++ AppendToBuffer(",0x%x", imm); ++ data += 2; ++ } else if (*data == 0x87) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("xchg_w %s,", NameOfCPURegister(regop)); ++ data += PrintRightOperand(data); ++ } else if (*data == 0x89) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("mov_w "); ++ data += PrintRightOperand(data); ++ AppendToBuffer(",%s", NameOfCPURegister(regop)); ++ } else if (*data == 0x8B) { ++ data++; ++ data += PrintOperands("mov_w", REG_OPER_OP_ORDER, data); ++ } else if (*data == 0x90) { ++ AppendToBuffer("nop"); // 0x66 prefix ++ } else if (*data == 0xC7) { ++ data++; ++ AppendToBuffer("%s ", "mov_w"); ++ data += PrintRightOperand(data); ++ int imm = *reinterpret_cast(data); ++ AppendToBuffer(",0x%x", imm); ++ data += 2; ++ } else if (*data == 0xF7) { ++ data++; ++ AppendToBuffer("%s ", "test_w"); ++ data += PrintRightOperand(data); ++ int imm = *reinterpret_cast(data); ++ AppendToBuffer(",0x%x", imm); ++ data += 2; ++ } else if (*data == 0x0F) { ++ data++; ++ if (*data == 0x38) { ++ data++; ++ if (*data == 0x17) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("ptest %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x2A) { ++ // movntdqa ++ UnimplementedInstruction(); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } else if (*data == 0x3A) { ++ data++; ++ if (*data == 0x0B) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("roundsd %s,%s,%d", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm), ++ static_cast(imm8)); ++ data += 2; ++ } else if (*data == 0x16) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, &rm, ®op); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("pextrd %s,%s,%d", ++ NameOfCPURegister(regop), ++ NameOfXMMRegister(rm), ++ static_cast(imm8)); ++ data += 2; ++ } else if (*data == 0x17) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("extractps %s,%s,%d", ++ NameOfCPURegister(rm), ++ NameOfXMMRegister(regop), ++ static_cast(imm8)); ++ data += 2; ++ } else if (*data == 0x22) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("pinsrd %s,%s,%d", ++ NameOfXMMRegister(regop), ++ NameOfCPURegister(rm), ++ static_cast(imm8)); ++ data += 2; ++ } else { ++ UnimplementedInstruction(); ++ } ++ } else if (*data == 0x2E || *data == 0x2F) { ++ const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd"; ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (mod == 0x3) { ++ AppendToBuffer("%s %s,%s", mnem, ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else { ++ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); ++ data += PrintRightOperand(data); ++ } ++ } else if (*data == 0x50) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movmskpd %s,%s", ++ NameOfCPURegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x54) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("andpd %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x56) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("orpd %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x57) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("xorpd %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x6E) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movd %s,", NameOfXMMRegister(regop)); ++ data += PrintRightOperand(data); ++ } else if (*data == 0x6F) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movdqa %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (*data == 0x70) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ AppendToBuffer("pshufd %s,%s,%d", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm), ++ static_cast(imm8)); ++ data += 2; ++ } else if (*data == 0x76) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("pcmpeqd %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x90) { ++ data++; ++ AppendToBuffer("nop"); // 2 byte nop. ++ } else if (*data == 0xF3) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("psllq %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x73) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ int8_t imm8 = static_cast(data[1]); ++ DCHECK(regop == esi || regop == edx); ++ AppendToBuffer("%s %s,%d", ++ (regop == esi) ? "psllq" : "psrlq", ++ NameOfXMMRegister(rm), ++ static_cast(imm8)); ++ data += 2; ++ } else if (*data == 0xD3) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("psrlq %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0x7F) { ++ AppendToBuffer("movdqa "); ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightXMMOperand(data); ++ AppendToBuffer(",%s", NameOfXMMRegister(regop)); ++ } else if (*data == 0x7E) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movd "); ++ data += PrintRightOperand(data); ++ AppendToBuffer(",%s", NameOfXMMRegister(regop)); ++ } else if (*data == 0xDB) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("pand %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0xE7) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (mod == 3) { ++ // movntdq ++ UnimplementedInstruction(); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } else if (*data == 0xEF) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("pxor %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0xEB) { ++ data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("por %s,%s", ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data++; ++ } else if (*data == 0xB1) { ++ data++; ++ data += PrintOperands("cmpxchg_w", OPER_REG_OP_ORDER, data); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } else { ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xFE: ++ { data++; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (regop == ecx) { ++ AppendToBuffer("dec_b "); ++ data += PrintRightOperand(data); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } ++ break; ++ ++ case 0x68: ++ AppendToBuffer("push 0x%x", *reinterpret_cast(data+1)); ++ data += 5; ++ break; ++ ++ case 0x6A: ++ AppendToBuffer("push 0x%x", *reinterpret_cast(data + 1)); ++ data += 2; ++ break; ++ ++ case 0xA8: ++ AppendToBuffer("test al,0x%x", *reinterpret_cast(data+1)); ++ data += 2; ++ break; ++ ++ case 0xA9: ++ AppendToBuffer("test eax,0x%x", *reinterpret_cast(data+1)); ++ data += 5; ++ break; ++ ++ case 0xD1: // fall through ++ case 0xD3: // fall through ++ case 0xC1: ++ data += D1D3C1Instruction(data); ++ break; ++ ++ case 0xD8: // fall through ++ case 0xD9: // fall through ++ case 0xDA: // fall through ++ case 0xDB: // fall through ++ case 0xDC: // fall through ++ case 0xDD: // fall through ++ case 0xDE: // fall through ++ case 0xDF: ++ data += FPUInstruction(data); ++ break; ++ ++ case 0xEB: ++ data += JumpShort(data); ++ break; ++ ++ case 0xF2: ++ if (*(data+1) == 0x0F) { ++ byte b2 = *(data+2); ++ if (b2 == 0x11) { ++ AppendToBuffer("movsd "); ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightXMMOperand(data); ++ AppendToBuffer(",%s", NameOfXMMRegister(regop)); ++ } else if (b2 == 0x10) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movsd %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0x5A) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("cvtsd2ss %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else { ++ const char* mnem = "?"; ++ switch (b2) { ++ case 0x2A: mnem = "cvtsi2sd"; break; ++ case 0x2C: mnem = "cvttsd2si"; break; ++ case 0x2D: mnem = "cvtsd2si"; break; ++ case 0x51: mnem = "sqrtsd"; break; ++ case 0x58: mnem = "addsd"; break; ++ case 0x59: mnem = "mulsd"; break; ++ case 0x5C: mnem = "subsd"; break; ++ case 0x5E: mnem = "divsd"; break; ++ } ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ if (b2 == 0x2A) { ++ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); ++ data += PrintRightOperand(data); ++ } else if (b2 == 0x2C || b2 == 0x2D) { ++ AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0xC2) { ++ // Intel manual 2A, Table 3-18. ++ const char* const pseudo_op[] = { ++ "cmpeqsd", ++ "cmpltsd", ++ "cmplesd", ++ "cmpunordsd", ++ "cmpneqsd", ++ "cmpnltsd", ++ "cmpnlesd", ++ "cmpordsd" ++ }; ++ AppendToBuffer("%s %s,%s", ++ pseudo_op[data[1]], ++ NameOfXMMRegister(regop), ++ NameOfXMMRegister(rm)); ++ data += 2; ++ } else { ++ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } ++ } ++ } else { ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xF3: ++ if (*(data+1) == 0x0F) { ++ byte b2 = *(data+2); ++ if (b2 == 0x11) { ++ AppendToBuffer("movss "); ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightXMMOperand(data); ++ AppendToBuffer(",%s", NameOfXMMRegister(regop)); ++ } else if (b2 == 0x10) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movss %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0x2C) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("cvttss2si %s,", NameOfCPURegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0x5A) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("cvtss2sd %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0x6F) { ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop)); ++ data += PrintRightXMMOperand(data); ++ } else if (b2 == 0x7F) { ++ AppendToBuffer("movdqu "); ++ data += 3; ++ int mod, regop, rm; ++ get_modrm(*data, &mod, ®op, &rm); ++ data += PrintRightXMMOperand(data); ++ AppendToBuffer(",%s", NameOfXMMRegister(regop)); ++ } else { ++ UnimplementedInstruction(); ++ } ++ } else if (*(data+1) == 0xA5) { ++ data += 2; ++ AppendToBuffer("rep_movs"); ++ } else if (*(data+1) == 0xAB) { ++ data += 2; ++ AppendToBuffer("rep_stos"); ++ } else { ++ UnimplementedInstruction(); ++ } ++ break; ++ ++ case 0xF7: ++ data += F7Instruction(data); ++ break; ++ ++ default: ++ UnimplementedInstruction(); ++ } ++ } ++ ++ if (tmp_buffer_pos_ < sizeof tmp_buffer_) { ++ tmp_buffer_[tmp_buffer_pos_] = '\0'; ++ } ++ ++ int instr_len = data - instr; ++ if (instr_len == 0) { ++ printf("%02x", *data); ++ } ++ DCHECK(instr_len > 0); // Ensure progress. ++ ++ int outp = 0; ++ // Instruction bytes. ++ for (byte* bp = instr; bp < data; bp++) { ++ outp += v8::internal::SNPrintF(out_buffer + outp, "%02x", *bp); ++ } ++ for (int i = 6 - instr_len; i >= 0; i--) { ++ outp += v8::internal::SNPrintF(out_buffer + outp, " "); ++ } ++ ++ outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.start()); ++ return instr_len; ++} // NOLINT (function is too long) ++ ++ ++//------------------------------------------------------------------------------ ++ ++ ++static const char* const cpu_regs[8] = { ++ "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" ++}; ++ ++ ++static const char* const byte_cpu_regs[8] = { ++ "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" ++}; ++ ++ ++static const char* const xmm_regs[8] = { ++ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" ++}; ++ ++ ++const char* NameConverter::NameOfAddress(byte* addr) const { ++ v8::internal::SNPrintF(tmp_buffer_, "%p", static_cast(addr)); ++ return tmp_buffer_.start(); ++} ++ ++ ++const char* NameConverter::NameOfConstant(byte* addr) const { ++ return NameOfAddress(addr); ++} ++ ++ ++const char* NameConverter::NameOfCPURegister(int reg) const { ++ if (0 <= reg && reg < 8) return cpu_regs[reg]; ++ return "noreg"; ++} ++ ++ ++const char* NameConverter::NameOfByteCPURegister(int reg) const { ++ if (0 <= reg && reg < 8) return byte_cpu_regs[reg]; ++ return "noreg"; ++} ++ ++ ++const char* NameConverter::NameOfXMMRegister(int reg) const { ++ if (0 <= reg && reg < 8) return xmm_regs[reg]; ++ return "noxmmreg"; ++} ++ ++ ++const char* NameConverter::NameInCode(byte* addr) const { ++ // X87 does not embed debug strings at the moment. ++ UNREACHABLE(); ++} ++ ++ ++//------------------------------------------------------------------------------ ++ ++Disassembler::Disassembler(const NameConverter& converter) ++ : converter_(converter) {} ++ ++ ++Disassembler::~Disassembler() {} ++ ++ ++int Disassembler::InstructionDecode(v8::internal::Vector buffer, ++ byte* instruction) { ++ DisassemblerX87 d(converter_, false /*do not crash if unimplemented*/); ++ return d.InstructionDecode(buffer, instruction); ++} ++ ++ ++// The IA-32 assembler does not currently use constant pools. ++int Disassembler::ConstantPoolSizeAt(byte* instruction) { return -1; } ++ ++ ++/*static*/ void Disassembler::Disassemble(FILE* f, byte* begin, byte* end) { ++ NameConverter converter; ++ Disassembler d(converter); ++ for (byte* pc = begin; pc < end;) { ++ v8::internal::EmbeddedVector buffer; ++ buffer[0] = '\0'; ++ byte* prev_pc = pc; ++ pc += d.InstructionDecode(buffer, pc); ++ fprintf(f, "%p", static_cast(prev_pc)); ++ fprintf(f, " "); ++ ++ for (byte* bp = prev_pc; bp < pc; bp++) { ++ fprintf(f, "%02x", *bp); ++ } ++ for (int i = 6 - (pc - prev_pc); i >= 0; i--) { ++ fprintf(f, " "); ++ } ++ fprintf(f, " %s\n", buffer.start()); ++ } ++} ++ ++ ++} // namespace disasm ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 2017-12-25 17:42:57.222465544 +0100 +@@ -0,0 +1,27 @@ ++// Copyright 2006-2008 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/assembler.h" ++#include "src/frames.h" ++#include "src/x87/assembler-x87-inl.h" ++#include "src/x87/assembler-x87.h" ++#include "src/x87/frames-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++ ++Register JavaScriptFrame::fp_register() { return ebp; } ++Register JavaScriptFrame::context_register() { return esi; } ++Register JavaScriptFrame::constant_pool_pointer_register() { ++ UNREACHABLE(); ++} ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h 2017-12-25 17:42:57.222465544 +0100 +@@ -0,0 +1,78 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_X87_FRAMES_X87_H_ ++#define V8_X87_FRAMES_X87_H_ ++ ++namespace v8 { ++namespace internal { ++ ++ ++// Register lists ++// Note that the bit values must match those used in actual instruction encoding ++const int kNumRegs = 8; ++ ++ ++// Caller-saved registers ++const RegList kJSCallerSaved = ++ 1 << 0 | // eax ++ 1 << 1 | // ecx ++ 1 << 2 | // edx ++ 1 << 3 | // ebx - used as a caller-saved register in JavaScript code ++ 1 << 7; // edi - callee function ++ ++const int kNumJSCallerSaved = 5; ++ ++ ++// Number of registers for which space is reserved in safepoints. ++const int kNumSafepointRegisters = 8; ++ ++// ---------------------------------------------------- ++ ++ ++class EntryFrameConstants : public AllStatic { ++ public: ++ static const int kCallerFPOffset = -6 * kPointerSize; ++ ++ static const int kNewTargetArgOffset = +2 * kPointerSize; ++ static const int kFunctionArgOffset = +3 * kPointerSize; ++ static const int kReceiverArgOffset = +4 * kPointerSize; ++ static const int kArgcOffset = +5 * kPointerSize; ++ static const int kArgvOffset = +6 * kPointerSize; ++}; ++ ++class ExitFrameConstants : public TypedFrameConstants { ++ public: ++ static const int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0); ++ static const int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1); ++ DEFINE_TYPED_FRAME_SIZES(2); ++ ++ static const int kCallerFPOffset = 0 * kPointerSize; ++ static const int kCallerPCOffset = +1 * kPointerSize; ++ ++ // FP-relative displacement of the caller's SP. It points just ++ // below the saved PC. ++ static const int kCallerSPDisplacement = +2 * kPointerSize; ++ ++ static const int kConstantPoolOffset = 0; // Not used ++}; ++ ++ ++class JavaScriptFrameConstants : public AllStatic { ++ public: ++ // FP-relative. ++ static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; ++ static const int kLastParameterOffset = +2 * kPointerSize; ++ static const int kFunctionOffset = StandardFrameConstants::kFunctionOffset; ++ ++ // Caller SP-relative. ++ static const int kParam0Offset = -2 * kPointerSize; ++ static const int kReceiverOffset = -1 * kPointerSize; ++}; ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_FRAMES_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-25 17:42:57.223465529 +0100 +@@ -0,0 +1,386 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/interface-descriptors.h" ++ ++namespace v8 { ++namespace internal { ++ ++const Register CallInterfaceDescriptor::ContextRegister() { return esi; } ++ ++void CallInterfaceDescriptor::DefaultInitializePlatformSpecific( ++ CallInterfaceDescriptorData* data, int register_parameter_count) { ++ const Register default_stub_registers[] = {eax, ebx, ecx, edx, edi}; ++ CHECK_LE(static_cast(register_parameter_count), ++ arraysize(default_stub_registers)); ++ data->InitializePlatformSpecific(register_parameter_count, ++ default_stub_registers); ++} ++ ++const Register FastNewFunctionContextDescriptor::FunctionRegister() { ++ return edi; ++} ++const Register FastNewFunctionContextDescriptor::SlotsRegister() { return eax; } ++ ++const Register LoadDescriptor::ReceiverRegister() { return edx; } ++const Register LoadDescriptor::NameRegister() { return ecx; } ++const Register LoadDescriptor::SlotRegister() { return eax; } ++ ++const Register LoadWithVectorDescriptor::VectorRegister() { return ebx; } ++ ++const Register LoadICProtoArrayDescriptor::HandlerRegister() { return edi; } ++ ++const Register StoreDescriptor::ReceiverRegister() { return edx; } ++const Register StoreDescriptor::NameRegister() { return ecx; } ++const Register StoreDescriptor::ValueRegister() { return eax; } ++const Register StoreDescriptor::SlotRegister() { return edi; } ++ ++const Register StoreWithVectorDescriptor::VectorRegister() { return ebx; } ++ ++const Register StoreTransitionDescriptor::SlotRegister() { return no_reg; } ++const Register StoreTransitionDescriptor::VectorRegister() { return ebx; } ++const Register StoreTransitionDescriptor::MapRegister() { return edi; } ++ ++const Register StringCompareDescriptor::LeftRegister() { return edx; } ++const Register StringCompareDescriptor::RightRegister() { return eax; } ++ ++const Register StringConcatDescriptor::ArgumentsCountRegister() { return eax; } ++ ++const Register ApiGetterDescriptor::HolderRegister() { return ecx; } ++const Register ApiGetterDescriptor::CallbackRegister() { return eax; } ++ ++const Register MathPowTaggedDescriptor::exponent() { return eax; } ++ ++const Register MathPowIntegerDescriptor::exponent() { ++ return MathPowTaggedDescriptor::exponent(); ++} ++ ++ ++const Register GrowArrayElementsDescriptor::ObjectRegister() { return eax; } ++const Register GrowArrayElementsDescriptor::KeyRegister() { return ebx; } ++ ++ ++void FastNewClosureDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // SharedFunctionInfo, vector, slot index. ++ Register registers[] = {ebx, ecx, edx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void FastNewRestParameterDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void FastNewSloppyArgumentsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void FastNewStrictArgumentsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++// static ++const Register TypeConversionDescriptor::ArgumentRegister() { return eax; } ++ ++void TypeofDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void FastCloneRegExpDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi, eax, ecx, edx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void FastCloneShallowArrayDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {eax, ebx, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void FastCloneShallowObjectDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {eax, ebx, ecx, edx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void CreateAllocationSiteDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {ebx, edx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void CreateWeakCellDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {ebx, edx, edi}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void CallFunctionDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void CallICTrampolineDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi, eax, edx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CallICDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edi, eax, edx, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void CallConstructDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments ++ // ebx : feedback vector ++ // ecx : new target (for IsSuperConstructorCall) ++ // edx : slot in feedback vector (Smi, for RecordCallTarget) ++ // edi : constructor function ++ // TODO(turbofan): So far we don't gather type feedback and hence skip the ++ // slot parameter, but ArrayConstructStub needs the vector to be undefined. ++ Register registers[] = {eax, edi, ecx, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void CallTrampolineDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments ++ // edi : the target to call ++ Register registers[] = {edi, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CallForwardVarargsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // ecx : start index (to support rest parameters) ++ // edi : the target to call ++ Register registers[] = {edi, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ConstructStubDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments ++ // edx : the new target ++ // edi : the target to call ++ // ebx : allocation site or undefined ++ Register registers[] = {edi, edx, eax, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void ConstructTrampolineDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments ++ // edx : the new target ++ // edi : the target to call ++ Register registers[] = {edi, edx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++ ++void TransitionElementsKindDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {eax, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void AllocateHeapNumberDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // register state ++ data->InitializePlatformSpecific(0, nullptr, nullptr); ++} ++ ++void ArrayNoArgumentConstructorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // register state ++ // eax -- number of arguments ++ // edi -- function ++ // ebx -- allocation site with elements kind ++ Register registers[] = {edi, ebx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void ArraySingleArgumentConstructorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // register state ++ // eax -- number of arguments ++ // edi -- function ++ // ebx -- allocation site with elements kind ++ Register registers[] = {edi, ebx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void ArrayNArgumentsConstructorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // register state ++ // eax -- number of arguments ++ // edi -- function ++ // ebx -- allocation site with elements kind ++ Register registers[] = {edi, ebx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void VarArgFunctionDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // stack param count needs (arg count) ++ Register registers[] = {eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CompareDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void BinaryOpDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++ ++void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {ecx, edx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void BinaryOpWithVectorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // register state ++ // edx -- lhs ++ // eax -- rhs ++ // edi -- slot id ++ // ebx -- vector ++ Register registers[] = {edx, eax, edi, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CountOpDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void StringAddDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = {edx, eax}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ ++void ArgumentAdaptorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ edi, // JSFunction ++ edx, // the new target ++ eax, // actual number of arguments ++ ebx, // expected number of arguments ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ApiCallbackDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ edi, // callee ++ ebx, // call_data ++ ecx, // holder ++ edx, // api_function_address ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void InterpreterDispatchDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ kInterpreterAccumulatorRegister, kInterpreterBytecodeOffsetRegister, ++ kInterpreterBytecodeArrayRegister, kInterpreterDispatchTableRegister}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void InterpreterPushArgsThenCallDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ eax, // argument count (not including receiver) ++ ebx, // address of first argument ++ edi // the target callable to be call ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void InterpreterPushArgsThenConstructDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ eax, // argument count (not including receiver) ++ edx, // new target ++ edi, // constructor ++ ebx, // allocation site feedback ++ ecx, // address of first argument ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void InterpreterPushArgsThenConstructArrayDescriptor:: ++ InitializePlatformSpecific(CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ eax, // argument count (not including receiver) ++ edx, // target to the call. It is checked to be Array function. ++ ebx, // allocation site feedback ++ ecx, // address of first argument ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void InterpreterCEntryDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ eax, // argument count (argc) ++ ecx, // address of first argument (argv) ++ ebx // the runtime function to call ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ResumeGeneratorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ eax, // the value to pass to the generator ++ ebx, // the JSGeneratorObject to resume ++ edx // the resume mode (tagged) ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-25 17:42:57.223465529 +0100 +@@ -0,0 +1,2546 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#if V8_TARGET_ARCH_X87 ++ ++#include "src/base/bits.h" ++#include "src/base/division-by-constant.h" ++#include "src/bootstrapper.h" ++#include "src/codegen.h" ++#include "src/debug/debug.h" ++#include "src/runtime/runtime.h" ++#include "src/x87/frames-x87.h" ++#include "src/x87/macro-assembler-x87.h" ++ ++namespace v8 { ++namespace internal { ++ ++// ------------------------------------------------------------------------- ++// MacroAssembler implementation. ++ ++MacroAssembler::MacroAssembler(Isolate* isolate, void* buffer, int size, ++ CodeObjectRequired create_code_object) ++ : Assembler(arg_isolate, buffer, size), ++ generating_stub_(false), ++ has_frame_(false), ++ isolate_(isolate) { ++ if (create_code_object == CodeObjectRequired::kYes) { ++ code_object_ = ++ Handle::New(isolate_->heap()->undefined_value(), isolate_); ++ } ++} ++ ++ ++void MacroAssembler::Load(Register dst, const Operand& src, Representation r) { ++ DCHECK(!r.IsDouble()); ++ if (r.IsInteger8()) { ++ movsx_b(dst, src); ++ } else if (r.IsUInteger8()) { ++ movzx_b(dst, src); ++ } else if (r.IsInteger16()) { ++ movsx_w(dst, src); ++ } else if (r.IsUInteger16()) { ++ movzx_w(dst, src); ++ } else { ++ mov(dst, src); ++ } ++} ++ ++ ++void MacroAssembler::Store(Register src, const Operand& dst, Representation r) { ++ DCHECK(!r.IsDouble()); ++ if (r.IsInteger8() || r.IsUInteger8()) { ++ mov_b(dst, src); ++ } else if (r.IsInteger16() || r.IsUInteger16()) { ++ mov_w(dst, src); ++ } else { ++ if (r.IsHeapObject()) { ++ AssertNotSmi(src); ++ } else if (r.IsSmi()) { ++ AssertSmi(src); ++ } ++ mov(dst, src); ++ } ++} ++ ++ ++void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { ++ if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { ++ mov(destination, isolate()->heap()->root_handle(index)); ++ return; ++ } ++ ExternalReference roots_array_start = ++ ExternalReference::roots_array_start(isolate()); ++ mov(destination, Immediate(index)); ++ mov(destination, Operand::StaticArray(destination, ++ times_pointer_size, ++ roots_array_start)); ++} ++ ++ ++void MacroAssembler::StoreRoot(Register source, ++ Register scratch, ++ Heap::RootListIndex index) { ++ DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); ++ ExternalReference roots_array_start = ++ ExternalReference::roots_array_start(isolate()); ++ mov(scratch, Immediate(index)); ++ mov(Operand::StaticArray(scratch, times_pointer_size, roots_array_start), ++ source); ++} ++ ++ ++void MacroAssembler::CompareRoot(Register with, ++ Register scratch, ++ Heap::RootListIndex index) { ++ ExternalReference roots_array_start = ++ ExternalReference::roots_array_start(isolate()); ++ mov(scratch, Immediate(index)); ++ cmp(with, Operand::StaticArray(scratch, ++ times_pointer_size, ++ roots_array_start)); ++} ++ ++ ++void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { ++ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); ++ cmp(with, isolate()->heap()->root_handle(index)); ++} ++ ++ ++void MacroAssembler::CompareRoot(const Operand& with, ++ Heap::RootListIndex index) { ++ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); ++ cmp(with, isolate()->heap()->root_handle(index)); ++} ++ ++ ++void MacroAssembler::PushRoot(Heap::RootListIndex index) { ++ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); ++ Push(isolate()->heap()->root_handle(index)); ++} ++ ++#define REG(Name) \ ++ { Register::kCode_##Name } ++ ++static const Register saved_regs[] = {REG(eax), REG(ecx), REG(edx)}; ++ ++#undef REG ++ ++static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); ++ ++void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, ++ Register exclusion1, Register exclusion2, ++ Register exclusion3) { ++ // We don't allow a GC during a store buffer overflow so there is no need to ++ // store the registers in any particular way, but we do have to store and ++ // restore them. ++ for (int i = 0; i < kNumberOfSavedRegs; i++) { ++ Register reg = saved_regs[i]; ++ if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { ++ push(reg); ++ } ++ } ++ if (fp_mode == kSaveFPRegs) { ++ // Save FPU state in m108byte. ++ sub(esp, Immediate(108)); ++ fnsave(Operand(esp, 0)); ++ } ++} ++ ++void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1, ++ Register exclusion2, Register exclusion3) { ++ if (fp_mode == kSaveFPRegs) { ++ // Restore FPU state in m108byte. ++ frstor(Operand(esp, 0)); ++ add(esp, Immediate(108)); ++ } ++ ++ for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { ++ Register reg = saved_regs[i]; ++ if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { ++ pop(reg); ++ } ++ } ++} ++ ++void MacroAssembler::InNewSpace(Register object, Register scratch, Condition cc, ++ Label* condition_met, ++ Label::Distance distance) { ++ CheckPageFlag(object, scratch, MemoryChunk::kIsInNewSpaceMask, cc, ++ condition_met, distance); ++} ++ ++ ++void MacroAssembler::RememberedSetHelper( ++ Register object, // Only used for debug checks. ++ Register addr, Register scratch, SaveFPRegsMode save_fp, ++ MacroAssembler::RememberedSetFinalAction and_then) { ++ Label done; ++ if (emit_debug_code()) { ++ Label ok; ++ JumpIfNotInNewSpace(object, scratch, &ok, Label::kNear); ++ int3(); ++ bind(&ok); ++ } ++ // Load store buffer top. ++ ExternalReference store_buffer = ++ ExternalReference::store_buffer_top(isolate()); ++ mov(scratch, Operand::StaticVariable(store_buffer)); ++ // Store pointer to buffer. ++ mov(Operand(scratch, 0), addr); ++ // Increment buffer top. ++ add(scratch, Immediate(kPointerSize)); ++ // Write back new top of buffer. ++ mov(Operand::StaticVariable(store_buffer), scratch); ++ // Call stub on end of buffer. ++ // Check for end of buffer. ++ test(scratch, Immediate(StoreBuffer::kStoreBufferMask)); ++ if (and_then == kReturnAtEnd) { ++ Label buffer_overflowed; ++ j(equal, &buffer_overflowed, Label::kNear); ++ ret(0); ++ bind(&buffer_overflowed); ++ } else { ++ DCHECK(and_then == kFallThroughAtEnd); ++ j(not_equal, &done, Label::kNear); ++ } ++ StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); ++ CallStub(&store_buffer_overflow); ++ if (and_then == kReturnAtEnd) { ++ ret(0); ++ } else { ++ DCHECK(and_then == kFallThroughAtEnd); ++ bind(&done); ++ } ++} ++ ++ ++void MacroAssembler::ClampTOSToUint8(Register result_reg) { ++ Label done, conv_failure; ++ sub(esp, Immediate(kPointerSize)); ++ fnclex(); ++ fist_s(Operand(esp, 0)); ++ pop(result_reg); ++ X87CheckIA(); ++ j(equal, &conv_failure, Label::kNear); ++ test(result_reg, Immediate(0xFFFFFF00)); ++ j(zero, &done, Label::kNear); ++ setcc(sign, result_reg); ++ sub(result_reg, Immediate(1)); ++ and_(result_reg, Immediate(255)); ++ jmp(&done, Label::kNear); ++ bind(&conv_failure); ++ fnclex(); ++ fldz(); ++ fld(1); ++ FCmp(); ++ setcc(below, result_reg); // 1 if negative, 0 if positive. ++ dec_b(result_reg); // 0 if negative, 255 if positive. ++ bind(&done); ++} ++ ++ ++void MacroAssembler::ClampUint8(Register reg) { ++ Label done; ++ test(reg, Immediate(0xFFFFFF00)); ++ j(zero, &done, Label::kNear); ++ setcc(negative, reg); // 1 if negative, 0 if positive. ++ dec_b(reg); // 0 if negative, 255 if positive. ++ bind(&done); ++} ++ ++ ++void MacroAssembler::SlowTruncateToI(Register result_reg, ++ Register input_reg, ++ int offset) { ++ DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true); ++ call(stub.GetCode(), RelocInfo::CODE_TARGET); ++} ++ ++ ++void MacroAssembler::TruncateX87TOSToI(Register result_reg) { ++ sub(esp, Immediate(kDoubleSize)); ++ fst_d(MemOperand(esp, 0)); ++ SlowTruncateToI(result_reg, esp, 0); ++ add(esp, Immediate(kDoubleSize)); ++} ++ ++ ++void MacroAssembler::X87TOSToI(Register result_reg, ++ MinusZeroMode minus_zero_mode, ++ Label* lost_precision, Label* is_nan, ++ Label* minus_zero, Label::Distance dst) { ++ Label done; ++ sub(esp, Immediate(kPointerSize)); ++ fld(0); ++ fist_s(MemOperand(esp, 0)); ++ fild_s(MemOperand(esp, 0)); ++ pop(result_reg); ++ FCmp(); ++ j(not_equal, lost_precision, dst); ++ j(parity_even, is_nan, dst); ++ if (minus_zero_mode == FAIL_ON_MINUS_ZERO) { ++ test(result_reg, Operand(result_reg)); ++ j(not_zero, &done, Label::kNear); ++ // To check for minus zero, we load the value again as float, and check ++ // if that is still 0. ++ sub(esp, Immediate(kPointerSize)); ++ fst_s(MemOperand(esp, 0)); ++ pop(result_reg); ++ test(result_reg, Operand(result_reg)); ++ j(not_zero, minus_zero, dst); ++ } ++ bind(&done); ++} ++ ++ ++void MacroAssembler::TruncateHeapNumberToI(Register result_reg, ++ Register input_reg) { ++ Label done, slow_case; ++ ++ SlowTruncateToI(result_reg, input_reg); ++ bind(&done); ++} ++ ++ ++void MacroAssembler::LoadUint32NoSSE2(const Operand& src) { ++ Label done; ++ push(src); ++ fild_s(Operand(esp, 0)); ++ cmp(src, Immediate(0)); ++ j(not_sign, &done, Label::kNear); ++ ExternalReference uint32_bias = ++ ExternalReference::address_of_uint32_bias(); ++ fld_d(Operand::StaticVariable(uint32_bias)); ++ faddp(1); ++ bind(&done); ++ add(esp, Immediate(kPointerSize)); ++} ++ ++ ++void MacroAssembler::RecordWriteField( ++ Register object, int offset, Register value, Register dst, ++ SaveFPRegsMode save_fp, RememberedSetAction remembered_set_action, ++ SmiCheck smi_check, PointersToHereCheck pointers_to_here_check_for_value) { ++ // First, check if a write barrier is even needed. The tests below ++ // catch stores of Smis. ++ Label done; ++ ++ // Skip barrier if writing a smi. ++ if (smi_check == INLINE_SMI_CHECK) { ++ JumpIfSmi(value, &done, Label::kNear); ++ } ++ ++ // Although the object register is tagged, the offset is relative to the start ++ // of the object, so so offset must be a multiple of kPointerSize. ++ DCHECK(IsAligned(offset, kPointerSize)); ++ ++ lea(dst, FieldOperand(object, offset)); ++ if (emit_debug_code()) { ++ Label ok; ++ test_b(dst, Immediate(kPointerSize - 1)); ++ j(zero, &ok, Label::kNear); ++ int3(); ++ bind(&ok); ++ } ++ ++ RecordWrite(object, dst, value, save_fp, remembered_set_action, ++ OMIT_SMI_CHECK, pointers_to_here_check_for_value); ++ ++ bind(&done); ++ ++ // Clobber clobbered input registers when running with the debug-code flag ++ // turned on to provoke errors. ++ if (emit_debug_code()) { ++ mov(value, Immediate(bit_cast(kZapValue))); ++ mov(dst, Immediate(bit_cast(kZapValue))); ++ } ++} ++ ++ ++void MacroAssembler::RecordWriteForMap(Register object, Handle map, ++ Register scratch1, Register scratch2, ++ SaveFPRegsMode save_fp) { ++ Label done; ++ ++ Register address = scratch1; ++ Register value = scratch2; ++ if (emit_debug_code()) { ++ Label ok; ++ lea(address, FieldOperand(object, HeapObject::kMapOffset)); ++ test_b(address, Immediate(kPointerSize - 1)); ++ j(zero, &ok, Label::kNear); ++ int3(); ++ bind(&ok); ++ } ++ ++ DCHECK(!object.is(value)); ++ DCHECK(!object.is(address)); ++ DCHECK(!value.is(address)); ++ AssertNotSmi(object); ++ ++ if (!FLAG_incremental_marking) { ++ return; ++ } ++ ++ // Compute the address. ++ lea(address, FieldOperand(object, HeapObject::kMapOffset)); ++ ++ // A single check of the map's pages interesting flag suffices, since it is ++ // only set during incremental collection, and then it's also guaranteed that ++ // the from object's page's interesting flag is also set. This optimization ++ // relies on the fact that maps can never be in new space. ++ DCHECK(!isolate()->heap()->InNewSpace(*map)); ++ CheckPageFlagForMap(map, ++ MemoryChunk::kPointersToHereAreInterestingMask, ++ zero, ++ &done, ++ Label::kNear); ++ ++ RecordWriteStub stub(isolate(), object, value, address, OMIT_REMEMBERED_SET, ++ save_fp); ++ CallStub(&stub); ++ ++ bind(&done); ++ ++ // Count number of write barriers in generated code. ++ isolate()->counters()->write_barriers_static()->Increment(); ++ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); ++ ++ // Clobber clobbered input registers when running with the debug-code flag ++ // turned on to provoke errors. ++ if (emit_debug_code()) { ++ mov(value, Immediate(bit_cast(kZapValue))); ++ mov(scratch1, Immediate(bit_cast(kZapValue))); ++ mov(scratch2, Immediate(bit_cast(kZapValue))); ++ } ++} ++ ++ ++void MacroAssembler::RecordWrite( ++ Register object, Register address, Register value, SaveFPRegsMode fp_mode, ++ RememberedSetAction remembered_set_action, SmiCheck smi_check, ++ PointersToHereCheck pointers_to_here_check_for_value) { ++ DCHECK(!object.is(value)); ++ DCHECK(!object.is(address)); ++ DCHECK(!value.is(address)); ++ AssertNotSmi(object); ++ ++ if (remembered_set_action == OMIT_REMEMBERED_SET && ++ !FLAG_incremental_marking) { ++ return; ++ } ++ ++ if (emit_debug_code()) { ++ Label ok; ++ cmp(value, Operand(address, 0)); ++ j(equal, &ok, Label::kNear); ++ int3(); ++ bind(&ok); ++ } ++ ++ // First, check if a write barrier is even needed. The tests below ++ // catch stores of Smis and stores into young gen. ++ Label done; ++ ++ if (smi_check == INLINE_SMI_CHECK) { ++ // Skip barrier if writing a smi. ++ JumpIfSmi(value, &done, Label::kNear); ++ } ++ ++ if (pointers_to_here_check_for_value != kPointersToHereAreAlwaysInteresting) { ++ CheckPageFlag(value, ++ value, // Used as scratch. ++ MemoryChunk::kPointersToHereAreInterestingMask, ++ zero, ++ &done, ++ Label::kNear); ++ } ++ CheckPageFlag(object, ++ value, // Used as scratch. ++ MemoryChunk::kPointersFromHereAreInterestingMask, ++ zero, ++ &done, ++ Label::kNear); ++ ++ RecordWriteStub stub(isolate(), object, value, address, remembered_set_action, ++ fp_mode); ++ CallStub(&stub); ++ ++ bind(&done); ++ ++ // Count number of write barriers in generated code. ++ isolate()->counters()->write_barriers_static()->Increment(); ++ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); ++ ++ // Clobber clobbered registers when running with the debug-code flag ++ // turned on to provoke errors. ++ if (emit_debug_code()) { ++ mov(address, Immediate(bit_cast(kZapValue))); ++ mov(value, Immediate(bit_cast(kZapValue))); ++ } ++} ++ ++void MacroAssembler::RecordWriteCodeEntryField(Register js_function, ++ Register code_entry, ++ Register scratch) { ++ const int offset = JSFunction::kCodeEntryOffset; ++ ++ // Since a code entry (value) is always in old space, we don't need to update ++ // remembered set. If incremental marking is off, there is nothing for us to ++ // do. ++ if (!FLAG_incremental_marking) return; ++ ++ DCHECK(!js_function.is(code_entry)); ++ DCHECK(!js_function.is(scratch)); ++ DCHECK(!code_entry.is(scratch)); ++ AssertNotSmi(js_function); ++ ++ if (emit_debug_code()) { ++ Label ok; ++ lea(scratch, FieldOperand(js_function, offset)); ++ cmp(code_entry, Operand(scratch, 0)); ++ j(equal, &ok, Label::kNear); ++ int3(); ++ bind(&ok); ++ } ++ ++ // First, check if a write barrier is even needed. The tests below ++ // catch stores of Smis and stores into young gen. ++ Label done; ++ ++ CheckPageFlag(code_entry, scratch, ++ MemoryChunk::kPointersToHereAreInterestingMask, zero, &done, ++ Label::kNear); ++ CheckPageFlag(js_function, scratch, ++ MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done, ++ Label::kNear); ++ ++ // Save input registers. ++ push(js_function); ++ push(code_entry); ++ ++ const Register dst = scratch; ++ lea(dst, FieldOperand(js_function, offset)); ++ ++ // Save caller-saved registers. ++ PushCallerSaved(kDontSaveFPRegs, js_function, code_entry); ++ ++ int argument_count = 3; ++ PrepareCallCFunction(argument_count, code_entry); ++ mov(Operand(esp, 0 * kPointerSize), js_function); ++ mov(Operand(esp, 1 * kPointerSize), dst); // Slot. ++ mov(Operand(esp, 2 * kPointerSize), ++ Immediate(ExternalReference::isolate_address(isolate()))); ++ ++ { ++ AllowExternalCallThatCantCauseGC scope(this); ++ CallCFunction( ++ ExternalReference::incremental_marking_record_write_code_entry_function( ++ isolate()), ++ argument_count); ++ } ++ ++ // Restore caller-saved registers. ++ PopCallerSaved(kDontSaveFPRegs, js_function, code_entry); ++ ++ // Restore input registers. ++ pop(code_entry); ++ pop(js_function); ++ ++ bind(&done); ++} ++ ++void MacroAssembler::DebugBreak() { ++ Move(eax, Immediate(0)); ++ mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, ++ isolate()))); ++ CEntryStub ces(isolate(), 1); ++ call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); ++} ++ ++void MacroAssembler::ShlPair(Register high, Register low, uint8_t shift) { ++ if (shift >= 32) { ++ mov(high, low); ++ shl(high, shift - 32); ++ xor_(low, low); ++ } else { ++ shld(high, low, shift); ++ shl(low, shift); ++ } ++} ++ ++void MacroAssembler::ShlPair_cl(Register high, Register low) { ++ shld_cl(high, low); ++ shl_cl(low); ++ Label done; ++ test(ecx, Immediate(0x20)); ++ j(equal, &done, Label::kNear); ++ mov(high, low); ++ xor_(low, low); ++ bind(&done); ++} ++ ++void MacroAssembler::ShrPair(Register high, Register low, uint8_t shift) { ++ if (shift >= 32) { ++ mov(low, high); ++ shr(low, shift - 32); ++ xor_(high, high); ++ } else { ++ shrd(high, low, shift); ++ shr(high, shift); ++ } ++} ++ ++void MacroAssembler::ShrPair_cl(Register high, Register low) { ++ shrd_cl(low, high); ++ shr_cl(high); ++ Label done; ++ test(ecx, Immediate(0x20)); ++ j(equal, &done, Label::kNear); ++ mov(low, high); ++ xor_(high, high); ++ bind(&done); ++} ++ ++void MacroAssembler::SarPair(Register high, Register low, uint8_t shift) { ++ if (shift >= 32) { ++ mov(low, high); ++ sar(low, shift - 32); ++ sar(high, 31); ++ } else { ++ shrd(high, low, shift); ++ sar(high, shift); ++ } ++} ++ ++void MacroAssembler::SarPair_cl(Register high, Register low) { ++ shrd_cl(low, high); ++ sar_cl(high); ++ Label done; ++ test(ecx, Immediate(0x20)); ++ j(equal, &done, Label::kNear); ++ mov(low, high); ++ sar(high, 31); ++ bind(&done); ++} ++ ++bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { ++ static const int kMaxImmediateBits = 17; ++ if (!RelocInfo::IsNone(x.rmode_)) return false; ++ return !is_intn(x.x_, kMaxImmediateBits); ++} ++ ++ ++void MacroAssembler::SafeMove(Register dst, const Immediate& x) { ++ if (IsUnsafeImmediate(x) && jit_cookie() != 0) { ++ Move(dst, Immediate(x.x_ ^ jit_cookie())); ++ xor_(dst, jit_cookie()); ++ } else { ++ Move(dst, x); ++ } ++} ++ ++ ++void MacroAssembler::SafePush(const Immediate& x) { ++ if (IsUnsafeImmediate(x) && jit_cookie() != 0) { ++ push(Immediate(x.x_ ^ jit_cookie())); ++ xor_(Operand(esp, 0), Immediate(jit_cookie())); ++ } else { ++ push(x); ++ } ++} ++ ++ ++void MacroAssembler::CmpObjectType(Register heap_object, ++ InstanceType type, ++ Register map) { ++ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); ++ CmpInstanceType(map, type); ++} ++ ++ ++void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { ++ cmpb(FieldOperand(map, Map::kInstanceTypeOffset), Immediate(type)); ++} ++ ++void MacroAssembler::CompareMap(Register obj, Handle map) { ++ cmp(FieldOperand(obj, HeapObject::kMapOffset), map); ++} ++ ++ ++void MacroAssembler::CheckMap(Register obj, ++ Handle map, ++ Label* fail, ++ SmiCheckType smi_check_type) { ++ if (smi_check_type == DO_SMI_CHECK) { ++ JumpIfSmi(obj, fail); ++ } ++ ++ CompareMap(obj, map); ++ j(not_equal, fail); ++} ++ ++ ++Condition MacroAssembler::IsObjectStringType(Register heap_object, ++ Register map, ++ Register instance_type) { ++ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); ++ movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); ++ STATIC_ASSERT(kNotStringTag != 0); ++ test(instance_type, Immediate(kIsNotStringMask)); ++ return zero; ++} ++ ++ ++void MacroAssembler::FCmp() { ++ fucompp(); ++ push(eax); ++ fnstsw_ax(); ++ sahf(); ++ pop(eax); ++} ++ ++ ++void MacroAssembler::FXamMinusZero() { ++ fxam(); ++ push(eax); ++ fnstsw_ax(); ++ and_(eax, Immediate(0x4700)); ++ // For minus zero, C3 == 1 && C1 == 1. ++ cmp(eax, Immediate(0x4200)); ++ pop(eax); ++ fstp(0); ++} ++ ++ ++void MacroAssembler::FXamSign() { ++ fxam(); ++ push(eax); ++ fnstsw_ax(); ++ // For negative value (including -0.0), C1 == 1. ++ and_(eax, Immediate(0x0200)); ++ pop(eax); ++ fstp(0); ++} ++ ++ ++void MacroAssembler::X87CheckIA() { ++ push(eax); ++ fnstsw_ax(); ++ // For #IA, IE == 1 && SF == 0. ++ and_(eax, Immediate(0x0041)); ++ cmp(eax, Immediate(0x0001)); ++ pop(eax); ++} ++ ++ ++// rc=00B, round to nearest. ++// rc=01B, round down. ++// rc=10B, round up. ++// rc=11B, round toward zero. ++void MacroAssembler::X87SetRC(int rc) { ++ sub(esp, Immediate(kPointerSize)); ++ fnstcw(MemOperand(esp, 0)); ++ and_(MemOperand(esp, 0), Immediate(0xF3FF)); ++ or_(MemOperand(esp, 0), Immediate(rc)); ++ fldcw(MemOperand(esp, 0)); ++ add(esp, Immediate(kPointerSize)); ++} ++ ++ ++void MacroAssembler::X87SetFPUCW(int cw) { ++ RecordComment("-- X87SetFPUCW start --"); ++ push(Immediate(cw)); ++ fldcw(MemOperand(esp, 0)); ++ add(esp, Immediate(kPointerSize)); ++ RecordComment("-- X87SetFPUCW end--"); ++} ++ ++ ++void MacroAssembler::AssertSmi(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(equal, kOperandIsNotASmi); ++ } ++} ++ ++ ++void MacroAssembler::AssertFunction(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(not_equal, kOperandIsASmiAndNotAFunction); ++ Push(object); ++ CmpObjectType(object, JS_FUNCTION_TYPE, object); ++ Pop(object); ++ Check(equal, kOperandIsNotAFunction); ++ } ++} ++ ++ ++void MacroAssembler::AssertBoundFunction(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(not_equal, kOperandIsASmiAndNotABoundFunction); ++ Push(object); ++ CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); ++ Pop(object); ++ Check(equal, kOperandIsNotABoundFunction); ++ } ++} ++ ++void MacroAssembler::AssertGeneratorObject(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); ++ Push(object); ++ CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); ++ Pop(object); ++ Check(equal, kOperandIsNotAGeneratorObject); ++ } ++} ++ ++void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { ++ if (emit_debug_code()) { ++ Label done_checking; ++ AssertNotSmi(object); ++ cmp(object, isolate()->factory()->undefined_value()); ++ j(equal, &done_checking); ++ cmp(FieldOperand(object, 0), ++ Immediate(isolate()->factory()->allocation_site_map())); ++ Assert(equal, kExpectedUndefinedOrCell); ++ bind(&done_checking); ++ } ++} ++ ++ ++void MacroAssembler::AssertNotSmi(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(not_equal, kOperandIsASmi); ++ } ++} ++ ++void MacroAssembler::StubPrologue(StackFrame::Type type) { ++ push(ebp); // Caller's frame pointer. ++ mov(ebp, esp); ++ push(Immediate(Smi::FromInt(type))); ++} ++ ++ ++void MacroAssembler::Prologue(bool code_pre_aging) { ++ PredictableCodeSizeScope predictible_code_size_scope(this, ++ kNoCodeAgeSequenceLength); ++ if (code_pre_aging) { ++ // Pre-age the code. ++ call(isolate()->builtins()->MarkCodeAsExecutedOnce(), ++ RelocInfo::CODE_AGE_SEQUENCE); ++ Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); ++ } else { ++ push(ebp); // Caller's frame pointer. ++ mov(ebp, esp); ++ push(esi); // Callee's context. ++ push(edi); // Callee's JS function. ++ } ++} ++ ++void MacroAssembler::EmitLoadFeedbackVector(Register vector) { ++ mov(vector, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ mov(vector, FieldOperand(vector, JSFunction::kFeedbackVectorOffset)); ++ mov(vector, FieldOperand(vector, Cell::kValueOffset)); ++} ++ ++ ++void MacroAssembler::EnterFrame(StackFrame::Type type, ++ bool load_constant_pool_pointer_reg) { ++ // Out-of-line constant pool not implemented on x87. ++ UNREACHABLE(); ++} ++ ++ ++void MacroAssembler::EnterFrame(StackFrame::Type type) { ++ push(ebp); ++ mov(ebp, esp); ++ push(Immediate(Smi::FromInt(type))); ++ if (type == StackFrame::INTERNAL) { ++ push(Immediate(CodeObject())); ++ } ++ if (emit_debug_code()) { ++ cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value())); ++ Check(not_equal, kCodeObjectNotProperlyPatched); ++ } ++} ++ ++ ++void MacroAssembler::LeaveFrame(StackFrame::Type type) { ++ if (emit_debug_code()) { ++ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), ++ Immediate(Smi::FromInt(type))); ++ Check(equal, kStackFrameTypesMustMatch); ++ } ++ leave(); ++} ++ ++void MacroAssembler::EnterBuiltinFrame(Register context, Register target, ++ Register argc) { ++ Push(ebp); ++ Move(ebp, esp); ++ Push(context); ++ Push(target); ++ Push(argc); ++} ++ ++void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, ++ Register argc) { ++ Pop(argc); ++ Pop(target); ++ Pop(context); ++ leave(); ++} ++ ++void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { ++ DCHECK(frame_type == StackFrame::EXIT || ++ frame_type == StackFrame::BUILTIN_EXIT); ++ ++ // Set up the frame structure on the stack. ++ DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); ++ DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); ++ DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); ++ push(ebp); ++ mov(ebp, esp); ++ ++ // Reserve room for entry stack pointer and push the code object. ++ push(Immediate(Smi::FromInt(frame_type))); ++ DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset); ++ push(Immediate(0)); // Saved entry sp, patched before call. ++ DCHECK_EQ(-3 * kPointerSize, ExitFrameConstants::kCodeOffset); ++ push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot. ++ ++ // Save the frame pointer and the context in top. ++ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, ++ isolate()); ++ ExternalReference context_address(IsolateAddressId::kContextAddress, ++ isolate()); ++ ExternalReference c_function_address(IsolateAddressId::kCFunctionAddress, ++ isolate()); ++ mov(Operand::StaticVariable(c_entry_fp_address), ebp); ++ mov(Operand::StaticVariable(context_address), esi); ++ mov(Operand::StaticVariable(c_function_address), ebx); ++} ++ ++ ++void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { ++ // Optionally save FPU state. ++ if (save_doubles) { ++ // Store FPU state to m108byte. ++ int space = 108 + argc * kPointerSize; ++ sub(esp, Immediate(space)); ++ const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp; ++ fnsave(MemOperand(ebp, offset - 108)); ++ } else { ++ sub(esp, Immediate(argc * kPointerSize)); ++ } ++ ++ // Get the required frame alignment for the OS. ++ const int kFrameAlignment = base::OS::ActivationFrameAlignment(); ++ if (kFrameAlignment > 0) { ++ DCHECK(base::bits::IsPowerOfTwo(kFrameAlignment)); ++ and_(esp, -kFrameAlignment); ++ } ++ ++ // Patch the saved entry sp. ++ mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); ++} ++ ++void MacroAssembler::EnterExitFrame(int argc, bool save_doubles, ++ StackFrame::Type frame_type) { ++ EnterExitFramePrologue(frame_type); ++ ++ // Set up argc and argv in callee-saved registers. ++ int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; ++ mov(edi, eax); ++ lea(esi, Operand(ebp, eax, times_4, offset)); ++ ++ // Reserve space for argc, argv and isolate. ++ EnterExitFrameEpilogue(argc, save_doubles); ++} ++ ++ ++void MacroAssembler::EnterApiExitFrame(int argc) { ++ EnterExitFramePrologue(StackFrame::EXIT); ++ EnterExitFrameEpilogue(argc, false); ++} ++ ++ ++void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { ++ // Optionally restore FPU state. ++ if (save_doubles) { ++ const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp; ++ frstor(MemOperand(ebp, offset - 108)); ++ } ++ ++ if (pop_arguments) { ++ // Get the return address from the stack and restore the frame pointer. ++ mov(ecx, Operand(ebp, 1 * kPointerSize)); ++ mov(ebp, Operand(ebp, 0 * kPointerSize)); ++ ++ // Pop the arguments and the receiver from the caller stack. ++ lea(esp, Operand(esi, 1 * kPointerSize)); ++ ++ // Push the return address to get ready to return. ++ push(ecx); ++ } else { ++ // Otherwise just leave the exit frame. ++ leave(); ++ } ++ ++ LeaveExitFrameEpilogue(true); ++} ++ ++ ++void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) { ++ // Restore current context from top and clear it in debug mode. ++ ExternalReference context_address(IsolateAddressId::kContextAddress, ++ isolate()); ++ if (restore_context) { ++ mov(esi, Operand::StaticVariable(context_address)); ++ } ++#ifdef DEBUG ++ mov(Operand::StaticVariable(context_address), Immediate(0)); ++#endif ++ ++ // Clear the top frame. ++ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, ++ isolate()); ++ mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0)); ++} ++ ++ ++void MacroAssembler::LeaveApiExitFrame(bool restore_context) { ++ mov(esp, ebp); ++ pop(ebp); ++ ++ LeaveExitFrameEpilogue(restore_context); ++} ++ ++ ++void MacroAssembler::PushStackHandler() { ++ // Adjust this code if not the case. ++ STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); ++ STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); ++ ++ // Link the current handler as the next handler. ++ ExternalReference handler_address(IsolateAddressId::kHandlerAddress, ++ isolate()); ++ push(Operand::StaticVariable(handler_address)); ++ ++ // Set this new handler as the current one. ++ mov(Operand::StaticVariable(handler_address), esp); ++} ++ ++ ++void MacroAssembler::PopStackHandler() { ++ STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); ++ ExternalReference handler_address(IsolateAddressId::kHandlerAddress, ++ isolate()); ++ pop(Operand::StaticVariable(handler_address)); ++ add(esp, Immediate(StackHandlerConstants::kSize - kPointerSize)); ++} ++ ++ ++// Compute the hash code from the untagged key. This must be kept in sync with ++// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in ++// code-stub-hydrogen.cc ++// ++// Note: r0 will contain hash code ++void MacroAssembler::GetNumberHash(Register r0, Register scratch) { ++ // Xor original key with a seed. ++ if (serializer_enabled()) { ++ ExternalReference roots_array_start = ++ ExternalReference::roots_array_start(isolate()); ++ mov(scratch, Immediate(Heap::kHashSeedRootIndex)); ++ mov(scratch, ++ Operand::StaticArray(scratch, times_pointer_size, roots_array_start)); ++ SmiUntag(scratch); ++ xor_(r0, scratch); ++ } else { ++ int32_t seed = isolate()->heap()->HashSeed(); ++ xor_(r0, Immediate(seed)); ++ } ++ ++ // hash = ~hash + (hash << 15); ++ mov(scratch, r0); ++ not_(r0); ++ shl(scratch, 15); ++ add(r0, scratch); ++ // hash = hash ^ (hash >> 12); ++ mov(scratch, r0); ++ shr(scratch, 12); ++ xor_(r0, scratch); ++ // hash = hash + (hash << 2); ++ lea(r0, Operand(r0, r0, times_4, 0)); ++ // hash = hash ^ (hash >> 4); ++ mov(scratch, r0); ++ shr(scratch, 4); ++ xor_(r0, scratch); ++ // hash = hash * 2057; ++ imul(r0, r0, 2057); ++ // hash = hash ^ (hash >> 16); ++ mov(scratch, r0); ++ shr(scratch, 16); ++ xor_(r0, scratch); ++ and_(r0, 0x3fffffff); ++} ++ ++void MacroAssembler::LoadAllocationTopHelper(Register result, ++ Register scratch, ++ AllocationFlags flags) { ++ ExternalReference allocation_top = ++ AllocationUtils::GetAllocationTopReference(isolate(), flags); ++ ++ // Just return if allocation top is already known. ++ if ((flags & RESULT_CONTAINS_TOP) != 0) { ++ // No use of scratch if allocation top is provided. ++ DCHECK(scratch.is(no_reg)); ++#ifdef DEBUG ++ // Assert that result actually contains top on entry. ++ cmp(result, Operand::StaticVariable(allocation_top)); ++ Check(equal, kUnexpectedAllocationTop); ++#endif ++ return; ++ } ++ ++ // Move address of new object to result. Use scratch register if available. ++ if (scratch.is(no_reg)) { ++ mov(result, Operand::StaticVariable(allocation_top)); ++ } else { ++ mov(scratch, Immediate(allocation_top)); ++ mov(result, Operand(scratch, 0)); ++ } ++} ++ ++ ++void MacroAssembler::UpdateAllocationTopHelper(Register result_end, ++ Register scratch, ++ AllocationFlags flags) { ++ if (emit_debug_code()) { ++ test(result_end, Immediate(kObjectAlignmentMask)); ++ Check(zero, kUnalignedAllocationInNewSpace); ++ } ++ ++ ExternalReference allocation_top = ++ AllocationUtils::GetAllocationTopReference(isolate(), flags); ++ ++ // Update new top. Use scratch if available. ++ if (scratch.is(no_reg)) { ++ mov(Operand::StaticVariable(allocation_top), result_end); ++ } else { ++ mov(Operand(scratch, 0), result_end); ++ } ++} ++ ++ ++void MacroAssembler::Allocate(int object_size, ++ Register result, ++ Register result_end, ++ Register scratch, ++ Label* gc_required, ++ AllocationFlags flags) { ++ DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); ++ DCHECK(object_size <= kMaxRegularHeapObjectSize); ++ if (!FLAG_inline_new) { ++ if (emit_debug_code()) { ++ // Trash the registers to simulate an allocation failure. ++ mov(result, Immediate(0x7091)); ++ if (result_end.is_valid()) { ++ mov(result_end, Immediate(0x7191)); ++ } ++ if (scratch.is_valid()) { ++ mov(scratch, Immediate(0x7291)); ++ } ++ } ++ jmp(gc_required); ++ return; ++ } ++ DCHECK(!result.is(result_end)); ++ ++ // Load address of new object into result. ++ LoadAllocationTopHelper(result, scratch, flags); ++ ++ ExternalReference allocation_limit = ++ AllocationUtils::GetAllocationLimitReference(isolate(), flags); ++ ++ // Align the next allocation. Storing the filler map without checking top is ++ // safe in new-space because the limit of the heap is aligned there. ++ if ((flags & DOUBLE_ALIGNMENT) != 0) { ++ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); ++ Label aligned; ++ test(result, Immediate(kDoubleAlignmentMask)); ++ j(zero, &aligned, Label::kNear); ++ if ((flags & PRETENURE) != 0) { ++ cmp(result, Operand::StaticVariable(allocation_limit)); ++ j(above_equal, gc_required); ++ } ++ mov(Operand(result, 0), ++ Immediate(isolate()->factory()->one_pointer_filler_map())); ++ add(result, Immediate(kDoubleSize / 2)); ++ bind(&aligned); ++ } ++ ++ // Calculate new top and bail out if space is exhausted. ++ Register top_reg = result_end.is_valid() ? result_end : result; ++ ++ if (!top_reg.is(result)) { ++ mov(top_reg, result); ++ } ++ add(top_reg, Immediate(object_size)); ++ cmp(top_reg, Operand::StaticVariable(allocation_limit)); ++ j(above, gc_required); ++ ++ UpdateAllocationTopHelper(top_reg, scratch, flags); ++ ++ if (top_reg.is(result)) { ++ sub(result, Immediate(object_size - kHeapObjectTag)); ++ } else { ++ // Tag the result. ++ DCHECK(kHeapObjectTag == 1); ++ inc(result); ++ } ++} ++ ++ ++void MacroAssembler::Allocate(int header_size, ++ ScaleFactor element_size, ++ Register element_count, ++ RegisterValueType element_count_type, ++ Register result, ++ Register result_end, ++ Register scratch, ++ Label* gc_required, ++ AllocationFlags flags) { ++ DCHECK((flags & SIZE_IN_WORDS) == 0); ++ if (!FLAG_inline_new) { ++ if (emit_debug_code()) { ++ // Trash the registers to simulate an allocation failure. ++ mov(result, Immediate(0x7091)); ++ mov(result_end, Immediate(0x7191)); ++ if (scratch.is_valid()) { ++ mov(scratch, Immediate(0x7291)); ++ } ++ // Register element_count is not modified by the function. ++ } ++ jmp(gc_required); ++ return; ++ } ++ DCHECK(!result.is(result_end)); ++ ++ // Load address of new object into result. ++ LoadAllocationTopHelper(result, scratch, flags); ++ ++ ExternalReference allocation_limit = ++ AllocationUtils::GetAllocationLimitReference(isolate(), flags); ++ ++ // Align the next allocation. Storing the filler map without checking top is ++ // safe in new-space because the limit of the heap is aligned there. ++ if ((flags & DOUBLE_ALIGNMENT) != 0) { ++ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); ++ Label aligned; ++ test(result, Immediate(kDoubleAlignmentMask)); ++ j(zero, &aligned, Label::kNear); ++ if ((flags & PRETENURE) != 0) { ++ cmp(result, Operand::StaticVariable(allocation_limit)); ++ j(above_equal, gc_required); ++ } ++ mov(Operand(result, 0), ++ Immediate(isolate()->factory()->one_pointer_filler_map())); ++ add(result, Immediate(kDoubleSize / 2)); ++ bind(&aligned); ++ } ++ ++ // Calculate new top and bail out if space is exhausted. ++ // We assume that element_count*element_size + header_size does not ++ // overflow. ++ if (element_count_type == REGISTER_VALUE_IS_SMI) { ++ STATIC_ASSERT(static_cast(times_2 - 1) == times_1); ++ STATIC_ASSERT(static_cast(times_4 - 1) == times_2); ++ STATIC_ASSERT(static_cast(times_8 - 1) == times_4); ++ DCHECK(element_size >= times_2); ++ DCHECK(kSmiTagSize == 1); ++ element_size = static_cast(element_size - 1); ++ } else { ++ DCHECK(element_count_type == REGISTER_VALUE_IS_INT32); ++ } ++ lea(result_end, Operand(element_count, element_size, header_size)); ++ add(result_end, result); ++ j(carry, gc_required); ++ cmp(result_end, Operand::StaticVariable(allocation_limit)); ++ j(above, gc_required); ++ ++ // Tag result. ++ DCHECK(kHeapObjectTag == 1); ++ inc(result); ++ ++ // Update allocation top. ++ UpdateAllocationTopHelper(result_end, scratch, flags); ++} ++ ++void MacroAssembler::Allocate(Register object_size, ++ Register result, ++ Register result_end, ++ Register scratch, ++ Label* gc_required, ++ AllocationFlags flags) { ++ DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); ++ if (!FLAG_inline_new) { ++ if (emit_debug_code()) { ++ // Trash the registers to simulate an allocation failure. ++ mov(result, Immediate(0x7091)); ++ mov(result_end, Immediate(0x7191)); ++ if (scratch.is_valid()) { ++ mov(scratch, Immediate(0x7291)); ++ } ++ // object_size is left unchanged by this function. ++ } ++ jmp(gc_required); ++ return; ++ } ++ DCHECK(!result.is(result_end)); ++ ++ // Load address of new object into result. ++ LoadAllocationTopHelper(result, scratch, flags); ++ ++ ExternalReference allocation_limit = ++ AllocationUtils::GetAllocationLimitReference(isolate(), flags); ++ ++ // Align the next allocation. Storing the filler map without checking top is ++ // safe in new-space because the limit of the heap is aligned there. ++ if ((flags & DOUBLE_ALIGNMENT) != 0) { ++ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); ++ Label aligned; ++ test(result, Immediate(kDoubleAlignmentMask)); ++ j(zero, &aligned, Label::kNear); ++ if ((flags & PRETENURE) != 0) { ++ cmp(result, Operand::StaticVariable(allocation_limit)); ++ j(above_equal, gc_required); ++ } ++ mov(Operand(result, 0), ++ Immediate(isolate()->factory()->one_pointer_filler_map())); ++ add(result, Immediate(kDoubleSize / 2)); ++ bind(&aligned); ++ } ++ ++ // Calculate new top and bail out if space is exhausted. ++ if (!object_size.is(result_end)) { ++ mov(result_end, object_size); ++ } ++ add(result_end, result); ++ cmp(result_end, Operand::StaticVariable(allocation_limit)); ++ j(above, gc_required); ++ ++ // Tag result. ++ DCHECK(kHeapObjectTag == 1); ++ inc(result); ++ ++ UpdateAllocationTopHelper(result_end, scratch, flags); ++} ++ ++void MacroAssembler::AllocateHeapNumber(Register result, ++ Register scratch1, ++ Register scratch2, ++ Label* gc_required, ++ MutableMode mode) { ++ // Allocate heap number in new space. ++ Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, ++ NO_ALLOCATION_FLAGS); ++ ++ Handle map = mode == MUTABLE ++ ? isolate()->factory()->mutable_heap_number_map() ++ : isolate()->factory()->heap_number_map(); ++ ++ // Set the map. ++ mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map)); ++} ++ ++void MacroAssembler::AllocateJSValue(Register result, Register constructor, ++ Register value, Register scratch, ++ Label* gc_required) { ++ DCHECK(!result.is(constructor)); ++ DCHECK(!result.is(scratch)); ++ DCHECK(!result.is(value)); ++ ++ // Allocate JSValue in new space. ++ Allocate(JSValue::kSize, result, scratch, no_reg, gc_required, ++ NO_ALLOCATION_FLAGS); ++ ++ // Initialize the JSValue. ++ LoadGlobalFunctionInitialMap(constructor, scratch); ++ mov(FieldOperand(result, HeapObject::kMapOffset), scratch); ++ LoadRoot(scratch, Heap::kEmptyFixedArrayRootIndex); ++ mov(FieldOperand(result, JSObject::kPropertiesOrHashOffset), scratch); ++ mov(FieldOperand(result, JSObject::kElementsOffset), scratch); ++ mov(FieldOperand(result, JSValue::kValueOffset), value); ++ STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize); ++} ++ ++void MacroAssembler::InitializeFieldsWithFiller(Register current_address, ++ Register end_address, ++ Register filler) { ++ Label loop, entry; ++ jmp(&entry, Label::kNear); ++ bind(&loop); ++ mov(Operand(current_address, 0), filler); ++ add(current_address, Immediate(kPointerSize)); ++ bind(&entry); ++ cmp(current_address, end_address); ++ j(below, &loop, Label::kNear); ++} ++ ++ ++void MacroAssembler::BooleanBitTest(Register object, ++ int field_offset, ++ int bit_index) { ++ bit_index += kSmiTagSize + kSmiShiftSize; ++ DCHECK(base::bits::IsPowerOfTwo(kBitsPerByte)); ++ int byte_index = bit_index / kBitsPerByte; ++ int byte_bit_index = bit_index & (kBitsPerByte - 1); ++ test_b(FieldOperand(object, field_offset + byte_index), ++ Immediate(1 << byte_bit_index)); ++} ++ ++void MacroAssembler::GetMapConstructor(Register result, Register map, ++ Register temp) { ++ Label done, loop; ++ mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); ++ bind(&loop); ++ JumpIfSmi(result, &done, Label::kNear); ++ CmpObjectType(result, MAP_TYPE, temp); ++ j(not_equal, &done, Label::kNear); ++ mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); ++ jmp(&loop); ++ bind(&done); ++} ++ ++void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { ++ DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. ++ call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); ++} ++ ++ ++void MacroAssembler::TailCallStub(CodeStub* stub) { ++ jmp(stub->GetCode(), RelocInfo::CODE_TARGET); ++} ++ ++ ++ ++bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { ++ return has_frame_ || !stub->SometimesSetsUpAFrame(); ++} ++ ++void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments, ++ SaveFPRegsMode save_doubles) { ++ // If the expected number of arguments of the runtime function is ++ // constant, we check that the actual number of arguments match the ++ // expectation. ++ CHECK(f->nargs < 0 || f->nargs == num_arguments); ++ ++ // TODO(1236192): Most runtime routines don't need the number of ++ // arguments passed in because it is constant. At some point we ++ // should remove this need and make the runtime routine entry code ++ // smarter. ++ Move(eax, Immediate(num_arguments)); ++ mov(ebx, Immediate(ExternalReference(f, isolate()))); ++ CEntryStub ces(isolate(), 1, save_doubles); ++ CallStub(&ces); ++} ++ ++ ++void MacroAssembler::CallExternalReference(ExternalReference ref, ++ int num_arguments) { ++ mov(eax, Immediate(num_arguments)); ++ mov(ebx, Immediate(ref)); ++ ++ CEntryStub stub(isolate(), 1); ++ CallStub(&stub); ++} ++ ++ ++void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { ++ // ----------- S t a t e ------------- ++ // -- esp[0] : return address ++ // -- esp[8] : argument num_arguments - 1 ++ // ... ++ // -- esp[8 * num_arguments] : argument 0 (receiver) ++ // ++ // For runtime functions with variable arguments: ++ // -- eax : number of arguments ++ // ----------------------------------- ++ ++ const Runtime::Function* function = Runtime::FunctionForId(fid); ++ DCHECK_EQ(1, function->result_size); ++ if (function->nargs >= 0) { ++ // TODO(1236192): Most runtime routines don't need the number of ++ // arguments passed in because it is constant. At some point we ++ // should remove this need and make the runtime routine entry code ++ // smarter. ++ mov(eax, Immediate(function->nargs)); ++ } ++ JumpToExternalReference(ExternalReference(fid, isolate())); ++} ++ ++void MacroAssembler::JumpToExternalReference(const ExternalReference& ext, ++ bool builtin_exit_frame) { ++ // Set the entry point and jump to the C entry runtime stub. ++ mov(ebx, Immediate(ext)); ++ CEntryStub ces(isolate(), 1, kDontSaveFPRegs, kArgvOnStack, ++ builtin_exit_frame); ++ jmp(ces.GetCode(), RelocInfo::CODE_TARGET); ++} ++ ++void MacroAssembler::PrepareForTailCall( ++ const ParameterCount& callee_args_count, Register caller_args_count_reg, ++ Register scratch0, Register scratch1, ReturnAddressState ra_state, ++ int number_of_temp_values_after_return_address) { ++#if DEBUG ++ if (callee_args_count.is_reg()) { ++ DCHECK(!AreAliased(callee_args_count.reg(), caller_args_count_reg, scratch0, ++ scratch1)); ++ } else { ++ DCHECK(!AreAliased(caller_args_count_reg, scratch0, scratch1)); ++ } ++ DCHECK(ra_state != ReturnAddressState::kNotOnStack || ++ number_of_temp_values_after_return_address == 0); ++#endif ++ ++ // Calculate the destination address where we will put the return address ++ // after we drop current frame. ++ Register new_sp_reg = scratch0; ++ if (callee_args_count.is_reg()) { ++ sub(caller_args_count_reg, callee_args_count.reg()); ++ lea(new_sp_reg, ++ Operand(ebp, caller_args_count_reg, times_pointer_size, ++ StandardFrameConstants::kCallerPCOffset - ++ number_of_temp_values_after_return_address * kPointerSize)); ++ } else { ++ lea(new_sp_reg, Operand(ebp, caller_args_count_reg, times_pointer_size, ++ StandardFrameConstants::kCallerPCOffset - ++ (callee_args_count.immediate() + ++ number_of_temp_values_after_return_address) * ++ kPointerSize)); ++ } ++ ++ if (FLAG_debug_code) { ++ cmp(esp, new_sp_reg); ++ Check(below, kStackAccessBelowStackPointer); ++ } ++ ++ // Copy return address from caller's frame to current frame's return address ++ // to avoid its trashing and let the following loop copy it to the right ++ // place. ++ Register tmp_reg = scratch1; ++ if (ra_state == ReturnAddressState::kOnStack) { ++ mov(tmp_reg, Operand(ebp, StandardFrameConstants::kCallerPCOffset)); ++ mov(Operand(esp, number_of_temp_values_after_return_address * kPointerSize), ++ tmp_reg); ++ } else { ++ DCHECK(ReturnAddressState::kNotOnStack == ra_state); ++ DCHECK_EQ(0, number_of_temp_values_after_return_address); ++ Push(Operand(ebp, StandardFrameConstants::kCallerPCOffset)); ++ } ++ ++ // Restore caller's frame pointer now as it could be overwritten by ++ // the copying loop. ++ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); ++ ++ // +2 here is to copy both receiver and return address. ++ Register count_reg = caller_args_count_reg; ++ if (callee_args_count.is_reg()) { ++ lea(count_reg, Operand(callee_args_count.reg(), ++ 2 + number_of_temp_values_after_return_address)); ++ } else { ++ mov(count_reg, Immediate(callee_args_count.immediate() + 2 + ++ number_of_temp_values_after_return_address)); ++ // TODO(ishell): Unroll copying loop for small immediate values. ++ } ++ ++ // Now copy callee arguments to the caller frame going backwards to avoid ++ // callee arguments corruption (source and destination areas could overlap). ++ Label loop, entry; ++ jmp(&entry, Label::kNear); ++ bind(&loop); ++ dec(count_reg); ++ mov(tmp_reg, Operand(esp, count_reg, times_pointer_size, 0)); ++ mov(Operand(new_sp_reg, count_reg, times_pointer_size, 0), tmp_reg); ++ bind(&entry); ++ cmp(count_reg, Immediate(0)); ++ j(not_equal, &loop, Label::kNear); ++ ++ // Leave current frame. ++ mov(esp, new_sp_reg); ++} ++ ++void MacroAssembler::InvokePrologue(const ParameterCount& expected, ++ const ParameterCount& actual, ++ Label* done, ++ bool* definitely_mismatches, ++ InvokeFlag flag, ++ Label::Distance done_near, ++ const CallWrapper& call_wrapper) { ++ bool definitely_matches = false; ++ *definitely_mismatches = false; ++ Label invoke; ++ if (expected.is_immediate()) { ++ DCHECK(actual.is_immediate()); ++ mov(eax, actual.immediate()); ++ if (expected.immediate() == actual.immediate()) { ++ definitely_matches = true; ++ } else { ++ const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel; ++ if (expected.immediate() == sentinel) { ++ // Don't worry about adapting arguments for builtins that ++ // don't want that done. Skip adaption code by making it look ++ // like we have a match between expected and actual number of ++ // arguments. ++ definitely_matches = true; ++ } else { ++ *definitely_mismatches = true; ++ mov(ebx, expected.immediate()); ++ } ++ } ++ } else { ++ if (actual.is_immediate()) { ++ // Expected is in register, actual is immediate. This is the ++ // case when we invoke function values without going through the ++ // IC mechanism. ++ mov(eax, actual.immediate()); ++ cmp(expected.reg(), actual.immediate()); ++ j(equal, &invoke); ++ DCHECK(expected.reg().is(ebx)); ++ } else if (!expected.reg().is(actual.reg())) { ++ // Both expected and actual are in (different) registers. This ++ // is the case when we invoke functions using call and apply. ++ cmp(expected.reg(), actual.reg()); ++ j(equal, &invoke); ++ DCHECK(actual.reg().is(eax)); ++ DCHECK(expected.reg().is(ebx)); ++ } else { ++ Move(eax, actual.reg()); ++ } ++ } ++ ++ if (!definitely_matches) { ++ Handle adaptor = ++ isolate()->builtins()->ArgumentsAdaptorTrampoline(); ++ if (flag == CALL_FUNCTION) { ++ call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET)); ++ call(adaptor, RelocInfo::CODE_TARGET); ++ call_wrapper.AfterCall(); ++ if (!*definitely_mismatches) { ++ jmp(done, done_near); ++ } ++ } else { ++ jmp(adaptor, RelocInfo::CODE_TARGET); ++ } ++ bind(&invoke); ++ } ++} ++ ++void MacroAssembler::CheckDebugHook(Register fun, Register new_target, ++ const ParameterCount& expected, ++ const ParameterCount& actual) { ++ Label skip_hook; ++ ExternalReference debug_hook_active = ++ ExternalReference::debug_hook_on_function_call_address(isolate()); ++ cmpb(Operand::StaticVariable(debug_hook_active), Immediate(0)); ++ j(equal, &skip_hook); ++ { ++ FrameScope frame(this, ++ has_frame() ? StackFrame::NONE : StackFrame::INTERNAL); ++ if (expected.is_reg()) { ++ SmiTag(expected.reg()); ++ Push(expected.reg()); ++ } ++ if (actual.is_reg()) { ++ SmiTag(actual.reg()); ++ Push(actual.reg()); ++ } ++ if (new_target.is_valid()) { ++ Push(new_target); ++ } ++ Push(fun); ++ Push(fun); ++ CallRuntime(Runtime::kDebugOnFunctionCall); ++ Pop(fun); ++ if (new_target.is_valid()) { ++ Pop(new_target); ++ } ++ if (actual.is_reg()) { ++ Pop(actual.reg()); ++ SmiUntag(actual.reg()); ++ } ++ if (expected.is_reg()) { ++ Pop(expected.reg()); ++ SmiUntag(expected.reg()); ++ } ++ } ++ bind(&skip_hook); ++} ++ ++ ++void MacroAssembler::InvokeFunctionCode(Register function, Register new_target, ++ const ParameterCount& expected, ++ const ParameterCount& actual, ++ InvokeFlag flag, ++ const CallWrapper& call_wrapper) { ++ // You can't call a function without a valid frame. ++ DCHECK(flag == JUMP_FUNCTION || has_frame()); ++ DCHECK(function.is(edi)); ++ DCHECK_IMPLIES(new_target.is_valid(), new_target.is(edx)); ++ ++ if (call_wrapper.NeedsDebugHookCheck()) { ++ CheckDebugHook(function, new_target, expected, actual); ++ } ++ ++ // Clear the new.target register if not given. ++ if (!new_target.is_valid()) { ++ mov(edx, isolate()->factory()->undefined_value()); ++ } ++ ++ Label done; ++ bool definitely_mismatches = false; ++ InvokePrologue(expected, actual, &done, &definitely_mismatches, flag, ++ Label::kNear, call_wrapper); ++ if (!definitely_mismatches) { ++ // We call indirectly through the code field in the function to ++ // allow recompilation to take effect without changing any of the ++ // call sites. ++ Operand code = FieldOperand(function, JSFunction::kCodeEntryOffset); ++ if (flag == CALL_FUNCTION) { ++ call_wrapper.BeforeCall(CallSize(code)); ++ call(code); ++ call_wrapper.AfterCall(); ++ } else { ++ DCHECK(flag == JUMP_FUNCTION); ++ jmp(code); ++ } ++ bind(&done); ++ } ++} ++ ++ ++void MacroAssembler::InvokeFunction(Register fun, Register new_target, ++ const ParameterCount& actual, ++ InvokeFlag flag, ++ const CallWrapper& call_wrapper) { ++ // You can't call a function without a valid frame. ++ DCHECK(flag == JUMP_FUNCTION || has_frame()); ++ ++ DCHECK(fun.is(edi)); ++ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); ++ ++ ParameterCount expected(ebx); ++ InvokeFunctionCode(edi, new_target, expected, actual, flag, call_wrapper); ++} ++ ++ ++void MacroAssembler::InvokeFunction(Register fun, ++ const ParameterCount& expected, ++ const ParameterCount& actual, ++ InvokeFlag flag, ++ const CallWrapper& call_wrapper) { ++ // You can't call a function without a valid frame. ++ DCHECK(flag == JUMP_FUNCTION || has_frame()); ++ ++ DCHECK(fun.is(edi)); ++ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ ++ InvokeFunctionCode(edi, no_reg, expected, actual, flag, call_wrapper); ++} ++ ++ ++void MacroAssembler::InvokeFunction(Handle function, ++ const ParameterCount& expected, ++ const ParameterCount& actual, ++ InvokeFlag flag, ++ const CallWrapper& call_wrapper) { ++ LoadHeapObject(edi, function); ++ InvokeFunction(edi, expected, actual, flag, call_wrapper); ++} ++ ++ ++void MacroAssembler::LoadContext(Register dst, int context_chain_length) { ++ if (context_chain_length > 0) { ++ // Move up the chain of contexts to the context containing the slot. ++ mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX))); ++ for (int i = 1; i < context_chain_length; i++) { ++ mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); ++ } ++ } else { ++ // Slot is in the current function context. Move it into the ++ // destination register in case we store into it (the write barrier ++ // cannot be allowed to destroy the context in esi). ++ mov(dst, esi); ++ } ++ ++ // We should not have found a with context by walking the context chain ++ // (i.e., the static scope chain and runtime context chain do not agree). ++ // A variable occurring in such a scope should have slot type LOOKUP and ++ // not CONTEXT. ++ if (emit_debug_code()) { ++ cmp(FieldOperand(dst, HeapObject::kMapOffset), ++ isolate()->factory()->with_context_map()); ++ Check(not_equal, kVariableResolvedToWithContext); ++ } ++} ++ ++ ++void MacroAssembler::LoadGlobalProxy(Register dst) { ++ mov(dst, NativeContextOperand()); ++ mov(dst, ContextOperand(dst, Context::GLOBAL_PROXY_INDEX)); ++} ++ ++void MacroAssembler::LoadGlobalFunction(int index, Register function) { ++ // Load the native context from the current context. ++ mov(function, NativeContextOperand()); ++ // Load the function from the native context. ++ mov(function, ContextOperand(function, index)); ++} ++ ++ ++void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, ++ Register map) { ++ // Load the initial map. The global functions all have initial maps. ++ mov(map, FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); ++ if (emit_debug_code()) { ++ Label ok, fail; ++ CheckMap(map, isolate()->factory()->meta_map(), &fail, DO_SMI_CHECK); ++ jmp(&ok); ++ bind(&fail); ++ Abort(kGlobalFunctionsMustHaveInitialMap); ++ bind(&ok); ++ } ++} ++ ++ ++// Store the value in register src in the safepoint register stack ++// slot for register dst. ++void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Register src) { ++ mov(SafepointRegisterSlot(dst), src); ++} ++ ++ ++void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Immediate src) { ++ mov(SafepointRegisterSlot(dst), src); ++} ++ ++ ++void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) { ++ mov(dst, SafepointRegisterSlot(src)); ++} ++ ++ ++Operand MacroAssembler::SafepointRegisterSlot(Register reg) { ++ return Operand(esp, SafepointRegisterStackIndex(reg.code()) * kPointerSize); ++} ++ ++ ++int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { ++ // The registers are pushed starting with the lowest encoding, ++ // which means that lowest encodings are furthest away from ++ // the stack pointer. ++ DCHECK(reg_code >= 0 && reg_code < kNumSafepointRegisters); ++ return kNumSafepointRegisters - reg_code - 1; ++} ++ ++ ++void MacroAssembler::LoadHeapObject(Register result, ++ Handle object) { ++ mov(result, object); ++} ++ ++ ++void MacroAssembler::CmpHeapObject(Register reg, Handle object) { ++ cmp(reg, object); ++} ++ ++void MacroAssembler::PushHeapObject(Handle object) { Push(object); } ++ ++void MacroAssembler::GetWeakValue(Register value, Handle cell) { ++ mov(value, cell); ++ mov(value, FieldOperand(value, WeakCell::kValueOffset)); ++} ++ ++ ++void MacroAssembler::LoadWeakValue(Register value, Handle cell, ++ Label* miss) { ++ GetWeakValue(value, cell); ++ JumpIfSmi(value, miss); ++} ++ ++ ++void MacroAssembler::Ret() { ++ ret(0); ++} ++ ++ ++void MacroAssembler::Ret(int bytes_dropped, Register scratch) { ++ if (is_uint16(bytes_dropped)) { ++ ret(bytes_dropped); ++ } else { ++ pop(scratch); ++ add(esp, Immediate(bytes_dropped)); ++ push(scratch); ++ ret(0); ++ } ++} ++ ++ ++void MacroAssembler::VerifyX87StackDepth(uint32_t depth) { ++ // Turn off the stack depth check when serializer is enabled to reduce the ++ // code size. ++ if (serializer_enabled()) return; ++ // Make sure the floating point stack is either empty or has depth items. ++ DCHECK(depth <= 7); ++ // This is very expensive. ++ DCHECK(FLAG_debug_code && FLAG_enable_slow_asserts); ++ ++ // The top-of-stack (tos) is 7 if there is one item pushed. ++ int tos = (8 - depth) % 8; ++ const int kTopMask = 0x3800; ++ push(eax); ++ fwait(); ++ fnstsw_ax(); ++ and_(eax, kTopMask); ++ shr(eax, 11); ++ cmp(eax, Immediate(tos)); ++ Check(equal, kUnexpectedFPUStackDepthAfterInstruction); ++ fnclex(); ++ pop(eax); ++} ++ ++ ++void MacroAssembler::Drop(int stack_elements) { ++ if (stack_elements > 0) { ++ add(esp, Immediate(stack_elements * kPointerSize)); ++ } ++} ++ ++ ++void MacroAssembler::Move(Register dst, Register src) { ++ if (!dst.is(src)) { ++ mov(dst, src); ++ } ++} ++ ++ ++void MacroAssembler::Move(Register dst, const Immediate& x) { ++ if (x.is_zero() && RelocInfo::IsNone(x.rmode_)) { ++ xor_(dst, dst); // Shorter than mov of 32-bit immediate 0. ++ } else { ++ mov(dst, x); ++ } ++} ++ ++ ++void MacroAssembler::Move(const Operand& dst, const Immediate& x) { ++ mov(dst, x); ++} ++ ++ ++void MacroAssembler::Lzcnt(Register dst, const Operand& src) { ++ // TODO(intel): Add support for LZCNT (with ABM/BMI1). ++ Label not_zero_src; ++ bsr(dst, src); ++ j(not_zero, ¬_zero_src, Label::kNear); ++ Move(dst, Immediate(63)); // 63^31 == 32 ++ bind(¬_zero_src); ++ xor_(dst, Immediate(31)); // for x in [0..31], 31^x == 31-x. ++} ++ ++ ++void MacroAssembler::Tzcnt(Register dst, const Operand& src) { ++ // TODO(intel): Add support for TZCNT (with ABM/BMI1). ++ Label not_zero_src; ++ bsf(dst, src); ++ j(not_zero, ¬_zero_src, Label::kNear); ++ Move(dst, Immediate(32)); // The result of tzcnt is 32 if src = 0. ++ bind(¬_zero_src); ++} ++ ++ ++void MacroAssembler::Popcnt(Register dst, const Operand& src) { ++ // TODO(intel): Add support for POPCNT (with POPCNT) ++ // if (CpuFeatures::IsSupported(POPCNT)) { ++ // CpuFeatureScope scope(this, POPCNT); ++ // popcnt(dst, src); ++ // return; ++ // } ++ UNREACHABLE(); ++} ++ ++ ++void MacroAssembler::SetCounter(StatsCounter* counter, int value) { ++ if (FLAG_native_code_counters && counter->Enabled()) { ++ mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); ++ } ++} ++ ++ ++void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { ++ DCHECK(value > 0); ++ if (FLAG_native_code_counters && counter->Enabled()) { ++ Operand operand = Operand::StaticVariable(ExternalReference(counter)); ++ if (value == 1) { ++ inc(operand); ++ } else { ++ add(operand, Immediate(value)); ++ } ++ } ++} ++ ++ ++void MacroAssembler::DecrementCounter(StatsCounter* counter, int value) { ++ DCHECK(value > 0); ++ if (FLAG_native_code_counters && counter->Enabled()) { ++ Operand operand = Operand::StaticVariable(ExternalReference(counter)); ++ if (value == 1) { ++ dec(operand); ++ } else { ++ sub(operand, Immediate(value)); ++ } ++ } ++} ++ ++ ++void MacroAssembler::IncrementCounter(Condition cc, ++ StatsCounter* counter, ++ int value) { ++ DCHECK(value > 0); ++ if (FLAG_native_code_counters && counter->Enabled()) { ++ Label skip; ++ j(NegateCondition(cc), &skip); ++ pushfd(); ++ IncrementCounter(counter, value); ++ popfd(); ++ bind(&skip); ++ } ++} ++ ++ ++void MacroAssembler::DecrementCounter(Condition cc, ++ StatsCounter* counter, ++ int value) { ++ DCHECK(value > 0); ++ if (FLAG_native_code_counters && counter->Enabled()) { ++ Label skip; ++ j(NegateCondition(cc), &skip); ++ pushfd(); ++ DecrementCounter(counter, value); ++ popfd(); ++ bind(&skip); ++ } ++} ++ ++ ++void MacroAssembler::Assert(Condition cc, BailoutReason reason) { ++ if (emit_debug_code()) Check(cc, reason); ++} ++ ++ ++ ++void MacroAssembler::Check(Condition cc, BailoutReason reason) { ++ Label L; ++ j(cc, &L); ++ Abort(reason); ++ // will not return here ++ bind(&L); ++} ++ ++ ++void MacroAssembler::CheckStackAlignment() { ++ int frame_alignment = base::OS::ActivationFrameAlignment(); ++ int frame_alignment_mask = frame_alignment - 1; ++ if (frame_alignment > kPointerSize) { ++ DCHECK(base::bits::IsPowerOfTwo(frame_alignment)); ++ Label alignment_as_expected; ++ test(esp, Immediate(frame_alignment_mask)); ++ j(zero, &alignment_as_expected); ++ // Abort if stack is not aligned. ++ int3(); ++ bind(&alignment_as_expected); ++ } ++} ++ ++ ++void MacroAssembler::Abort(BailoutReason reason) { ++#ifdef DEBUG ++ const char* msg = GetBailoutReason(reason); ++ if (msg != NULL) { ++ RecordComment("Abort message: "); ++ RecordComment(msg); ++ } ++ ++ if (FLAG_trap_on_abort) { ++ int3(); ++ return; ++ } ++#endif ++ ++ // Check if Abort() has already been initialized. ++ DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); ++ ++ Move(edx, Smi::FromInt(static_cast(reason))); ++ ++ // Disable stub call restrictions to always allow calls to abort. ++ if (!has_frame_) { ++ // We don't actually want to generate a pile of code for this, so just ++ // claim there is a stack frame, without generating one. ++ FrameScope scope(this, StackFrame::NONE); ++ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); ++ } else { ++ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); ++ } ++ // will not return here ++ int3(); ++} ++ ++ ++void MacroAssembler::LoadInstanceDescriptors(Register map, ++ Register descriptors) { ++ mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); ++} ++ ++ ++void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { ++ mov(dst, FieldOperand(map, Map::kBitField3Offset)); ++ DecodeField(dst); ++} ++ ++ ++void MacroAssembler::LoadAccessor(Register dst, Register holder, ++ int accessor_index, ++ AccessorComponent accessor) { ++ mov(dst, FieldOperand(holder, HeapObject::kMapOffset)); ++ LoadInstanceDescriptors(dst, dst); ++ mov(dst, FieldOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); ++ int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset ++ : AccessorPair::kSetterOffset; ++ mov(dst, FieldOperand(dst, offset)); ++} ++ ++void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1, ++ Register object2, ++ Register scratch1, ++ Register scratch2, ++ Label* failure) { ++ // Check that both objects are not smis. ++ STATIC_ASSERT(kSmiTag == 0); ++ mov(scratch1, object1); ++ and_(scratch1, object2); ++ JumpIfSmi(scratch1, failure); ++ ++ // Load instance type for both strings. ++ mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset)); ++ mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset)); ++ movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); ++ movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); ++ ++ // Check that both are flat one-byte strings. ++ const int kFlatOneByteStringMask = ++ kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; ++ const int kFlatOneByteStringTag = ++ kStringTag | kOneByteStringTag | kSeqStringTag; ++ // Interleave bits from both instance types and compare them in one check. ++ const int kShift = 8; ++ DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift)); ++ and_(scratch1, kFlatOneByteStringMask); ++ and_(scratch2, kFlatOneByteStringMask); ++ shl(scratch2, kShift); ++ or_(scratch1, scratch2); ++ cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << kShift)); ++ j(not_equal, failure); ++} ++ ++ ++void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand, ++ Label* not_unique_name, ++ Label::Distance distance) { ++ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); ++ Label succeed; ++ test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); ++ j(zero, &succeed); ++ cmpb(operand, Immediate(SYMBOL_TYPE)); ++ j(not_equal, not_unique_name, distance); ++ ++ bind(&succeed); ++} ++ ++ ++void MacroAssembler::EmitSeqStringSetCharCheck(Register string, ++ Register index, ++ Register value, ++ uint32_t encoding_mask) { ++ Label is_object; ++ JumpIfNotSmi(string, &is_object, Label::kNear); ++ Abort(kNonObject); ++ bind(&is_object); ++ ++ push(value); ++ mov(value, FieldOperand(string, HeapObject::kMapOffset)); ++ movzx_b(value, FieldOperand(value, Map::kInstanceTypeOffset)); ++ ++ and_(value, Immediate(kStringRepresentationMask | kStringEncodingMask)); ++ cmp(value, Immediate(encoding_mask)); ++ pop(value); ++ Check(equal, kUnexpectedStringType); ++ ++ // The index is assumed to be untagged coming in, tag it to compare with the ++ // string length without using a temp register, it is restored at the end of ++ // this function. ++ SmiTag(index); ++ Check(no_overflow, kIndexIsTooLarge); ++ ++ cmp(index, FieldOperand(string, String::kLengthOffset)); ++ Check(less, kIndexIsTooLarge); ++ ++ cmp(index, Immediate(Smi::kZero)); ++ Check(greater_equal, kIndexIsNegative); ++ ++ // Restore the index ++ SmiUntag(index); ++} ++ ++ ++void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { ++ int frame_alignment = base::OS::ActivationFrameAlignment(); ++ if (frame_alignment != 0) { ++ // Make stack end at alignment and make room for num_arguments words ++ // and the original value of esp. ++ mov(scratch, esp); ++ sub(esp, Immediate((num_arguments + 1) * kPointerSize)); ++ DCHECK(base::bits::IsPowerOfTwo(frame_alignment)); ++ and_(esp, -frame_alignment); ++ mov(Operand(esp, num_arguments * kPointerSize), scratch); ++ } else { ++ sub(esp, Immediate(num_arguments * kPointerSize)); ++ } ++} ++ ++ ++void MacroAssembler::CallCFunction(ExternalReference function, ++ int num_arguments) { ++ // Trashing eax is ok as it will be the return value. ++ mov(eax, Immediate(function)); ++ CallCFunction(eax, num_arguments); ++} ++ ++ ++void MacroAssembler::CallCFunction(Register function, ++ int num_arguments) { ++ DCHECK(has_frame()); ++ // Check stack alignment. ++ if (emit_debug_code()) { ++ CheckStackAlignment(); ++ } ++ ++ call(function); ++ if (base::OS::ActivationFrameAlignment() != 0) { ++ mov(esp, Operand(esp, num_arguments * kPointerSize)); ++ } else { ++ add(esp, Immediate(num_arguments * kPointerSize)); ++ } ++} ++ ++ ++#ifdef DEBUG ++bool AreAliased(Register reg1, ++ Register reg2, ++ Register reg3, ++ Register reg4, ++ Register reg5, ++ Register reg6, ++ Register reg7, ++ Register reg8) { ++ int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + ++ reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + ++ reg7.is_valid() + reg8.is_valid(); ++ ++ RegList regs = 0; ++ if (reg1.is_valid()) regs |= reg1.bit(); ++ if (reg2.is_valid()) regs |= reg2.bit(); ++ if (reg3.is_valid()) regs |= reg3.bit(); ++ if (reg4.is_valid()) regs |= reg4.bit(); ++ if (reg5.is_valid()) regs |= reg5.bit(); ++ if (reg6.is_valid()) regs |= reg6.bit(); ++ if (reg7.is_valid()) regs |= reg7.bit(); ++ if (reg8.is_valid()) regs |= reg8.bit(); ++ int n_of_non_aliasing_regs = NumRegs(regs); ++ ++ return n_of_valid_regs != n_of_non_aliasing_regs; ++} ++#endif ++ ++ ++CodePatcher::CodePatcher(Isolate* isolate, byte* address, int size) ++ : address_(address), ++ size_(size), ++ masm_(isolate, address, size + Assembler::kGap, CodeObjectRequired::kNo) { ++ // Create a new macro assembler pointing to the address of the code to patch. ++ // The size is adjusted with kGap on order for the assembler to generate size ++ // bytes of instructions without failing with buffer size constraints. ++ DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); ++} ++ ++ ++CodePatcher::~CodePatcher() { ++ // Indicate that code has changed. ++ Assembler::FlushICache(masm_.isolate(), address_, size_); ++ ++ // Check that the code was patched as expected. ++ DCHECK(masm_.pc_ == address_ + size_); ++ DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); ++} ++ ++ ++void MacroAssembler::CheckPageFlag( ++ Register object, ++ Register scratch, ++ int mask, ++ Condition cc, ++ Label* condition_met, ++ Label::Distance condition_met_distance) { ++ DCHECK(cc == zero || cc == not_zero); ++ if (scratch.is(object)) { ++ and_(scratch, Immediate(~Page::kPageAlignmentMask)); ++ } else { ++ mov(scratch, Immediate(~Page::kPageAlignmentMask)); ++ and_(scratch, object); ++ } ++ if (mask < (1 << kBitsPerByte)) { ++ test_b(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); ++ } else { ++ test(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); ++ } ++ j(cc, condition_met, condition_met_distance); ++} ++ ++ ++void MacroAssembler::CheckPageFlagForMap( ++ Handle map, ++ int mask, ++ Condition cc, ++ Label* condition_met, ++ Label::Distance condition_met_distance) { ++ DCHECK(cc == zero || cc == not_zero); ++ Page* page = Page::FromAddress(map->address()); ++ DCHECK(!serializer_enabled()); // Serializer cannot match page_flags. ++ ExternalReference reference(ExternalReference::page_flags(page)); ++ // The inlined static address check of the page's flags relies ++ // on maps never being compacted. ++ DCHECK(!isolate()->heap()->mark_compact_collector()-> ++ IsOnEvacuationCandidate(*map)); ++ if (mask < (1 << kBitsPerByte)) { ++ test_b(Operand::StaticVariable(reference), Immediate(mask)); ++ } else { ++ test(Operand::StaticVariable(reference), Immediate(mask)); ++ } ++ j(cc, condition_met, condition_met_distance); ++} ++ ++ ++void MacroAssembler::JumpIfBlack(Register object, ++ Register scratch0, ++ Register scratch1, ++ Label* on_black, ++ Label::Distance on_black_near) { ++ HasColor(object, scratch0, scratch1, on_black, on_black_near, 1, ++ 1); // kBlackBitPattern. ++ DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0); ++} ++ ++ ++void MacroAssembler::HasColor(Register object, ++ Register bitmap_scratch, ++ Register mask_scratch, ++ Label* has_color, ++ Label::Distance has_color_distance, ++ int first_bit, ++ int second_bit) { ++ DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, ecx)); ++ ++ GetMarkBits(object, bitmap_scratch, mask_scratch); ++ ++ Label other_color, word_boundary; ++ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); ++ j(first_bit == 1 ? zero : not_zero, &other_color, Label::kNear); ++ add(mask_scratch, mask_scratch); // Shift left 1 by adding. ++ j(zero, &word_boundary, Label::kNear); ++ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); ++ j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance); ++ jmp(&other_color, Label::kNear); ++ ++ bind(&word_boundary); ++ test_b(Operand(bitmap_scratch, MemoryChunk::kHeaderSize + kPointerSize), ++ Immediate(1)); ++ ++ j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance); ++ bind(&other_color); ++} ++ ++ ++void MacroAssembler::GetMarkBits(Register addr_reg, ++ Register bitmap_reg, ++ Register mask_reg) { ++ DCHECK(!AreAliased(addr_reg, mask_reg, bitmap_reg, ecx)); ++ mov(bitmap_reg, Immediate(~Page::kPageAlignmentMask)); ++ and_(bitmap_reg, addr_reg); ++ mov(ecx, addr_reg); ++ int shift = ++ Bitmap::kBitsPerCellLog2 + kPointerSizeLog2 - Bitmap::kBytesPerCellLog2; ++ shr(ecx, shift); ++ and_(ecx, ++ (Page::kPageAlignmentMask >> shift) & ~(Bitmap::kBytesPerCell - 1)); ++ ++ add(bitmap_reg, ecx); ++ mov(ecx, addr_reg); ++ shr(ecx, kPointerSizeLog2); ++ and_(ecx, (1 << Bitmap::kBitsPerCellLog2) - 1); ++ mov(mask_reg, Immediate(1)); ++ shl_cl(mask_reg); ++} ++ ++ ++void MacroAssembler::JumpIfWhite(Register value, Register bitmap_scratch, ++ Register mask_scratch, Label* value_is_white, ++ Label::Distance distance) { ++ DCHECK(!AreAliased(value, bitmap_scratch, mask_scratch, ecx)); ++ GetMarkBits(value, bitmap_scratch, mask_scratch); ++ ++ // If the value is black or grey we don't need to do anything. ++ DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); ++ DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0); ++ DCHECK(strcmp(Marking::kGreyBitPattern, "10") == 0); ++ DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); ++ ++ // Since both black and grey have a 1 in the first position and white does ++ // not have a 1 there we only need to check one bit. ++ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); ++ j(zero, value_is_white, Label::kNear); ++} ++ ++ ++void MacroAssembler::EnumLength(Register dst, Register map) { ++ STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); ++ mov(dst, FieldOperand(map, Map::kBitField3Offset)); ++ and_(dst, Immediate(Map::EnumLengthBits::kMask)); ++ SmiTag(dst); ++} ++ ++ ++void MacroAssembler::CheckEnumCache(Label* call_runtime) { ++ Label next, start; ++ mov(ecx, eax); ++ ++ // Check if the enum length field is properly initialized, indicating that ++ // there is an enum cache. ++ mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); ++ ++ EnumLength(edx, ebx); ++ cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel))); ++ j(equal, call_runtime); ++ ++ jmp(&start); ++ ++ bind(&next); ++ mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); ++ ++ // For all objects but the receiver, check that the cache is empty. ++ EnumLength(edx, ebx); ++ cmp(edx, Immediate(Smi::kZero)); ++ j(not_equal, call_runtime); ++ ++ bind(&start); ++ ++ // Check that there are no elements. Register rcx contains the current JS ++ // object we've reached through the prototype chain. ++ Label no_elements; ++ mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset)); ++ cmp(ecx, isolate()->factory()->empty_fixed_array()); ++ j(equal, &no_elements); ++ ++ // Second chance, the object may be using the empty slow element dictionary. ++ cmp(ecx, isolate()->factory()->empty_slow_element_dictionary()); ++ j(not_equal, call_runtime); ++ ++ bind(&no_elements); ++ mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); ++ cmp(ecx, isolate()->factory()->null_value()); ++ j(not_equal, &next); ++} ++ ++ ++void MacroAssembler::TestJSArrayForAllocationMemento( ++ Register receiver_reg, ++ Register scratch_reg, ++ Label* no_memento_found) { ++ Label map_check; ++ Label top_check; ++ ExternalReference new_space_allocation_top = ++ ExternalReference::new_space_allocation_top_address(isolate()); ++ const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; ++ const int kMementoLastWordOffset = ++ kMementoMapOffset + AllocationMemento::kSize - kPointerSize; ++ ++ // Bail out if the object is not in new space. ++ JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found); ++ // If the object is in new space, we need to check whether it is on the same ++ // page as the current top. ++ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); ++ xor_(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); ++ test(scratch_reg, Immediate(~Page::kPageAlignmentMask)); ++ j(zero, &top_check); ++ // The object is on a different page than allocation top. Bail out if the ++ // object sits on the page boundary as no memento can follow and we cannot ++ // touch the memory following it. ++ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); ++ xor_(scratch_reg, receiver_reg); ++ test(scratch_reg, Immediate(~Page::kPageAlignmentMask)); ++ j(not_zero, no_memento_found); ++ // Continue with the actual map check. ++ jmp(&map_check); ++ // If top is on the same page as the current object, we need to check whether ++ // we are below top. ++ bind(&top_check); ++ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); ++ cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); ++ j(greater_equal, no_memento_found); ++ // Memento map check. ++ bind(&map_check); ++ mov(scratch_reg, Operand(receiver_reg, kMementoMapOffset)); ++ cmp(scratch_reg, Immediate(isolate()->factory()->allocation_memento_map())); ++} ++ ++void MacroAssembler::TruncatingDiv(Register dividend, int32_t divisor) { ++ DCHECK(!dividend.is(eax)); ++ DCHECK(!dividend.is(edx)); ++ base::MagicNumbersForDivision mag = ++ base::SignedDivisionByConstant(static_cast(divisor)); ++ mov(eax, Immediate(mag.multiplier)); ++ imul(dividend); ++ bool neg = (mag.multiplier & (static_cast(1) << 31)) != 0; ++ if (divisor > 0 && neg) add(edx, dividend); ++ if (divisor < 0 && !neg && mag.multiplier > 0) sub(edx, dividend); ++ if (mag.shift > 0) sar(edx, mag.shift); ++ mov(eax, dividend); ++ shr(eax, 31); ++ add(edx, eax); ++} ++ ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_TARGET_ARCH_X87 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-25 17:42:57.224465515 +0100 +@@ -0,0 +1,906 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ ++#define V8_X87_MACRO_ASSEMBLER_X87_H_ ++ ++#include "src/assembler.h" ++#include "src/bailout-reason.h" ++#include "src/frames.h" ++#include "src/globals.h" ++ ++namespace v8 { ++namespace internal { ++ ++// Give alias names to registers for calling conventions. ++const Register kReturnRegister0 = {Register::kCode_eax}; ++const Register kReturnRegister1 = {Register::kCode_edx}; ++const Register kReturnRegister2 = {Register::kCode_edi}; ++const Register kJSFunctionRegister = {Register::kCode_edi}; ++const Register kContextRegister = {Register::kCode_esi}; ++const Register kAllocateSizeRegister = {Register::kCode_edx}; ++const Register kInterpreterAccumulatorRegister = {Register::kCode_eax}; ++const Register kInterpreterBytecodeOffsetRegister = {Register::kCode_ecx}; ++const Register kInterpreterBytecodeArrayRegister = {Register::kCode_edi}; ++const Register kInterpreterDispatchTableRegister = {Register::kCode_esi}; ++const Register kJavaScriptCallArgCountRegister = {Register::kCode_eax}; ++const Register kJavaScriptCallNewTargetRegister = {Register::kCode_edx}; ++const Register kRuntimeCallFunctionRegister = {Register::kCode_ebx}; ++const Register kRuntimeCallArgCountRegister = {Register::kCode_eax}; ++ ++// Spill slots used by interpreter dispatch calling convention. ++const int kInterpreterDispatchTableSpillSlot = -1; ++ ++// Convenience for platform-independent signatures. We do not normally ++// distinguish memory operands from other operands on ia32. ++typedef Operand MemOperand; ++ ++enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; ++enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; ++enum PointersToHereCheck { ++ kPointersToHereMaybeInteresting, ++ kPointersToHereAreAlwaysInteresting ++}; ++ ++enum RegisterValueType { REGISTER_VALUE_IS_SMI, REGISTER_VALUE_IS_INT32 }; ++ ++enum class ReturnAddressState { kOnStack, kNotOnStack }; ++ ++#ifdef DEBUG ++bool AreAliased(Register reg1, Register reg2, Register reg3 = no_reg, ++ Register reg4 = no_reg, Register reg5 = no_reg, ++ Register reg6 = no_reg, Register reg7 = no_reg, ++ Register reg8 = no_reg); ++#endif ++ ++// MacroAssembler implements a collection of frequently used macros. ++class MacroAssembler: public Assembler { ++ public: ++ MacroAssembler(Isolate* isolate, void* buffer, int size, ++ CodeObjectRequired create_code_object); ++ ++ Isolate* isolate() const { return isolate_; } ++ ++ void Load(Register dst, const Operand& src, Representation r); ++ void Store(Register src, const Operand& dst, Representation r); ++ ++ // Load a register with a long value as efficiently as possible. ++ void Set(Register dst, int32_t x) { ++ if (x == 0) { ++ xor_(dst, dst); ++ } else { ++ mov(dst, Immediate(x)); ++ } ++ } ++ void Set(const Operand& dst, int32_t x) { mov(dst, Immediate(x)); } ++ ++ // Operations on roots in the root-array. ++ void LoadRoot(Register destination, Heap::RootListIndex index); ++ void StoreRoot(Register source, Register scratch, Heap::RootListIndex index); ++ void CompareRoot(Register with, Register scratch, Heap::RootListIndex index); ++ // These methods can only be used with constant roots (i.e. non-writable ++ // and not in new space). ++ void CompareRoot(Register with, Heap::RootListIndex index); ++ void CompareRoot(const Operand& with, Heap::RootListIndex index); ++ void PushRoot(Heap::RootListIndex index); ++ ++ // Compare the object in a register to a value and jump if they are equal. ++ void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, ++ Label::Distance if_equal_distance = Label::kFar) { ++ CompareRoot(with, index); ++ j(equal, if_equal, if_equal_distance); ++ } ++ void JumpIfRoot(const Operand& with, Heap::RootListIndex index, ++ Label* if_equal, ++ Label::Distance if_equal_distance = Label::kFar) { ++ CompareRoot(with, index); ++ j(equal, if_equal, if_equal_distance); ++ } ++ ++ // Compare the object in a register to a value and jump if they are not equal. ++ void JumpIfNotRoot(Register with, Heap::RootListIndex index, ++ Label* if_not_equal, ++ Label::Distance if_not_equal_distance = Label::kFar) { ++ CompareRoot(with, index); ++ j(not_equal, if_not_equal, if_not_equal_distance); ++ } ++ void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, ++ Label* if_not_equal, ++ Label::Distance if_not_equal_distance = Label::kFar) { ++ CompareRoot(with, index); ++ j(not_equal, if_not_equal, if_not_equal_distance); ++ } ++ ++ // These functions do not arrange the registers in any particular order so ++ // they are not useful for calls that can cause a GC. The caller can ++ // exclude up to 3 registers that do not need to be saved and restored. ++ void PushCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, ++ Register exclusion2 = no_reg, ++ Register exclusion3 = no_reg); ++ void PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, ++ Register exclusion2 = no_reg, ++ Register exclusion3 = no_reg); ++ ++ // --------------------------------------------------------------------------- ++ // GC Support ++ enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; ++ ++ // Record in the remembered set the fact that we have a pointer to new space ++ // at the address pointed to by the addr register. Only works if addr is not ++ // in new space. ++ void RememberedSetHelper(Register object, // Used for debug code. ++ Register addr, Register scratch, ++ SaveFPRegsMode save_fp, ++ RememberedSetFinalAction and_then); ++ ++ void CheckPageFlag(Register object, Register scratch, int mask, Condition cc, ++ Label* condition_met, ++ Label::Distance condition_met_distance = Label::kFar); ++ ++ void CheckPageFlagForMap( ++ Handle map, int mask, Condition cc, Label* condition_met, ++ Label::Distance condition_met_distance = Label::kFar); ++ ++ // Check if object is in new space. Jumps if the object is not in new space. ++ // The register scratch can be object itself, but scratch will be clobbered. ++ void JumpIfNotInNewSpace(Register object, Register scratch, Label* branch, ++ Label::Distance distance = Label::kFar) { ++ InNewSpace(object, scratch, zero, branch, distance); ++ } ++ ++ // Check if object is in new space. Jumps if the object is in new space. ++ // The register scratch can be object itself, but it will be clobbered. ++ void JumpIfInNewSpace(Register object, Register scratch, Label* branch, ++ Label::Distance distance = Label::kFar) { ++ InNewSpace(object, scratch, not_zero, branch, distance); ++ } ++ ++ // Check if an object has a given incremental marking color. Also uses ecx! ++ void HasColor(Register object, Register scratch0, Register scratch1, ++ Label* has_color, Label::Distance has_color_distance, ++ int first_bit, int second_bit); ++ ++ void JumpIfBlack(Register object, Register scratch0, Register scratch1, ++ Label* on_black, ++ Label::Distance on_black_distance = Label::kFar); ++ ++ // Checks the color of an object. If the object is white we jump to the ++ // incremental marker. ++ void JumpIfWhite(Register value, Register scratch1, Register scratch2, ++ Label* value_is_white, Label::Distance distance); ++ ++ // Notify the garbage collector that we wrote a pointer into an object. ++ // |object| is the object being stored into, |value| is the object being ++ // stored. value and scratch registers are clobbered by the operation. ++ // The offset is the offset from the start of the object, not the offset from ++ // the tagged HeapObject pointer. For use with FieldOperand(reg, off). ++ void RecordWriteField( ++ Register object, int offset, Register value, Register scratch, ++ SaveFPRegsMode save_fp, ++ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, ++ SmiCheck smi_check = INLINE_SMI_CHECK, ++ PointersToHereCheck pointers_to_here_check_for_value = ++ kPointersToHereMaybeInteresting); ++ ++ // As above, but the offset has the tag presubtracted. For use with ++ // Operand(reg, off). ++ void RecordWriteContextSlot( ++ Register context, int offset, Register value, Register scratch, ++ SaveFPRegsMode save_fp, ++ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, ++ SmiCheck smi_check = INLINE_SMI_CHECK, ++ PointersToHereCheck pointers_to_here_check_for_value = ++ kPointersToHereMaybeInteresting) { ++ RecordWriteField(context, offset + kHeapObjectTag, value, scratch, save_fp, ++ remembered_set_action, smi_check, ++ pointers_to_here_check_for_value); ++ } ++ ++ // For page containing |object| mark region covering |address| ++ // dirty. |object| is the object being stored into, |value| is the ++ // object being stored. The address and value registers are clobbered by the ++ // operation. RecordWrite filters out smis so it does not update the ++ // write barrier if the value is a smi. ++ void RecordWrite( ++ Register object, Register address, Register value, SaveFPRegsMode save_fp, ++ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, ++ SmiCheck smi_check = INLINE_SMI_CHECK, ++ PointersToHereCheck pointers_to_here_check_for_value = ++ kPointersToHereMaybeInteresting); ++ ++ // Notify the garbage collector that we wrote a code entry into a ++ // JSFunction. Only scratch is clobbered by the operation. ++ void RecordWriteCodeEntryField(Register js_function, Register code_entry, ++ Register scratch); ++ ++ // For page containing |object| mark the region covering the object's map ++ // dirty. |object| is the object being stored into, |map| is the Map object ++ // that was stored. ++ void RecordWriteForMap(Register object, Handle map, Register scratch1, ++ Register scratch2, SaveFPRegsMode save_fp); ++ ++ // --------------------------------------------------------------------------- ++ // Debugger Support ++ ++ void DebugBreak(); ++ ++ // Generates function and stub prologue code. ++ void StubPrologue(StackFrame::Type type); ++ void Prologue(bool code_pre_aging); ++ ++ // Enter specific kind of exit frame. Expects the number of ++ // arguments in register eax and sets up the number of arguments in ++ // register edi and the pointer to the first argument in register ++ // esi. ++ void EnterExitFrame(int argc, bool save_doubles, StackFrame::Type frame_type); ++ ++ void EnterApiExitFrame(int argc); ++ ++ // Leave the current exit frame. Expects the return value in ++ // register eax:edx (untouched) and the pointer to the first ++ // argument in register esi (if pop_arguments == true). ++ void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); ++ ++ // Leave the current exit frame. Expects the return value in ++ // register eax (untouched). ++ void LeaveApiExitFrame(bool restore_context); ++ ++ // Find the function context up the context chain. ++ void LoadContext(Register dst, int context_chain_length); ++ ++ // Load the global proxy from the current context. ++ void LoadGlobalProxy(Register dst); ++ ++ // Load the global function with the given index. ++ void LoadGlobalFunction(int index, Register function); ++ ++ // Load the initial map from the global function. The registers ++ // function and map can be the same. ++ void LoadGlobalFunctionInitialMap(Register function, Register map); ++ ++ // Push and pop the registers that can hold pointers. ++ void PushSafepointRegisters() { pushad(); } ++ void PopSafepointRegisters() { popad(); } ++ // Store the value in register/immediate src in the safepoint ++ // register stack slot for register dst. ++ void StoreToSafepointRegisterSlot(Register dst, Register src); ++ void StoreToSafepointRegisterSlot(Register dst, Immediate src); ++ void LoadFromSafepointRegisterSlot(Register dst, Register src); ++ ++ // Nop, because x87 does not have a root register. ++ void InitializeRootRegister() {} ++ ++ void LoadHeapObject(Register result, Handle object); ++ void CmpHeapObject(Register reg, Handle object); ++ void PushHeapObject(Handle object); ++ ++ void LoadObject(Register result, Handle object) { ++ AllowDeferredHandleDereference heap_object_check; ++ if (object->IsHeapObject()) { ++ LoadHeapObject(result, Handle::cast(object)); ++ } else { ++ Move(result, Immediate(object)); ++ } ++ } ++ ++ void CmpObject(Register reg, Handle object) { ++ AllowDeferredHandleDereference heap_object_check; ++ if (object->IsHeapObject()) { ++ CmpHeapObject(reg, Handle::cast(object)); ++ } else { ++ cmp(reg, Immediate(object)); ++ } ++ } ++ ++ void GetWeakValue(Register value, Handle cell); ++ void LoadWeakValue(Register value, Handle cell, Label* miss); ++ ++ // --------------------------------------------------------------------------- ++ // JavaScript invokes ++ ++ // Removes current frame and its arguments from the stack preserving ++ // the arguments and a return address pushed to the stack for the next call. ++ // |ra_state| defines whether return address is already pushed to stack or ++ // not. Both |callee_args_count| and |caller_args_count_reg| do not include ++ // receiver. |callee_args_count| is not modified, |caller_args_count_reg| ++ // is trashed. |number_of_temp_values_after_return_address| specifies ++ // the number of words pushed to the stack after the return address. This is ++ // to allow "allocation" of scratch registers that this function requires ++ // by saving their values on the stack. ++ void PrepareForTailCall(const ParameterCount& callee_args_count, ++ Register caller_args_count_reg, Register scratch0, ++ Register scratch1, ReturnAddressState ra_state, ++ int number_of_temp_values_after_return_address); ++ ++ // Invoke the JavaScript function code by either calling or jumping. ++ ++ void InvokeFunctionCode(Register function, Register new_target, ++ const ParameterCount& expected, ++ const ParameterCount& actual, InvokeFlag flag, ++ const CallWrapper& call_wrapper); ++ ++ // On function call, call into the debugger if necessary. ++ void CheckDebugHook(Register fun, Register new_target, ++ const ParameterCount& expected, ++ const ParameterCount& actual); ++ ++ // Invoke the JavaScript function in the given register. Changes the ++ // current context to the context in the function before invoking. ++ void InvokeFunction(Register function, Register new_target, ++ const ParameterCount& actual, InvokeFlag flag, ++ const CallWrapper& call_wrapper); ++ ++ void InvokeFunction(Register function, const ParameterCount& expected, ++ const ParameterCount& actual, InvokeFlag flag, ++ const CallWrapper& call_wrapper); ++ ++ void InvokeFunction(Handle function, ++ const ParameterCount& expected, ++ const ParameterCount& actual, InvokeFlag flag, ++ const CallWrapper& call_wrapper); ++ ++ void ShlPair(Register high, Register low, uint8_t imm8); ++ void ShlPair_cl(Register high, Register low); ++ void ShrPair(Register high, Register low, uint8_t imm8); ++ void ShrPair_cl(Register high, Register src); ++ void SarPair(Register high, Register low, uint8_t imm8); ++ void SarPair_cl(Register high, Register low); ++ ++ // Expression support ++ // Support for constant splitting. ++ bool IsUnsafeImmediate(const Immediate& x); ++ void SafeMove(Register dst, const Immediate& x); ++ void SafePush(const Immediate& x); ++ ++ // Compare object type for heap object. ++ // Incoming register is heap_object and outgoing register is map. ++ void CmpObjectType(Register heap_object, InstanceType type, Register map); ++ ++ // Compare instance type for map. ++ void CmpInstanceType(Register map, InstanceType type); ++ ++ // Compare an object's map with the specified map. ++ void CompareMap(Register obj, Handle map); ++ ++ // Check if the map of an object is equal to a specified map and branch to ++ // label if not. Skip the smi check if not required (object is known to be a ++ // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match ++ // against maps that are ElementsKind transition maps of the specified map. ++ void CheckMap(Register obj, Handle map, Label* fail, ++ SmiCheckType smi_check_type); ++ ++ // Check if the object in register heap_object is a string. Afterwards the ++ // register map contains the object map and the register instance_type ++ // contains the instance_type. The registers map and instance_type can be the ++ // same in which case it contains the instance type afterwards. Either of the ++ // registers map and instance_type can be the same as heap_object. ++ Condition IsObjectStringType(Register heap_object, Register map, ++ Register instance_type); ++ ++ // FCmp is similar to integer cmp, but requires unsigned ++ // jcc instructions (je, ja, jae, jb, jbe, je, and jz). ++ void FCmp(); ++ void FXamMinusZero(); ++ void FXamSign(); ++ void X87CheckIA(); ++ void X87SetRC(int rc); ++ void X87SetFPUCW(int cw); ++ ++ void ClampUint8(Register reg); ++ void ClampTOSToUint8(Register result_reg); ++ ++ void SlowTruncateToI(Register result_reg, Register input_reg, ++ int offset = HeapNumber::kValueOffset - kHeapObjectTag); ++ ++ void TruncateHeapNumberToI(Register result_reg, Register input_reg); ++ void TruncateX87TOSToI(Register result_reg); ++ ++ void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode, ++ Label* lost_precision, Label* is_nan, Label* minus_zero, ++ Label::Distance dst = Label::kFar); ++ ++ // Smi tagging support. ++ void SmiTag(Register reg) { ++ STATIC_ASSERT(kSmiTag == 0); ++ STATIC_ASSERT(kSmiTagSize == 1); ++ add(reg, reg); ++ } ++ void SmiUntag(Register reg) { ++ sar(reg, kSmiTagSize); ++ } ++ ++ // Modifies the register even if it does not contain a Smi! ++ void SmiUntag(Register reg, Label* is_smi) { ++ STATIC_ASSERT(kSmiTagSize == 1); ++ sar(reg, kSmiTagSize); ++ STATIC_ASSERT(kSmiTag == 0); ++ j(not_carry, is_smi); ++ } ++ ++ void LoadUint32NoSSE2(Register src) { ++ LoadUint32NoSSE2(Operand(src)); ++ } ++ void LoadUint32NoSSE2(const Operand& src); ++ ++ // Jump the register contains a smi. ++ inline void JumpIfSmi(Register value, Label* smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(zero, smi_label, distance); ++ } ++ // Jump if the operand is a smi. ++ inline void JumpIfSmi(Operand value, Label* smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(zero, smi_label, distance); ++ } ++ // Jump if register contain a non-smi. ++ inline void JumpIfNotSmi(Register value, Label* not_smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(not_zero, not_smi_label, distance); ++ } ++ // Jump if the operand is not a smi. ++ inline void JumpIfNotSmi(Operand value, Label* smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(not_zero, smi_label, distance); ++ } ++ // Jump if the value cannot be represented by a smi. ++ inline void JumpIfNotValidSmiValue(Register value, Register scratch, ++ Label* on_invalid, ++ Label::Distance distance = Label::kFar) { ++ mov(scratch, value); ++ add(scratch, Immediate(0x40000000U)); ++ j(sign, on_invalid, distance); ++ } ++ ++ // Jump if the unsigned integer value cannot be represented by a smi. ++ inline void JumpIfUIntNotValidSmiValue( ++ Register value, Label* on_invalid, ++ Label::Distance distance = Label::kFar) { ++ cmp(value, Immediate(0x40000000U)); ++ j(above_equal, on_invalid, distance); ++ } ++ ++ void LoadInstanceDescriptors(Register map, Register descriptors); ++ void EnumLength(Register dst, Register map); ++ void NumberOfOwnDescriptors(Register dst, Register map); ++ void LoadAccessor(Register dst, Register holder, int accessor_index, ++ AccessorComponent accessor); ++ ++ template ++ void DecodeField(Register reg) { ++ static const int shift = Field::kShift; ++ static const int mask = Field::kMask >> Field::kShift; ++ if (shift != 0) { ++ sar(reg, shift); ++ } ++ and_(reg, Immediate(mask)); ++ } ++ ++ template ++ void DecodeFieldToSmi(Register reg) { ++ static const int shift = Field::kShift; ++ static const int mask = (Field::kMask >> Field::kShift) << kSmiTagSize; ++ STATIC_ASSERT((mask & (0x80000000u >> (kSmiTagSize - 1))) == 0); ++ STATIC_ASSERT(kSmiTag == 0); ++ if (shift < kSmiTagSize) { ++ shl(reg, kSmiTagSize - shift); ++ } else if (shift > kSmiTagSize) { ++ sar(reg, shift - kSmiTagSize); ++ } ++ and_(reg, Immediate(mask)); ++ } ++ ++ // Abort execution if argument is not a smi, enabled via --debug-code. ++ void AssertSmi(Register object); ++ ++ // Abort execution if argument is a smi, enabled via --debug-code. ++ void AssertNotSmi(Register object); ++ ++ // Abort execution if argument is not a JSFunction, enabled via --debug-code. ++ void AssertFunction(Register object); ++ ++ // Abort execution if argument is not a JSBoundFunction, ++ // enabled via --debug-code. ++ void AssertBoundFunction(Register object); ++ ++ // Abort execution if argument is not a JSGeneratorObject, ++ // enabled via --debug-code. ++ void AssertGeneratorObject(Register object); ++ ++ // Abort execution if argument is not undefined or an AllocationSite, enabled ++ // via --debug-code. ++ void AssertUndefinedOrAllocationSite(Register object); ++ ++ // --------------------------------------------------------------------------- ++ // Exception handling ++ ++ // Push a new stack handler and link it into stack handler chain. ++ void PushStackHandler(); ++ ++ // Unlink the stack handler on top of the stack from the stack handler chain. ++ void PopStackHandler(); ++ ++ // --------------------------------------------------------------------------- ++ // Inline caching support ++ ++ void GetNumberHash(Register r0, Register scratch); ++ ++ // --------------------------------------------------------------------------- ++ // Allocation support ++ ++ // Allocate an object in new space or old space. If the given space ++ // is exhausted control continues at the gc_required label. The allocated ++ // object is returned in result and end of the new object is returned in ++ // result_end. The register scratch can be passed as no_reg in which case ++ // an additional object reference will be added to the reloc info. The ++ // returned pointers in result and result_end have not yet been tagged as ++ // heap objects. If result_contains_top_on_entry is true the content of ++ // result is known to be the allocation top on entry (could be result_end ++ // from a previous call). If result_contains_top_on_entry is true scratch ++ // should be no_reg as it is never used. ++ void Allocate(int object_size, Register result, Register result_end, ++ Register scratch, Label* gc_required, AllocationFlags flags); ++ ++ void Allocate(int header_size, ScaleFactor element_size, ++ Register element_count, RegisterValueType element_count_type, ++ Register result, Register result_end, Register scratch, ++ Label* gc_required, AllocationFlags flags); ++ ++ void Allocate(Register object_size, Register result, Register result_end, ++ Register scratch, Label* gc_required, AllocationFlags flags); ++ ++ // Allocate a heap number in new space with undefined value. The ++ // register scratch2 can be passed as no_reg; the others must be ++ // valid registers. Returns tagged pointer in result register, or ++ // jumps to gc_required if new space is full. ++ void AllocateHeapNumber(Register result, Register scratch1, Register scratch2, ++ Label* gc_required, MutableMode mode = IMMUTABLE); ++ ++ // Allocate and initialize a JSValue wrapper with the specified {constructor} ++ // and {value}. ++ void AllocateJSValue(Register result, Register constructor, Register value, ++ Register scratch, Label* gc_required); ++ ++ // Initialize fields with filler values. Fields starting at |current_address| ++ // not including |end_address| are overwritten with the value in |filler|. At ++ // the end the loop, |current_address| takes the value of |end_address|. ++ void InitializeFieldsWithFiller(Register current_address, ++ Register end_address, Register filler); ++ ++ // --------------------------------------------------------------------------- ++ // Support functions. ++ ++ // Check a boolean-bit of a Smi field. ++ void BooleanBitTest(Register object, int field_offset, int bit_index); ++ ++ // Machine code version of Map::GetConstructor(). ++ // |temp| holds |result|'s map when done. ++ void GetMapConstructor(Register result, Register map, Register temp); ++ ++ // --------------------------------------------------------------------------- ++ // Runtime calls ++ ++ // Call a code stub. Generate the code if necessary. ++ void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None()); ++ ++ // Tail call a code stub (jump). Generate the code if necessary. ++ void TailCallStub(CodeStub* stub); ++ ++ // Call a runtime routine. ++ void CallRuntime(const Runtime::Function* f, int num_arguments, ++ SaveFPRegsMode save_doubles = kDontSaveFPRegs); ++ void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { ++ const Runtime::Function* function = Runtime::FunctionForId(fid); ++ CallRuntime(function, function->nargs, kSaveFPRegs); ++ } ++ ++ // Convenience function: Same as above, but takes the fid instead. ++ void CallRuntime(Runtime::FunctionId fid, ++ SaveFPRegsMode save_doubles = kDontSaveFPRegs) { ++ const Runtime::Function* function = Runtime::FunctionForId(fid); ++ CallRuntime(function, function->nargs, save_doubles); ++ } ++ ++ // Convenience function: Same as above, but takes the fid instead. ++ void CallRuntime(Runtime::FunctionId fid, int num_arguments, ++ SaveFPRegsMode save_doubles = kDontSaveFPRegs) { ++ CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles); ++ } ++ ++ // Convenience function: call an external reference. ++ void CallExternalReference(ExternalReference ref, int num_arguments); ++ ++ // Convenience function: tail call a runtime routine (jump). ++ void TailCallRuntime(Runtime::FunctionId fid); ++ ++ // Before calling a C-function from generated code, align arguments on stack. ++ // After aligning the frame, arguments must be stored in esp[0], esp[4], ++ // etc., not pushed. The argument count assumes all arguments are word sized. ++ // Some compilers/platforms require the stack to be aligned when calling ++ // C++ code. ++ // Needs a scratch register to do some arithmetic. This register will be ++ // trashed. ++ void PrepareCallCFunction(int num_arguments, Register scratch); ++ ++ // Calls a C function and cleans up the space for arguments allocated ++ // by PrepareCallCFunction. The called function is not allowed to trigger a ++ // garbage collection, since that might move the code and invalidate the ++ // return address (unless this is somehow accounted for by the called ++ // function). ++ void CallCFunction(ExternalReference function, int num_arguments); ++ void CallCFunction(Register function, int num_arguments); ++ ++ // Jump to a runtime routine. ++ void JumpToExternalReference(const ExternalReference& ext, ++ bool builtin_exit_frame = false); ++ ++ // --------------------------------------------------------------------------- ++ // Utilities ++ ++ void Ret(); ++ ++ // Return and drop arguments from stack, where the number of arguments ++ // may be bigger than 2^16 - 1. Requires a scratch register. ++ void Ret(int bytes_dropped, Register scratch); ++ ++ // Emit code that loads |parameter_index|'th parameter from the stack to ++ // the register according to the CallInterfaceDescriptor definition. ++ // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed ++ // below the caller's sp (on x87 it's at least return address). ++ template ++ void LoadParameterFromStack( ++ Register reg, typename Descriptor::ParameterIndices parameter_index, ++ int sp_to_ra_offset_in_words = 1) { ++ DCHECK(Descriptor::kPassLastArgsOnStack); ++ DCHECK_LT(parameter_index, Descriptor::kParameterCount); ++ DCHECK_LE(Descriptor::kParameterCount - Descriptor::kStackArgumentsCount, ++ parameter_index); ++ int offset = (Descriptor::kParameterCount - parameter_index - 1 + ++ sp_to_ra_offset_in_words) * ++ kPointerSize; ++ mov(reg, Operand(esp, offset)); ++ } ++ ++ // Emit code to discard a non-negative number of pointer-sized elements ++ // from the stack, clobbering only the esp register. ++ void Drop(int element_count); ++ ++ void Call(Label* target) { call(target); } ++ void Call(Handle target, RelocInfo::Mode rmode, ++ TypeFeedbackId id = TypeFeedbackId::None()) { ++ call(target, rmode, id); ++ } ++ void Jump(Handle target, RelocInfo::Mode rmode) { jmp(target, rmode); } ++ void Push(Register src) { push(src); } ++ void Push(const Operand& src) { push(src); } ++ void Push(Immediate value) { push(value); } ++ void Pop(Register dst) { pop(dst); } ++ void Pop(const Operand& dst) { pop(dst); } ++ void PushReturnAddressFrom(Register src) { push(src); } ++ void PopReturnAddressTo(Register dst) { pop(dst); } ++ ++ void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); } ++ void Lzcnt(Register dst, const Operand& src); ++ ++ void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); } ++ void Tzcnt(Register dst, const Operand& src); ++ ++ void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); } ++ void Popcnt(Register dst, const Operand& src); ++ ++ // Move if the registers are not identical. ++ void Move(Register target, Register source); ++ ++ // Move a constant into a destination using the most efficient encoding. ++ void Move(Register dst, const Immediate& x); ++ void Move(const Operand& dst, const Immediate& x); ++ ++ void Move(Register dst, Handle handle) { LoadObject(dst, handle); } ++ void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } ++ ++ // Push a handle value. ++ void Push(Handle handle) { push(Immediate(handle)); } ++ void Push(Smi* smi) { Push(Immediate(smi)); } ++ ++ Handle CodeObject() { ++ DCHECK(!code_object_.is_null()); ++ return code_object_; ++ } ++ ++ // Insert code to verify that the x87 stack has the specified depth (0-7) ++ void VerifyX87StackDepth(uint32_t depth); ++ ++ // Emit code for a truncating division by a constant. The dividend register is ++ // unchanged, the result is in edx, and eax gets clobbered. ++ void TruncatingDiv(Register dividend, int32_t divisor); ++ ++ // --------------------------------------------------------------------------- ++ // StatsCounter support ++ ++ void SetCounter(StatsCounter* counter, int value); ++ void IncrementCounter(StatsCounter* counter, int value); ++ void DecrementCounter(StatsCounter* counter, int value); ++ void IncrementCounter(Condition cc, StatsCounter* counter, int value); ++ void DecrementCounter(Condition cc, StatsCounter* counter, int value); ++ ++ // --------------------------------------------------------------------------- ++ // Debugging ++ ++ // Calls Abort(msg) if the condition cc is not satisfied. ++ // Use --debug_code to enable. ++ void Assert(Condition cc, BailoutReason reason); ++ ++ // Like Assert(), but always enabled. ++ void Check(Condition cc, BailoutReason reason); ++ ++ // Print a message to stdout and abort execution. ++ void Abort(BailoutReason reason); ++ ++ // Check that the stack is aligned. ++ void CheckStackAlignment(); ++ ++ // Verify restrictions about code generated in stubs. ++ void set_generating_stub(bool value) { generating_stub_ = value; } ++ bool generating_stub() { return generating_stub_; } ++ void set_has_frame(bool value) { has_frame_ = value; } ++ bool has_frame() { return has_frame_; } ++ inline bool AllowThisStubCall(CodeStub* stub); ++ ++ // --------------------------------------------------------------------------- ++ // String utilities. ++ ++ // Checks if both objects are sequential one-byte strings, and jumps to label ++ // if either is not. ++ void JumpIfNotBothSequentialOneByteStrings( ++ Register object1, Register object2, Register scratch1, Register scratch2, ++ Label* on_not_flat_one_byte_strings); ++ ++ // Checks if the given register or operand is a unique name ++ void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name, ++ Label::Distance distance = Label::kFar) { ++ JumpIfNotUniqueNameInstanceType(Operand(reg), not_unique_name, distance); ++ } ++ ++ void JumpIfNotUniqueNameInstanceType(Operand operand, Label* not_unique_name, ++ Label::Distance distance = Label::kFar); ++ ++ void EmitSeqStringSetCharCheck(Register string, Register index, ++ Register value, uint32_t encoding_mask); ++ ++ static int SafepointRegisterStackIndex(Register reg) { ++ return SafepointRegisterStackIndex(reg.code()); ++ } ++ ++ // Load the type feedback vector from a JavaScript frame. ++ void EmitLoadFeedbackVector(Register vector); ++ ++ // Activation support. ++ void EnterFrame(StackFrame::Type type); ++ void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg); ++ void LeaveFrame(StackFrame::Type type); ++ ++ void EnterBuiltinFrame(Register context, Register target, Register argc); ++ void LeaveBuiltinFrame(Register context, Register target, Register argc); ++ ++ // Expects object in eax and returns map with validated enum cache ++ // in eax. Assumes that any other register can be used as a scratch. ++ void CheckEnumCache(Label* call_runtime); ++ ++ // AllocationMemento support. Arrays may have an associated ++ // AllocationMemento object that can be checked for in order to pretransition ++ // to another type. ++ // On entry, receiver_reg should point to the array object. ++ // scratch_reg gets clobbered. ++ // If allocation info is present, conditional code is set to equal. ++ void TestJSArrayForAllocationMemento(Register receiver_reg, ++ Register scratch_reg, ++ Label* no_memento_found); ++ ++ private: ++ bool generating_stub_; ++ bool has_frame_; ++ Isolate* isolate_; ++ // This handle will be patched with the code object on installation. ++ Handle code_object_; ++ ++ // Helper functions for generating invokes. ++ void InvokePrologue(const ParameterCount& expected, ++ const ParameterCount& actual, Label* done, ++ bool* definitely_mismatches, InvokeFlag flag, ++ Label::Distance done_distance, ++ const CallWrapper& call_wrapper); ++ ++ void EnterExitFramePrologue(StackFrame::Type frame_type); ++ void EnterExitFrameEpilogue(int argc, bool save_doubles); ++ ++ void LeaveExitFrameEpilogue(bool restore_context); ++ ++ // Allocation support helpers. ++ void LoadAllocationTopHelper(Register result, Register scratch, ++ AllocationFlags flags); ++ ++ void UpdateAllocationTopHelper(Register result_end, Register scratch, ++ AllocationFlags flags); ++ ++ // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. ++ void InNewSpace(Register object, Register scratch, Condition cc, ++ Label* condition_met, ++ Label::Distance condition_met_distance = Label::kFar); ++ ++ // Helper for finding the mark bits for an address. Afterwards, the ++ // bitmap register points at the word with the mark bits and the mask ++ // the position of the first bit. Uses ecx as scratch and leaves addr_reg ++ // unchanged. ++ inline void GetMarkBits(Register addr_reg, Register bitmap_reg, ++ Register mask_reg); ++ ++ // Compute memory operands for safepoint stack slots. ++ Operand SafepointRegisterSlot(Register reg); ++ static int SafepointRegisterStackIndex(int reg_code); ++ ++ // Needs access to SafepointRegisterStackIndex for compiled frame ++ // traversal. ++ friend class StandardFrame; ++}; ++ ++// The code patcher is used to patch (typically) small parts of code e.g. for ++// debugging and other types of instrumentation. When using the code patcher ++// the exact number of bytes specified must be emitted. Is not legal to emit ++// relocation information. If any of these constraints are violated it causes ++// an assertion. ++class CodePatcher { ++ public: ++ CodePatcher(Isolate* isolate, byte* address, int size); ++ ~CodePatcher(); ++ ++ // Macro assembler to emit code. ++ MacroAssembler* masm() { return &masm_; } ++ ++ private: ++ byte* address_; // The address of the code being patched. ++ int size_; // Number of bytes of the expected patch size. ++ MacroAssembler masm_; // Macro assembler used to generate the code. ++}; ++ ++// ----------------------------------------------------------------------------- ++// Static helper functions. ++ ++// Generate an Operand for loading a field from an object. ++inline Operand FieldOperand(Register object, int offset) { ++ return Operand(object, offset - kHeapObjectTag); ++} ++ ++// Generate an Operand for loading an indexed field from an object. ++inline Operand FieldOperand(Register object, Register index, ScaleFactor scale, ++ int offset) { ++ return Operand(object, index, scale, offset - kHeapObjectTag); ++} ++ ++inline Operand FixedArrayElementOperand(Register array, Register index_as_smi, ++ int additional_offset = 0) { ++ int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; ++ return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); ++} ++ ++inline Operand ContextOperand(Register context, int index) { ++ return Operand(context, Context::SlotOffset(index)); ++} ++ ++inline Operand ContextOperand(Register context, Register index) { ++ return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); ++} ++ ++inline Operand NativeContextOperand() { ++ return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); ++} ++ ++#define ACCESS_MASM(masm) masm-> ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_MACRO_ASSEMBLER_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS 2017-12-25 17:42:57.218465603 +0100 +@@ -0,0 +1,2 @@ ++weiliang.lin@intel.com ++chunyang.dai@intel.com +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 2017-12-25 17:42:57.224465515 +0100 +@@ -0,0 +1,7 @@ ++// Copyright 2008 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "src/x87/simulator-x87.h" ++ ++// Since there is no simulator for the ia32 architecture this file is empty. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 2017-12-25 17:42:57.224465515 +0100 +@@ -0,0 +1,52 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef V8_X87_SIMULATOR_X87_H_ ++#define V8_X87_SIMULATOR_X87_H_ ++ ++#include "src/allocation.h" ++ ++namespace v8 { ++namespace internal { ++ ++// Since there is no simulator for the ia32 architecture the only thing we can ++// do is to call the entry directly. ++#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ ++ (entry(p0, p1, p2, p3, p4)) ++ ++ ++typedef int (*regexp_matcher)(String*, int, const byte*, ++ const byte*, int*, int, Address, int, Isolate*); ++ ++// Call the generated regexp code directly. The code at the entry address should ++// expect eight int/pointer sized arguments and return an int. ++#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ ++ p7, p8) \ ++ (FUNCTION_CAST(entry)(p0, p1, p2, p3, p4, p5, p6, p7, p8)) ++ ++ ++// The stack limit beyond which we will throw stack overflow errors in ++// generated code. Because generated code on ia32 uses the C stack, we ++// just use the C stack limit. ++class SimulatorStack : public v8::internal::AllStatic { ++ public: ++ static inline uintptr_t JsLimitFromCLimit(Isolate* isolate, ++ uintptr_t c_limit) { ++ USE(isolate); ++ return c_limit; ++ } ++ ++ static inline uintptr_t RegisterCTryCatch(Isolate* isolate, ++ uintptr_t try_catch_address) { ++ USE(isolate); ++ return try_catch_address; ++ } ++ ++ static inline void UnregisterCTryCatch(Isolate* isolate) { USE(isolate); } ++}; ++ ++} // namespace internal ++} // namespace v8 ++ ++#endif // V8_X87_SIMULATOR_X87_H_ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-12-25 17:42:57.224465515 +0100 +@@ -287,6 +287,17 @@ + "test-macro-assembler-x64.cc", + "test-run-wasm-relocation-x64.cc", + ] ++ } else if (v8_current_cpu == "x87") { ++ sources += [ ### gcmole(arch:x87) ### ++ "test-assembler-x87.cc", ++ "test-code-stubs-x87.cc", ++ "test-code-stubs.cc", ++ "test-code-stubs.h", ++ "test-disasm-x87.cc", ++ "test-log-stack-tracer.cc", ++ "test-macro-assembler-x87.cc", ++ "test-run-wasm-relocation-x87.cc", ++ ] + } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { + sources += [ ### gcmole(arch:ppc) ### + "test-assembler-ppc.cc", +@@ -332,7 +343,7 @@ + + defines = [] + +- if (is_component_build) { ++ if (is_component_build || v8_build_shared) { + # cctest can't be built against a shared library, so we + # need to depend on the underlying static target in that case. + deps += [ "../..:v8_maybe_snapshot" ] +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/cctest.gyp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2017-12-25 17:43:10.318273560 +0100 +@@ -308,6 +308,16 @@ + 'test-disasm-mips64.cc', + 'test-macro-assembler-mips64.cc', + ], ++ 'cctest_sources_x87': [ ### gcmole(arch:x87) ### ++ 'test-assembler-x87.cc', ++ 'test-code-stubs.cc', ++ 'test-code-stubs.h', ++ 'test-code-stubs-x87.cc', ++ 'test-disasm-x87.cc', ++ 'test-macro-assembler-x87.cc', ++ 'test-log-stack-tracer.cc', ++ 'test-run-wasm-relocation-x87.cc', ++ ], + }, + 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'], + 'targets': [ +@@ -392,6 +402,11 @@ + '<@(cctest_sources_mips64el)', + ], + }], ++ ['v8_target_arch=="x87"', { ++ 'sources': [ ++ '<@(cctest_sources_x87)', ++ ], ++ }], + [ 'OS=="linux" or OS=="qnx"', { + 'sources': [ + 'test-platform-linux.cc', +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gen-tags.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2017-12-25 17:43:15.534197094 +0100 +@@ -20,7 +20,7 @@ + import sys + + # All arches that this script understands. +-ARCHES = ["ia32", "x64", "arm", "arm64", "mips", "mips64", "ppc", "s390"] ++ARCHES = ["ia32", "x64", "arm", "arm64", "mips", "mips64", "ppc", "s390", "x87"] + + def PrintHelpAndExit(): + print(__doc__) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gm.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gm.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py 2017-12-25 17:43:15.534197094 +0100 +@@ -33,7 +33,7 @@ + + # All arches that this script understands. + ARCHES = ["ia32", "x64", "arm", "arm64", "mipsel", "mips64el", "ppc", "ppc64", +- "s390", "s390x"] ++ "s390", "s390x", "x87"] + # Arches that get built/run when you don't specify any. + DEFAULT_ARCHES = ["ia32", "x64", "arm", "arm64"] + # Modes that this script understands. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/run-tests.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/run-tests.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py 2017-12-25 17:43:15.534197094 +0100 +@@ -187,6 +187,7 @@ + "android_x64", + "arm", + "ia32", ++ "x87", + "mips", + "mipsel", + "mips64", +@@ -210,6 +211,7 @@ + "mips64el", + "s390", + "s390x", ++ "x87", + "arm64"] + + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2017-12-25 17:43:15.534197094 +0100 +@@ -59,10 +59,10 @@ + # Support arches, modes to be written as keywords instead of strings. + VARIABLES = {ALWAYS: True} + for var in ["debug", "release", "big", "little", +- "android_arm", "android_arm64", "android_ia32", "android_x64", +- "arm", "arm64", "ia32", "mips", "mipsel", "mips64", "mips64el", +- "x64", "ppc", "ppc64", "s390", "s390x", "macos", "windows", +- "linux", "aix"]: ++ "android_arm", "android_arm64", "android_ia32", "android_x87", ++ "android_x64", "arm", "arm64", "ia32", "mips", "mipsel", "mips64", ++ "mips64el", "x64", "x87", "ppc", "ppc64", "s390", "s390x", "macos", ++ "windows", "linux", "aix"]: + VARIABLES[var] = var + + # Allow using variants as keywords. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/verify_source_deps.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2017-12-25 17:43:15.535197080 +0100 +@@ -82,6 +82,7 @@ + 'solaris', + 'vtune', + 'v8-version.h', ++ 'x87', + ] + + ALL_GN_PREFIXES = [ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro qtwebengine-everywhere-src-5.10.0-no-sse2/src/core/core_module.pro +--- qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/core/core_module.pro 2017-12-25 13:05:24.093938639 +0100 +@@ -44,6 +44,31 @@ + else: QMAKE_LFLAGS += $$NINJA_LFLAGS + POST_TARGETDEPS += $$NINJA_TARGETDEPS + ++# go through the shared libraries that GN wants to link to ++# ignore the dummy convert_dict shared library used only to get a .pri file ++# add the ones NOT in lib/sse2 to LIBS_PRIVATE ++# don't add those in lib/sse2 that are only replacements for the normal ones ++# collect all shared libraries, non-SSE2 and SSE2, so they can be installed ++for(shlib, NINJA_SOLIBS) { ++ !contains(shlib, .*convert_dict.*) { ++ contains(shlib, .*/lib/sse2/.*) { ++ shlibs_sse2 += $$shlib ++ } else { ++ LIBS_PRIVATE += $$shlib ++ shlibs += $$shlib ++ } ++ } ++} ++ ++# set the shared libraries to be installed ++# add an rpath to their installation location ++shlib_install_path = $$[QT_INSTALL_LIBS]/qtwebengine ++!isEmpty(shlibs) { ++ shlibs.files += $$shlibs ++ shlibs_sse2.files += $$shlibs_sse2 ++ LIBS_PRIVATE += -Wl,--rpath,$$shlib_install_path ++} ++ + + LIBS_PRIVATE += -L$$api_library_path + CONFIG *= no_smart_library_merge +@@ -113,7 +138,12 @@ + locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales + resources.CONFIG += no_check_exist + resources.path = $$[QT_INSTALL_DATA]/resources +- INSTALLS += locales resources ++ # install the shared libraries ++ shlibs.CONFIG += no_check_exist ++ shlibs.path = $$shlib_install_path ++ shlibs_sse2.CONFIG += no_check_exist ++ shlibs_sse2.path = $$shlib_install_path/sse2 ++ INSTALLS += locales resources shlibs shlibs_sse2 + + !qtConfig(webengine-system-icu) { + icu.CONFIG += no_check_exist +diff -Nur qtwebengine-everywhere-src-5.10.0/src/process/process.pro qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro +--- qtwebengine-everywhere-src-5.10.0/src/process/process.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro 2017-12-25 13:05:24.093938639 +0100 +@@ -9,6 +9,8 @@ + + SOURCES = main.cpp + ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/Release ++ + win32 { + SOURCES += \ + support_win.cpp diff --git a/qtwebengine-opensource-src-5.9.0-skia-neon.patch b/qtwebengine-everywhere-src-5.10.0-skia-neon.patch similarity index 62% rename from qtwebengine-opensource-src-5.9.0-skia-neon.patch rename to qtwebengine-everywhere-src-5.10.0-skia-neon.patch index 3506533..82ef406 100644 --- a/qtwebengine-opensource-src-5.9.0-skia-neon.patch +++ b/qtwebengine-everywhere-src-5.10.0-skia-neon.patch @@ -1,32 +1,32 @@ -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-06-12 12:59:26.707922417 +0200 -@@ -486,6 +486,24 @@ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-12-25 18:31:12.288797893 +0100 +@@ -508,6 +508,24 @@ + } # Separated out so it can be compiled with different flags for SSE. - if (!skia_build_no_opts) { -+ if (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) { -+ source_set("skia_opts_neon") { -+ sources = skia_opts.neon_sources -+ # Root build config sets -mfpu=$arm_fpu, which we expect to be neon -+ # when running this. -+ if (!arm_use_neon) { -+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ] -+ cflags = [ "-mfpu=neon" ] -+ } -+ visibility = [ ":skia_opts" ] -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ -+ ":skia_config", -+ ":skia_library_config", -+ "//build/config/compiler:no_chromium_code", -+ ] ++if (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) { ++ source_set("skia_opts_neon") { ++ sources = skia_opts.neon_sources ++ # Root build config sets -mfpu=$arm_fpu, which we expect to be neon ++ # when running this. ++ if (!arm_use_neon) { ++ configs -= [ "//build/config/compiler:compiler_arm_fpu" ] ++ cflags = [ "-mfpu=neon" ] + } ++ visibility = [ ":skia_opts" ] ++ configs -= [ "//build/config/compiler:chromium_code" ] ++ configs += [ ++ ":skia_config", ++ ":skia_library_config", ++ "//build/config/compiler:no_chromium_code", ++ ] + } - if (current_cpu == "arm64") { - source_set("skia_opts_crc32") { - sources = skia_opts.crc32_sources -@@ -624,14 +642,7 @@ ++} + if (current_cpu == "arm64") { + source_set("skia_opts_crc32") { + sources = skia_opts.crc32_sources +@@ -644,14 +662,7 @@ if (arm_version >= 7) { sources = skia_opts.armv7_sources if (arm_use_neon || arm_optionally_use_neon) { @@ -42,9 +42,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/skia/BUILD.gn q } } else { sources = skia_opts.none_sources -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-06-12 12:20:30.277109309 +0200 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-12-25 18:29:15.083480322 +0100 @@ -23,6 +23,7 @@ "$_src/opts/SkBitmapProcState_matrixProcs_neon.cpp", "$_src/opts/SkBlitMask_opts_arm_neon.cpp", @@ -61,10 +61,10 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski ] crc32 = [ "$_src/opts/SkOpts_crc32.cpp" ] -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-06-12 12:20:30.382107811 +0200 -@@ -19,7 +19,7 @@ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-12-25 18:29:22.449374588 +0100 +@@ -17,7 +17,7 @@ #include "SkImageEncoder.h" #include "SkResourceCache.h" @@ -72,9 +72,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski +#if !SK_ARM_NEON_IS_NONE // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[]; - extern void S16_D16_filter_DX_neon(const SkBitmapProcState&, const uint32_t*, int, uint16_t*); -@@ -280,7 +280,7 @@ - return false; + #endif +@@ -212,7 +212,7 @@ + index |= 4; } -#if !defined(SK_ARM_HAS_NEON) @@ -82,10 +82,10 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski static const SampleProc32 gSkBitmapProcStateSample32[] = { S32_opaque_D32_nofilter_DXDY, S32_alpha_D32_nofilter_DXDY, -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-06-12 12:20:30.448106869 +0200 -@@ -47,16 +47,16 @@ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-12-25 18:34:09.229257992 +0100 +@@ -46,16 +46,16 @@ /////////////////////////////////////////////////////////////////////////////// // Compile neon code paths if needed @@ -102,52 +102,13 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski // Compile non-neon code path if needed -#if !defined(SK_ARM_HAS_NEON) +#if !SK_ARM_NEON_IS_ALWAYS - #define MAKENAME(suffix) ClampX_ClampY ## suffix - #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) - #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBlitter_RGB16.cpp 2017-06-12 12:20:30.449106855 +0200 -@@ -20,7 +20,7 @@ - uint32_t expanded32, unsigned maskRB); - #endif - --#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) -+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) - #include - extern void SkRGB16BlitterBlitV_neon(uint16_t* device, - int height, -@@ -381,7 +381,7 @@ - unsigned maskRB = mask.fRowBytes - width; - uint32_t expanded32 = fExpandedRaw16; - --#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) -+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) - #define UNROLL 8 - do { - int w = width; -@@ -475,7 +475,7 @@ - unsigned scale5 = SkAlpha255To256(alpha) >> 3; - uint32_t src32 = fExpandedRaw16 * scale5; - scale5 = 32 - scale5; --#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) -+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) - SkRGB16BlitterBlitV_neon(device, height, deviceRB, scale5, src32); - #else - do { -@@ -654,7 +654,7 @@ - unsigned scale5 = SkAlpha255To256(alpha) * fScale >> (8 + 3); - uint32_t src32 = fExpandedRaw16 * scale5; - scale5 = 32 - scale5; --#if defined(SK_ARM_HAS_NEON) && defined(SK_CPU_LENDIAN) -+#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN) - SkRGB16BlitterBlitV_neon(device, height, deviceRB, scale5, src32); - #else - do { -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-06-12 12:20:30.449106855 +0200 -@@ -73,6 +73,124 @@ + #define MAKENAME(suffix) ClampX_ClampY ## suffix + #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) + #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-12-25 18:37:45.974144769 +0100 +@@ -74,6 +74,124 @@ return features; } @@ -269,23 +230,23 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski + return features; + } + - #elif defined(SK_CPU_ARM64) && \ - defined(SK_BUILD_FOR_ANDROID) && \ - !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-06-12 12:20:30.449106855 +0200 -@@ -99,6 +99,7 @@ + #elif defined(SK_CPU_ARM64) && __has_include() + #include + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-12-25 18:34:52.777632875 +0100 +@@ -95,6 +95,7 @@ + void Init_sse42(); void Init_avx(); - void Init_hsw(); void Init_crc32(); + void Init_neon(); static void init() { #if !defined(SK_BUILD_NO_OPTS) -@@ -109,6 +110,9 @@ +@@ -104,6 +105,9 @@ + if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } - if (SkCpu::Supports(SkCpu::HSW )) { Init_hsw(); } + #elif defined(SK_CPU_ARM32) + if (SkCpu::Supports(SkCpu::NEON)) { Init_neon(); } @@ -293,9 +254,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski #elif defined(SK_CPU_ARM64) if (SkCpu::Supports(SkCpu::CRC32)) { Init_crc32(); } -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-06-12 12:20:30.450106841 +0200 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-12-25 18:34:52.777632875 +0100 @@ -8,12 +8,75 @@ #ifndef SkUtilsArm_DEFINED #define SkUtilsArm_DEFINED @@ -376,9 +337,9 @@ diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/ski #endif #endif // SkUtilsArm_DEFINED -diff -Nur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-06-12 12:20:30.450106841 +0200 +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-12-25 18:34:52.850631826 +0100 @@ -0,0 +1,54 @@ +/* + * Copyright 2015 Google Inc. diff --git a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch b/qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch similarity index 51% rename from qtwebengine-opensource-src-5.9.0-system-icu-utf.patch rename to qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch index 1c905e4..e645de8 100644 --- a/qtwebengine-opensource-src-5.9.0-system-icu-utf.patch +++ b/qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch @@ -1,18 +1,18 @@ -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 10:52:51.565409865 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 11:13:47.297983554 +0200 -@@ -834,8 +834,6 @@ +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:16:23.250517752 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:26:21.502411527 +0100 +@@ -859,8 +859,6 @@ "third_party/dmg_fp/dmg_fp.h", "third_party/dmg_fp/dtoa_wrapper.cc", "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-06-08 11:02:19.933803953 +0200 + "third_party/valgrind/memcheck.h", + "threading/platform_thread.h", +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-12-25 12:26:21.503411511 +0100 @@ -18,7 +18,7 @@ #if defined(OS_MACOSX) @@ -22,7 +22,7 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi #endif #if defined(OS_WIN) -@@ -1156,9 +1156,9 @@ +@@ -1163,9 +1163,9 @@ int* index) { int codepoint = 0; while (*index < length && codepoint == 0) { @@ -34,9 +34,9 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi DCHECK_GT(codepoint, 0); if (codepoint > 0) { // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-06-08 11:05:52.045814002 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-12-25 12:29:56.210138445 +0100 @@ -16,7 +16,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" @@ -46,9 +46,9 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi #include "base/values.h" namespace base { -@@ -630,21 +630,21 @@ - - while (CanConsume(1)) { +@@ -482,14 +482,14 @@ + // string character and the terminating closing quote. + while (CanConsume(2)) { int start_index = index_; - pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. - CBU8_NEXT(start_pos_, index_, length, next_char); @@ -62,17 +62,18 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi - CBU8_NEXT(start_pos_, start_index, length, next_char); + U8_NEXT(start_pos_, start_index, length, next_char); string.Convert(); - string.AppendString(kUnicodeReplacementString); - continue; + string.AppendString(kUnicodeReplacementString, + arraysize(kUnicodeReplacementString) - 1); +@@ -497,7 +497,7 @@ } if (next_char == '"') { - --index_; // Rewind by one because of CBU8_NEXT. + --index_; // Rewind by one because of U8_NEXT. - out->Swap(&string); + *out = std::move(string); return true; } -@@ -774,10 +774,10 @@ +@@ -633,10 +633,10 @@ // If this is a high surrogate, consume the next code unit to get the // low surrogate. @@ -85,7 +86,7 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi return false; // Make sure that the token has more characters to consume the -@@ -794,24 +794,24 @@ +@@ -653,20 +653,20 @@ NextNChars(3); @@ -107,15 +108,19 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi // Not a surrogate. - DCHECK(CBU16_IS_SINGLE(code_unit16_high)); + DCHECK(U16_IS_SINGLE(code_unit16_high)); - if (!IsValidCharacter(code_unit16_high)) - return false; + if (!IsValidCharacter(code_unit16_high)) { + if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { + return false; +@@ -675,7 +675,7 @@ + return true; + } - CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); + U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); } - dest_string->append(code_unit8); -@@ -828,9 +828,9 @@ + dest_string->append(code_unit8, offset); +@@ -692,9 +692,9 @@ } else { char utf8_units[4] = { 0 }; int offset = 0; @@ -125,11 +130,11 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi - // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be + // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be // zero terminated at this point. |offset| contains the correct length. - dest->AppendString(std::string(utf8_units, offset)); + dest->AppendString(utf8_units, offset); } -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-06-08 11:02:19.934803939 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-12-25 12:36:34.186118210 +0100 @@ -14,7 +14,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversion_utils.h" @@ -139,9 +144,18 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-06-08 11:02:21.774778002 +0200 +@@ -92,7 +92,7 @@ + for (int32_t i = 0; i < length; ++i) { + uint32_t code_point; + if (!ReadUnicodeCharacter(str.data(), length, &i, &code_point) || +- code_point == static_cast(CBU_SENTINEL) || ++ code_point == static_cast(U_SENTINEL) || + !IsValidCharacter(code_point)) { + code_point = kReplacementCodePoint; + did_replacement = true; +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-12-25 12:26:21.545410871 +0100 @@ -4,13 +4,13 @@ #include "base/strings/pattern.h" @@ -197,9 +211,9 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi *p += offset; return c; } -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-06-08 11:02:21.774778002 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-12-25 12:26:21.545410871 +0100 @@ -8,7 +8,7 @@ #include "base/logging.h" @@ -209,9 +223,9 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi namespace base { -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-06-08 11:02:21.775777988 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-12-25 12:26:21.546410856 +0100 @@ -25,7 +25,7 @@ #include "base/memory/singleton.h" #include "base/strings/utf_string_conversion_utils.h" @@ -221,7 +235,7 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi #include "build/build_config.h" namespace base { -@@ -357,19 +357,19 @@ +@@ -372,19 +372,19 @@ } DCHECK_LE(byte_size, static_cast(std::numeric_limits::max())); @@ -245,7 +259,7 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { char_index = prev - 1; -@@ -522,7 +522,7 @@ +@@ -537,7 +537,7 @@ while (char_index < src_len) { int32_t code_point; @@ -254,9 +268,9 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi if (!IsValidCharacter(code_point)) return false; } -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-06-08 11:02:21.775777988 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-12-25 12:26:21.546410856 +0100 @@ -4,7 +4,7 @@ #include "base/strings/utf_string_conversion_utils.h" @@ -335,30 +349,81 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi } // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 10:55:05.945934291 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 11:14:16.956570568 +0200 -@@ -472,7 +472,6 @@ +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc 2017-12-25 12:37:08.791629561 +0100 +@@ -10,7 +10,7 @@ + #include "base/strings/string_number_conversions.h" + #include "base/strings/string_util.h" + #include "base/task_scheduler/post_task.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + #include "base/threading/thread_restrictions.h" + #include "content/public/browser/browser_thread.h" + +@@ -92,7 +92,7 @@ + } else { + // Provided client has requested sufficient large block, make their + // life easier by not truncating in the middle of a UTF-8 character. +- if (size_got > 6 && !CBU8_IS_SINGLE(buffer[size_got - 1])) { ++ if (size_got > 6 && !U8_IS_SINGLE(buffer[size_got - 1])) { + base::TruncateUTF8ToByteSize(buffer, size_got, &buffer); + size_got = buffer.size(); + } else { +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/net/cert/internal/parse_name.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/net/cert/internal/parse_name.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/net/cert/internal/parse_name.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/net/cert/internal/parse_name.cc 2017-12-25 12:34:58.610528544 +0100 +@@ -9,7 +9,7 @@ + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" + #include "base/sys_byteorder.h" +-#include "base/third_party/icu/icu_utf.h" ++#include + + #if !defined(OS_NACL) + #include "net/base/net_string_util.h" +@@ -38,7 +38,7 @@ + + // BMPString only supports codepoints in the Basic Multilingual Plane; + // surrogates are not allowed. +- if (CBU_IS_SURROGATE(c)) ++ if (U_IS_SURROGATE(c)) + return false; + } + return base::UTF16ToUTF8(in_16bit.data(), in_16bit.size(), out); +@@ -58,7 +58,7 @@ + for (const uint32_t c : in_32bit) { + // UniversalString is UCS-4 in big-endian order. + uint32_t codepoint = base::NetToHost32(c); +- if (!CBU_IS_UNICODE_CHAR(codepoint)) ++ if (!U_IS_UNICODE_CHAR(codepoint)) + return false; + + base::WriteUnicodeCharacter(codepoint, out); +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:20:43.585562853 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:41:57.071558915 +0100 +@@ -526,7 +526,6 @@ 'base/task_scheduler/task_traits.cc', 'base/third_party/dmg_fp/dtoa_wrapper.cc', 'base/third_party/dmg_fp/g_fmt.cc', - 'base/third_party/icu/icu_utf.cc', - 'base/threading/non_thread_safe_impl.cc', 'base/threading/post_task_and_reply_impl.cc', + 'base/threading/sequence_local_storage_map.cc', 'base/threading/sequenced_task_runner_handle.cc', -@@ -574,7 +573,7 @@ - } - - if is_linux: -- libs.extend(['-lrt', '-lnspr4']) -+ libs.extend(['-lrt', '-lnspr4', '-licuuc']) - ldflags.extend(['-pthread']) - - static_libraries['xdg_user_dirs'] = { -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:26.863178931 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:30.168114045 +0200 -@@ -277,6 +277,7 @@ +@@ -679,7 +678,7 @@ + 'base/allocator/allocator_shim.cc', + 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', + ]) +- libs.extend(['-lrt', '-lnspr4']) ++ libs.extend(['-lrt', '-lnspr4', '-licuuc']) + static_libraries['libevent']['include_dirs'].extend([ + os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') + ]) +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:16:48.744131902 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:26:21.547410841 +0100 +@@ -278,6 +278,7 @@ libs = [ "nspr4", @@ -366,9 +431,20 @@ diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromi ] } -diff -ur qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-06-08 11:02:21.776777974 +0200 +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc 2017-12-25 12:40:50.356500963 +0100 +@@ -17,7 +17,6 @@ + #include "base/logging.h" + #include "base/strings/string_util.h" + #include "base/strings/utf_string_conversions.h" +-#include "base/third_party/icu/icu_utf.h" + #include "chromeos/system/devicemode.h" + #include "ui/base/ime/chromeos/ime_keyboard.h" + #include "ui/base/ime/chromeos/input_method_manager.h" +diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc +--- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-12-25 12:26:21.547410841 +0100 @@ -5,13 +5,13 @@ #include "ui/gfx/utf16_indexing.h" diff --git a/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch b/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch new file mode 100644 index 0000000..ec4dce8 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch @@ -0,0 +1,80 @@ +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:16:23.250517752 +0100 +@@ -53,6 +53,9 @@ + "-Wno-char-subscripts", + ] + } ++ ldflags = [ ++ "-lnspr4", ++ ] + } + + config("base_implementation") { +@@ -858,8 +861,6 @@ + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", +- "third_party/nspr/prtime.cc", +- "third_party/nspr/prtime.h", + "third_party/superfasthash/superfasthash.c", + "third_party/valgrind/memcheck.h", + "threading/platform_thread.h", +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-12-25 12:16:23.250517752 +0100 +@@ -7,7 +7,7 @@ + + #include "base/compiler_specific.h" + #include "base/macros.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "base/time/time.h" + #include "build/build_config.h" + #include "testing/gtest/include/gtest/gtest.h" +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/time.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-12-25 12:16:48.710132416 +0100 +@@ -14,7 +14,7 @@ + #include "base/logging.h" + #include "base/macros.h" + #include "base/strings/stringprintf.h" +-#include "base/third_party/nspr/prtime.h" ++#include + #include "build/build_config.h" + + namespace base { +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:20:43.585562853 +0100 +@@ -527,7 +527,6 @@ + 'base/third_party/dmg_fp/dtoa_wrapper.cc', + 'base/third_party/dmg_fp/g_fmt.cc', + 'base/third_party/icu/icu_utf.cc', +- 'base/third_party/nspr/prtime.cc', + 'base/threading/post_task_and_reply_impl.cc', + 'base/threading/sequence_local_storage_map.cc', + 'base/threading/sequenced_task_runner_handle.cc', +@@ -680,7 +679,7 @@ + 'base/allocator/allocator_shim.cc', + 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', + ]) +- libs.extend(['-lrt']) ++ libs.extend(['-lrt', '-lnspr4']) + static_libraries['libevent']['include_dirs'].extend([ + os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') + ]) +diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:16:48.744131902 +0100 +@@ -275,6 +275,10 @@ + "//build/config:exe_and_shlib_deps", + "//build/win:default_exe_manifest", + ] ++ ++ libs = [ ++ "nspr4", ++ ] + } + + test("gn_unittests") { diff --git a/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch b/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch deleted file mode 100644 index 87b5beb..0000000 --- a/qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/buildtools/gn.pro qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose/src/buildtools/gn.pro ---- qtwebengine-opensource-src-5.9.0/src/buildtools/gn.pro 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose/src/buildtools/gn.pro 2017-06-10 15:24:55.426814326 +0200 -@@ -20,7 +20,7 @@ - src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir)) - gn_args = $$system_quote($$gn_args) -- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path -+ gn_configure = $$system_quote($$gn_bootstrap) --verbose --shadow --gn-gen-args=$$gn_args $$ninja_path - !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") { - error("GN build error!") - } diff --git a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch b/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch deleted file mode 100644 index ab14cb9..0000000 --- a/qtwebengine-opensource-src-5.9.0-system-nspr-prtime.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-06-08 10:52:51.565409865 +0200 -@@ -49,6 +49,9 @@ - "-Wno-char-subscripts", - ] - } -+ ldflags = [ -+ "-lnspr4", -+ ] - } - - config("base_implementation") { -@@ -833,8 +836,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "threading/non_thread_safe.h", - "threading/non_thread_safe_impl.cc", -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-06-08 10:58:06.743413247 +0200 -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/base/time/time.cc 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-06-08 10:58:09.557373071 +0200 -@@ -14,7 +14,7 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "build/build_config.h" - - namespace base { -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-06-08 10:55:05.945934291 +0200 -@@ -473,7 +473,6 @@ - 'base/third_party/dmg_fp/dtoa_wrapper.cc', - 'base/third_party/dmg_fp/g_fmt.cc', - 'base/third_party/icu/icu_utf.cc', -- 'base/third_party/nspr/prtime.cc', - 'base/threading/non_thread_safe_impl.cc', - 'base/threading/post_task_and_reply_impl.cc', - 'base/threading/sequenced_task_runner_handle.cc', -@@ -575,7 +574,7 @@ - } - - if is_linux: -- libs.extend(['-lrt']) -+ libs.extend(['-lrt', '-lnspr4']) - ldflags.extend(['-pthread']) - - static_libraries['xdg_user_dirs'] = { -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-06-10 22:18:26.863178931 +0200 -@@ -274,6 +274,10 @@ - "//build/config/sanitizers:deps", - "//build/win:default_exe_manifest", - ] -+ -+ libs = [ -+ "nspr4", -+ ] - } - - test("gn_unittests") { diff --git a/qtwebengine-opensource-src-5.9.1-no-sse2.patch b/qtwebengine-opensource-src-5.9.1-no-sse2.patch deleted file mode 100644 index 086349a..0000000 --- a/qtwebengine-opensource-src-5.9.1-no-sse2.patch +++ /dev/null @@ -1,3132 +0,0 @@ -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/customdialogs/customdialogs.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro ---- qtwebengine-opensource-src-5.9.1/examples/webengine/customdialogs/customdialogs.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-07-01 03:36:34.349977335 +0200 -@@ -1,5 +1,7 @@ - QT += webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - server.h - -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/minimal/minimal.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/minimal/minimal.pro ---- qtwebengine-opensource-src-5.9.1/examples/webengine/minimal/minimal.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/minimal/minimal.pro 2017-07-01 03:36:34.439976022 +0200 -@@ -2,6 +2,8 @@ - - QT += webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - SOURCES += main.cpp - - RESOURCES += qml.qrc -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro ---- qtwebengine-opensource-src-5.9.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-07-01 03:36:34.440976008 +0200 -@@ -20,5 +20,7 @@ - QT += widgets # QApplication is required to get native styling with QtQuickControls - } - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser - INSTALLS += target -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro ---- qtwebengine-opensource-src-5.9.1/examples/webengine/recipebrowser/recipebrowser.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-07-01 03:36:34.497975177 +0200 -@@ -2,6 +2,8 @@ - - QT += quick qml quickcontrols2 webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - cross_compile { - posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED - } -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-07-01 03:36:34.556974316 +0200 -@@ -1,5 +1,7 @@ - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS = mainwindow.h - SOURCES = main.cpp \ - mainwindow.cpp -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-07-01 03:36:34.614973470 +0200 -@@ -3,6 +3,8 @@ - TEMPLATE = app - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - SOURCES += \ - main.cpp\ - mainwindow.cpp -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/demobrowser/demobrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/demobrowser/demobrowser.pro 2017-07-01 03:36:34.673972609 +0200 -@@ -3,6 +3,8 @@ - QT += webenginewidgets network widgets printsupport - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - qtHaveModule(uitools):!embedded: QT += uitools - else: DEFINES += QT_NO_UITOOLS - -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-07-01 03:39:53.946070116 +0200 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - SOURCES += html2pdf.cpp - - target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/maps/maps.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/maps/maps.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/maps/maps.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-07-01 03:40:09.747841163 +0200 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - mainwindow.h - -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-07-01 03:36:34.731971763 +0200 -@@ -3,6 +3,8 @@ - QT += webenginewidgets webchannel - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - mainwindow.h \ - previewpage.h \ -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/minimal/minimal.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/minimal/minimal.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-07-01 03:36:34.789970917 +0200 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - SOURCES += main.cpp - - target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-07-01 03:36:34.850970027 +0200 -@@ -3,6 +3,8 @@ - QT += webenginewidgets - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - browser.h \ - browserwindow.h \ -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-07-01 03:36:34.851970013 +0200 -@@ -7,6 +7,8 @@ - error("Spellcheck example can not be built when using native OS dictionaries.") - } - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - webview.h - -diff -Nur qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro ---- qtwebengine-opensource-src-5.9.1/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-07-01 03:36:34.851970013 +0200 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release -+ - HEADERS += \ - mainwindow.h \ - fullscreenwindow.h \ -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-07-01 03:36:34.851970013 +0200 -@@ -533,13 +533,6 @@ - } else if (current_cpu == "x86") { - cflags += [ "-m32" ] - ldflags += [ "-m32" ] -- if (!is_nacl) { -- cflags += [ -- "-msse2", -- "-mfpmath=sse", -- "-mmmx", -- ] -- } - } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { - cflags += [ "--target=arm-linux-gnueabihf" ] -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-07-01 03:36:34.928968889 +0200 -@@ -59,3 +59,11 @@ - # It should never be explicitly set by the user. - v8_current_cpu = v8_target_cpu - } -+ -+if (v8_current_cpu == "x86") { -+ # If we are not building for the x86_sse2 toolchain, we actually want to build -+ # the "x87" backend instead. -+ if (current_toolchain != "//build/toolchain/linux:x86_sse2") { -+ v8_current_cpu = "x87" -+ } -+} -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-07-01 03:36:34.929968875 +0200 -@@ -213,6 +213,10 @@ - extra_ldflags = "" - } - -+ if (defined(invoker.shlib_subdir)) { -+ shlib_subdir = invoker.shlib_subdir -+ } -+ - # These library switches can apply to all tools below. - lib_switch = "-l" - lib_dir_switch = "-L" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-07-01 03:36:34.929968875 +0200 -@@ -96,6 +96,26 @@ - } - } - -+gcc_toolchain("x86_sse2") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ extra_cflags = "-msse2 -mfpmath=sse" -+ extra_cxxflags = "-msse2 -mfpmath=sse" -+ shlib_subdir = "lib/sse2" -+ -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "linux" -+ is_clang = false -+ } -+} -+ - clang_toolchain("clang_x64") { - toolchain_args = { - current_cpu = "x64" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/cc/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-07-01 03:36:34.929968875 +0200 -@@ -567,13 +567,6 @@ - "trees/tree_synchronizer.h", - ] - -- if (current_cpu == "x86" || current_cpu == "x64") { -- sources += [ -- "raster/texture_compressor_etc1_sse.cc", -- "raster/texture_compressor_etc1_sse.h", -- ] -- } -- - configs += [ "//build/config:precompiled_headers" ] - - public_deps = [ -@@ -583,6 +576,7 @@ - deps = [ - "//base", - "//base/third_party/dynamic_annotations", -+ "//cc:cc_opts", - "//cc/proto", - "//cc/surfaces:surface_id", - "//gpu", -@@ -612,6 +606,36 @@ - } - } - -+source_set("cc_opts") { -+ public_deps = [ -+ "//cc:cc_opts_sse", -+ ] -+} -+ -+source_set("cc_opts_sse") { -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps = [ -+ "//base", -+ ] -+ -+ defines = [ "CC_IMPLEMENTATION=1" ] -+ -+ if (!is_debug && (is_win || is_android)) { -+ configs -= [ "//build/config/compiler:optimize" ] -+ configs += [ "//build/config/compiler:optimize_max" ] -+ } -+ -+ sources = [ -+ "raster/texture_compressor.h", -+ "raster/texture_compressor_etc1.h", -+ "raster/texture_compressor_etc1_sse.cc", -+ "raster/texture_compressor_etc1_sse.h", -+ ] -+ -+ cflags = [ "-msse2" ] -+ } -+} -+ - static_library("test_support") { - testonly = true - sources = [ -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-07-01 03:36:34.998967868 +0200 -@@ -468,6 +468,13 @@ - "//ui/surface", - "//v8", - ] -+ -+ if (current_cpu == "x86") { -+ deps += [ -+ "//v8(//build/toolchain/linux:x86_sse2)", -+ ] -+ } -+ - allow_circular_includes_from = [] - - if (use_aura && !use_qt) { -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-07-01 03:36:35.073966774 +0200 -@@ -336,13 +336,13 @@ - } - - if (current_cpu == "x86" || current_cpu == "x64") { -- sources += [ -- "simd/convert_rgb_to_yuv_sse2.cc", -- "simd/convert_rgb_to_yuv_ssse3.cc", -- "simd/convert_yuv_to_rgb_x86.cc", -- "simd/filter_yuv_sse2.cc", -+ sources += [ "simd/convert_yuv_to_rgb_x86.cc" ] -+ deps += [ -+ ":media_yasm", -+ ":media_mmx", -+ ":media_sse", -+ ":media_sse2", - ] -- deps += [ ":media_yasm" ] - } - - if (is_linux || is_win) { -@@ -539,10 +539,47 @@ - } - - if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("media_mmx") { -+ sources = [ "simd/filter_yuv_mmx.cc" ] -+ configs += [ "//media:media_config" ] -+ if (!is_win) { -+ cflags = [ "-mmmx" ] -+ } -+ } -+ -+ source_set("media_sse") { -+ sources = [ -+ "simd/sinc_resampler_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } -+ -+ source_set("media_sse2") { -+ sources = [ -+ "simd/convert_rgb_to_yuv_sse2.cc", -+ "simd/convert_rgb_to_yuv_ssse3.cc", -+ "simd/filter_yuv_sse2.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse2" ] -+ } -+ } -+ - import("//third_party/yasm/yasm_assemble.gni") - yasm_assemble("media_yasm") { - sources = [ - "simd/convert_rgb_to_yuv_ssse3.asm", -+ "simd/convert_yuv_to_rgb_mmx.asm", - "simd/convert_yuv_to_rgb_sse.asm", - "simd/convert_yuva_to_argb_mmx.asm", - "simd/empty_register_state_mmx.asm", -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/media.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-07-01 03:36:35.131965928 +0200 -@@ -10,6 +10,8 @@ - #include "base/metrics/field_trial.h" - #include "base/trace_event/trace_event.h" - #include "media/base/media_switches.h" -+#include "media/base/sinc_resampler.h" -+#include "media/base/vector_math.h" - #include "media/base/yuv_convert.h" - - #if defined(OS_ANDROID) -@@ -40,6 +42,8 @@ - TRACE_EVENT_WARMUP_CATEGORY("media"); - - // Perform initialization of libraries which require runtime CPU detection. -+ vector_math::Initialize(); -+ SincResampler::InitializeCPUSpecificFeatures(); - InitializeCPUSpecificYUVConversions(); - - #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb.h 2017-07-01 03:36:35.131965928 +0200 -@@ -65,6 +65,17 @@ - int rgbstride, - YUVType yuv_type); - -+MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type); -+ - MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -@@ -124,6 +135,13 @@ - ptrdiff_t width, - const int16_t* convert_table); - -+MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ ptrdiff_t width, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -@@ -131,6 +149,14 @@ - ptrdiff_t width, - const int16_t* convert_table); - -+MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, -+ const uint8_t* u_buf, -+ const uint8_t* v_buf, -+ uint8_t* rgb_buf, -+ ptrdiff_t width, -+ ptrdiff_t source_dx, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -@@ -147,6 +173,14 @@ - ptrdiff_t source_dx, - const int16_t* convert_table); - -+MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(const uint8_t* y_buf, -+ const uint8_t* u_buf, -+ const uint8_t* v_buf, -+ uint8_t* rgb_buf, -+ ptrdiff_t width, -+ ptrdiff_t source_dx, -+ const int16_t* convert_table); -+ - MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_mmx.asm 2017-07-01 03:36:35.132965913 +0200 -@@ -0,0 +1,23 @@ -+; Copyright (c) 2011 The Chromium Authors. All rights reserved. -+; Use of this source code is governed by a BSD-style license that can be -+; found in the LICENSE file. -+ -+%include "third_party/x86inc/x86inc.asm" -+ -+; -+; This file uses MMX instructions. -+; -+ SECTION_TEXT -+ CPU MMX -+ -+; Use movq to save the output. -+%define MOVQ movq -+ -+; extern "C" void ConvertYUVToRGB32Row_MMX(const uint8* y_buf, -+; const uint8* u_buf, -+; const uint8* v_buf, -+; uint8* rgb_buf, -+; ptrdiff_t width, -+; const int16* convert_table); -+%define SYMBOL ConvertYUVToRGB32Row_MMX -+%include "convert_yuv_to_rgb_mmx.inc" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/convert_yuv_to_rgb_x86.cc 2017-07-01 03:36:35.132965913 +0200 -@@ -47,6 +47,34 @@ - EmptyRegisterState(); - } - -+void ConvertYUVToRGB32_MMX(const uint8_t* yplane, -+ const uint8_t* uplane, -+ const uint8_t* vplane, -+ uint8_t* rgbframe, -+ int width, -+ int height, -+ int ystride, -+ int uvstride, -+ int rgbstride, -+ YUVType yuv_type) { -+ unsigned int y_shift = GetVerticalShift(yuv_type); -+ for (int y = 0; y < height; ++y) { -+ uint8_t* rgb_row = rgbframe + y * rgbstride; -+ const uint8_t* y_ptr = yplane + y * ystride; -+ const uint8_t* u_ptr = uplane + (y >> y_shift) * uvstride; -+ const uint8_t* v_ptr = vplane + (y >> y_shift) * uvstride; -+ -+ ConvertYUVToRGB32Row_MMX(y_ptr, -+ u_ptr, -+ v_ptr, -+ rgb_row, -+ width, -+ GetLookupTable(yuv_type)); -+ } -+ -+ EmptyRegisterState(); -+} -+ - void ConvertYUVToRGB32_SSE(const uint8_t* yplane, - const uint8_t* uplane, - const uint8_t* vplane, -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv.h 2017-07-01 03:36:35.132965913 +0200 -@@ -20,6 +20,12 @@ - int source_width, - uint8_t source_y_fraction); - -+MEDIA_EXPORT void FilterYUVRows_MMX(uint8_t* ybuf, -+ const uint8_t* y0_ptr, -+ const uint8_t* y1_ptr, -+ int source_width, -+ uint8_t source_y_fraction); -+ - MEDIA_EXPORT void FilterYUVRows_SSE2(uint8_t* ybuf, - const uint8_t* y0_ptr, - const uint8_t* y1_ptr, -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/filter_yuv_mmx.cc 2017-07-01 03:36:35.132965913 +0200 -@@ -0,0 +1,79 @@ -+// Copyright (c) 2011 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if defined(_MSC_VER) -+#include -+#else -+#include -+#endif -+ -+#include "build/build_config.h" -+#include "media/base/simd/filter_yuv.h" -+ -+namespace media { -+ -+#if defined(COMPILER_MSVC) -+// Warning 4799 is about calling emms before the function exits. -+// We calls emms in a frame level so suppress this warning. -+#pragma warning(push) -+#pragma warning(disable: 4799) -+#endif -+ -+void FilterYUVRows_MMX(uint8_t* dest, -+ const uint8_t* src0, -+ const uint8_t* src1, -+ int width, -+ uint8_t fraction) { -+ int pixel = 0; -+ -+ // Process the unaligned bytes first. -+ int unaligned_width = -+ (8 - (reinterpret_cast(dest) & 7)) & 7; -+ while (pixel < width && pixel < unaligned_width) { -+ dest[pixel] = (src0[pixel] * (256 - fraction) + -+ src1[pixel] * fraction) >> 8; -+ ++pixel; -+ } -+ -+ __m64 zero = _mm_setzero_si64(); -+ __m64 src1_fraction = _mm_set1_pi16(fraction); -+ __m64 src0_fraction = _mm_set1_pi16(256 - fraction); -+ const __m64* src0_64 = reinterpret_cast(src0 + pixel); -+ const __m64* src1_64 = reinterpret_cast(src1 + pixel); -+ __m64* dest64 = reinterpret_cast<__m64*>(dest + pixel); -+ __m64* end64 = reinterpret_cast<__m64*>( -+ reinterpret_cast(dest + width) & ~7); -+ -+ while (dest64 < end64) { -+ __m64 src0 = *src0_64++; -+ __m64 src1 = *src1_64++; -+ __m64 src2 = _mm_unpackhi_pi8(src0, zero); -+ __m64 src3 = _mm_unpackhi_pi8(src1, zero); -+ src0 = _mm_unpacklo_pi8(src0, zero); -+ src1 = _mm_unpacklo_pi8(src1, zero); -+ src0 = _mm_mullo_pi16(src0, src0_fraction); -+ src1 = _mm_mullo_pi16(src1, src1_fraction); -+ src2 = _mm_mullo_pi16(src2, src0_fraction); -+ src3 = _mm_mullo_pi16(src3, src1_fraction); -+ src0 = _mm_add_pi16(src0, src1); -+ src2 = _mm_add_pi16(src2, src3); -+ src0 = _mm_srli_pi16(src0, 8); -+ src2 = _mm_srli_pi16(src2, 8); -+ src0 = _mm_packs_pu16(src0, src2); -+ *dest64++ = src0; -+ pixel += 8; -+ } -+ -+ while (pixel < width) { -+ dest[pixel] = (src0[pixel] * (256 - fraction) + -+ src1[pixel] * fraction) >> 8; -+ ++pixel; -+ } -+} -+ -+#if defined(COMPILER_MSVC) -+#pragma warning(pop) -+#endif -+ -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/sinc_resampler_sse.cc 2017-07-01 03:36:35.133965899 +0200 -@@ -0,0 +1,50 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/sinc_resampler.h" -+ -+#include -+ -+namespace media { -+ -+float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -+ const float* k2, -+ double kernel_interpolation_factor) { -+ __m128 m_input; -+ __m128 m_sums1 = _mm_setzero_ps(); -+ __m128 m_sums2 = _mm_setzero_ps(); -+ -+ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -+ // these loops hurt performance in local testing. -+ if (reinterpret_cast(input_ptr) & 0x0F) { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_loadu_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } else { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_load_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } -+ -+ // Linearly interpolate the two "convolutions". -+ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -+ static_cast(1.0 - kernel_interpolation_factor))); -+ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -+ static_cast(kernel_interpolation_factor))); -+ m_sums1 = _mm_add_ps(m_sums1, m_sums2); -+ -+ // Sum components together. -+ float result; -+ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -+ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -+ m_sums2, m_sums2, 1))); -+ -+ return result; -+} -+ -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/simd/vector_math_sse.cc 2017-07-01 03:36:35.133965899 +0200 -@@ -0,0 +1,118 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/vector_math_testing.h" -+ -+#include -+ -+#include // NOLINT -+ -+namespace media { -+namespace vector_math { -+ -+void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) -+ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] = src[i] * scale; -+} -+ -+void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) { -+ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -+ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -+ } -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] += src[i] * scale; -+} -+ -+// Convenience macro to extract float 0 through 3 from the vector |a|. This is -+// needed because compilers other than clang don't support access via -+// operator[](). -+#define EXTRACT_FLOAT(a, i) \ -+ (i == 0 ? \ -+ _mm_cvtss_f32(a) : \ -+ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -+ -+std::pair EWMAAndMaxPower_SSE( -+ float initial_value, const float src[], int len, float smoothing_factor) { -+ // When the recurrence is unrolled, we see that we can split it into 4 -+ // separate lanes of evaluation: -+ // -+ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -+ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -+ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ // -+ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -+ // -+ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -+ // each of the 4 lanes, and then combine them to give y[n]. -+ -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ -+ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -+ const float weight_prev = 1.0f - smoothing_factor; -+ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -+ const __m128 weight_prev_squared_x4 = -+ _mm_mul_ps(weight_prev_x4, weight_prev_x4); -+ const __m128 weight_prev_4th_x4 = -+ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -+ -+ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -+ // 0, respectively. -+ __m128 max_x4 = _mm_setzero_ps(); -+ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -+ int i; -+ for (i = 0; i < last_index; i += 4) { -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -+ const __m128 sample_x4 = _mm_load_ps(src + i); -+ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -+ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -+ // Note: The compiler optimizes this to a single multiply-and-accumulate -+ // instruction: -+ ewma_x4 = _mm_add_ps(ewma_x4, -+ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -+ } -+ -+ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ float ewma = EXTRACT_FLOAT(ewma_x4, 3); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 2); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 1); -+ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 0); -+ -+ // Fold the maximums together to get the overall maximum. -+ max_x4 = _mm_max_ps(max_x4, -+ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -+ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -+ -+ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -+ -+ // Handle remaining values at the end of |src|. -+ for (; i < len; ++i) { -+ result.first *= weight_prev; -+ const float sample = src[i]; -+ const float sample_squared = sample * sample; -+ result.first += sample_squared * smoothing_factor; -+ result.second = std::max(result.second, sample_squared); -+ } -+ -+ return result; -+} -+ -+} // namespace vector_math -+} // namespace media -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-07-01 03:36:35.133965899 +0200 -@@ -81,17 +81,12 @@ - #include - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - --#if defined(ARCH_CPU_X86_FAMILY) --#include --#define CONVOLVE_FUNC Convolve_SSE --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include --#define CONVOLVE_FUNC Convolve_NEON --#else --#define CONVOLVE_FUNC Convolve_C - #endif - - namespace media { -@@ -112,10 +107,41 @@ - return sinc_scale_factor; - } - -+#undef CONVOLVE_FUNC -+ - static int CalculateChunkSize(int block_size_, double io_ratio) { - return block_size_ / io_ratio; - } - -+// If we know the minimum architecture at compile time, avoid CPU detection. -+// Force NaCl code to use C routines since (at present) nothing there uses these -+// methods and plumbing the -msse built library is non-trivial. -+#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(__SSE__) -+#define CONVOLVE_FUNC Convolve_SSE -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// X86 CPU detection required. Functions will be set by -+// InitializeCPUSpecificFeatures(). -+#define CONVOLVE_FUNC g_convolve_proc_ -+ -+typedef float (*ConvolveProc)(const float*, const float*, const float*, double); -+static ConvolveProc g_convolve_proc_ = NULL; -+ -+void SincResampler::InitializeCPUSpecificFeatures() { -+ CHECK(!g_convolve_proc_); -+ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; -+} -+#endif -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define CONVOLVE_FUNC Convolve_NEON -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// Unknown architecture. -+#define CONVOLVE_FUNC Convolve_C -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#endif -+ - SincResampler::SincResampler(double io_sample_rate_ratio, - int request_frames, - const ReadCB& read_cb) -@@ -328,46 +354,7 @@ - kernel_interpolation_factor * sum2); - } - --#if defined(ARCH_CPU_X86_FAMILY) --float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -- const float* k2, -- double kernel_interpolation_factor) { -- __m128 m_input; -- __m128 m_sums1 = _mm_setzero_ps(); -- __m128 m_sums2 = _mm_setzero_ps(); -- -- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -- // these loops hurt performance in local testing. -- if (reinterpret_cast(input_ptr) & 0x0F) { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_loadu_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } else { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_load_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } -- -- // Linearly interpolate the two "convolutions". -- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -- static_cast(1.0 - kernel_interpolation_factor))); -- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -- static_cast(kernel_interpolation_factor))); -- m_sums1 = _mm_add_ps(m_sums1, m_sums2); -- -- // Sum components together. -- float result; -- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -- m_sums2, m_sums2, 1))); -- -- return result; --} --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, - const float* k2, - double kernel_interpolation_factor) { -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-07-01 03:36:35.133965899 +0200 -@@ -36,6 +36,10 @@ - kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), - }; - -+ // Selects runtime specific CPU features like SSE. Must be called before -+ // using SincResampler. -+ static void InitializeCPUSpecificFeatures(); -+ - // Callback type for providing more data into the resampler. Expects |frames| - // of data to be rendered into |destination|; zero padded if not enough frames - // are available to satisfy the request. -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-07-01 03:36:35.134965884 +0200 -@@ -4,6 +4,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/time/time.h" - #include "build/build_config.h" - #include "media/base/sinc_resampler.h" -@@ -61,6 +62,9 @@ - &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); - - #if defined(CONVOLVE_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - RunConvolveBenchmark( - &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); - RunConvolveBenchmark( -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-07-01 03:36:35.134965884 +0200 -@@ -10,6 +10,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/macros.h" - #include "base/strings/string_number_conversions.h" - #include "base/time/time.h" -@@ -166,6 +167,10 @@ - static const double kKernelInterpolationFactor = 0.5; - - TEST(SincResamplerTest, Convolve) { -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif -+ - // Initialize a dummy resampler. - MockSource mock_source; - SincResampler resampler( -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-07-01 03:36:35.135965870 +0200 -@@ -7,12 +7,17 @@ - - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - -+namespace media { -+namespace vector_math { -+ -+// If we know the minimum architecture at compile time, avoid CPU detection. - // NaCl does not allow intrinsics. - #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --#include -+#if defined(__SSE__) - // Don't use custom SSE versions where the auto-vectorized C version performs - // better, which is anywhere clang is used. - #if !defined(__clang__) -@@ -23,20 +28,52 @@ - #define FMUL_FUNC FMUL_C - #endif - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+void Initialize() {} -+#else -+// X86 CPU detection required. Functions will be set by Initialize(). -+#if !defined(__clang__) -+#define FMAC_FUNC g_fmac_proc_ -+#define FMUL_FUNC g_fmul_proc_ -+#else -+#define FMAC_FUNC FMAC_C -+#define FMUL_FUNC FMUL_C -+#endif -+#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ -+ -+#if !defined(__clang__) -+typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); -+static MathProc g_fmac_proc_ = NULL; -+static MathProc g_fmul_proc_ = NULL; -+#endif -+typedef std::pair (*EWMAAndMaxPowerProc)( -+ float initial_value, const float src[], int len, float smoothing_factor); -+static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; -+ -+void Initialize() { -+ CHECK(!g_fmac_proc_); -+ CHECK(!g_fmul_proc_); -+ CHECK(!g_ewma_power_proc_); -+ const bool kUseSSE = base::CPU().has_sse(); -+#if !defined(__clang__) -+ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; -+ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; -+#endif -+ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; -+} -+#endif - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include - #define FMAC_FUNC FMAC_NEON - #define FMUL_FUNC FMUL_NEON - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+void Initialize() {} - #else - #define FMAC_FUNC FMAC_C - #define FMUL_FUNC FMUL_C - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C -+void Initialize() {} - #endif - --namespace media { --namespace vector_math { -- - void FMAC(const float src[], float scale, int len, float dest[]) { - // Ensure |src| and |dest| are 16-byte aligned. - DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); -@@ -89,111 +126,6 @@ - return result; - } - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) -- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] = src[i] * scale; --} -- --void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) { -- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -- } -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] += src[i] * scale; --} -- --// Convenience macro to extract float 0 through 3 from the vector |a|. This is --// needed because compilers other than clang don't support access via --// operator[](). --#define EXTRACT_FLOAT(a, i) \ -- (i == 0 ? \ -- _mm_cvtss_f32(a) : \ -- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -- --std::pair EWMAAndMaxPower_SSE( -- float initial_value, const float src[], int len, float smoothing_factor) { -- // When the recurrence is unrolled, we see that we can split it into 4 -- // separate lanes of evaluation: -- // -- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- // -- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -- // -- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -- // each of the 4 lanes, and then combine them to give y[n]. -- -- const int rem = len % 4; -- const int last_index = len - rem; -- -- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -- const float weight_prev = 1.0f - smoothing_factor; -- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -- const __m128 weight_prev_squared_x4 = -- _mm_mul_ps(weight_prev_x4, weight_prev_x4); -- const __m128 weight_prev_4th_x4 = -- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -- -- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -- // 0, respectively. -- __m128 max_x4 = _mm_setzero_ps(); -- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -- int i; -- for (i = 0; i < last_index; i += 4) { -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -- const __m128 sample_x4 = _mm_load_ps(src + i); -- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -- // Note: The compiler optimizes this to a single multiply-and-accumulate -- // instruction: -- ewma_x4 = _mm_add_ps(ewma_x4, -- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -- } -- -- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- float ewma = EXTRACT_FLOAT(ewma_x4, 3); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 2); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 1); -- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 0); -- -- // Fold the maximums together to get the overall maximum. -- max_x4 = _mm_max_ps(max_x4, -- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -- -- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -- -- // Handle remaining values at the end of |src|. -- for (; i < len; ++i) { -- result.first *= weight_prev; -- const float sample = src[i]; -- const float sample_squared = sample * sample; -- result.first += sample_squared * smoothing_factor; -- result.second = std::max(result.second, sample_squared); -- } -- -- return result; --} --#endif -- - #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - void FMAC_NEON(const float src[], float scale, int len, float dest[]) { - const int rem = len % 4; -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-07-01 03:36:35.135965870 +0200 -@@ -15,6 +15,11 @@ - // Required alignment for inputs and outputs to all vector math functions - enum { kRequiredAlignment = 16 }; - -+// Selects runtime specific optimizations such as SSE. Must be called prior to -+// calling FMAC() or FMUL(). Called during media library initialization; most -+// users should never have to call this. -+MEDIA_EXPORT void Initialize(); -+ - // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. - // |src| and |dest| must be aligned by kRequiredAlignment. - MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-07-01 03:36:35.135965870 +0200 -@@ -5,6 +5,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/time/time.h" - #include "build/build_config.h" -@@ -82,15 +83,11 @@ - DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); - }; - --// Define platform dependent function names for SIMD optimized methods. -+// Define platform independent function name for FMAC* perf tests. - #if defined(ARCH_CPU_X86_FAMILY) - #define FMAC_FUNC FMAC_SSE --#define FMUL_FUNC FMUL_SSE --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #define FMAC_FUNC FMAC_NEON --#define FMUL_FUNC FMUL_NEON --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON - #endif - - // Benchmark for each optimized vector_math::FMAC() method. -@@ -99,6 +96,9 @@ - RunBenchmark( - vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); - #if defined(FMAC_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMAC_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -112,12 +112,24 @@ - #endif - } - -+#undef FMAC_FUNC -+ -+// Define platform independent function name for FMULBenchmark* tests. -+#if defined(ARCH_CPU_X86_FAMILY) -+#define FMUL_FUNC FMUL_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define FMUL_FUNC FMUL_NEON -+#endif -+ - // Benchmark for each optimized vector_math::FMUL() method. - TEST_F(VectorMathPerfTest, FMUL) { - // Benchmark FMUL_C(). - RunBenchmark( - vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); - #if defined(FMUL_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMUL_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -131,6 +143,14 @@ - #endif - } - -+#undef FMUL_FUNC -+ -+#if defined(ARCH_CPU_X86_FAMILY) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+#endif -+ - // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. - TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { - // Benchmark EWMAAndMaxPower_C(). -@@ -139,6 +159,9 @@ - "vector_math_ewma_and_max_power", - "unoptimized"); - #if defined(EWMAAndMaxPower_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -156,4 +179,6 @@ - #endif - } - -+#undef EWMAAndMaxPower_FUNC -+ - } // namespace media -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-07-01 03:36:35.136965855 +0200 -@@ -19,7 +19,7 @@ - MEDIA_EXPORT std::pair EWMAAndMaxPower_C( - float initial_value, const float src[], int len, float smoothing_factor); - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(ARCH_CPU_X86_FAMILY) - MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, - float dest[]); - MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-07-01 03:36:35.136965855 +0200 -@@ -9,6 +9,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/stringize_macros.h" -@@ -78,6 +79,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMAC_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMAC_SSE( -@@ -119,6 +121,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMUL_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMUL_SSE( -@@ -227,6 +230,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("EWMAAndMaxPower_SSE"); - const std::pair& result = vector_math::EWMAAndMaxPower_SSE( - initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert.cc 2017-07-01 03:36:35.136965855 +0200 -@@ -32,7 +32,7 @@ - #include "media/base/simd/convert_yuv_to_rgb.h" - #include "media/base/simd/filter_yuv.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if defined(ARCH_CPU_X86_FAMILY) && defined(__MMX__) - #if defined(COMPILER_MSVC) - #include - #else -@@ -133,7 +133,7 @@ - - // Empty SIMD registers state after using them. - void EmptyRegisterStateStub() {} --#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) - void EmptyRegisterStateIntrinsic() { _mm_empty(); } - #endif - typedef void (*EmptyRegisterStateProc)(); -@@ -247,34 +247,46 @@ - // Assembly code confuses MemorySanitizer. Also not available in iOS builds. - #if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER) && \ - !defined(OS_IOS) -- g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; -+ base::CPU cpu; -+ if (cpu.has_mmx()) { -+ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX; -+ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX; -+ g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX; -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX; - - #if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -- g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; -+ g_filter_yuv_rows_proc_ = FilterYUVRows_MMX; -+#endif -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) && defined(__MMX__) -+ g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic; - #else -- g_empty_register_state_proc_ = EmptyRegisterState_MMX; -+ g_empty_register_state_proc_ = EmptyRegisterState_MMX; - #endif -+ } - -- g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; -- g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; -+ if (cpu.has_sse()) { -+ g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; -+ g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE; -+ } - -- g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; -- g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; -+ if (cpu.has_sse2()) { -+ g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2; -+ g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2; - - #if defined(ARCH_CPU_X86_64) -- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; -+ g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64; - -- // Technically this should be in the MMX section, but MSVC will optimize out -- // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit -- // tests, if that decision can be made at compile time. Since all X64 CPUs -- // have SSE2, we can hack around this by making the selection here. -- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; --#else -- g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE; -- g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE; -+ // Technically this should be in the MMX section, but MSVC will optimize out -+ // the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit -+ // tests, if that decision can be made at compile time. Since all X64 CPUs -+ // have SSE2, we can hack around this by making the selection here. -+ g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64; - #endif -+ } - -- base::CPU cpu; - if (cpu.has_ssse3()) { - g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3; - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_perftest.cc 2017-07-01 03:36:35.137965840 +0200 -@@ -71,6 +71,29 @@ - DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest); - }; - -+TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ ConvertYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -161,9 +184,32 @@ - } - #endif - --// 64-bit release + component builds on Windows are too smart and optimizes --// away the function being tested. --#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) -+TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ const int kSourceDx = 80000; // This value means a scale down. -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ ScaleYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -190,6 +236,32 @@ - kPerfTestIterations / total_time_seconds, "runs/s", true); - } - -+TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) { -+ ASSERT_TRUE(base::CPU().has_mmx()); -+ -+ const int kSourceDx = 80000; // This value means a scale down. -+ -+ base::TimeTicks start = base::TimeTicks::Now(); -+ for (int i = 0; i < kPerfTestIterations; ++i) { -+ for (int row = 0; row < kSourceHeight; ++row) { -+ int chroma_row = row / 2; -+ LinearScaleYUVToRGB32Row_MMX( -+ yuv_bytes_.get() + row * kSourceWidth, -+ yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2), -+ yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2), -+ rgb_bytes_converted_.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ } -+ } -+ media::EmptyRegisterState(); -+ double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF(); -+ perf_test::PrintResult( -+ "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX", -+ kPerfTestIterations / total_time_seconds, "runs/s", true); -+} -+ - TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) { - ASSERT_TRUE(base::CPU().has_sse()); - -@@ -215,7 +287,6 @@ - "yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE", - kPerfTestIterations / total_time_seconds, "runs/s", true); - } --#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) - - #endif // !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/base/yuv_convert_unittest.cc 2017-07-01 03:36:35.137965840 +0200 -@@ -643,6 +643,37 @@ - EXPECT_EQ(0, error); - } - -+TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ ConvertYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ ConvertYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -674,9 +705,40 @@ - kWidth * kBpp)); - } - --// 64-bit release + component builds on Windows are too smart and optimizes --// away the function being tested. --#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD)) -+TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ const int kSourceDx = 80000; // This value means a scale down. -+ ScaleYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ ScaleYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -711,6 +773,40 @@ - kWidth * kBpp)); - } - -+TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr yuv_bytes(new uint8[kYUV12Size]); -+ scoped_ptr rgb_bytes_reference(new uint8[kRGBSize]); -+ scoped_ptr rgb_bytes_converted(new uint8[kRGBSize]); -+ ReadYV12Data(&yuv_bytes); -+ -+ const int kWidth = 167; -+ const int kSourceDx = 80000; // This value means a scale down. -+ LinearScaleYUVToRGB32Row_C(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_reference.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(), -+ yuv_bytes.get() + kSourceUOffset, -+ yuv_bytes.get() + kSourceVOffset, -+ rgb_bytes_converted.get(), -+ kWidth, -+ kSourceDx, -+ GetLookupTable(YV12)); -+ media::EmptyRegisterState(); -+ EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), -+ rgb_bytes_converted.get(), -+ kWidth * kBpp)); -+} -+ - TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) { - base::CPU cpu; - if (!cpu.has_sse()) { -@@ -744,7 +840,6 @@ - rgb_bytes_converted.get(), - kWidth * kBpp)); - } --#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD) - - TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) { - std::unique_ptr src(new uint8_t[16]); -@@ -761,6 +856,30 @@ - } - } - -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ scoped_ptr src(new uint8[16]); -+ scoped_ptr dst(new uint8[16]); -+ -+ memset(src.get(), 0xff, 16); -+ memset(dst.get(), 0, 16); -+ -+ media::FilterYUVRows_MMX(dst.get(), src.get(), src.get(), 1, 255); -+ media::EmptyRegisterState(); -+ -+ EXPECT_EQ(255u, dst[0]); -+ for (int i = 1; i < 16; ++i) { -+ EXPECT_EQ(0u, dst[i]); -+ } -+} -+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+ - TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) { - base::CPU cpu; - if (!cpu.has_sse2()) { -@@ -782,6 +901,38 @@ - } - } - -+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) { -+ base::CPU cpu; -+ if (!cpu.has_mmx()) { -+ LOG(WARNING) << "System not supported. Test skipped."; -+ return; -+ } -+ -+ const int kSize = 32; -+ scoped_ptr src(new uint8[kSize]); -+ scoped_ptr dst_sample(new uint8[kSize]); -+ scoped_ptr dst(new uint8[kSize]); -+ -+ memset(dst_sample.get(), 0, kSize); -+ memset(dst.get(), 0, kSize); -+ for (int i = 0; i < kSize; ++i) -+ src[i] = 100 + i; -+ -+ media::FilterYUVRows_C(dst_sample.get(), -+ src.get(), src.get(), 17, 128); -+ -+ // Generate an unaligned output address. -+ uint8* dst_ptr = -+ reinterpret_cast( -+ (reinterpret_cast(dst.get() + 8) & ~7) + 1); -+ media::FilterYUVRows_MMX(dst_ptr, src.get(), src.get(), 17, 128); -+ media::EmptyRegisterState(); -+ -+ EXPECT_EQ(0, memcmp(dst_sample.get(), dst_ptr, 17)); -+} -+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE) -+ - TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) { - base::CPU cpu; - if (!cpu.has_sse2()) { -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-07-01 03:36:35.138965826 +0200 -@@ -832,6 +832,26 @@ - "//base", - "//ui/gfx/geometry", - ] -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":shared_memory_support_sse", -+ ] -+ } -+} -+ -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("shared_memory_support_sse") { -+ sources = [ -+ "base/simd/vector_math_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } - } - - # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-07-01 03:36:35.206964834 +0200 -@@ -15,7 +15,7 @@ - #include "base/logging.h" - #include "media/base/audio_bus.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE2__) - #define USE_SIMD 1 - #include - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-07-01 03:36:35.273963857 +0200 -@@ -231,11 +231,6 @@ - if (!is_ios) { - sources += [ "ext/platform_canvas.cc" ] - } -- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { -- sources += [ "ext/convolver_SSE2.cc" ] -- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { -- sources += [ "ext/convolver_mips_dspr2.cc" ] -- } - - # The skia gypi values are relative to the skia_dir, so we need to rebase. - sources += skia_core_sources -@@ -500,6 +495,31 @@ - } - } - if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("skia_opts_sse2") { -+ sources = skia_opts.sse2_sources + -+ [ -+ # Chrome-specific. -+ "ext/convolver_SSE2.cc", -+ "ext/convolver_SSE2.h", -+ ] -+ sources -= [ -+ # Detection code must not be built with -msse2 -+ "//third_party/skia/src/opts/opts_check_x86.cpp", -+ ] -+ if (!is_win || is_clang) { -+ cflags = [ "-msse2" ] -+ } -+ if (is_win) { -+ defines = [ "SK_CPU_SSE_LEVEL=20" ] -+ } -+ visibility = [ ":skia_opts" ] -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ -+ ":skia_config", -+ ":skia_library_config", -+ "//build/config/compiler:no_chromium_code", -+ ] -+ } - source_set("skia_opts_sse3") { - sources = skia_opts.ssse3_sources - if (!is_win || is_clang) { -@@ -608,10 +628,13 @@ - if (skia_build_no_opts) { - sources = skia_opts.none_sources - } else if (current_cpu == "x86" || current_cpu == "x64") { -- sources = skia_opts.sse2_sources -+ sources = [ -+ "//third_party/skia/src/opts/opts_check_x86.cpp", -+ ] - deps += [ - ":skia_opts_avx", - ":skia_opts_hsw", -+ ":skia_opts_sse2", - ":skia_opts_sse3", - ":skia_opts_sse41", - ":skia_opts_sse42", -@@ -644,6 +667,13 @@ - - if (mips_dsp_rev >= 1) { - sources = skia_opts.mips_dsp_sources -+ if (mips_dsp_rev >= 2) { -+ sources += [ -+ # Chrome-specific. -+ "ext/convolver_mips_dspr2.cc", -+ "ext/convolver_mips_dspr2.h", -+ ] -+ } - } else { - sources = skia_opts.none_sources - } -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-07-01 03:36:35.331963011 +0200 -@@ -362,10 +362,13 @@ - - void SetupSIMD(ConvolveProcs *procs) { - #ifdef SIMD_SSE2 -- procs->extra_horizontal_reads = 3; -- procs->convolve_vertically = &ConvolveVertically_SSE2; -- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ base::CPU cpu; -+ if (cpu.has_sse2()) { -+ procs->extra_horizontal_reads = 3; -+ procs->convolve_vertically = &ConvolveVertically_SSE2; -+ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -+ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ } - #elif defined SIMD_MIPS_DSPR2 - procs->extra_horizontal_reads = 3; - procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/skia/ext/convolver.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-07-01 03:36:35.331963011 +0200 -@@ -11,6 +11,7 @@ - #include - - #include "build/build_config.h" -+#include "base/cpu.h" - #include "third_party/skia/include/core/SkSize.h" - #include "third_party/skia/include/core/SkTypes.h" - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-07-01 03:36:35.332962996 +0200 -@@ -160,6 +160,26 @@ - public_deps = [ - ":angle_common", - ] -+ -+ if (current_cpu == "x86") { -+ deps = [ -+ ":angle_image_util_x86_sse2", -+ ] -+ } -+} -+ -+source_set("angle_image_util_x86_sse2") { -+ configs -= angle_undefine_configs -+ configs += [ ":internal_config" ] -+ -+ deps = [ -+ ":angle_common", -+ ] -+ -+ sources = [ -+ "src/image_util/loadimage_SSE2.cpp", -+ ] -+ cflags = [ "-msse2", "-mfpmath=sse" ] - } - - static_library("translator") { -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-07-01 03:36:35.406961915 +0200 -@@ -142,9 +142,42 @@ - } - } - --inline bool supportsSSE2() -+#if defined(ANGLE_USE_SSE) && !defined(__x86_64__) && !defined(__SSE2__) && !defined(_MSC_VER) -+ -+// From the base/cpu.cc in Chromium, to avoid depending on Chromium headers -+ -+#if defined(__pic__) && defined(__i386__) -+ -+static inline void __cpuid(int cpu_info[4], int info_type) { -+ __asm__ volatile ( -+ "mov %%ebx, %%edi\n" -+ "cpuid\n" -+ "xchg %%edi, %%ebx\n" -+ : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) -+ : "a"(info_type) -+ ); -+} -+ -+#else -+ -+static inline void __cpuid(int cpu_info[4], int info_type) { -+ __asm__ volatile ( -+ "cpuid\n" -+ : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) -+ : "a"(info_type) -+ ); -+} -+ -+#endif -+ -+#endif -+ -+static inline bool supportsSSE2() - { - #if defined(ANGLE_USE_SSE) -+#if defined(__x86_64__) || defined(__SSE2__) -+ return true; -+#else - static bool checked = false; - static bool supports = false; - -@@ -153,7 +186,6 @@ - return supports; - } - --#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) - { - int info[4]; - __cpuid(info, 0); -@@ -165,9 +197,9 @@ - supports = (info[3] >> 26) & 1; - } - } --#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) - checked = true; - return supports; -+#endif // defined(x86_64) || defined(__SSE2__) - #else // defined(ANGLE_USE_SSE) - return false; - #endif -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-07-01 03:36:35.406961915 +0200 -@@ -81,7 +81,9 @@ - #include - #define ANGLE_USE_SSE - #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -+#if defined(__x86_64__) || defined(__SSE2__) - #include -+#endif - #define ANGLE_USE_SSE - #endif - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-07-01 03:36:35.407961901 +0200 -@@ -12,9 +12,17 @@ - #include "common/platform.h" - #include "image_util/imageformats.h" - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - namespace angle - { - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+namespace SSE2 { -+#endif -+ - void LoadA8ToRGBA8(size_t width, - size_t height, - size_t depth, -@@ -28,6 +36,11 @@ - #if defined(ANGLE_USE_SSE) - if (gl::supportsSSE2()) - { -+#if !defined(__x86_64__) && !defined(__SSE2__) -+ angle::SSE2::LoadA8ToRGBA8(width, height, depth, input, inputRowPitch, -+ inputDepthPitch, output, outputRowPitch, -+ outputDepthPitch); -+#else - __m128i zeroWide = _mm_setzero_si128(); - - for (size_t z = 0; z < depth; z++) -@@ -68,6 +81,7 @@ - } - } - } -+#endif - - return; - } -@@ -89,6 +103,8 @@ - } - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void LoadA8ToBGRA8(size_t width, - size_t height, - size_t depth, -@@ -584,6 +600,8 @@ - } - } - -+#endif -+ - void LoadRGBA8ToBGRA8(size_t width, - size_t height, - size_t depth, -@@ -597,6 +615,11 @@ - #if defined(ANGLE_USE_SSE) - if (gl::supportsSSE2()) - { -+#if !defined(__x86_64__) && !defined(__SSE2__) -+ angle::SSE2::LoadRGBA8ToBGRA8(width, height, depth, input, -+ inputRowPitch, inputDepthPitch, output, -+ outputRowPitch, outputDepthPitch); -+#else - __m128i brMask = _mm_set1_epi32(0x00ff00ff); - - for (size_t z = 0; z < depth; z++) -@@ -641,6 +664,7 @@ - } - } - } -+#endif - - return; - } -@@ -663,6 +687,8 @@ - } - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void LoadRGBA8ToBGRA4(size_t width, - size_t height, - size_t depth, -@@ -1320,4 +1346,10 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+} // namespace SSE2 -+#endif -+ - } // namespace angle -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-07-01 03:36:35.408961886 +0200 -@@ -611,6 +611,32 @@ - size_t outputRowPitch, - size_t outputDepthPitch); - -+#if defined(__i386__) -+namespace SSE2 { -+ -+void LoadA8ToRGBA8(size_t width, -+ size_t height, -+ size_t depth, -+ const uint8_t *input, -+ size_t inputRowPitch, -+ size_t inputDepthPitch, -+ uint8_t *output, -+ size_t outputRowPitch, -+ size_t outputDepthPitch); -+ -+void LoadRGBA8ToBGRA8(size_t width, -+ size_t height, -+ size_t depth, -+ const uint8_t *input, -+ size_t inputRowPitch, -+ size_t inputDepthPitch, -+ uint8_t *output, -+ size_t outputRowPitch, -+ size_t outputDepthPitch); -+ -+} -+#endif // defined(__i386__) -+ - } // namespace angle - - #include "loadimage.inl" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-07-01 03:36:35.408961886 +0200 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "loadimage.cpp" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-07-01 03:36:35.408961886 +0200 -@@ -30,8 +30,8 @@ - ] - - if (current_cpu == "x86" || current_cpu == "x64") { -- defines = [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines = [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ ":qcms_sse2" ] - } - } - -@@ -74,3 +74,15 @@ - public_configs = [ ":qcms_config" ] - } - } -+ -+source_set("qcms_sse2") { -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ public_configs = [ ":qcms_config" ] -+ -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ defines = [ "SSE2_ENABLE" ] -+ sources = [ "src/transform-sse2.c" ] -+ cflags = [ "-msse2" ] -+ } -+} -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-07-01 03:36:35.556959728 +0200 -@@ -31,7 +31,7 @@ - #include "wtf/MathExtras.h" - #include - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -@@ -662,7 +662,7 @@ - // the next event. - if (nextEventType == ParamEvent::LinearRampToValue) { - const float valueDelta = value2 - value1; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - // Minimize in-loop operations. Calculate starting value and increment. - // Next step: value += inc. -@@ -841,7 +841,7 @@ - for (; writeIndex < fillToFrame; ++writeIndex) - values[writeIndex] = target; - } else { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - // Resolve recursion by expanding constants to achieve a 4-step - // loop unrolling. -@@ -959,7 +959,7 @@ - // Oversampled curve data can be provided if sharp discontinuities are - // desired. - unsigned k = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (fillToFrame > writeIndex) { - const __m128 vCurveVirtualIndex = _mm_set_ps1(curveVirtualIndex); - const __m128 vCurvePointsPerFrame = -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-07-01 03:36:35.673958021 +0200 -@@ -26,6 +26,9 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/DirectConvolver.h" - - #if OS(MACOSX) -@@ -35,21 +38,47 @@ - #include "platform/audio/VectorMath.h" - #include "wtf/CPU.h" - --#if (CPU(X86) || CPU(X86_64)) && !OS(MACOSX) -+#if ((CPU(X86) && defined(__SSE2__)) || CPU(X86_64)) && !OS(MACOSX) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - namespace blink { - - using namespace VectorMath; - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - DirectConvolver::DirectConvolver(size_t inputBlockSize) -- : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) {} -+ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) { -+#if CPU(X86) -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif -+} -+ -+#endif - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void DirectConvolver::m_processSSE2(AudioFloatArray* convolutionKernel, -+ const float* sourceP, -+ float* destP, -+ size_t framesToProcess) { -+#else - void DirectConvolver::process(AudioFloatArray* convolutionKernel, - const float* sourceP, - float* destP, - size_t framesToProcess) { -+#endif -+#if CPU(X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_processSSE2(convolutionKernel, sourceP, destP, framesToProcess); -+ return; -+ } -+#endif - ASSERT(framesToProcess == m_inputBlockSize); - if (framesToProcess != m_inputBlockSize) - return; -@@ -83,7 +112,7 @@ - #endif // CPU(X86) - #else - size_t i = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Convolution using SSE2. Currently only do this if both |kernelSize| and - // |framesToProcess| are multiples of 4. If not, use the straightforward loop - // below. -@@ -397,7 +426,7 @@ - } - destP[i++] = sum; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - #endif // OS(MACOSX) -@@ -406,8 +435,12 @@ - memcpy(m_buffer.data(), inputP, sizeof(float) * framesToProcess); - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void DirectConvolver::reset() { - m_buffer.zero(); - } - -+#endif -+ - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-07-01 03:36:35.673958021 +0200 -@@ -32,6 +32,7 @@ - #include "platform/PlatformExport.h" - #include "platform/audio/AudioArray.h" - #include "wtf/Allocator.h" -+#include "wtf/CPU.h" - #include "wtf/Noncopyable.h" - - namespace blink { -@@ -54,6 +55,14 @@ - size_t m_inputBlockSize; - - AudioFloatArray m_buffer; -+ -+#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioFloatArray* convolutionKernel, -+ const float* sourceP, -+ float* destP, -+ size_t framesToProcess); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-07-01 03:36:35.673958021 +0200 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "DirectConvolver.cpp" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-07-01 03:36:35.674958007 +0200 -@@ -26,15 +26,22 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/SincResampler.h" - #include "platform/audio/AudioBus.h" - #include "wtf/CPU.h" - #include "wtf/MathExtras.h" - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - // Input buffer layout, dividing the total buffer into regions (r0 - r5): - // - // |----------------|-----------------------------------------|----------------| -@@ -66,6 +73,8 @@ - - namespace blink { - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - SincResampler::SincResampler(double scaleFactor, - unsigned kernelSize, - unsigned numberOfKernelOffsets) -@@ -81,6 +90,10 @@ - m_sourceFramesAvailable(0), - m_sourceProvider(nullptr), - m_isBufferPrimed(false) { -+#if CPU(X86) -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif - initializeKernel(); - } - -@@ -201,9 +214,23 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void SincResampler::m_processSSE2(AudioSourceProvider* sourceProvider, -+ float* destination, -+ size_t framesToProcess) { -+#else - void SincResampler::process(AudioSourceProvider* sourceProvider, - float* destination, - size_t framesToProcess) { -+#endif -+#if CPU(X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_processSSE2(sourceProvider, destination, framesToProcess); -+ return; -+ } -+#endif - bool isGood = sourceProvider && m_blockSize > m_kernelSize && - m_inputBuffer.size() >= m_blockSize + m_kernelSize && - !(m_kernelSize % 2); -@@ -269,7 +296,7 @@ - { - float input; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // If the sourceP address is not 16-byte aligned, the first several - // frames (at most three) should be processed seperately. - while ((reinterpret_cast(inputP) & 0x0F) && n) { -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-07-01 03:36:35.674958007 +0200 -@@ -33,6 +33,7 @@ - #include "platform/audio/AudioArray.h" - #include "platform/audio/AudioSourceProvider.h" - #include "wtf/Allocator.h" -+#include "wtf/CPU.h" - #include "wtf/Noncopyable.h" - - namespace blink { -@@ -96,6 +97,13 @@ - - // The buffer is primed once at the very beginning of processing. - bool m_isBufferPrimed; -+ -+#if CPU(X86) -+ bool m_haveSSE2; -+ void m_processSSE2(AudioSourceProvider*, -+ float* destination, -+ size_t framesToProcess); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-07-01 03:36:35.674958007 +0200 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "SincResampler.cpp" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-07-01 03:36:35.675957992 +0200 -@@ -23,6 +23,9 @@ - * DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/VectorMath.h" - #include "wtf/Assertions.h" - #include "wtf/CPU.h" -@@ -33,10 +36,14 @@ - #include - #endif - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - #if HAVE(ARM_NEON_INTRINSICS) - #include - #endif -@@ -165,15 +172,30 @@ - } - #else - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+namespace SSE2 { -+#endif -+ -+#if CPU(X86) && !defined(__SSE2__) -+static base::CPU cpu; -+#endif -+ - void vsma(const float* sourceP, - int sourceStride, - const float* scale, - float* destP, - int destStride, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsma(sourceP, sourceStride, scale, destP, -+ destStride, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; - -@@ -269,9 +291,16 @@ - float* destP, - int destStride, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsmul(sourceP, sourceStride, scale, destP, -+ destStride, framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride == 1) && (destStride == 1)) { - float k = *scale; - -@@ -360,7 +389,7 @@ - sourceP += sourceStride; - destP += destStride; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - } -@@ -372,9 +401,17 @@ - float* destP, - int destStride, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vadd(source1P, sourceStride1, source2P, -+ sourceStride2, destP, destStride, -+ framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -501,7 +538,7 @@ - source2P += sourceStride2; - destP += destStride; - } --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - } - #endif - } -@@ -513,9 +550,17 @@ - float* destP, - int destStride, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vmul(source1P, sourceStride1, source2P, -+ sourceStride2, destP, destStride, -+ framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if ((sourceStride1 == 1) && (sourceStride2 == 1) && (destStride == 1)) { - // If the source1P address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -614,8 +659,15 @@ - float* realDestP, - float* imagDestP, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::zvmul(real1P, imag1P, real2P, imag2P, realDestP, -+ imagDestP, framesToProcess); -+ return; -+ } -+#endif - unsigned i = 0; --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - // Only use the SSE optimization in the very common case that all addresses - // are 16-byte aligned. Otherwise, fall through to the scalar code below. - if (!(reinterpret_cast(real1P) & 0x0F) && -@@ -671,10 +723,17 @@ - int sourceStride, - float* sumP, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vsvesq(sourceP, sourceStride, sumP, -+ framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - float sum = 0; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -740,10 +799,17 @@ - int sourceStride, - float* maxP, - size_t framesToProcess) { -+#if CPU(X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::vmaxmgv(sourceP, sourceStride, maxP, -+ framesToProcess); -+ return; -+ } -+#endif - int n = framesToProcess; - float max = 0; - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - if (sourceStride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -832,6 +898,8 @@ - *maxP = max; - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void vclip(const float* sourceP, - int sourceStride, - const float* lowThresholdP, -@@ -889,6 +957,12 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+} // namespace SSE2 -+#endif -+ - #endif // OS(MACOSX) - - } // namespace VectorMath -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-07-01 03:36:35.675957992 +0200 -@@ -27,6 +27,7 @@ - #define VectorMath_h - - #include "platform/PlatformExport.h" -+#include "wtf/CPU.h" - #include "wtf/build_config.h" - #include - -@@ -97,6 +98,62 @@ - int destStride, - size_t framesToProcess); - -+#if CPU(X86) -+namespace SSE2 { -+// Vector scalar multiply and then add. -+PLATFORM_EXPORT void vsma(const float* sourceP, -+ int sourceStride, -+ const float* scale, -+ float* destP, -+ int destStride, -+ size_t framesToProcess); -+ -+PLATFORM_EXPORT void vsmul(const float* sourceP, -+ int sourceStride, -+ const float* scale, -+ float* destP, -+ int destStride, -+ size_t framesToProcess); -+PLATFORM_EXPORT void vadd(const float* source1P, -+ int sourceStride1, -+ const float* source2P, -+ int sourceStride2, -+ float* destP, -+ int destStride, -+ size_t framesToProcess); -+ -+// Finds the maximum magnitude of a float vector. -+PLATFORM_EXPORT void vmaxmgv(const float* sourceP, -+ int sourceStride, -+ float* maxP, -+ size_t framesToProcess); -+ -+// Sums the squares of a float vector's elements. -+PLATFORM_EXPORT void vsvesq(const float* sourceP, -+ int sourceStride, -+ float* sumP, -+ size_t framesToProcess); -+ -+// For an element-by-element multiply of two float vectors. -+PLATFORM_EXPORT void vmul(const float* source1P, -+ int sourceStride1, -+ const float* source2P, -+ int sourceStride2, -+ float* destP, -+ int destStride, -+ size_t framesToProcess); -+ -+// Multiplies two complex vectors. -+PLATFORM_EXPORT void zvmul(const float* real1P, -+ const float* imag1P, -+ const float* real2P, -+ const float* imag2P, -+ float* realDestP, -+ float* imagDestP, -+ size_t framesToProcess); -+} -+#endif -+ - } // namespace VectorMath - } // namespace blink - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-07-01 03:36:35.675957992 +0200 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "VectorMath.cpp" -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-07-01 03:36:35.676957977 +0200 -@@ -1529,6 +1529,10 @@ - deps += [ ":blink_x86_sse" ] - } - -+ if (current_cpu == "x86") { -+ deps += [ ":blink_x86_sse2" ] -+ } -+ - if (use_webaudio_ffmpeg) { - include_dirs += [ "//third_party/ffmpeg" ] - deps += [ "//third_party/ffmpeg" ] -@@ -1914,6 +1918,26 @@ - ] - } - } -+ -+if (current_cpu == "x86") { -+ source_set("blink_x86_sse2") { -+ sources = [ -+ "audio/DirectConvolverSSE2.cpp", -+ "audio/SincResamplerSSE2.cpp", -+ "audio/VectorMathSSE2.cpp", -+ ] -+ cflags = [ "-msse2", "-mfpmath=sse" ] -+ deps = [ -+ ":blink_common", -+ ] -+ configs += [ -+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. -+ "//build/config/compiler:no_size_t_to_int_warning", -+ "//third_party/WebKit/Source:config", -+ "//third_party/WebKit/Source:non_test_config", -+ ] -+ } -+} - - # This source set is used for fuzzers that need an environment similar to unit - # tests. -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-07-01 03:36:35.676957977 +0200 -@@ -5,7 +5,7 @@ - #ifndef WebGLImageConversionSSE_h - #define WebGLImageConversionSSE_h - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - - #include - -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-07-01 03:36:35.677957963 +0200 -@@ -441,7 +441,7 @@ - const uint32_t* source32 = reinterpret_cast_ptr(source); - uint32_t* destination32 = reinterpret_cast_ptr(destination); - --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, pixelsPerRow); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -467,7 +467,7 @@ - const uint16_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA5551LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(ARM_NEON_INTRINSICS) -@@ -496,7 +496,7 @@ - const uint16_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::unpackOneRowOfRGBA4444LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(ARM_NEON_INTRINSICS) -@@ -711,7 +711,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToR8(source, destination, pixelsPerRow); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -768,7 +768,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRA8(source, destination, pixelsPerRow); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -880,7 +880,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixelsPerRow) { --#if CPU(X86) || CPU(X86_64) -+#if (CPU(X86) && defined(__SSE2__)) || CPU(X86_64) - SIMD::packOneRowOfRGBA8LittleToRGBA8(source, destination, pixelsPerRow); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-07-01 03:36:35.677957963 +0200 -@@ -14,6 +14,7 @@ - #include "webrtc/common_audio/real_fourier_ooura.h" - #include "webrtc/common_audio/real_fourier_openmax.h" - #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" -+#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" - - namespace webrtc { - -@@ -23,7 +24,15 @@ - - std::unique_ptr RealFourier::Create(int fft_order) { - #if defined(RTC_USE_OPENMAX_DL) -+#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) -+ // x86 CPU detection required. -+ if (WebRtc_GetCPUInfo(kSSE2)) -+ return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+ else -+ return std::unique_ptr(new RealFourierOoura(fft_order)); -+#else - return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+#endif - #else - return std::unique_ptr(new RealFourierOoura(fft_order)); - #endif -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-07-01 03:36:35.762956723 +0200 -@@ -117,7 +117,7 @@ - - include_dirs = [ "." ] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_SHARED" ] - } - } -@@ -131,14 +131,14 @@ - # This config should be applied to code using the libplatform. - config("libplatform_config") { - include_dirs = [ "include" ] -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_PLATFORM_SHARED" ] - } - } - - # This config should be applied to code using the libbase. - config("libbase_config") { -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_BASE_SHARED" ] - } - libs = [] -@@ -155,7 +155,7 @@ - # This config should only be applied to code using V8 and not any V8 code - # itself. - config("external_config") { -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_SHARED" ] - } - include_dirs = [ "include" ] -@@ -331,6 +331,9 @@ - cflags += [ "/arch:SSE2" ] - } - } -+ if (v8_current_cpu == "x87") { -+ defines += [ "V8_TARGET_ARCH_X87" ] -+ } - if (v8_current_cpu == "x64") { - defines += [ "V8_TARGET_ARCH_X64" ] - if (is_win) { -@@ -2274,7 +2277,7 @@ - - defines = [] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_BASE_SHARED" ] - } - -@@ -2364,7 +2367,7 @@ - - configs = [ ":internal_config_base" ] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_PLATFORM_SHARED" ] - } - -@@ -2507,7 +2510,26 @@ - } - } - --if (is_component_build) { -+if (v8_build_shared) { -+ shared_library("v8") { -+ sources = [ -+ "src/v8dll-main.cc", -+ ] -+ -+ deps = [ -+ ":v8_dump_build_config", -+ ] -+ -+ public_deps = [ -+ ":v8_base", -+ ":v8_maybe_snapshot", -+ ] -+ -+ configs += [ ":internal_config" ] -+ -+ public_configs = [ ":external_config" ] -+ } -+} else if (is_component_build) { - v8_component("v8") { - sources = [ - "src/v8dll-main.cc", -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/gni/v8.gni 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-07-01 03:36:35.828955760 +0200 -@@ -30,6 +30,9 @@ - # Enable ECMAScript Internationalization API. Enabling this feature will - # add a dependency on the ICU library. - v8_enable_i18n_support = true -+ -+ # Whether to build V8 as a shared library -+ v8_build_shared = false - } - - if (v8_use_external_startup_data == "") { -@@ -42,6 +45,11 @@ - v8_enable_backtrace = is_debug && !v8_optimized_debug - } - -+if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { -+ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds -+ v8_build_shared = true -+} -+ - # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute - # paths for all configs in templates as they are shared in different - # subdirectories. -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/make-v8-sse2-gyp.sh 2017-07-01 03:36:35.895954782 +0200 -@@ -0,0 +1,56 @@ -+#!/bin/sh -+# This script renames the v8 targets to _sse2 names so that they do not conflict -+# with the non-SSE2 versions. -+ -+# Copyright 2016 Kevin Kofler. All rights reserved. -+# Redistribution and use in source and binary forms, with or without -+# modification, are permitted provided that the following conditions are -+# met: -+# -+# * Redistributions of source code must retain the above copyright -+# notice, this list of conditions and the following disclaimer. -+# * Redistributions in binary form must reproduce the above -+# copyright 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. -+ -+# add comment noting that the file is generated -+echo "# Generated from v8.gyp by make-v8-sse2-gyp.sh" >v8_sse2.gyp -+# rename all target names -+SUBTARGETS=`grep "'target_name': '" v8.gyp | sed -e "s/^.*'target_name': '//g" -e "s/',$//g"` -+SEDS= -+for SUBTARGET in $SUBTARGETS ; do -+ SEDS=$SEDS\ -e\ "s/'$SUBTARGET\(['#]\)/'${SUBTARGET}_sse2\1/g" -+done -+# in addition: -+# * set v8_target_arch to "ia32" (instead of "x87") -+# * rename all actions -+# * fix mksnapshot_exec to match the renamed target -+# * rename the generated snapshot.cc (but not mksnapshot.cc) to snapshot_sse2.cc -+# * rename the generated *libraries.cc to *libraries_sse2.cc -+# * rename the generated *.bin to *_sse2.bin -+# * set product_name and product_dir for the v8_sse2 target -+sed -e "s/^\( 'variables': {\)/\1\n 'v8_target_arch': 'ia32',/g" \ -+ -e "s/\('action_name': '\)/\1v8_sse2_/g" \ -+ $SEDS \ -+ -e "s/\('mksnapshot_exec': '.*mksnapshot\)/\1_sse2/g" \ -+ -e "s#/snapshot\.cc#/snapshot_sse2.cc#g" \ -+ -e "s/libraries\.cc/libraries_sse2.cc/g" \ -+ -e "s/\.bin/_sse2.bin/g" \ -+ -e "s#^\( *\)\('target_name': 'v8_sse2',\)#\1\2\n\1'product_name': 'v8',\n\1'product_dir': '<(PRODUCT_DIR)/lib/sse2',#g" \ -+ v8.gyp >>v8_sse2.gyp -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-07-01 03:36:35.895954782 +0200 -@@ -106,7 +106,7 @@ - "/wd4996", # Deprecated function call. - ] - } -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_SHARED" ] - } - } -diff -Nur qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn ---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-06-20 11:10:02.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-07-01 03:36:35.956953893 +0200 -@@ -335,7 +335,7 @@ - - defines = [] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - # cctest can't be built against a shared library, so we - # need to depend on the underlying static target in that case. - deps += [ "../..:v8_maybe_snapshot" ] -diff -Nur qtwebengine-opensource-src-5.9.1/src/core/core_module.pro qtwebengine-opensource-src-5.9.1-no-sse2/src/core/core_module.pro ---- qtwebengine-opensource-src-5.9.1/src/core/core_module.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/core/core_module.pro 2017-07-01 03:36:36.017953003 +0200 -@@ -41,6 +41,31 @@ - else: QMAKE_LFLAGS += $$NINJA_LFLAGS - POST_TARGETDEPS += $$NINJA_TARGETDEPS - -+# go through the shared libraries that GN wants to link to -+# ignore the dummy convert_dict shared library used only to get a .pri file -+# add the ones NOT in lib/sse2 to LIBS_PRIVATE -+# don't add those in lib/sse2 that are only replacements for the normal ones -+# collect all shared libraries, non-SSE2 and SSE2, so they can be installed -+for(shlib, NINJA_SOLIBS) { -+ !contains(shlib, .*convert_dict.*) { -+ contains(shlib, .*/lib/sse2/.*) { -+ shlibs_sse2 += $$shlib -+ } else { -+ LIBS_PRIVATE += $$shlib -+ shlibs += $$shlib -+ } -+ } -+} -+ -+# set the shared libraries to be installed -+# add an rpath to their installation location -+shlib_install_path = $$[QT_INSTALL_LIBS]/qtwebengine -+!isEmpty(shlibs) { -+ shlibs.files += $$shlibs -+ shlibs_sse2.files += $$shlibs_sse2 -+ LIBS_PRIVATE += -Wl,--rpath,$$shlib_install_path -+} -+ - - LIBS_PRIVATE += -L$$api_library_path - CONFIG *= no_smart_library_merge -@@ -98,7 +123,12 @@ - locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales - resources.CONFIG += no_check_exist - resources.path = $$[QT_INSTALL_DATA]/resources -- INSTALLS += locales resources -+ # install the shared libraries -+ shlibs.CONFIG += no_check_exist -+ shlibs.path = $$shlib_install_path -+ shlibs_sse2.CONFIG += no_check_exist -+ shlibs_sse2.path = $$shlib_install_path/sse2 -+ INSTALLS += locales resources shlibs shlibs_sse2 - - !use?(system_icu) { - icu.CONFIG += no_check_exist -diff -Nur qtwebengine-opensource-src-5.9.1/src/process/process.pro qtwebengine-opensource-src-5.9.1-no-sse2/src/process/process.pro ---- qtwebengine-opensource-src-5.9.1/src/process/process.pro 2017-06-23 08:29:46.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.1-no-sse2/src/process/process.pro 2017-07-01 03:36:36.017953003 +0200 -@@ -9,6 +9,8 @@ - - SOURCES = main.cpp - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/Release -+ - win32 { - SOURCES += \ - support_win.cpp diff --git a/qtwebengine-opensource-src-5.9.2-qt57.patch b/qtwebengine-opensource-src-5.9.2-qt57.patch deleted file mode 100644 index 1c10e4b..0000000 --- a/qtwebengine-opensource-src-5.9.2-qt57.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.2/src/core/web_contents_adapter.cpp qtwebengine-opensource-src-5.9.2-qt57/src/core/web_contents_adapter.cpp ---- qtwebengine-opensource-src-5.9.2/src/core/web_contents_adapter.cpp 2017-10-03 11:06:38.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.2-qt57/src/core/web_contents_adapter.cpp 2017-11-16 17:17:51.072511997 +0100 -@@ -1265,7 +1265,15 @@ - } - - const QString &fileName = toQt(dropData.file_description_filename); -+#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) - const QString &filePath = d->dndTmpDir->filePath(fileName); -+#else -+ QString filePath = d->dndTmpDir->path(); -+ if (!filePath.isEmpty()) { -+ filePath += QLatin1Char('/'); -+ filePath += fileName; -+ } -+#endif - QFile file(filePath); - if (!file.open(QIODevice::WriteOnly)) { - qWarning("Cannot write temporary file %s.", qUtf8Printable(filePath)); diff --git a/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch b/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch deleted file mode 100644 index 695b25f..0000000 --- a/qtwebengine-opensource-src-5.9.3-no-aspirational-scripts.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter.cc qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter.cc ---- qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-11-08 20:13:31.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-12-02 03:07:07.447476275 +0100 -@@ -478,39 +478,6 @@ - const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status); - allowed_set.addAll(*inclusion_set); - -- // Five aspirational scripts are taken from UTR 31 Table 6 at -- // http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . -- // Not all the characters of aspirational scripts are suitable for -- // identifiers. Therefore, only characters belonging to -- // [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational' -- // section at -- // http://www.unicode.org/Public/security/latest/xidmodifications.txt) are -- // are added to the allowed set. The list has to be updated when a new -- // version of Unicode is released. The current version is 9.0.0 and ICU 60 -- // will have Unicode 10.0 data. --#if U_ICU_VERSION_MAJOR_NUM < 60 -- const icu::UnicodeSet aspirational_scripts( -- icu::UnicodeString( -- // Unified Canadian Syllabics -- "[\\u1401-\\u166C\\u166F-\\u167F" -- // Mongolian -- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA" -- // Unified Canadian Syllabics -- "\\u18B0-\\u18F5" -- // Tifinagh -- "\\u2D30-\\u2D67\\u2D7F" -- // Yi -- "\\uA000-\\uA48C" -- // Miao -- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E" -- "\\U00016F8F-\\U00016F9F]", -- -1, US_INV), -- *status); -- allowed_set.addAll(aspirational_scripts); --#else --#error "Update aspirational_scripts per Unicode 10.0" --#endif -- - // U+0338 is included in the recommended set, while U+05F4 and U+2027 are in - // the inclusion set. However, they are blacklisted as a part of Mozilla's - // IDN blacklist (http://kb.mozillazine.org/Network.IDN.blacklist_chars). -diff -ur qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc ---- qtwebengine-opensource-src-5.9.3/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-11-08 20:13:31.000000000 +0100 -+++ qtwebengine-opensource-src-5.9.3-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-12-02 03:08:51.073912562 +0100 -@@ -102,22 +102,24 @@ - {"xn---123-kbjl2j0bl2k.in", - L"\x0939\x093f\x0928\x094d\x0926\x0940-123.in", true}, - -- // 5 Aspirational scripts -+ // What used to be 5 Aspirational scripts in the earlier versions of UAX 31. -+ // UAX 31 does not define aspirational scripts any more. -+ // See http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . - // Unifieid Canadian Syllabary -- {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", true}, -+ {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", false}, - // Tifinagh - {"xn--4ljxa2bb4a6bxb.ma", -- L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", true}, -+ L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", false}, - // Tifinagh with a disallowed character(U+2D6F) - {"xn--hmjzaby5d5f.ma", L"\x2d5c\x2d49\x2d3c\x2d6f\x2d49\x2d4f.ma", false}, - // Yi -- {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", true}, -+ {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", false}, - // Mongolian - 'ordu' (place, camp) -- {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", true}, -+ {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", false}, - // Mongolian with a disallowed character - {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, - // Miao/Pollad -- {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, -+ {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", false}, - - // Script mixing tests - // The following script combinations are allowed. diff --git a/sources b/sources index 61b00bb..d0b675c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-opensource-src-5.9.3-clean.tar.xz) = fb1c6af02d7cbeef41da5cbe7e56861de3342a538940a997753fae204bdd5386d66b1385fc8450b6a4989e6e2b67e8c4f063e8192181cdc02ff64e0d48dde97e +SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = 0c89061507a7f1541eb9433545f3610f96ac6b6b29dc2527a9bc15c945a0ce33d0d2bd693c9d865639b10a97077192fc387b0a5920e64b7860c576b987899fb2 From 9229bd04caa0df45f3c1594c5d9e5b289163a905 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Mon, 25 Dec 2017 20:28:18 +0100 Subject: [PATCH 235/437] Disable system libvpx, add BR flex pkgconfig(lcms2) - Disable system libvpx support for now, requires unreleased libvpx (1.6.2+) - Add new BuildRequires: flex (required) and pkgconfig(lcms2) (unbundled) --- qt5-qtwebengine.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 05ca77d..cfff4c5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,8 +10,12 @@ %global docs 1 %endif -# need libvpx >= 1.6.0 +%if 0 +# need libvpx >= 1.6.2 +# (The needed commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e was added after +# 1.6.1, not released anywhere yet.) %global use_system_libvpx 1 +%endif # need libwebp >= 0.6.0 %global use_system_libwebp 1 @@ -133,6 +137,7 @@ BuildRequires: qt5-qtquickcontrols2-devel BuildRequires: ninja-build BuildRequires: cmake BuildRequires: bison +BuildRequires: flex BuildRequires: git-core BuildRequires: gperf BuildRequires: libicu-devel @@ -152,7 +157,7 @@ BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) %if 0%{?use_system_libwebp} -BuildRequires: pkgconfig(libwebp) >= 0.5.1 +BuildRequires: pkgconfig(libwebp) >= 0.6.0 %endif BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libdrm) @@ -177,10 +182,11 @@ BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter BuildRequires: python %if 0%{?use_system_libvpx} -BuildRequires: pkgconfig(vpx) >= 1.6.0 +BuildRequires: pkgconfig(vpx) >= 1.6.2 %endif # extra (non-upstream) functions needed, see @@ -236,7 +242,9 @@ Provides: bundled(libjingle) # see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number Provides: bundled(libsrtp) = 2.1.0 %if !0%{?use_system_libvpx} -Provides: bundled(libvpx) = 1.6.0 +# claims "Version: 1.6.0", but according to the fine print, this is actually a +# snapshot from master from after the 1.6.1 release +Provides: bundled(libvpx) = 1.6.1 %endif %if !0%{?use_system_libwebp} Provides: bundled(libwebp) = 0.6.0 @@ -574,6 +582,8 @@ done gn-bootstrap-verbose patches - In particular, restore the removed V8 x87 backend in the no-sse2 patch - Re-backport no-aspirational-scripts from upstream (undo 5.9 backport) +- Disable system libvpx support for now, requires unreleased libvpx (1.6.2+) +- Add new BuildRequires: flex (required) and pkgconfig(lcms2) (unbundled) * Tue Dec 19 2017 Rex Dieter - 5.9.3-5 - properly escape newline in lesser_version hack From 3119084d60f71e2e79961d2b209c62069533be48 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Dec 2017 00:46:09 +0100 Subject: [PATCH 236/437] Forward-port missing parts of 5.9 ICU>=59 build fix (QTBUG-60886, QTBUG-65090) --- qt5-qtwebengine.spec | 6 + qtwebengine-everywhere-src-5.10.0-icu59.patch | 524 ++++++++++++++++++ 2 files changed, 530 insertions(+) create mode 100644 qtwebengine-everywhere-src-5.10.0-icu59.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index cfff4c5..8323af1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -113,6 +113,10 @@ Patch11: qtwebengine-everywhere-src-5.10.0-skia-neon.patch Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch +# Forward-port missing parts of build fix with system ICU >= 59 from 5.9: +# https://codereview.qt-project.org/#/c/196922/ +# see QTBUG-60886 and QTBUG-65090 +Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts @@ -364,6 +368,7 @@ BuildArch: noarch %patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose +%patch22 -p1 -b .icu59 %patch100 -p1 -b .no-aspirational-scripts # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ @@ -584,6 +589,7 @@ done - Re-backport no-aspirational-scripts from upstream (undo 5.9 backport) - Disable system libvpx support for now, requires unreleased libvpx (1.6.2+) - Add new BuildRequires: flex (required) and pkgconfig(lcms2) (unbundled) +- Forward-port missing parts of 5.9 ICU>=59 build fix (QTBUG-60886, QTBUG-65090) * Tue Dec 19 2017 Rex Dieter - 5.9.3-5 - properly escape newline in lesser_version hack diff --git a/qtwebengine-everywhere-src-5.10.0-icu59.patch b/qtwebengine-everywhere-src-5.10.0-icu59.patch new file mode 100644 index 0000000..3ccff08 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-icu59.patch @@ -0,0 +1,524 @@ +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/BUILD.gn +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/BUILD.gn 2017-12-26 00:08:24.179696335 +0100 +@@ -1134,6 +1134,10 @@ + ":debugging_flags", + ] + ++ if (!is_win) { ++ public_deps += [ "//third_party/icu:icuuc" ] ++ } ++ + # Needed for if using newer C++ library than sysroot, except if + # building inside the cros_sdk environment - use host_toolchain as a + # more robust check for this. +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-12-25 23:52:46.376221561 +0100 +@@ -44,7 +44,7 @@ + bidi_ = ubidi_openSized(static_cast(text.length()), 0, &error); + if (U_FAILURE(error)) + return false; +- ubidi_setPara(bidi_, text.data(), static_cast(text.length()), ++ ubidi_setPara(bidi_, reinterpret_cast(text.data()), static_cast(text.length()), + GetParagraphLevelForDirection(direction), NULL, &error); + return (U_SUCCESS(error) == TRUE); + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/break_iterator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/break_iterator.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-12-25 23:52:46.376221561 +0100 +@@ -59,9 +59,9 @@ + return false; + } + if (break_type_ == RULE_BASED) { +- iter_ = ubrk_openRules(rules_.c_str(), ++ iter_ = ubrk_openRules(reinterpret_cast(rules_.c_str()), + static_cast(rules_.length()), +- string_.data(), ++ reinterpret_cast(string_.data()), + static_cast(string_.size()), + &parse_error, + &status); +@@ -72,7 +72,7 @@ + } else { + iter_ = ubrk_open(break_type, + NULL, +- string_.data(), ++ reinterpret_cast(string_.data()), + static_cast(string_.size()), + &status); + if (U_FAILURE(status)) { +@@ -128,7 +128,7 @@ + bool BreakIterator::SetText(const base::char16* text, const size_t length) { + UErrorCode status = U_ZERO_ERROR; + ubrk_setText(static_cast(iter_), +- text, length, &status); ++ reinterpret_cast(text), length, &status); + pos_ = 0; // implicit when ubrk_setText is done + prev_ = npos; + if (U_FAILURE(status)) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/case_conversion.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/case_conversion.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-12-25 23:52:46.376221561 +0100 +@@ -64,8 +64,8 @@ + // terminator, but will otherwise. So we don't need to save room for that. + // Don't use WriteInto, which assumes null terminators. + int32_t new_length = case_mapper( +- &dest[0], saturated_cast(dest.size()), +- string.data(), saturated_cast(string.size()), ++ reinterpret_cast(&dest[0]), saturated_cast(dest.size()), ++ reinterpret_cast(string.data()), saturated_cast(string.size()), + &error); + dest.resize(new_length); + } while (error == U_BUFFER_OVERFLOW_ERROR); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-12-25 23:52:46.376221561 +0100 +@@ -151,7 +151,7 @@ + if (!U_SUCCESS(status)) + return false; + +- return ConvertFromUTF16(converter, utf16.c_str(), ++ return ConvertFromUTF16(converter, reinterpret_cast(utf16.c_str()), + static_cast(utf16.length()), on_error, encoded); + } + +@@ -178,7 +178,7 @@ + + SetUpErrorHandlerForToUChars(on_error, converter, &status); + std::unique_ptr buffer(new char16[uchar_max_length]); +- int actual_size = ucnv_toUChars(converter, buffer.get(), ++ int actual_size = ucnv_toUChars(converter, reinterpret_cast(buffer.get()), + static_cast(uchar_max_length), encoded.data(), + static_cast(encoded.length()), &status); + ucnv_close(converter); +@@ -205,8 +205,8 @@ + string16 normalized_utf16; + std::unique_ptr buffer(new char16[max_length]); + int actual_length = unorm_normalize( +- utf16.c_str(), utf16.length(), UNORM_NFC, 0, +- buffer.get(), static_cast(max_length), &status); ++ reinterpret_cast(utf16.c_str()), utf16.length(), UNORM_NFC, 0, ++ reinterpret_cast(buffer.get()), static_cast(max_length), &status); + if (!U_SUCCESS(status)) + return false; + normalized_utf16.assign(buffer.get(), actual_length); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/rtl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/rtl.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/rtl.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/rtl.cc 2017-12-25 23:54:24.681803775 +0100 +@@ -212,7 +212,7 @@ + } + + TextDirection GetFirstStrongCharacterDirection(const string16& text) { +- const UChar* string = text.c_str(); ++ const UChar* string = reinterpret_cast(text.c_str()); + size_t length = text.length(); + size_t position = 0; + while (position < length) { +@@ -228,7 +228,7 @@ + } + + TextDirection GetLastStrongCharacterDirection(const string16& text) { +- const UChar* string = text.c_str(); ++ const UChar* string = reinterpret_cast(text.c_str()); + size_t position = text.length(); + while (position > 0) { + UChar32 character; +@@ -243,7 +243,7 @@ + } + + TextDirection GetStringDirection(const string16& text) { +- const UChar* string = text.c_str(); ++ const UChar* string = reinterpret_cast(text.c_str()); + size_t length = text.length(); + size_t position = 0; + +@@ -374,7 +374,7 @@ + #endif // !OS_WIN + + bool StringContainsStrongRTLChars(const string16& text) { +- const UChar* string = text.c_str(); ++ const UChar* string = reinterpret_cast(text.c_str()); + size_t length = text.length(); + size_t position = 0; + while (position < length) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/string_search.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/string_search.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/string_search.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/string_search.cc 2017-12-25 23:54:45.809499066 +0100 +@@ -20,8 +20,8 @@ + const string16& dummy = find_this_; + + UErrorCode status = U_ZERO_ERROR; +- search_ = usearch_open(find_this_.data(), find_this_.size(), +- dummy.data(), dummy.size(), ++ search_ = usearch_open(reinterpret_cast(find_this_.data()), find_this_.size(), ++ reinterpret_cast(dummy.data()), dummy.size(), + uloc_getDefault(), + NULL, // breakiter + &status); +@@ -41,7 +41,7 @@ + bool FixedPatternStringSearchIgnoringCaseAndAccents::Search( + const string16& in_this, size_t* match_index, size_t* match_length) { + UErrorCode status = U_ZERO_ERROR; +- usearch_setText(search_, in_this.data(), in_this.size(), &status); ++ usearch_setText(search_, reinterpret_cast(in_this.data()), in_this.size(), &status); + + // Default to basic substring search if usearch fails. According to + // http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-12-26 00:16:45.791461970 +0100 +@@ -155,14 +155,14 @@ + bool is_tld_ascii) { + UErrorCode status = U_ZERO_ERROR; + int32_t result = +- uspoof_check(checker_, label.data(), ++ uspoof_check(checker_, (const UChar*)label.data(), + base::checked_cast(label.size()), NULL, &status); + // If uspoof_check fails (due to library failure), or if any of the checks + // fail, treat the IDN as unsafe. + if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS)) + return false; + +- icu::UnicodeString label_string(FALSE, label.data(), ++ icu::UnicodeString label_string(FALSE, (const UChar*)label.data(), + base::checked_cast(label.size())); + + // A punycode label with 'xn--' prefix is not subject to the URL +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/url_formatter.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-12-25 23:58:01.767672910 +0100 +@@ -374,7 +374,7 @@ + // code units, |status| will be U_BUFFER_OVERFLOW_ERROR and we'll try + // the conversion again, but with a sufficiently large buffer. + output_length = uidna_labelToUnicode( +- uidna, comp, static_cast(comp_len), &(*out)[original_length], ++ uidna, (const UChar*)comp, static_cast(comp_len), (UChar*)&(*out)[original_length], + output_length, &info, &status); + } while ((status == U_BUFFER_OVERFLOW_ERROR && info.errors == 0)); + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc 2017-12-25 23:58:54.555911585 +0100 +@@ -77,7 +77,7 @@ + } else { + bidi_ = ubidi_open(); + UErrorCode uerror = U_ZERO_ERROR; +- ubidi_setPara(bidi_, text_.data(), text_.size(), run.rtl, NULL, &uerror); ++ ubidi_setPara(bidi_, reinterpret_cast(text_.data()), text_.size(), run.rtl, NULL, &uerror); + if (U_SUCCESS(uerror)) + num_runs_ = ubidi_countRuns(bidi_, &uerror); + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp 2017-12-26 00:00:40.801379288 +0100 +@@ -58,7 +58,7 @@ + // For the NSS PKCS#12 library, must convert PRUnichars (shorts) to + // a buffer of octets. Must handle byte order correctly. + // TODO: Is there a Mozilla way to do this? In the string lib? +-void unicodeToItem(const PRUnichar *uni, SECItem *item) ++void unicodeToItem(const base::char16 *uni, SECItem *item) + { + int len = 0; + while (uni[len++] != 0); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc 2017-12-26 00:00:40.801379288 +0100 +@@ -58,10 +58,10 @@ + PP_PrivateFindResult** results, int* count) { + if (locale_.empty()) + locale_ = GetLocale(); +- const base::char16* string = +- reinterpret_cast(input_string); +- const base::char16* term = +- reinterpret_cast(input_term); ++ const UChar* string = ++ reinterpret_cast(input_string); ++ const UChar* term = ++ reinterpret_cast(input_term); + + UErrorCode status = U_ZERO_ERROR; + UStringSearch* searcher = usearch_open(term, -1, string, -1, locale_.c_str(), +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc 2017-12-26 00:02:54.958444442 +0100 +@@ -27,6 +27,7 @@ + #include + #include + ++#include "base/i18n/unicodestring.h" + #include "sfntly/table/bitmap/eblc_table.h" + #include "sfntly/table/bitmap/ebdt_table.h" + #include "sfntly/table/bitmap/index_sub_table.h" +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp 2017-12-26 00:21:22.768467342 +0100 +@@ -19,7 +19,7 @@ + String str = web_string; + if (!str.Is8Bit()) { + return base::FilePath::FromUTF16Unsafe( +- base::StringPiece16(str.Characters16(), str.length())); ++ base::StringPiece16((const base::char16*)str.Characters16(), str.length())); + } + + #if defined(OS_POSIX) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp 2017-12-26 00:21:37.908248992 +0100 +@@ -23,7 +23,7 @@ + } + + // GURL can consume UTF-16 directly. +- return GURL(base::StringPiece16(str.Characters16(), str.length())); ++ return GURL(base::StringPiece16((const base::char16*)str.Characters16(), str.length())); + } + + } // namespace blink +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp 2017-12-26 00:22:14.401722675 +0100 +@@ -59,7 +59,7 @@ + } + + void WebString::Assign(const WebUChar* data, size_t length) { +- Assign(StringImpl::Create8BitIfPossible(data, length).Get()); ++ Assign(StringImpl::Create8BitIfPossible((const UChar*)data, length).Get()); + } + + size_t WebString::length() const { +@@ -75,7 +75,7 @@ + } + + const WebUChar* WebString::Data16() const { +- return !private_.IsNull() && !Is8Bit() ? private_->Characters16() : 0; ++ return !private_.IsNull() && !Is8Bit() ? (const WebUChar*)private_->Characters16() : 0; + } + + std::string WebString::Utf8(UTF8ConversionMode mode) const { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp 2017-12-26 00:20:18.452394923 +0100 +@@ -51,7 +51,7 @@ + relative_utf8.length(), 0, buffer, &parsed); + } + return url::ResolveRelative(base_utf8.Data(), base_utf8.length(), +- base.GetParsed(), relative.Characters16(), ++ base.GetParsed(), (const base::char16*)relative.Characters16(), + relative.length(), 0, buffer, &parsed); + } + +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp 2017-12-26 00:25:55.112547976 +0100 +@@ -104,7 +104,7 @@ + int input_length, + url::CanonOutput* output) override { + CString encoded = encoding_->Encode( +- String(input, input_length), WTF::kURLEncodedEntitiesForUnencodables); ++ String((const UChar*)input, input_length), WTF::kURLEncodedEntitiesForUnencodables); + output->Append(encoded.data(), static_cast(encoded.length())); + } + +@@ -341,7 +341,7 @@ + if (string_.Is8Bit()) + url::ExtractFileName(AsURLChar8Subtle(string_), path, &file); + else +- url::ExtractFileName(string_.Characters16(), path, &file); ++ url::ExtractFileName((const base::char16*)string_.Characters16(), path, &file); + + // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns + // a null string when the path is empty, which we duplicate here. +@@ -371,7 +371,7 @@ + DCHECK(!string_.IsNull()); + int port = string_.Is8Bit() + ? url::ParsePort(AsURLChar8Subtle(string_), parsed_.port) +- : url::ParsePort(string_.Characters16(), parsed_.port); ++ : url::ParsePort((const base::char16*)string_.Characters16(), parsed_.port); + DCHECK_NE(port, url::PORT_UNSPECIFIED); // Checked port.len <= 0 before. + + if (port == url::PORT_INVALID || +@@ -666,7 +666,7 @@ + return false; + return string_.Is8Bit() + ? url::IsStandard(AsURLChar8Subtle(string_), parsed_.scheme) +- : url::IsStandard(string_.Characters16(), parsed_.scheme); ++ : url::IsStandard((const base::char16*)string_.Characters16(), parsed_.scheme); + } + + bool EqualIgnoringFragmentIdentifier(const KURL& a, const KURL& b) { +@@ -719,7 +719,7 @@ + if (string_.Is8Bit()) + url::ExtractFileName(AsURLChar8Subtle(string_), parsed_.path, &filename); + else +- url::ExtractFileName(string_.Characters16(), parsed_.path, &filename); ++ url::ExtractFileName((const base::char16*)string_.Characters16(), parsed_.path, &filename); + return filename.begin; + } + +@@ -732,7 +732,7 @@ + if (url.Is8Bit()) + return url::FindAndCompareScheme(AsURLChar8Subtle(url), url.length(), + protocol, 0); +- return url::FindAndCompareScheme(url.Characters16(), url.length(), protocol, ++ return url::FindAndCompareScheme((const base::char16*)url.Characters16(), url.length(), protocol, + 0); + } + +@@ -765,7 +765,7 @@ + charset_converter, &output, &parsed_); + } else { + is_valid_ = url::ResolveRelative(base_utf8.Data(), base_utf8.length(), +- base.parsed_, relative.Characters16(), ++ base.parsed_, (const base::char16*)relative.Characters16(), + clampTo(relative.length()), + charset_converter, &output, &parsed_); + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp 2017-12-26 00:27:48.865912016 +0100 +@@ -638,7 +638,7 @@ + url::CanonicalizeHost(utf8.Data(), url::Component(0, utf8.length()), + &canon_output, &out_host); + } else { +- *success = url::CanonicalizeHost(host.Characters16(), ++ *success = url::CanonicalizeHost(reinterpret_cast(host.Characters16()), + url::Component(0, host.length()), + &canon_output, &out_host); + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h 2017-12-26 00:02:31.246786418 +0100 +@@ -66,9 +66,10 @@ + AtomicString(const LChar* chars, unsigned length); + AtomicString(const UChar* chars, unsigned length); + AtomicString(const UChar* chars); ++#if U_ICU_VERSION_MAJOR_NUM < 59 + AtomicString(const char16_t* chars) + : AtomicString(reinterpret_cast(chars)) {} +- ++#endif + template + explicit AtomicString(const Vector& vector) + : AtomicString(vector.data(), vector.size()) {} +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h 2017-12-26 00:02:44.550594548 +0100 +@@ -83,8 +83,10 @@ + characters16_(chars), + length_(length) {} + StringView(const UChar* chars); ++#if U_ICU_VERSION_MAJOR_NUM < 59 + StringView(const char16_t* chars) + : StringView(reinterpret_cast(chars)) {} ++#endif + + #if DCHECK_IS_ON() + ~StringView(); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h 2017-12-26 00:33:00.427431253 +0100 +@@ -36,6 +36,8 @@ + #include + #include + ++#include "third_party/icu/source/common/unicode/uvernum.h" ++ + #ifdef __OBJC__ + #include + #endif +@@ -82,8 +84,13 @@ + + // Construct a string with UTF-16 data, from a null-terminated source. + String(const UChar*); ++#if U_ICU_VERSION_MAJOR_NUM < 59 + String(const char16_t* chars) + : String(reinterpret_cast(chars)) {} ++#else ++ String(const uint16_t* chars) ++ : String(reinterpret_cast(chars)) {} ++#endif + + // Construct a string with latin1 data. + String(const LChar* characters, unsigned length); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc 2017-12-26 00:02:54.958444442 +0100 +@@ -225,7 +225,7 @@ + key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR)); + shortcut += key; + #elif defined(USE_AURA) || defined(OS_MACOSX) +- const uint16_t c = DomCodeToUsLayoutCharacter( ++ const base::char16 c = DomCodeToUsLayoutCharacter( + UsLayoutKeyboardCodeToDomCode(key_code_), false); + if (c != 0) + shortcut += +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc 2017-12-26 00:02:54.959444427 +0100 +@@ -581,7 +581,7 @@ + + int actual_size = uloc_getDisplayName( + locale_code.c_str(), display_locale.c_str(), +- base::WriteInto(&display_name, kBufferSize), kBufferSize - 1, &error); ++ (UChar*)base::WriteInto(&display_name, kBufferSize), kBufferSize - 1, &error); + DCHECK(U_SUCCESS(error)); + display_name.resize(actual_size); + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/time_format.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/time_format.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/time_format.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/time_format.cc 2017-12-26 00:02:54.959444427 +0100 +@@ -141,7 +141,7 @@ + DCHECK_GT(capacity, 1); + base::string16 result; + UErrorCode error = U_ZERO_ERROR; +- time_string.extract(static_cast(base::WriteInto(&result, capacity)), ++ time_string.extract(reinterpret_cast(base::WriteInto(&result, capacity)), + capacity, error); + DCHECK(U_SUCCESS(error)); + return result; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/x/selection_utils.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/x/selection_utils.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/x/selection_utils.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/x/selection_utils.cc 2017-12-26 00:02:54.959444427 +0100 +@@ -207,8 +207,8 @@ + // If the data starts with 0xFEFF, i.e., Byte Order Mark, assume it is + // UTF-16, otherwise assume UTF-8. + if (size >= 2 && +- reinterpret_cast(data)[0] == 0xFEFF) { +- markup.assign(reinterpret_cast(data) + 1, ++ reinterpret_cast(data)[0] == 0xFEFF) { ++ markup.assign(reinterpret_cast(data) + 1, + (size / 2) - 1); + } else { + base::UTF8ToUTF16(reinterpret_cast(data), size, &markup); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/url/url_canon_icu.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/url/url_canon_icu.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/url/url_canon_icu.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/url/url_canon_icu.cc 2017-12-26 00:02:54.959444427 +0100 +@@ -133,7 +133,7 @@ + UErrorCode err = U_ZERO_ERROR; + char* dest = &output->data()[begin_offset]; + int required_capacity = ucnv_fromUChars(converter_, dest, dest_capacity, +- input, input_len, &err); ++ (const UChar*)input, input_len, &err); + if (err != U_BUFFER_OVERFLOW_ERROR) { + output->set_length(begin_offset + required_capacity); + return; +@@ -170,7 +170,7 @@ + while (true) { + UErrorCode err = U_ZERO_ERROR; + UIDNAInfo info = UIDNA_INFO_INITIALIZER; +- int output_length = uidna_nameToASCII(uidna, src, src_len, output->data(), ++ int output_length = uidna_nameToASCII(uidna, (const UChar*)src, src_len, (UChar*)output->data(), + output->capacity(), &info, &err); + if (U_SUCCESS(err) && info.errors == 0) { + output->set_length(output_length); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc 2017-12-26 00:38:34.568625756 +0100 +@@ -43,6 +43,7 @@ + #include "unicode/ucurr.h" + #include "unicode/uloc.h" + #include "unicode/unistr.h" ++#include "unicode/ustring.h" + #include "unicode/unum.h" + #include "unicode/uvernum.h" + #include "unicode/uversion.h" From b32710261f8bd54e2a90462f8d4950621c9bfd16 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Dec 2017 01:49:04 +0100 Subject: [PATCH 237/437] Fix FTBFS issues in the icu59, no-sse2 and skia-neon patches Also bump changelog date. --- qt5-qtwebengine.spec | 2 +- qtwebengine-everywhere-src-5.10.0-icu59.patch | 21 +++++++++++++++ ...engine-everywhere-src-5.10.0-no-sse2.patch | 26 ++++++++++++++----- ...gine-everywhere-src-5.10.0-skia-neon.patch | 11 ++------ 4 files changed, 43 insertions(+), 17 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8323af1..5142c43 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -575,7 +575,7 @@ done %changelog -* Mon Dec 25 2017 Kevin Kofler - 5.10.0-1 +* Tue Dec 26 2017 Kevin Kofler - 5.10.0-1 - Update to 5.10.0 - Update version numbers of bundled stuff - Drop support for Fedora < 26 (in particular, WEBENGINE_CONFIG F25 workarounds) diff --git a/qtwebengine-everywhere-src-5.10.0-icu59.patch b/qtwebengine-everywhere-src-5.10.0-icu59.patch index 3ccff08..2b031f7 100644 --- a/qtwebengine-everywhere-src-5.10.0-icu59.patch +++ b/qtwebengine-everywhere-src-5.10.0-icu59.patch @@ -165,6 +165,27 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/stri // Default to basic substring search if usearch fails. According to // http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/unicodestring.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/unicodestring.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-12-26 01:22:00.605067404 +0100 +@@ -9,16 +9,12 @@ + #include "third_party/icu/source/common/unicode/unistr.h" + #include "third_party/icu/source/common/unicode/uvernum.h" + +-#if U_ICU_VERSION_MAJOR_NUM >= 59 +-#include "third_party/icu/source/common/unicode/char16ptr.h" +-#endif +- + namespace base { + namespace i18n { + + inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) { + #if U_ICU_VERSION_MAJOR_NUM >= 59 +- return base::string16(icu::toUCharPtr(unistr.getBuffer()), ++ return base::string16(reinterpret_cast(unistr.getBuffer()), + static_cast(unistr.length())); + #else + return base::string16(unistr.getBuffer(), diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-11-28 14:06:53.000000000 +0100 +++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-12-26 00:16:45.791461970 +0100 diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index a7d40dc..9dd1a6d 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -2098,7 +2098,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We +#include "VectorMath.cpp" diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-12-25 13:05:24.025939484 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-12-26 01:28:56.946048732 +0100 @@ -1693,6 +1693,10 @@ deps += [ ":blink_x86_sse" ] } @@ -2110,7 +2110,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We if (use_webaudio_ffmpeg) { include_dirs += [ "//third_party/ffmpeg" ] deps += [ "//third_party/ffmpeg" ] -@@ -2139,6 +2143,26 @@ +@@ -2139,6 +2143,23 @@ } } @@ -2122,9 +2122,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We + "audio/VectorMathSSE2.cpp", + ] + cflags = [ "-msse2", "-mfpmath=sse" ] -+ deps = [ -+ ":blink_common", -+ ] + configs += [ + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + "//build/config/compiler:no_size_t_to_int_warning", @@ -2235,7 +2232,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we #endif diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-12-25 17:42:57.199465881 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-12-26 01:32:06.842303361 +0100 @@ -116,9 +116,9 @@ v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ] @@ -2372,7 +2369,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qt defines = [ "BUILDING_V8_PLATFORM_SHARED" ] } -@@ -2676,7 +2718,22 @@ +@@ -2676,7 +2718,37 @@ ] } @@ -2392,6 +2389,21 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qt + + public_configs = [ ":external_config" ] + } ++ ++ group("v8_for_testing") { ++ testonly = true ++ ++ public_deps = [ ++ ":v8_base", ++ ":v8_maybe_snapshot", ++ ] ++ ++ if (v8_use_snapshot) { ++ public_deps += [ ":v8_builtins_generators" ] ++ } ++ ++ public_configs = [ ":external_config" ] ++ } +} else if (is_component_build) { v8_component("v8") { sources = [ diff --git a/qtwebengine-everywhere-src-5.10.0-skia-neon.patch b/qtwebengine-everywhere-src-5.10.0-skia-neon.patch index 82ef406..9424e9f 100644 --- a/qtwebengine-everywhere-src-5.10.0-skia-neon.patch +++ b/qtwebengine-everywhere-src-5.10.0-skia-neon.patch @@ -339,8 +339,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sk #endif // SkUtilsArm_DEFINED diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-12-25 18:34:52.850631826 +0100 -@@ -0,0 +1,54 @@ ++++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-12-26 01:45:00.514114716 +0100 +@@ -0,0 +1,47 @@ +/* + * Copyright 2015 Google Inc. + * @@ -354,10 +354,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sk +#include "SkBlitMask_opts.h" +#include "SkBlitRow_opts.h" +#include "SkBlurImageFilter_opts.h" -+#include "SkColorCubeFilter_opts.h" +#include "SkMorphologyImageFilter_opts.h" +#include "SkSwizzler_opts.h" -+#include "SkTextureCompressor_opts.h" +#include "SkXfermode_opts.h" + +namespace SkOpts { @@ -373,16 +371,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sk + erode_x = sk_neon::erode_x; + erode_y = sk_neon::erode_y; + -+ texture_compressor = sk_neon::texture_compressor; -+ fill_block_dimensions = sk_neon::fill_block_dimensions; -+ + blit_mask_d32_a8 = sk_neon::blit_mask_d32_a8; + + blit_row_color32 = sk_neon::blit_row_color32; + blit_row_s32a_opaque = sk_neon::blit_row_s32a_opaque; + -+ color_cube_filter_span = sk_neon::color_cube_filter_span; -+ + RGBA_to_BGRA = sk_neon::RGBA_to_BGRA; + RGBA_to_rgbA = sk_neon::RGBA_to_rgbA; + RGBA_to_bgrA = sk_neon::RGBA_to_bgrA; From e16c10df1add84e08220d8b4d0c7e9da7d925b79 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Dec 2017 02:29:29 +0100 Subject: [PATCH 238/437] Update clean_ffmpeg.sh whitelist (sync from Fedora Chromium packaging) Add missing libavutil/imgutils.c, libavutil/imgutils.h, libavutil/imgutils_internal.h and libavcodec/hwaccel.h. Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 8 ++++++-- qt5-qtwebengine.spec | 1 + sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 0b1fa64..c049e03 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -61,9 +61,11 @@ header_files=" libavutil/x86/asm.h \ libavutil/cpu.h \ libavutil/dynarray.h \ libavutil/ffmath.h \ - libavutil/float_dsp.h \ libavutil/fixed_dsp.h \ + libavutil/float_dsp.h \ libavutil/hwcontext_internal.h \ + libavutil/imgutils.h \ + libavutil/imgutils_internal.h \ libavutil/internal.h \ libavutil/intfloat.h \ libavutil/intreadwrite.h \ @@ -116,6 +118,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/h264chroma.h \ libavcodec/h264pred.h \ libavcodec/hpeldsp.h \ + libavcodec/hwaccel.h \ libavcodec/idctdsp.h \ libavcodec/internal.h \ libavcodec/mathops.h \ @@ -229,8 +232,9 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/vp8_parser.c \ libavcodec/vp8dsp.c \ libavutil/cpu.c \ - libavutil/float_dsp.c \ libavutil/fixed_dsp.c \ + libavutil/float_dsp.c \ + libavutil/imgutils.c \ libavutil/aarch64/float_dsp_neon.S \ libavutil/arm/cpu.c \ libavutil/arm/float_dsp_neon.S \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5142c43..b41afa6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -581,6 +581,7 @@ done - Drop support for Fedora < 26 (in particular, WEBENGINE_CONFIG F25 workarounds) - Drop qt57 patch, support for Qt 5.7 was completely dropped upstream - Update get_free_ffmpeg_source_files.py from Fedora Chromium packaging +- Update clean_ffmpeg.sh whitelist (sync from Fedora Chromium packaging) - clean_qtwebengine.sh: Update for the changed tarball naming scheme - Use QMAKE_EXTRA_ARGS instead of the removed WEBENGINE_CONFIG - Rebase linux-pri, system-nspr-prtime, system-icu-utf, no-sse2, skia-neon and diff --git a/sources b/sources index d0b675c..f60115f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = 0c89061507a7f1541eb9433545f3610f96ac6b6b29dc2527a9bc15c945a0ce33d0d2bd693c9d865639b10a97077192fc387b0a5920e64b7860c576b987899fb2 +SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = 7802bfe56ea24a3038b703af693d0227a5e283804a20d6796687c658b28f9eb21f99a163c3ddf4d9a13d915bf254d32e05b1bd54b413f2afa160b7b3d21815ba From b3a92e0ab09fdfb73bbde86d081233985c88bd16 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Dec 2017 22:10:48 +0100 Subject: [PATCH 239/437] clean_ffmpeg.sh: Add missing libavcodec/mpeg12data.h Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index c049e03..01e354d 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -124,6 +124,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/mathops.h \ libavcodec/me_cmp.h \ libavcodec/motion_est.h \ + libavcodec/mpeg12data.h \ libavcodec/mpegpicture.h \ libavcodec/mpegutils.h \ libavcodec/mpegvideo.h \ diff --git a/sources b/sources index f60115f..813d4c6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = 7802bfe56ea24a3038b703af693d0227a5e283804a20d6796687c658b28f9eb21f99a163c3ddf4d9a13d915bf254d32e05b1bd54b413f2afa160b7b3d21815ba +SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = d990decda15de607208798ab4d6ce310e2e1c922186cabbb73b13597e08ddad45f0465fb636d3fb9fa1641808f6b3d352643752cebf9c0612584e39aaf48601a From 2e3844f4b7d27bb13df3b2f7e48b1a050f4aee7a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Dec 2017 22:39:22 +0100 Subject: [PATCH 240/437] clean_ffmpeg.sh: Add missing libavcodec/opus_rc.h Also update sources with the regenerated and reuploaded tarball. --- clean_ffmpeg.sh | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 01e354d..51b6854 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -132,6 +132,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/mpegvideoencdsp.h \ libavcodec/old_codec_ids.h \ libavcodec/options_table.h \ + libavcodec/opus_rc.h \ libavcodec/pcm_tablegen.h \ libavcodec/pel_template.c \ libavcodec/pixblockdsp.h \ diff --git a/sources b/sources index 813d4c6..a081baa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = d990decda15de607208798ab4d6ce310e2e1c922186cabbb73b13597e08ddad45f0465fb636d3fb9fa1641808f6b3d352643752cebf9c0612584e39aaf48601a +SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = d89fa0898176749b30a13dd50b58ca5c65a2a3ab67f210a567d791374cb95d206eff6aa6d41fa444dd9b88e4bf7f0544ed58486875b4c66d1d3974a2a7675c46 From ab0943aad9b08f623cca915bbf676036d63620a9 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 27 Dec 2017 00:22:26 +0100 Subject: [PATCH 241/437] Fix no-sse2 patch bugs * Revert https://chromium-review.googlesource.com/c/chromium/src/+/570351 which assumes that x86 must have SSE (1). * Fix the wsola_internals.cc patch: xmmintrin.h requires only SSE (1), not SSE2. (Should not really make a difference in practice though.) * Fix rebasing copy&paste error in DirectConvolver.cpp. --- qt5-qtwebengine.spec | 7 ++- ...engine-everywhere-src-5.10.0-no-sse2.patch | 58 +++++++++++++++++-- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b41afa6..c5abba4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -96,9 +96,10 @@ Patch4: qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch # undoing, there were no modifications at all. Must be applied after Patch4. Patch5: qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch # do not require SSE2 on i686 -# cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts -# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, and V8 -# Gerrit review 575756, along with some custom fixes and improvements +# cumulative revert of Chromium reviews 187423002, 308003004, 511773002 (parts +# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, Chromium +# Gerrit review 570351 and V8 Gerrit review 575756, along with some custom fixes +# and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) Patch6: qtwebengine-everywhere-src-5.10.0-no-sse2.patch # fix missing ARM -mfpu setting diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index 9dd1a6d..99d481d 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -239,6 +239,56 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchai clang_toolchain("clang_x64") { # Output linker map files for binary size analysis. enable_linker_map = true +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc 2017-12-26 23:04:53.301868189 +0100 +@@ -7,7 +7,7 @@ + #include + #include + #include +-#if defined(ARCH_CPU_X86_FAMILY) ++#ifdef __SSE__ + #include + #endif + +@@ -810,7 +810,7 @@ + } + + ScopedSubnormalFloatDisabler::ScopedSubnormalFloatDisabler() { +-#if defined(ARCH_CPU_X86_FAMILY) ++#ifdef __SSE__ + // Turn on "subnormals are zero" and "flush to zero" CSR flags. + orig_state_ = _mm_getcsr(); + _mm_setcsr(orig_state_ | 0x8040); +@@ -818,7 +818,7 @@ + } + + ScopedSubnormalFloatDisabler::~ScopedSubnormalFloatDisabler() { +-#if defined(ARCH_CPU_X86_FAMILY) ++#ifdef __SSE__ + _mm_setcsr(orig_state_); + #endif + } +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.h 2017-12-26 23:04:53.301868189 +0100 +@@ -11,7 +11,6 @@ + #include + + #include "base/logging.h" +-#include "build/build_config.h" + #include "cc/base/base_export.h" + #include "ui/gfx/geometry/box_f.h" + #include "ui/gfx/geometry/point3_f.h" +@@ -331,7 +330,7 @@ + ~ScopedSubnormalFloatDisabler(); + + private: +-#if defined(ARCH_CPU_X86_FAMILY) ++#ifdef __SSE__ + unsigned int orig_state_; + #endif + DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler); diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 +++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-12-25 13:16:20.896994372 +0100 @@ -1103,13 +1153,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn # TODO(watk): Refactor tests that could be made to run on Android. See diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-12-25 12:58:07.760365227 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-12-26 23:00:39.631753174 +0100 @@ -15,7 +15,7 @@ #include "base/logging.h" #include "media/base/audio_bus.h" -#if defined(ARCH_CPU_X86_FAMILY) -+#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE2__) ++#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE__) #define USE_SIMD 1 #include #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) @@ -1566,7 +1616,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We const __m128 v_curve_points_per_frame = _mm_set_ps1(curve_points_per_frame); diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-12-25 14:40:01.051077869 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-12-27 00:16:35.571877993 +0100 @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -1599,7 +1649,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We + DirectConvolver::DirectConvolver(size_t input_block_size) - : input_block_size_(input_block_size), buffer_(input_block_size * 2) {} -+ : m_inputBlockSize(inputBlockSize), m_buffer(inputBlockSize * 2) { ++ : input_block_size_(input_block_size), buffer_(input_block_size * 2) { +#ifdef ARCH_CPU_X86 + base::CPU cpu; + m_haveSSE2 = cpu.has_sse2(); From 95e8108c94585db43375d4e312dcc94cbaa875c4 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 28 Dec 2017 02:31:06 +0100 Subject: [PATCH 242/437] no-sse2 patch FTBFS fix attempt, armv7hl FTBFS fix attempt - no-sse2 patch: First try at cleaning up the V8 x87 backend bitrot, by porting needed changes from the ia32 SSE2 backend. - Reduce debugging info on ARM also on F27+ (as on F26- since 5.9.0). - Update changelog date. --- qt5-qtwebengine.spec | 14 +- ...engine-everywhere-src-5.10.0-no-sse2.patch | 1086 +++++++++-------- 2 files changed, 604 insertions(+), 496 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c5abba4..a6f6bcb 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -23,20 +23,16 @@ # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 %global arm_neon 1 -%if 0%{?fedora} > 26 # the QMake CONFIG flags to force debugging information to be produced in # release builds, and for all parts of the code -%global debug_config webcore_debug v8base_debug force_debug_info -%else %ifarch %{arm} -# the ARM builder runs out of memory on Fedora 26 during linking with the full -# setting below, so omit debugging information for the parts upstream deems it -# dispensable for (webcore, v8base) +# the ARM builder runs out of memory during linking with the full setting below, +# so omit debugging information for the parts upstream deems it dispensable for +# (webcore, v8base) %global debug_config force_debug_info %else %global debug_config webcore_debug v8base_debug force_debug_info %endif -%endif #global prerelease rc @@ -576,7 +572,7 @@ done %changelog -* Tue Dec 26 2017 Kevin Kofler - 5.10.0-1 +* Thu Dec 28 2017 Kevin Kofler - 5.10.0-1 - Update to 5.10.0 - Update version numbers of bundled stuff - Drop support for Fedora < 26 (in particular, WEBENGINE_CONFIG F25 workarounds) @@ -592,6 +588,7 @@ done - Disable system libvpx support for now, requires unreleased libvpx (1.6.2+) - Add new BuildRequires: flex (required) and pkgconfig(lcms2) (unbundled) - Forward-port missing parts of 5.9 ICU>=59 build fix (QTBUG-60886, QTBUG-65090) +- Reduce debugging info on ARM also on F27+ (as on F26- since 5.9.0) * Tue Dec 19 2017 Rex Dieter - 5.9.3-5 - properly escape newline in lesser_version hack @@ -676,6 +673,7 @@ done - Backport patch to fix FTBFS with GCC on aarch64 from upstream Chromium - Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn - Delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn +- Reduce debugging info on ARM on F26- * Sat May 13 2017 Rex Dieter - 5.8.0-14 - fix rpm macros diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index 99d481d..373f41c 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -2649,8 +2649,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/bu #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-25 17:42:57.204465808 +0100 -@@ -0,0 +1,3143 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-27 22:57:11.363055815 +0100 +@@ -0,0 +1,3142 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -3609,8 +3609,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + Smi* interpreter_entry_return_pc_offset( + masm->isolate()->heap()->interpreter_entry_return_pc_offset()); + DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero); -+ __ LoadHeapObject(ebx, -+ masm->isolate()->builtins()->InterpreterEntryTrampoline()); ++ __ Move(ebx, masm->isolate()->builtins()->InterpreterEntryTrampoline()); + __ add(ebx, Immediate(interpreter_entry_return_pc_offset->value() + + Code::kHeaderSize - kHeapObjectTag)); + __ push(ebx); @@ -5881,8 +5880,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile // == arm ==================================================================== diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-25 17:42:57.208465749 +0100 -@@ -0,0 +1,2768 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-28 02:12:51.768596072 +0100 +@@ -0,0 +1,2800 @@ +// Copyright 2013 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -5903,7 +5902,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +namespace internal { +namespace compiler { + -+#define __ masm()-> ++#define __ tasm()-> + + +// Adds X87 specific methods for decoding operands. @@ -5953,11 +5952,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + case Constant::kInt32: + return Immediate(constant.ToInt32()); + case Constant::kFloat32: -+ return Immediate( -+ isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); ++ return Immediate::EmbeddedNumber(constant.ToFloat32()); + case Constant::kFloat64: -+ return Immediate(isolate()->factory()->NewNumber( -+ constant.ToFloat64(value()).value(), TENURED)); ++ return Immediate::EmbeddedNumber(constant.ToFloat64().value()); + case Constant::kExternalReference: + return Immediate(constant.ToExternalReference()); + case Constant::kHeapObject: @@ -6112,7 +6109,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + public: + OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result, + X87Register input) -+ : OutOfLineCode(gen), result_(result), input_(input) {} ++ : OutOfLineCode(gen), ++ result_(result), ++ input_(input), ++ zone_(gen->zone()) {} + + void Generate() final { + UNIMPLEMENTED(); @@ -6123,6 +6123,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + private: + Register const result_; + X87Register const input_; ++ Zone* zone_; +}; + + @@ -6137,7 +6138,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + value_(value), + scratch0_(scratch0), + scratch1_(scratch1), -+ mode_(mode) {} ++ mode_(mode), ++ zone_(gen->zone()) {} + + void Generate() final { + if (mode_ > RecordWriteMode::kValueIsPointer) { @@ -6151,10 +6153,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + : OMIT_REMEMBERED_SET; + SaveFPRegsMode const save_fp_mode = + frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; -+ RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, -+ remembered_set_action, save_fp_mode); + __ lea(scratch1_, operand_); -+ __ CallStub(&stub); ++ __ CallStubDelayed( ++ new (zone_) RecordWriteStub(nullptr, object_, scratch0_, scratch1_, ++ remembered_set_action, save_fp_mode)); + } + + private: @@ -6164,6 +6166,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + Register const scratch0_; + Register const scratch1_; + RecordWriteMode const mode_; ++ Zone* zone_; +}; + +} // namespace @@ -6262,48 +6265,48 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + } \ + } while (0) + -+#define ASSEMBLE_IEEE754_BINOP(name) \ -+ do { \ -+ /* Saves the esp into ebx */ \ -+ __ push(ebx); \ -+ __ mov(ebx, esp); \ -+ /* Pass one double as argument on the stack. */ \ -+ __ PrepareCallCFunction(4, eax); \ -+ __ fstp(0); \ -+ /* Load first operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4 + kDoubleSize)); \ -+ /* Put first operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 0 * kDoubleSize)); \ -+ /* Load second operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4)); \ -+ /* Put second operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 1 * kDoubleSize)); \ -+ __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ -+ 4); \ -+ /* Restore the ebx */ \ -+ __ pop(ebx); \ -+ /* Return value is in st(0) on x87. */ \ -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); \ ++#define ASSEMBLE_IEEE754_BINOP(name) \ ++ do { \ ++ /* Saves the esp into ebx */ \ ++ __ push(ebx); \ ++ __ mov(ebx, esp); \ ++ /* Pass one double as argument on the stack. */ \ ++ __ PrepareCallCFunction(4, eax); \ ++ __ fstp(0); \ ++ /* Load first operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4 + kDoubleSize)); \ ++ /* Put first operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 0 * kDoubleSize)); \ ++ /* Load second operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4)); \ ++ /* Put second operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 1 * kDoubleSize)); \ ++ __ CallCFunction( \ ++ ExternalReference::ieee754_##name##_function(__ isolate()), 4); \ ++ /* Restore the ebx */ \ ++ __ pop(ebx); \ ++ /* Return value is in st(0) on x87. */ \ ++ __ lea(esp, Operand(esp, 2 * kDoubleSize)); \ + } while (false) + -+#define ASSEMBLE_IEEE754_UNOP(name) \ -+ do { \ -+ /* Saves the esp into ebx */ \ -+ __ push(ebx); \ -+ __ mov(ebx, esp); \ -+ /* Pass one double as argument on the stack. */ \ -+ __ PrepareCallCFunction(2, eax); \ -+ __ fstp(0); \ -+ /* Load operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4)); \ -+ /* Put operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 0)); \ -+ __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \ -+ 2); \ -+ /* Restore the ebx */ \ -+ __ pop(ebx); \ -+ /* Return value is in st(0) on x87. */ \ -+ __ lea(esp, Operand(esp, kDoubleSize)); \ ++#define ASSEMBLE_IEEE754_UNOP(name) \ ++ do { \ ++ /* Saves the esp into ebx */ \ ++ __ push(ebx); \ ++ __ mov(ebx, esp); \ ++ /* Pass one double as argument on the stack. */ \ ++ __ PrepareCallCFunction(2, eax); \ ++ __ fstp(0); \ ++ /* Load operand from original stack */ \ ++ __ fld_d(MemOperand(ebx, 4)); \ ++ /* Put operand into stack for function call */ \ ++ __ fstp_d(Operand(esp, 0)); \ ++ __ CallCFunction( \ ++ ExternalReference::ieee754_##name##_function(__ isolate()), 2); \ ++ /* Restore the ebx */ \ ++ __ pop(ebx); \ ++ /* Return value is in st(0) on x87. */ \ ++ __ lea(esp, Operand(esp, kDoubleSize)); \ + } while (false) + +void CodeGenerator::AssembleDeconstructFrame() { @@ -6358,7 +6361,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + +namespace { + -+void AdjustStackPointerForTailCall(MacroAssembler* masm, ++void AdjustStackPointerForTailCall(TurboAssembler* tasm, + FrameAccessState* state, + int new_slot_above_sp, + bool allow_shrinkage = true) { @@ -6366,10 +6369,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + StandardFrameConstants::kFixedSlotCountAboveFp; + int stack_slot_delta = new_slot_above_sp - current_sp_offset; + if (stack_slot_delta > 0) { -+ masm->sub(esp, Immediate(stack_slot_delta * kPointerSize)); ++ tasm->sub(esp, Immediate(stack_slot_delta * kPointerSize)); + state->IncreaseSPDelta(stack_slot_delta); + } else if (allow_shrinkage && stack_slot_delta < 0) { -+ masm->add(esp, Immediate(-stack_slot_delta * kPointerSize)); ++ tasm->add(esp, Immediate(-stack_slot_delta * kPointerSize)); + state->IncreaseSPDelta(stack_slot_delta); + } +} @@ -6390,7 +6393,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + LocationOperand destination_location( + LocationOperand::cast(move->destination())); + InstructionOperand source(move->source()); -+ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ AdjustStackPointerForTailCall(tasm(), frame_access_state(), + destination_location.index()); + if (source.IsStackSlot()) { + LocationOperand source_location(LocationOperand::cast(source)); @@ -6408,13 +6411,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + move->Eliminate(); + } + } -+ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ AdjustStackPointerForTailCall(tasm(), frame_access_state(), + first_unused_stack_slot, false); +} + +void CodeGenerator::AssembleTailCallAfterGap(Instruction* instr, + int first_unused_stack_slot) { -+ AdjustStackPointerForTailCall(masm(), frame_access_state(), ++ AdjustStackPointerForTailCall(tasm(), frame_access_state(), + first_unused_stack_slot); +} + @@ -6433,7 +6436,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + __ fstp(0); + EnsureSpaceForLazyDeopt(); + if (HasImmediateInput(instr, 0)) { -+ Handle code = Handle::cast(i.InputHeapObject(0)); ++ Handle code = i.InputCode(0); + __ call(code, RelocInfo::CODE_TARGET); + } else { + Register reg = i.InputRegister(0); @@ -6468,7 +6471,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + no_reg, no_reg, no_reg); + } + if (HasImmediateInput(instr, 0)) { -+ Handle code = Handle::cast(i.InputHeapObject(0)); ++ Handle code = i.InputCode(0); + __ jmp(code, RelocInfo::CODE_TARGET); + } else { + Register reg = i.InputRegister(0); @@ -6735,8 +6738,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + // Keep the x87 FPU stack empty before calling stub code + __ fstp(0); + // Call the MathStub and put return value in stX_0 -+ MathPowStub stub(isolate(), MathPowStub::DOUBLE); -+ __ CallStub(&stub); ++ __ CallStubDelayed(new (zone()) ++ MathPowStub(nullptr, MathPowStub::DOUBLE)); + /* Return value is in st(0) on x87. */ + __ lea(esp, Operand(esp, 2 * kDoubleSize)); + break; @@ -7156,7 +7159,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + break; + } + case kX87Float64Mod: { -+ FrameScope frame_scope(&masm_, StackFrame::MANUAL); ++ FrameScope frame_scope(tasm(), StackFrame::MANUAL); + if (FLAG_debug_code && FLAG_enable_slow_asserts) { + __ VerifyX87StackDepth(1); + } @@ -8025,8 +8028,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + void Generate() final { + X87OperandConverter i(gen_, instr_); + -+ Runtime::FunctionId trap_id = static_cast( -+ i.InputInt32(instr_->InputCount() - 1)); ++ Builtins::Name trap_id = ++ static_cast(i.InputInt32(instr_->InputCount() - 1)); + bool old_has_frame = __ has_frame(); + if (frame_elided_) { + __ set_has_frame(true); @@ -8034,30 +8037,30 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + } + GenerateCallToTrap(trap_id); + if (frame_elided_) { -+ ReferenceMap* reference_map = -+ new (gen_->zone()) ReferenceMap(gen_->zone()); -+ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, -+ Safepoint::kNoLazyDeopt); + __ set_has_frame(old_has_frame); + } -+ if (FLAG_debug_code) { -+ __ ud2(); -+ } + } + + private: + void GenerateCallToTrap(Runtime::FunctionId trap_id) { -+ if (trap_id == Runtime::kNumFunctions) { ++ if (trap_id == Builtins::builtin_count) { + // We cannot test calls to the runtime in cctest/test-run-wasm. + // Therefore we emit a call to C here instead of a call to the runtime. + __ PrepareCallCFunction(0, esi); -+ __ CallCFunction( -+ ExternalReference::wasm_call_trap_callback_for_testing(isolate()), -+ 0); ++ __ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing( ++ __ isolate()), ++ 0); ++ __ LeaveFrame(StackFrame::WASM_COMPILED); ++ __ Ret(); + } else { -+ __ Move(esi, isolate()->native_context()); + gen_->AssembleSourcePosition(instr_); -+ __ CallRuntime(trap_id); ++ __ Call(__ isolate()->builtins()->builtin_handle(trap_id), ++ RelocInfo::CODE_TARGET); ++ ReferenceMap* reference_map = ++ new (gen_->zone()) ReferenceMap(gen_->zone()); ++ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, ++ Safepoint::kNoLazyDeopt); ++ __ AssertUnreachable(kUnexpectedReturnFromWasmTrap); + } + } + @@ -8343,6 +8346,40 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + + const RegList saves = descriptor->CalleeSavedRegisters(); + if (shrink_slots > 0) { ++ if (info()->IsWasm() && shrink_slots > 128) { ++ // For WebAssembly functions with big frames we have to do the stack ++ // overflow check before we construct the frame. Otherwise we may not ++ // have enough space on the stack to call the runtime for the stack ++ // overflow. ++ Label done; ++ ++ // If the frame is bigger than the stack, we throw the stack overflow ++ // exception unconditionally. Thereby we can avoid the integer overflow ++ // check in the condition code. ++ if (shrink_slots * kPointerSize < FLAG_stack_size * 1024) { ++ Register scratch = esi; ++ __ push(scratch); ++ __ mov(scratch, ++ Immediate(ExternalReference::address_of_real_stack_limit( ++ __ isolate()))); ++ __ mov(scratch, Operand(scratch, 0)); ++ __ add(scratch, Immediate(shrink_slots * kPointerSize)); ++ __ cmp(esp, scratch); ++ __ pop(scratch); ++ __ j(above_equal, &done); ++ } ++ if (!frame_access_state()->has_frame()) { ++ __ set_has_frame(true); ++ __ EnterFrame(StackFrame::WASM_COMPILED); ++ } ++ __ Move(esi, Smi::kZero); ++ __ CallRuntimeDelayed(zone(), Runtime::kThrowWasmStackOverflow); ++ ReferenceMap* reference_map = new (zone()) ReferenceMap(zone()); ++ RecordSafepoint(reference_map, Safepoint::kSimple, 0, ++ Safepoint::kNoLazyDeopt); ++ __ AssertUnreachable(kUnexpectedReturnFromWasmTrap); ++ __ bind(&done); ++ } + __ sub(esp, Immediate(shrink_slots * kPointerSize)); + } + @@ -8450,17 +8487,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + Handle src = src_constant.ToHeapObject(); + if (destination->IsRegister()) { + Register dst = g.ToRegister(destination); -+ __ LoadHeapObject(dst, src); ++ __ Move(dst, src); + } else { + DCHECK(destination->IsStackSlot()); + Operand dst = g.ToOperand(destination); -+ AllowDeferredHandleDereference embedding_raw_address; -+ if (isolate()->heap()->InNewSpace(*src)) { -+ __ PushHeapObject(src); -+ __ pop(dst); -+ } else { -+ __ mov(dst, src); -+ } ++ __ mov(dst, src); + } + } else if (destination->IsRegister()) { + Register dst = g.ToRegister(destination); @@ -8639,7 +8670,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + int space_needed = Deoptimizer::patch_size(); + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. -+ int current_pc = masm()->pc_offset(); ++ int current_pc = tasm()->pc_offset(); + if (current_pc < last_lazy_deopt_pc_ + space_needed) { + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + __ Nop(padding_size); @@ -10903,8 +10934,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co static const int kCodeSizeMultiplier = 165; diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-25 17:42:57.213465676 +0100 -@@ -0,0 +1,2425 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-28 02:00:30.471956182 +0100 +@@ -0,0 +1,2418 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -11344,9 +11375,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co +void FullCodeGenerator::AccumulatorValueContext::Plug( + Handle lit) const { + if (lit->IsSmi()) { -+ __ SafeMove(result_register(), Immediate(lit)); ++ __ SafeMove(result_register(), Immediate(Smi::cast(*lit))); + } else { -+ __ Move(result_register(), Immediate(lit)); ++ __ Move(result_register(), Immediate(Handle::cast(lit))); + } +} + @@ -11354,9 +11385,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co +void FullCodeGenerator::StackValueContext::Plug(Handle lit) const { + codegen()->OperandStackDepthIncrement(1); + if (lit->IsSmi()) { -+ __ SafePush(Immediate(lit)); ++ __ SafePush(Immediate(Smi::cast(*lit))); + } else { -+ __ push(Immediate(lit)); ++ __ push(Immediate(Handle::cast(lit))); + } +} + @@ -11381,7 +11412,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + } + } else { + // For simplicity we always test the accumulator register. -+ __ mov(result_register(), lit); ++ __ mov(result_register(), Handle::cast(lit)); + codegen()->DoTest(this); + } +} @@ -11437,18 +11468,16 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + + +void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { -+ Handle value = flag -+ ? isolate()->factory()->true_value() -+ : isolate()->factory()->false_value(); ++ Handle value = flag ? isolate()->factory()->true_value() ++ : isolate()->factory()->false_value(); + __ mov(result_register(), value); +} + + +void FullCodeGenerator::StackValueContext::Plug(bool flag) const { + codegen()->OperandStackDepthIncrement(1); -+ Handle value = flag -+ ? isolate()->factory()->true_value() -+ : isolate()->factory()->false_value(); ++ Handle value = flag ? isolate()->factory()->true_value() ++ : isolate()->factory()->false_value(); + __ push(Immediate(value)); +} + @@ -12246,11 +12275,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + } +} + -+void FullCodeGenerator::VisitSuspend(Suspend* expr) { -+ // Resumable functions are not supported. -+ UNREACHABLE(); -+} -+ +void FullCodeGenerator::PushOperand(MemOperand operand) { + OperandStackDepthIncrement(1); + __ Push(operand); @@ -13189,9 +13213,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + + VisitForAccumulatorValue(sub_expr); + -+ Handle nil_value = nil == kNullValue -+ ? isolate()->factory()->null_value() -+ : isolate()->factory()->undefined_value(); ++ Handle nil_value = nil == kNullValue ++ ? isolate()->factory()->null_value() ++ : isolate()->factory()->undefined_value(); + if (expr->op() == Token::EQ_STRICT) { + __ cmp(eax, nil_value); + Split(equal, if_true, if_false, fall_through); @@ -15752,8 +15776,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp 'mips/assembler-mips.cc', diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-25 17:42:57.219465588 +0100 -@@ -0,0 +1,2217 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 01:58:14.302045167 +0100 +@@ -0,0 +1,2256 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. +// @@ -15796,6 +15820,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + +#include "src/base/bits.h" +#include "src/base/cpu.h" ++#include "src/code-stubs.h" +#include "src/disassembler.h" +#include "src/macro-assembler.h" +#include "src/v8.h" @@ -15803,6 +15828,22 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +namespace v8 { +namespace internal { + ++Immediate Immediate::EmbeddedNumber(double value) { ++ int32_t smi; ++ if (DoubleToSmiInteger(value, &smi)) return Immediate(Smi::FromInt(smi)); ++ Immediate result(0, RelocInfo::EMBEDDED_OBJECT); ++ result.is_heap_object_request_ = true; ++ result.value_.heap_object_request = HeapObjectRequest(value); ++ return result; ++} ++ ++Immediate Immediate::EmbeddedCode(CodeStub* stub) { ++ Immediate result(0, RelocInfo::CODE_TARGET); ++ result.is_heap_object_request_ = true; ++ result.value_.heap_object_request = HeapObjectRequest(stub); ++ return result; ++} ++ +// ----------------------------------------------------------------------------- +// Implementation of CpuFeatures + @@ -15969,6 +16010,24 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + return Register::from_code(buf_[0] & 0x07); +} + ++void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) { ++ for (auto& request : heap_object_requests_) { ++ Handle object; ++ switch (request.kind()) { ++ case HeapObjectRequest::kHeapNumber: ++ object = isolate->factory()->NewHeapNumber(request.heap_number(), ++ IMMUTABLE, TENURED); ++ break; ++ case HeapObjectRequest::kCodeStub: ++ request.code_stub()->set_isolate(isolate); ++ object = request.code_stub()->GetCode(); ++ break; ++ } ++ Address pc = buffer_ + request.offset(); ++ Memory::Object_Handle_at(pc) = object; ++ } ++} ++ + +// ----------------------------------------------------------------------------- +// Implementation of Assembler. @@ -15992,10 +16051,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::GetCode(CodeDesc* desc) { ++void Assembler::GetCode(Isolate* isolate, CodeDesc* desc) { + // Finalize code (at this point overflow() may be true, but the gap ensures + // that we are still not overlapping instructions and relocation info). + DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. ++ ++ AllocateAndInstallRequestedHeapObjects(isolate); ++ + // Set up code descriptor. + desc->buffer = buffer_; + desc->buffer_size = buffer_size_; @@ -16077,7 +16139,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + EnsureSpace ensure_space(this); + if (x.is_int8()) { + EMIT(0x6a); -+ EMIT(x.x_); ++ EMIT(x.immediate()); + } else { + EMIT(0x68); + emit(x); @@ -16145,7 +16207,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + EnsureSpace ensure_space(this); + EMIT(0xC6); + emit_operand(eax, dst); -+ EMIT(static_cast(src.x_)); ++ EMIT(static_cast(src.immediate())); +} + + @@ -16196,8 +16258,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + EMIT(0x66); + EMIT(0xC7); + emit_operand(eax, dst); -+ EMIT(static_cast(src.x_ & 0xff)); -+ EMIT(static_cast(src.x_ >> 8)); ++ EMIT(static_cast(src.immediate() & 0xff)); ++ EMIT(static_cast(src.immediate() >> 8)); +} + + @@ -16215,7 +16277,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::mov(Register dst, Handle handle) { ++void Assembler::mov(Register dst, Handle handle) { + EnsureSpace ensure_space(this); + EMIT(0xB8 | dst.code()); + emit(handle); @@ -16244,7 +16306,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::mov(const Operand& dst, Handle handle) { ++void Assembler::mov(const Operand& dst, Handle handle) { + EnsureSpace ensure_space(this); + EMIT(0xC7); + emit_operand(eax, dst); @@ -16496,7 +16558,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::cmp(Register reg, Handle handle) { ++void Assembler::cmp(Register reg, Handle handle) { + EnsureSpace ensure_space(this); + emit_arith(7, Operand(reg), Immediate(handle)); +} @@ -16520,7 +16582,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::cmp(const Operand& op, Handle handle) { ++void Assembler::cmp(const Operand& op, Handle handle) { + EnsureSpace ensure_space(this); + emit_arith(7, op, Immediate(handle)); +} @@ -16929,7 +16991,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + EMIT(0xA8); + emit_b(imm8); + } else if (reg.is_byte_register()) { -+ emit_arith_b(0xF6, 0xC0, reg, static_cast(imm8.x_)); ++ emit_arith_b(0xF6, 0xC0, reg, static_cast(imm8.immediate())); + } else { + EMIT(0x66); + EMIT(0xF7); @@ -17206,16 +17268,19 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::call(Handle code, -+ RelocInfo::Mode rmode, -+ TypeFeedbackId ast_id) { ++void Assembler::call(Handle code, RelocInfo::Mode rmode) { + EnsureSpace ensure_space(this); + DCHECK(RelocInfo::IsCodeTarget(rmode) + || rmode == RelocInfo::CODE_AGE_SEQUENCE); + EMIT(0xE8); -+ emit(code, rmode, ast_id); ++ emit(code, rmode); +} + ++void Assembler::call(CodeStub* stub) { ++ EnsureSpace ensure_space(this); ++ EMIT(0xE8); ++ emit(Immediate::EmbeddedCode(stub)); ++} + +void Assembler::jmp(Label* L, Label::Distance distance) { + EnsureSpace ensure_space(this); @@ -17819,9 +17884,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + + // Some internal data structures overflow for very large buffers, + // they must ensure that kMaximalBufferSize is not too large. -+ if (desc.buffer_size > kMaximalBufferSize || -+ static_cast(desc.buffer_size) > -+ isolate()->heap()->MaxOldGenerationSize()) { ++ if (desc.buffer_size > kMaximalBufferSize) { + V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); + } + @@ -17877,7 +17940,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + if (x.is_int8()) { + EMIT(0x83); // using a sign-extended 8-bit immediate. + emit_operand(ireg, dst); -+ EMIT(x.x_ & 0xFF); ++ EMIT(x.immediate() & 0xFF); + } else if (dst.is_reg(eax)) { + EMIT((sel << 3) | 0x05); // short form if the destination is eax. + emit(x); @@ -17973,8 +18036,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-25 17:42:57.220465573 +0100 -@@ -0,0 +1,1107 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-28 01:53:26.598456142 +0100 +@@ -0,0 +1,1140 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. +// @@ -18248,38 +18311,65 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + public: + inline explicit Immediate(int x); + inline explicit Immediate(const ExternalReference& ext); -+ inline explicit Immediate(Handle handle); ++ inline explicit Immediate(Handle handle); + inline explicit Immediate(Smi* value); + inline explicit Immediate(Address addr); + inline explicit Immediate(Address x, RelocInfo::Mode rmode); + ++ static Immediate EmbeddedNumber(double number); // Smi or HeapNumber. ++ static Immediate EmbeddedCode(CodeStub* code); ++ + static Immediate CodeRelativeOffset(Label* label) { + return Immediate(label); + } + -+ bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); } ++ bool is_heap_object_request() const { ++ DCHECK_IMPLIES(is_heap_object_request_, ++ rmode_ == RelocInfo::EMBEDDED_OBJECT || ++ rmode_ == RelocInfo::CODE_TARGET); ++ return is_heap_object_request_; ++ } ++ ++ HeapObjectRequest heap_object_request() const { ++ DCHECK(is_heap_object_request()); ++ return value_.heap_object_request; ++ } ++ ++ int immediate() const { ++ DCHECK(!is_heap_object_request()); ++ return value_.immediate; ++ } ++ ++ bool is_zero() const { return RelocInfo::IsNone(rmode_) && immediate() == 0; } + bool is_int8() const { -+ return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); ++ return RelocInfo::IsNone(rmode_) && i::is_int8(immediate()); + } + bool is_uint8() const { -+ return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); ++ return RelocInfo::IsNone(rmode_) && i::is_uint8(immediate()); + } + bool is_int16() const { -+ return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); ++ return RelocInfo::IsNone(rmode_) && i::is_int16(immediate()); + } ++ + bool is_uint16() const { -+ return v8::internal::is_uint16(x_) && RelocInfo::IsNone(rmode_); ++ return RelocInfo::IsNone(rmode_) && i::is_uint16(immediate()); + } + ++ RelocInfo::Mode rmode() const { return rmode_; } ++ + private: + inline explicit Immediate(Label* value); + -+ int x_; ++ union Value { ++ Value() {} ++ HeapObjectRequest heap_object_request; ++ int immediate; ++ } value_; ++ bool is_heap_object_request_ = false; + RelocInfo::Mode rmode_; + + friend class Operand; + friend class Assembler; -+ friend class MacroAssembler; +}; + + @@ -18344,13 +18434,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + } + + static Operand ForCell(Handle cell) { -+ AllowDeferredHandleDereference embedding_raw_address; -+ return Operand(reinterpret_cast(cell.location()), -+ RelocInfo::CELL); ++ return Operand(reinterpret_cast(cell.address()), RelocInfo::CELL); + } + + static Operand ForRegisterPlusImmediate(Register base, Immediate imm) { -+ return Operand(base, imm.x_, imm.rmode_); ++ return Operand(base, imm.value_.immediate, imm.rmode_); + } + + // Returns true if this Operand is a wrapper for the specified register. @@ -18463,12 +18551,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + Assembler(Isolate* isolate, void* buffer, int buffer_size) + : Assembler(IsolateData(isolate), buffer, buffer_size) {} + Assembler(IsolateData isolate_data, void* buffer, int buffer_size); -+ virtual ~Assembler() { } ++ virtual ~Assembler() {} + + // GetCode emits any pending (non-emitted) code and fills the descriptor + // desc. GetCode() is idempotent; it returns the same result if no other + // Assembler functions are invoked in between GetCode() calls. -+ void GetCode(CodeDesc* desc); ++ void GetCode(Isolate* isolate, CodeDesc* desc); + + // Read/Modify the code target in the branch/call instruction at pc. + // The isolate argument is unused (and may be nullptr) when skipping flushing. @@ -18593,11 +18681,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + + void mov(Register dst, int32_t imm32); + void mov(Register dst, const Immediate& x); -+ void mov(Register dst, Handle handle); ++ void mov(Register dst, Handle handle); + void mov(Register dst, const Operand& src); + void mov(Register dst, Register src); + void mov(const Operand& dst, const Immediate& x); -+ void mov(const Operand& dst, Handle handle); ++ void mov(const Operand& dst, Handle handle); + void mov(const Operand& dst, Register src); + + void movsx_b(Register dst, Register src) { movsx_b(dst, Operand(src)); } @@ -18664,13 +18752,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + void cmpw(Register dst, Register src) { cmpw(Operand(dst), src); } + void cmpw(const Operand& dst, Register src); + void cmp(Register reg, int32_t imm32); -+ void cmp(Register reg, Handle handle); ++ void cmp(Register reg, Handle handle); + void cmp(Register reg0, Register reg1) { cmp(reg0, Operand(reg1)); } + void cmp(Register reg, const Operand& op); + void cmp(Register reg, const Immediate& imm) { cmp(Operand(reg), imm); } + void cmp(const Operand& op, Register reg); + void cmp(const Operand& op, const Immediate& imm); -+ void cmp(const Operand& op, Handle handle); ++ void cmp(const Operand& op, Handle handle); + + void dec_b(Register dst); + void dec_b(const Operand& dst); @@ -18812,9 +18900,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + void call(Register reg) { call(Operand(reg)); } + void call(const Operand& adr); + int CallSize(Handle code, RelocInfo::Mode mode); -+ void call(Handle code, -+ RelocInfo::Mode rmode, -+ TypeFeedbackId id = TypeFeedbackId::None()); ++ void call(Handle code, RelocInfo::Mode rmode); ++ void call(CodeStub* stub); + + // Jumps + // unconditional jump to L @@ -18995,13 +19082,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + // code emission + void GrowBuffer(); + inline void emit(uint32_t x); -+ inline void emit(Handle handle); -+ inline void emit(uint32_t x, -+ RelocInfo::Mode rmode, -+ TypeFeedbackId id = TypeFeedbackId::None()); -+ inline void emit(Handle code, -+ RelocInfo::Mode rmode, -+ TypeFeedbackId id = TypeFeedbackId::None()); ++ inline void emit(Handle handle); ++ inline void emit(uint32_t x, RelocInfo::Mode rmode); ++ inline void emit(Handle code, RelocInfo::Mode rmode); + inline void emit(const Immediate& x); + inline void emit_b(Immediate x); + inline void emit_w(const Immediate& x); @@ -19048,6 +19131,19 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + + // code generation + RelocInfoWriter reloc_info_writer; ++ ++ // The following functions help with avoiding allocations of embedded heap ++ // objects during the code assembly phase. {RequestHeapObject} records the ++ // need for a future heap number allocation or code stub generation. After ++ // code assembly, {AllocateAndInstallRequestedHeapObjects} will allocate these ++ // objects and place them where they are expected (determined by the pc offset ++ // associated with each request). That is, for each request, it will patch the ++ // dummy heap object handle that we emitted during code assembly with the ++ // actual heap object handle. ++ void RequestHeapObject(HeapObjectRequest request); ++ void AllocateAndInstallRequestedHeapObjects(Isolate* isolate); ++ ++ std::forward_list heap_object_requests_; +}; + + @@ -19084,8 +19180,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +#endif // V8_X87_ASSEMBLER_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2017-12-25 17:42:57.219465588 +0100 -@@ -0,0 +1,546 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2017-12-28 01:52:55.041936208 +0100 +@@ -0,0 +1,528 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. +// @@ -19383,50 +19479,41 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + + +Immediate::Immediate(int x) { -+ x_ = x; ++ value_.immediate = x; + rmode_ = RelocInfo::NONE32; +} + +Immediate::Immediate(Address x, RelocInfo::Mode rmode) { -+ x_ = reinterpret_cast(x); ++ value_.immediate = reinterpret_cast(x); + rmode_ = rmode; +} + +Immediate::Immediate(const ExternalReference& ext) { -+ x_ = reinterpret_cast(ext.address()); ++ value_.immediate = reinterpret_cast(ext.address()); + rmode_ = RelocInfo::EXTERNAL_REFERENCE; +} + + +Immediate::Immediate(Label* internal_offset) { -+ x_ = reinterpret_cast(internal_offset); ++ value_.immediate = reinterpret_cast(internal_offset); + rmode_ = RelocInfo::INTERNAL_REFERENCE; +} + + -+Immediate::Immediate(Handle handle) { -+ AllowDeferredHandleDereference using_raw_address; -+ // Verify all Objects referred by code are NOT in new space. -+ Object* obj = *handle; -+ if (obj->IsHeapObject()) { -+ x_ = reinterpret_cast(handle.location()); -+ rmode_ = RelocInfo::EMBEDDED_OBJECT; -+ } else { -+ // no relocation needed -+ x_ = reinterpret_cast(obj); -+ rmode_ = RelocInfo::NONE32; -+ } ++Immediate::Immediate(Handle handle) { ++ value_.immediate = reinterpret_cast(handle.address()); ++ rmode_ = RelocInfo::EMBEDDED_OBJECT; +} + + +Immediate::Immediate(Smi* value) { -+ x_ = reinterpret_cast(value); ++ value_.immediate = reinterpret_cast(value); + rmode_ = RelocInfo::NONE32; +} + + +Immediate::Immediate(Address addr) { -+ x_ = reinterpret_cast(addr); ++ value_.immediate = reinterpret_cast(addr); + rmode_ = RelocInfo::NONE32; +} + @@ -19443,47 +19530,38 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + + -+void Assembler::emit(Handle handle) { -+ AllowDeferredHandleDereference heap_object_check; -+ // Verify all Objects referred by code are NOT in new space. -+ Object* obj = *handle; -+ if (obj->IsHeapObject()) { -+ emit(reinterpret_cast(handle.location()), -+ RelocInfo::EMBEDDED_OBJECT); -+ } else { -+ // no relocation needed -+ emit(reinterpret_cast(obj)); -+ } ++void Assembler::emit(Handle handle) { ++ emit(reinterpret_cast(handle.address()), ++ RelocInfo::EMBEDDED_OBJECT); +} + + -+void Assembler::emit(uint32_t x, RelocInfo::Mode rmode, TypeFeedbackId id) { -+ if (rmode == RelocInfo::CODE_TARGET && !id.IsNone()) { -+ RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, id.ToInt()); -+ } else if (!RelocInfo::IsNone(rmode) -+ && rmode != RelocInfo::CODE_AGE_SEQUENCE) { ++void Assembler::emit(uint32_t x, RelocInfo::Mode rmode) { ++ if (!RelocInfo::IsNone(rmode) && rmode != RelocInfo::CODE_AGE_SEQUENCE) { + RecordRelocInfo(rmode); + } + emit(x); +} + + -+void Assembler::emit(Handle code, -+ RelocInfo::Mode rmode, -+ TypeFeedbackId id) { -+ AllowDeferredHandleDereference embedding_raw_address; -+ emit(reinterpret_cast(code.location()), rmode, id); ++void Assembler::emit(Handle code, RelocInfo::Mode rmode) { ++ emit(reinterpret_cast(code.address()), rmode); +} + + +void Assembler::emit(const Immediate& x) { + if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) { -+ Label* label = reinterpret_cast(x.x_); ++ Label* label = reinterpret_cast(x.immediate()); + emit_code_relative_offset(label); + return; + } + if (!RelocInfo::IsNone(x.rmode_)) RecordRelocInfo(x.rmode_); -+ emit(x.x_); ++ if (x.is_heap_object_request()) { ++ RequestHeapObject(x.heap_object_request()); ++ emit(0); ++ } else { ++ emit(x.immediate()); ++ } +} + + @@ -19499,13 +19577,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + +void Assembler::emit_b(Immediate x) { + DCHECK(x.is_int8() || x.is_uint8()); -+ uint8_t value = static_cast(x.x_); ++ uint8_t value = static_cast(x.immediate()); + *pc_++ = value; +} + +void Assembler::emit_w(const Immediate& x) { + DCHECK(RelocInfo::IsNone(x.rmode_)); -+ uint16_t value = static_cast(x.x_); ++ uint16_t value = static_cast(x.immediate()); + reinterpret_cast(pc_)[0] = value; + pc_ += sizeof(uint16_t); +} @@ -19626,7 +19704,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +Operand::Operand(Immediate imm) { + // [disp/r] + set_modrm(0, ebp); -+ set_dispr(imm.x_, imm.rmode_); ++ set_dispr(imm.immediate(), imm.rmode_); +} +} // namespace internal +} // namespace v8 @@ -19634,7 +19712,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +#endif // V8_X87_ASSEMBLER_X87_INL_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-25 17:42:57.221465559 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-27 22:01:35.070961553 +0100 @@ -0,0 +1,381 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -19689,7 +19767,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + __ Ret(); + + CodeDesc desc; -+ masm.GetCode(&desc); ++ masm.GetCode(isolate, &desc); + DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); + + Assembler::FlushICache(isolate, buffer, actual_size); @@ -20056,8 +20134,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +#endif // V8_X87_CODEGEN_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-25 17:42:57.221465559 +0100 -@@ -0,0 +1,3428 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 01:57:08.188059423 +0100 +@@ -0,0 +1,3423 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -21942,7 +22020,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + + NameDictionaryLookupStub stub(masm->isolate(), properties, r0, r0, + NEGATIVE_LOOKUP); -+ __ push(Immediate(Handle(name))); ++ __ push(Immediate(name)); + __ push(Immediate(name->Hash())); + __ CallStub(&stub); + __ test(r0, r0); @@ -22215,6 +22293,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +} + + ++void ProfileEntryHookStub::MaybeCallEntryHookDelayed(TurboAssembler* tasm, ++ Zone* zone) { ++ if (tasm->isolate()->function_entry_hook() != NULL) { ++ tasm->CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr)); ++ } ++} ++ +void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { + if (masm->isolate()->function_entry_hook() != NULL) { + ProfileEntryHookStub stub(masm->isolate()); @@ -22287,24 +22372,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + // edi - constructor? + // esp[0] - return address + // esp[4] - last argument -+ Label normal_sequence; -+ if (mode == DONT_OVERRIDE) { -+ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); -+ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); -+ STATIC_ASSERT(PACKED_ELEMENTS == 2); -+ STATIC_ASSERT(HOLEY_ELEMENTS == 3); -+ STATIC_ASSERT(PACKED_DOUBLE_ELEMENTS == 4); -+ STATIC_ASSERT(HOLEY_DOUBLE_ELEMENTS == 5); -+ -+ // is the low bit set? If so, we are holey and that is good. -+ __ test_b(edx, Immediate(1)); -+ __ j(not_zero, &normal_sequence); -+ } -+ -+ // look at the first argument -+ __ mov(ecx, Operand(esp, kPointerSize)); -+ __ test(ecx, ecx); -+ __ j(zero, &normal_sequence); ++ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); ++ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); ++ STATIC_ASSERT(PACKED_ELEMENTS == 2); ++ STATIC_ASSERT(HOLEY_ELEMENTS == 3); ++ STATIC_ASSERT(PACKED_DOUBLE_ELEMENTS == 4); ++ STATIC_ASSERT(HOLEY_DOUBLE_ELEMENTS == 5); + + if (mode == DISABLE_ALLOCATION_SITES) { + ElementsKind initial = GetInitialFastElementsKind(); @@ -22313,12 +22386,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + ArraySingleArgumentConstructorStub stub_holey( + masm->isolate(), holey_initial, DISABLE_ALLOCATION_SITES); + __ TailCallStub(&stub_holey); -+ -+ __ bind(&normal_sequence); -+ ArraySingleArgumentConstructorStub stub(masm->isolate(), initial, -+ DISABLE_ALLOCATION_SITES); -+ __ TailCallStub(&stub); + } else if (mode == DONT_OVERRIDE) { ++ // is the low bit set? If so, we are holey and that is good. ++ Label normal_sequence; ++ __ test_b(edx, Immediate(1)); ++ __ j(not_zero, &normal_sequence); ++ + // We are going to create a holey array, but our kind is non-holey. + // Fix kind and retry. + __ inc(edx); @@ -26687,8 +26760,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-25 17:42:57.223465529 +0100 -@@ -0,0 +1,2546 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 02:06:59.546987375 +0100 +@@ -0,0 +1,2568 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -26712,13 +26785,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + +MacroAssembler::MacroAssembler(Isolate* isolate, void* buffer, int size, + CodeObjectRequired create_code_object) -+ : Assembler(arg_isolate, buffer, size), -+ generating_stub_(false), -+ has_frame_(false), -+ isolate_(isolate) { -+ if (create_code_object == CodeObjectRequired::kYes) { -+ code_object_ = -+ Handle::New(isolate_->heap()->undefined_value(), isolate_); ++ : TurboAssembler(isolate, buffer, size, create_code_object), ++ jit_cookie_(0) { ++ if (FLAG_mask_constants_with_cookie) { ++ jit_cookie_ = isolate->random_number_generator()->NextInt(); + } +} + @@ -26758,7 +26828,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + +void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { + if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { -+ mov(destination, isolate()->heap()->root_handle(index)); ++ Handle object = isolate()->heap()->root_handle(index); ++ if (object->IsHeapObject()) { ++ mov(destination, Handle::cast(object)); ++ } else { ++ mov(destination, Immediate(Smi::cast(*object))); ++ } + return; + } + ExternalReference roots_array_start = @@ -26796,20 +26871,30 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + +void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { + DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ cmp(with, isolate()->heap()->root_handle(index)); ++ Handle object = isolate()->heap()->root_handle(index); ++ if (object->IsHeapObject()) { ++ cmp(with, Handle::cast(object)); ++ } else { ++ cmp(with, Immediate(Smi::cast(*object))); ++ } +} + + +void MacroAssembler::CompareRoot(const Operand& with, + Heap::RootListIndex index) { + DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ cmp(with, isolate()->heap()->root_handle(index)); ++ Handle object = isolate()->heap()->root_handle(index); ++ if (object->IsHeapObject()) { ++ cmp(with, Handle::cast(object)); ++ } else { ++ cmp(with, Immediate(Smi::cast(*object))); ++ } +} + + +void MacroAssembler::PushRoot(Heap::RootListIndex index) { + DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ Push(isolate()->heap()->root_handle(index)); ++ PushObject(isolate()->heap()->root_handle(index)); +} + +#define REG(Name) \ @@ -26943,11 +27028,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + ++void TurboAssembler::SlowTruncateToIDelayed(Zone* zone, Register result_reg, ++ Register input_reg, int offset) { ++ CallStubDelayed( ++ new (zone) DoubleToIStub(nullptr, input_reg, result_reg, offset, true)); ++} ++ +void MacroAssembler::SlowTruncateToI(Register result_reg, + Register input_reg, + int offset) { + DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true); -+ call(stub.GetCode(), RelocInfo::CODE_TARGET); ++ CallStub(&stub); +} + + @@ -26996,7 +27087,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::LoadUint32NoSSE2(const Operand& src) { ++void TurboAssembler::LoadUint32NoSSE2(const Operand& src) { + Label done; + push(src); + fild_s(Operand(esp, 0)); @@ -27252,7 +27343,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); +} + -+void MacroAssembler::ShlPair(Register high, Register low, uint8_t shift) { ++void TurboAssembler::ShlPair(Register high, Register low, uint8_t shift) { + if (shift >= 32) { + mov(high, low); + shl(high, shift - 32); @@ -27263,7 +27354,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } +} + -+void MacroAssembler::ShlPair_cl(Register high, Register low) { ++void TurboAssembler::ShlPair_cl(Register high, Register low) { + shld_cl(high, low); + shl_cl(low); + Label done; @@ -27274,7 +27365,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + bind(&done); +} + -+void MacroAssembler::ShrPair(Register high, Register low, uint8_t shift) { ++void TurboAssembler::ShrPair(Register high, Register low, uint8_t shift) { + if (shift >= 32) { + mov(low, high); + shr(low, shift - 32); @@ -27285,7 +27376,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } +} + -+void MacroAssembler::ShrPair_cl(Register high, Register low) { ++void TurboAssembler::ShrPair_cl(Register high, Register low) { + shrd_cl(low, high); + shr_cl(high); + Label done; @@ -27296,7 +27387,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + bind(&done); +} + -+void MacroAssembler::SarPair(Register high, Register low, uint8_t shift) { ++void TurboAssembler::SarPair(Register high, Register low, uint8_t shift) { + if (shift >= 32) { + mov(low, high); + sar(low, shift - 32); @@ -27307,7 +27398,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } +} + -+void MacroAssembler::SarPair_cl(Register high, Register low) { ++void TurboAssembler::SarPair_cl(Register high, Register low) { + shrd_cl(low, high); + sar_cl(high); + Label done; @@ -27321,13 +27412,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { + static const int kMaxImmediateBits = 17; + if (!RelocInfo::IsNone(x.rmode_)) return false; -+ return !is_intn(x.x_, kMaxImmediateBits); ++ return !is_intn(x.immediate(), kMaxImmediateBits); +} + + +void MacroAssembler::SafeMove(Register dst, const Immediate& x) { + if (IsUnsafeImmediate(x) && jit_cookie() != 0) { -+ Move(dst, Immediate(x.x_ ^ jit_cookie())); ++ Move(dst, Immediate(x.immediate() ^ jit_cookie())); + xor_(dst, jit_cookie()); + } else { + Move(dst, x); @@ -27337,7 +27428,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + +void MacroAssembler::SafePush(const Immediate& x) { + if (IsUnsafeImmediate(x) && jit_cookie() != 0) { -+ push(Immediate(x.x_ ^ jit_cookie())); ++ push(Immediate(x.immediate() ^ jit_cookie())); + xor_(Operand(esp, 0), Immediate(jit_cookie())); + } else { + push(x); @@ -27514,20 +27605,20 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } +} + -+void MacroAssembler::StubPrologue(StackFrame::Type type) { ++void TurboAssembler::StubPrologue(StackFrame::Type type) { + push(ebp); // Caller's frame pointer. + mov(ebp, esp); + push(Immediate(Smi::FromInt(type))); +} + + -+void MacroAssembler::Prologue(bool code_pre_aging) { ++void TurboAssembler::Prologue(bool code_pre_aging) { + PredictableCodeSizeScope predictible_code_size_scope(this, + kNoCodeAgeSequenceLength); + if (code_pre_aging) { -+ // Pre-age the code. ++ // Pre-age the code. + call(isolate()->builtins()->MarkCodeAsExecutedOnce(), -+ RelocInfo::CODE_AGE_SEQUENCE); ++ RelocInfo::CODE_AGE_SEQUENCE); + Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); + } else { + push(ebp); // Caller's frame pointer. @@ -27544,14 +27635,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::EnterFrame(StackFrame::Type type, -+ bool load_constant_pool_pointer_reg) { -+ // Out-of-line constant pool not implemented on x87. -+ UNREACHABLE(); -+} -+ -+ -+void MacroAssembler::EnterFrame(StackFrame::Type type) { ++void TurboAssembler::EnterFrame(StackFrame::Type type) { + push(ebp); + mov(ebp, esp); + push(Immediate(Smi::FromInt(type))); @@ -27565,7 +27649,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::LeaveFrame(StackFrame::Type type) { ++void TurboAssembler::LeaveFrame(StackFrame::Type type) { + if (emit_debug_code()) { + cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), + Immediate(Smi::FromInt(type))); @@ -28113,20 +28197,22 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + bind(&done); +} + -+void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { ++void MacroAssembler::CallStub(CodeStub* stub) { + DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. -+ call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); ++ call(stub->GetCode(), RelocInfo::CODE_TARGET); +} + ++void TurboAssembler::CallStubDelayed(CodeStub* stub) { ++ DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. ++ call(stub); ++} + +void MacroAssembler::TailCallStub(CodeStub* stub) { + jmp(stub->GetCode(), RelocInfo::CODE_TARGET); +} + -+ -+ -+bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { -+ return has_frame_ || !stub->SometimesSetsUpAFrame(); ++bool TurboAssembler::AllowThisStubCall(CodeStub* stub) { ++ return has_frame() || !stub->SometimesSetsUpAFrame(); +} + +void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments, @@ -28146,6 +28232,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + CallStub(&ces); +} + ++void TurboAssembler::CallRuntimeDelayed(Zone* zone, Runtime::FunctionId fid, ++ SaveFPRegsMode save_doubles) { ++ const Runtime::Function* f = Runtime::FunctionForId(fid); ++ // TODO(1236192): Most runtime routines don't need the number of ++ // arguments passed in because it is constant. At some point we ++ // should remove this need and make the runtime routine entry code ++ // smarter. ++ Move(eax, Immediate(f->nargs)); ++ mov(ebx, Immediate(ExternalReference(f, isolate()))); ++ CallStubDelayed(new (zone) CEntryStub(nullptr, 1, save_doubles)); ++} + +void MacroAssembler::CallExternalReference(ExternalReference ref, + int num_arguments) { @@ -28189,7 +28286,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + jmp(ces.GetCode(), RelocInfo::CODE_TARGET); +} + -+void MacroAssembler::PrepareForTailCall( ++void TurboAssembler::PrepareForTailCall( + const ParameterCount& callee_args_count, Register caller_args_count_reg, + Register scratch0, Register scratch1, ReturnAddressState ra_state, + int number_of_temp_values_after_return_address) { @@ -28457,7 +28554,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + const ParameterCount& actual, + InvokeFlag flag, + const CallWrapper& call_wrapper) { -+ LoadHeapObject(edi, function); ++ Move(edi, function); + InvokeFunction(edi, expected, actual, flag, call_wrapper); +} + @@ -28547,17 +28644,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::LoadHeapObject(Register result, -+ Handle object) { -+ mov(result, object); -+} -+ -+ +void MacroAssembler::CmpHeapObject(Register reg, Handle object) { + cmp(reg, object); +} + -+void MacroAssembler::PushHeapObject(Handle object) { Push(object); } ++void MacroAssembler::PushObject(Handle object) { ++ if (object->IsHeapObject()) { ++ Push(Handle::cast(object)); ++ } else { ++ Push(Smi::cast(*object)); ++ } ++} + +void MacroAssembler::GetWeakValue(Register value, Handle cell) { + mov(value, cell); @@ -28571,13 +28668,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + JumpIfSmi(value, miss); +} + ++void TurboAssembler::Ret() { ret(0); } + -+void MacroAssembler::Ret() { -+ ret(0); -+} -+ -+ -+void MacroAssembler::Ret(int bytes_dropped, Register scratch) { ++void TurboAssembler::Ret(int bytes_dropped, Register scratch) { + if (is_uint16(bytes_dropped)) { + ret(bytes_dropped); + } else { @@ -28589,7 +28682,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::VerifyX87StackDepth(uint32_t depth) { ++void TurboAssembler::VerifyX87StackDepth(uint32_t depth) { + // Turn off the stack depth check when serializer is enabled to reduce the + // code size. + if (serializer_enabled()) return; @@ -28620,15 +28713,16 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Move(Register dst, Register src) { ++void TurboAssembler::Move(Register dst, Register src) { + if (!dst.is(src)) { + mov(dst, src); + } +} + + -+void MacroAssembler::Move(Register dst, const Immediate& x) { -+ if (x.is_zero() && RelocInfo::IsNone(x.rmode_)) { ++void TurboAssembler::Move(Register dst, const Immediate& x) { ++ if (!x.is_heap_object_request() && x.is_zero() && ++ RelocInfo::IsNone(x.rmode())) { + xor_(dst, dst); // Shorter than mov of 32-bit immediate 0. + } else { + mov(dst, x); @@ -28636,12 +28730,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Move(const Operand& dst, const Immediate& x) { ++void TurboAssembler::Move(const Operand& dst, const Immediate& x) { + mov(dst, x); +} + + -+void MacroAssembler::Lzcnt(Register dst, const Operand& src) { ++void TurboAssembler::Move(Register dst, Handle object) { ++ mov(dst, object); ++} ++ ++ ++void TurboAssembler::Lzcnt(Register dst, const Operand& src) { + // TODO(intel): Add support for LZCNT (with ABM/BMI1). + Label not_zero_src; + bsr(dst, src); @@ -28652,7 +28751,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Tzcnt(Register dst, const Operand& src) { ++void TurboAssembler::Tzcnt(Register dst, const Operand& src) { + // TODO(intel): Add support for TZCNT (with ABM/BMI1). + Label not_zero_src; + bsf(dst, src); @@ -28662,7 +28761,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Popcnt(Register dst, const Operand& src) { ++void TurboAssembler::Popcnt(Register dst, const Operand& src) { + // TODO(intel): Add support for POPCNT (with POPCNT) + // if (CpuFeatures::IsSupported(POPCNT)) { + // CpuFeatureScope scope(this, POPCNT); @@ -28736,13 +28835,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Assert(Condition cc, BailoutReason reason) { ++void TurboAssembler::Assert(Condition cc, BailoutReason reason) { + if (emit_debug_code()) Check(cc, reason); +} + ++void TurboAssembler::AssertUnreachable(BailoutReason reason) { ++ if (emit_debug_code()) Abort(reason); ++} ++ + + -+void MacroAssembler::Check(Condition cc, BailoutReason reason) { ++void TurboAssembler::Check(Condition cc, BailoutReason reason) { + Label L; + j(cc, &L); + Abort(reason); @@ -28751,7 +28854,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::CheckStackAlignment() { ++void TurboAssembler::CheckStackAlignment() { + int frame_alignment = base::OS::ActivationFrameAlignment(); + int frame_alignment_mask = frame_alignment - 1; + if (frame_alignment > kPointerSize) { @@ -28766,7 +28869,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::Abort(BailoutReason reason) { ++void TurboAssembler::Abort(BailoutReason reason) { +#ifdef DEBUG + const char* msg = GetBailoutReason(reason); + if (msg != NULL) { @@ -28780,13 +28883,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } +#endif + -+ // Check if Abort() has already been initialized. -+ DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); -+ + Move(edx, Smi::FromInt(static_cast(reason))); + + // Disable stub call restrictions to always allow calls to abort. -+ if (!has_frame_) { ++ if (!has_frame()) { + // We don't actually want to generate a pile of code for this, so just + // claim there is a stack frame, without generating one. + FrameScope scope(this, StackFrame::NONE); @@ -28905,7 +29005,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { ++void TurboAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { + int frame_alignment = base::OS::ActivationFrameAlignment(); + if (frame_alignment != 0) { + // Make stack end at alignment and make room for num_arguments words @@ -28921,7 +29021,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::CallCFunction(ExternalReference function, ++void TurboAssembler::CallCFunction(ExternalReference function, + int num_arguments) { + // Trashing eax is ok as it will be the return value. + mov(eax, Immediate(function)); @@ -28929,8 +29029,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::CallCFunction(Register function, -+ int num_arguments) { ++void TurboAssembler::CallCFunction(Register function, int num_arguments) { + DCHECK(has_frame()); + // Check stack alignment. + if (emit_debug_code()) { @@ -28996,13 +29095,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::CheckPageFlag( -+ Register object, -+ Register scratch, -+ int mask, -+ Condition cc, -+ Label* condition_met, -+ Label::Distance condition_met_distance) { ++void TurboAssembler::CheckPageFlag(Register object, Register scratch, int mask, ++ Condition cc, Label* condition_met, ++ Label::Distance condition_met_distance) { + DCHECK(cc == zero || cc == not_zero); + if (scratch.is(object)) { + and_(scratch, Immediate(~Page::kPageAlignmentMask)); @@ -29237,8 +29332,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-25 17:42:57.224465515 +0100 -@@ -0,0 +1,906 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-28 02:05:16.624566310 +0100 +@@ -0,0 +1,921 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -29295,13 +29390,185 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + Register reg8 = no_reg); +#endif + ++class TurboAssembler: public Assembler { ++ public: ++ TurboAssembler(Isolate* isolate, void* buffer, int buffer_size, ++ CodeObjectRequired create_code_object) ++ : Assembler(isolate, buffer, buffer_size), isolate_(isolate) { ++ if (create_code_object == CodeObjectRequired::kYes) { ++ code_object_ = ++ Handle::New(isolate->heap()->undefined_value(), isolate); ++ } ++ } ++ ++ void set_has_frame(bool value) { has_frame_ = value; } ++ bool has_frame() { return has_frame_; } ++ ++ Isolate* isolate() const { return isolate_; } ++ ++ Handle CodeObject() { ++ DCHECK(!code_object_.is_null()); ++ return code_object_; ++ } ++ ++ void CheckPageFlag(Register object, Register scratch, int mask, Condition cc, ++ Label* condition_met, ++ Label::Distance condition_met_distance = Label::kFar); ++ ++ // Activation support. ++ void EnterFrame(StackFrame::Type type); ++ void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg) { ++ // Out-of-line constant pool not implemented on x87. ++ UNREACHABLE(); ++ } ++ void LeaveFrame(StackFrame::Type type); ++ ++ // Print a message to stdout and abort execution. ++ void Abort(BailoutReason reason); ++ ++ // Calls Abort(msg) if the condition cc is not satisfied. ++ // Use --debug_code to enable. ++ void Assert(Condition cc, BailoutReason reason); ++ ++ // Like Assert(), but without condition. ++ // Use --debug_code to enable. ++ void AssertUnreachable(BailoutReason reason); ++ ++ // Like Assert(), but always enabled. ++ void Check(Condition cc, BailoutReason reason); ++ ++ // Check that the stack is aligned. ++ void CheckStackAlignment(); ++ ++ // Nop, because x87 does not have a root register. ++ void InitializeRootRegister() {} ++ ++ // Move a constant into a destination using the most efficient encoding. ++ void Move(Register dst, const Immediate& x); ++ ++ void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } ++ ++ // Move if the registers are not identical. ++ void Move(Register target, Register source); ++ ++ void Move(const Operand& dst, const Immediate& x); ++ ++ void Move(Register dst, Handle handle); ++ ++ void Call(Handle target, RelocInfo::Mode rmode) { call(target, rmode); } ++ void Call(Label* target) { call(target); } ++ ++ inline bool AllowThisStubCall(CodeStub* stub); ++ void CallStubDelayed(CodeStub* stub); ++ ++ void CallRuntimeDelayed(Zone* zone, Runtime::FunctionId fid, ++ SaveFPRegsMode save_doubles = kDontSaveFPRegs); ++ ++ // Jump the register contains a smi. ++ inline void JumpIfSmi(Register value, Label* smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(zero, smi_label, distance); ++ } ++ // Jump if the operand is a smi. ++ inline void JumpIfSmi(Operand value, Label* smi_label, ++ Label::Distance distance = Label::kFar) { ++ test(value, Immediate(kSmiTagMask)); ++ j(zero, smi_label, distance); ++ } ++ ++ void SmiUntag(Register reg) { sar(reg, kSmiTagSize); } ++ ++ // Removes current frame and its arguments from the stack preserving ++ // the arguments and a return address pushed to the stack for the next call. ++ // |ra_state| defines whether return address is already pushed to stack or ++ // not. Both |callee_args_count| and |caller_args_count_reg| do not include ++ // receiver. |callee_args_count| is not modified, |caller_args_count_reg| ++ // is trashed. |number_of_temp_values_after_return_address| specifies ++ // the number of words pushed to the stack after the return address. This is ++ // to allow "allocation" of scratch registers that this function requires ++ // by saving their values on the stack. ++ void PrepareForTailCall(const ParameterCount& callee_args_count, ++ Register caller_args_count_reg, Register scratch0, ++ Register scratch1, ReturnAddressState ra_state, ++ int number_of_temp_values_after_return_address); ++ ++ // Before calling a C-function from generated code, align arguments on stack. ++ // After aligning the frame, arguments must be stored in esp[0], esp[4], ++ // etc., not pushed. The argument count assumes all arguments are word sized. ++ // Some compilers/platforms require the stack to be aligned when calling ++ // C++ code. ++ // Needs a scratch register to do some arithmetic. This register will be ++ // trashed. ++ void PrepareCallCFunction(int num_arguments, Register scratch); ++ ++ // Calls a C function and cleans up the space for arguments allocated ++ // by PrepareCallCFunction. The called function is not allowed to trigger a ++ // garbage collection, since that might move the code and invalidate the ++ // return address (unless this is somehow accounted for by the called ++ // function). ++ void CallCFunction(ExternalReference function, int num_arguments); ++ void CallCFunction(Register function, int num_arguments); ++ ++ void ShlPair(Register high, Register low, uint8_t imm8); ++ void ShlPair_cl(Register high, Register low); ++ void ShrPair(Register high, Register low, uint8_t imm8); ++ void ShrPair_cl(Register high, Register src); ++ void SarPair(Register high, Register low, uint8_t imm8); ++ void SarPair_cl(Register high, Register low); ++ ++ // Generates function and stub prologue code. ++ void StubPrologue(StackFrame::Type type); ++ void Prologue(bool code_pre_aging); ++ ++ void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); } ++ void Lzcnt(Register dst, const Operand& src); ++ ++ void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); } ++ void Tzcnt(Register dst, const Operand& src); ++ ++ void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); } ++ void Popcnt(Register dst, const Operand& src); ++ ++ void Ret(); ++ ++ // Return and drop arguments from stack, where the number of arguments ++ // may be bigger than 2^16 - 1. Requires a scratch register. ++ void Ret(int bytes_dropped, Register scratch); ++ ++ // Insert code to verify that the x87 stack has the specified depth (0-7) ++ void VerifyX87StackDepth(uint32_t depth); ++ ++ void LoadUint32NoSSE2(Register src) { ++ LoadUint32NoSSE2(Operand(src)); ++ } ++ void LoadUint32NoSSE2(const Operand& src); ++ ++ void SlowTruncateToIDelayed(Zone* zone, Register result_reg, ++ Register input_reg, ++ int offset = HeapNumber::kValueOffset - ++ kHeapObjectTag); ++ ++ void Push(Register src) { push(src); } ++ void Push(const Operand& src) { push(src); } ++ void Push(Immediate value) { push(value); } ++ void Push(Handle handle) { push(Immediate(handle)); } ++ void Push(Smi* smi) { Push(Immediate(smi)); } ++ ++ private: ++ bool has_frame_; ++ Isolate* isolate_; ++ // This handle will be patched with the code object on installation. ++ Handle code_object_; ++}; ++ +// MacroAssembler implements a collection of frequently used macros. -+class MacroAssembler: public Assembler { ++class MacroAssembler: public TurboAssembler { + public: + MacroAssembler(Isolate* isolate, void* buffer, int size, + CodeObjectRequired create_code_object); + -+ Isolate* isolate() const { return isolate_; } ++ int jit_cookie() const { return jit_cookie_; } + + void Load(Register dst, const Operand& src, Representation r); + void Store(Register src, const Operand& dst, Representation r); @@ -29375,10 +29642,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + SaveFPRegsMode save_fp, + RememberedSetFinalAction and_then); + -+ void CheckPageFlag(Register object, Register scratch, int mask, Condition cc, -+ Label* condition_met, -+ Label::Distance condition_met_distance = Label::kFar); -+ + void CheckPageFlagForMap( + Handle map, int mask, Condition cc, Label* condition_met, + Label::Distance condition_met_distance = Label::kFar); @@ -29466,10 +29729,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + + void DebugBreak(); + -+ // Generates function and stub prologue code. -+ void StubPrologue(StackFrame::Type type); -+ void Prologue(bool code_pre_aging); -+ + // Enter specific kind of exit frame. Expects the number of + // arguments in register eax and sets up the number of arguments in + // register edi and the pointer to the first argument in register @@ -29509,28 +29768,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + void StoreToSafepointRegisterSlot(Register dst, Immediate src); + void LoadFromSafepointRegisterSlot(Register dst, Register src); + -+ // Nop, because x87 does not have a root register. -+ void InitializeRootRegister() {} -+ -+ void LoadHeapObject(Register result, Handle object); + void CmpHeapObject(Register reg, Handle object); -+ void PushHeapObject(Handle object); -+ -+ void LoadObject(Register result, Handle object) { -+ AllowDeferredHandleDereference heap_object_check; -+ if (object->IsHeapObject()) { -+ LoadHeapObject(result, Handle::cast(object)); -+ } else { -+ Move(result, Immediate(object)); -+ } -+ } ++ void PushObject(Handle object); + + void CmpObject(Register reg, Handle object) { + AllowDeferredHandleDereference heap_object_check; + if (object->IsHeapObject()) { + CmpHeapObject(reg, Handle::cast(object)); + } else { -+ cmp(reg, Immediate(object)); ++ cmp(reg, Immediate(Smi::cast(*object))); + } + } + @@ -29540,20 +29786,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // --------------------------------------------------------------------------- + // JavaScript invokes + -+ // Removes current frame and its arguments from the stack preserving -+ // the arguments and a return address pushed to the stack for the next call. -+ // |ra_state| defines whether return address is already pushed to stack or -+ // not. Both |callee_args_count| and |caller_args_count_reg| do not include -+ // receiver. |callee_args_count| is not modified, |caller_args_count_reg| -+ // is trashed. |number_of_temp_values_after_return_address| specifies -+ // the number of words pushed to the stack after the return address. This is -+ // to allow "allocation" of scratch registers that this function requires -+ // by saving their values on the stack. -+ void PrepareForTailCall(const ParameterCount& callee_args_count, -+ Register caller_args_count_reg, Register scratch0, -+ Register scratch1, ReturnAddressState ra_state, -+ int number_of_temp_values_after_return_address); -+ + // Invoke the JavaScript function code by either calling or jumping. + + void InvokeFunctionCode(Register function, Register new_target, @@ -29581,14 +29813,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + const ParameterCount& actual, InvokeFlag flag, + const CallWrapper& call_wrapper); + -+ void ShlPair(Register high, Register low, uint8_t imm8); -+ void ShlPair_cl(Register high, Register low); -+ void ShrPair(Register high, Register low, uint8_t imm8); -+ void ShrPair_cl(Register high, Register src); -+ void SarPair(Register high, Register low, uint8_t imm8); -+ void SarPair_cl(Register high, Register low); -+ -+ // Expression support + // Support for constant splitting. + bool IsUnsafeImmediate(const Immediate& x); + void SafeMove(Register dst, const Immediate& x); @@ -29647,35 +29871,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + STATIC_ASSERT(kSmiTagSize == 1); + add(reg, reg); + } -+ void SmiUntag(Register reg) { -+ sar(reg, kSmiTagSize); -+ } + + // Modifies the register even if it does not contain a Smi! -+ void SmiUntag(Register reg, Label* is_smi) { ++ void UntagSmi(Register reg, Label* is_smi) { + STATIC_ASSERT(kSmiTagSize == 1); + sar(reg, kSmiTagSize); + STATIC_ASSERT(kSmiTag == 0); + j(not_carry, is_smi); + } + -+ void LoadUint32NoSSE2(Register src) { -+ LoadUint32NoSSE2(Operand(src)); -+ } -+ void LoadUint32NoSSE2(const Operand& src); -+ -+ // Jump the register contains a smi. -+ inline void JumpIfSmi(Register value, Label* smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(zero, smi_label, distance); -+ } -+ // Jump if the operand is a smi. -+ inline void JumpIfSmi(Operand value, Label* smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(zero, smi_label, distance); -+ } + // Jump if register contain a non-smi. + inline void JumpIfNotSmi(Register value, Label* not_smi_label, + Label::Distance distance = Label::kFar) { @@ -29748,7 +29952,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // enabled via --debug-code. + void AssertBoundFunction(Register object); + -+ // Abort execution if argument is not a JSGeneratorObject, ++ // Abort execution if argument is not a JSGeneratorObject (or subclass), + // enabled via --debug-code. + void AssertGeneratorObject(Register object); + @@ -29826,7 +30030,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // Runtime calls + + // Call a code stub. Generate the code if necessary. -+ void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None()); ++ void CallStub(CodeStub* stub); + + // Tail call a code stub (jump). Generate the code if necessary. + void TailCallStub(CodeStub* stub); @@ -29858,23 +30062,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // Convenience function: tail call a runtime routine (jump). + void TailCallRuntime(Runtime::FunctionId fid); + -+ // Before calling a C-function from generated code, align arguments on stack. -+ // After aligning the frame, arguments must be stored in esp[0], esp[4], -+ // etc., not pushed. The argument count assumes all arguments are word sized. -+ // Some compilers/platforms require the stack to be aligned when calling -+ // C++ code. -+ // Needs a scratch register to do some arithmetic. This register will be -+ // trashed. -+ void PrepareCallCFunction(int num_arguments, Register scratch); -+ -+ // Calls a C function and cleans up the space for arguments allocated -+ // by PrepareCallCFunction. The called function is not allowed to trigger a -+ // garbage collection, since that might move the code and invalidate the -+ // return address (unless this is somehow accounted for by the called -+ // function). -+ void CallCFunction(ExternalReference function, int num_arguments); -+ void CallCFunction(Register function, int num_arguments); -+ + // Jump to a runtime routine. + void JumpToExternalReference(const ExternalReference& ext, + bool builtin_exit_frame = false); @@ -29882,12 +30069,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // --------------------------------------------------------------------------- + // Utilities + -+ void Ret(); -+ -+ // Return and drop arguments from stack, where the number of arguments -+ // may be bigger than 2^16 - 1. Requires a scratch register. -+ void Ret(int bytes_dropped, Register scratch); -+ + // Emit code that loads |parameter_index|'th parameter from the stack to + // the register according to the CallInterfaceDescriptor definition. + // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed @@ -29910,51 +30091,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // from the stack, clobbering only the esp register. + void Drop(int element_count); + -+ void Call(Label* target) { call(target); } -+ void Call(Handle target, RelocInfo::Mode rmode, -+ TypeFeedbackId id = TypeFeedbackId::None()) { -+ call(target, rmode, id); -+ } + void Jump(Handle target, RelocInfo::Mode rmode) { jmp(target, rmode); } -+ void Push(Register src) { push(src); } -+ void Push(const Operand& src) { push(src); } -+ void Push(Immediate value) { push(value); } + void Pop(Register dst) { pop(dst); } + void Pop(const Operand& dst) { pop(dst); } + void PushReturnAddressFrom(Register src) { push(src); } + void PopReturnAddressTo(Register dst) { pop(dst); } + -+ void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); } -+ void Lzcnt(Register dst, const Operand& src); -+ -+ void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); } -+ void Tzcnt(Register dst, const Operand& src); -+ -+ void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); } -+ void Popcnt(Register dst, const Operand& src); -+ -+ // Move if the registers are not identical. -+ void Move(Register target, Register source); -+ -+ // Move a constant into a destination using the most efficient encoding. -+ void Move(Register dst, const Immediate& x); -+ void Move(const Operand& dst, const Immediate& x); -+ -+ void Move(Register dst, Handle handle) { LoadObject(dst, handle); } -+ void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } -+ -+ // Push a handle value. -+ void Push(Handle handle) { push(Immediate(handle)); } -+ void Push(Smi* smi) { Push(Immediate(smi)); } -+ -+ Handle CodeObject() { -+ DCHECK(!code_object_.is_null()); -+ return code_object_; -+ } -+ -+ // Insert code to verify that the x87 stack has the specified depth (0-7) -+ void VerifyX87StackDepth(uint32_t depth); -+ + // Emit code for a truncating division by a constant. The dividend register is + // unchanged, the result is in edx, and eax gets clobbered. + void TruncatingDiv(Register dividend, int32_t divisor); @@ -29969,29 +30111,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + void DecrementCounter(Condition cc, StatsCounter* counter, int value); + + // --------------------------------------------------------------------------- -+ // Debugging -+ -+ // Calls Abort(msg) if the condition cc is not satisfied. -+ // Use --debug_code to enable. -+ void Assert(Condition cc, BailoutReason reason); -+ -+ // Like Assert(), but always enabled. -+ void Check(Condition cc, BailoutReason reason); -+ -+ // Print a message to stdout and abort execution. -+ void Abort(BailoutReason reason); -+ -+ // Check that the stack is aligned. -+ void CheckStackAlignment(); -+ -+ // Verify restrictions about code generated in stubs. -+ void set_generating_stub(bool value) { generating_stub_ = value; } -+ bool generating_stub() { return generating_stub_; } -+ void set_has_frame(bool value) { has_frame_ = value; } -+ bool has_frame() { return has_frame_; } -+ inline bool AllowThisStubCall(CodeStub* stub); -+ -+ // --------------------------------------------------------------------------- + // String utilities. + + // Checks if both objects are sequential one-byte strings, and jumps to label @@ -30019,11 +30138,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // Load the type feedback vector from a JavaScript frame. + void EmitLoadFeedbackVector(Register vector); + -+ // Activation support. -+ void EnterFrame(StackFrame::Type type); -+ void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg); -+ void LeaveFrame(StackFrame::Type type); -+ + void EnterBuiltinFrame(Register context, Register target, Register argc); + void LeaveBuiltinFrame(Register context, Register target, Register argc); + @@ -30042,11 +30156,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + Label* no_memento_found); + + private: -+ bool generating_stub_; -+ bool has_frame_; -+ Isolate* isolate_; -+ // This handle will be patched with the code object on installation. -+ Handle code_object_; ++ int jit_cookie_; + + // Helper functions for generating invokes. + void InvokePrologue(const ParameterCount& expected, From 5b79f2f0a63d0a0879fb77843f3fe4fec501558c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 28 Dec 2017 04:13:19 +0100 Subject: [PATCH 243/437] no-sse2 patch: More V8 x87 fixes --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 1203 +++++------------ 1 file changed, 375 insertions(+), 828 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index 373f41c..c26313e 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -2649,8 +2649,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/bu #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-27 22:57:11.363055815 +0100 -@@ -0,0 +1,3142 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-28 03:52:06.933365833 +0100 +@@ -0,0 +1,3038 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -3349,8 +3349,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + +// static +void Builtins::Generate_InterpreterPushArgsThenCallImpl( -+ MacroAssembler* masm, TailCallMode tail_call_mode, -+ InterpreterPushArgsMode mode) { ++ MacroAssembler* masm, InterpreterPushArgsMode mode) { + // ----------- S t a t e ------------- + // -- eax : the number of arguments (not including the receiver) + // -- ebx : the address of the first argument to be pushed. Subsequent @@ -3383,15 +3382,14 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ Push(edx); // Re-push return address. + + if (mode == InterpreterPushArgsMode::kJSFunction) { -+ __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, -+ tail_call_mode), -+ RelocInfo::CODE_TARGET); ++ __ Jump( ++ masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny), ++ RelocInfo::CODE_TARGET); + } else if (mode == InterpreterPushArgsMode::kWithFinalSpread) { + __ Jump(masm->isolate()->builtins()->CallWithSpread(), + RelocInfo::CODE_TARGET); + } else { -+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, -+ tail_call_mode), ++ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny), + RelocInfo::CODE_TARGET); + } + @@ -4881,99 +4879,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ Jump(code, RelocInfo::CODE_TARGET); +} + -+namespace { -+ -+// Drops top JavaScript frame and an arguments adaptor frame below it (if -+// present) preserving all the arguments prepared for current call. -+// Does nothing if debugger is currently active. -+// ES6 14.6.3. PrepareForTailCall -+// -+// Stack structure for the function g() tail calling f(): -+// -+// ------- Caller frame: ------- -+// | ... -+// | g()'s arg M -+// | ... -+// | g()'s arg 1 -+// | g()'s receiver arg -+// | g()'s caller pc -+// ------- g()'s frame: ------- -+// | g()'s caller fp <- fp -+// | g()'s context -+// | function pointer: g -+// | ------------------------- -+// | ... -+// | ... -+// | f()'s arg N -+// | ... -+// | f()'s arg 1 -+// | f()'s receiver arg -+// | f()'s caller pc <- sp -+// ---------------------- -+// -+void PrepareForTailCall(MacroAssembler* masm, Register args_reg, -+ Register scratch1, Register scratch2, -+ Register scratch3) { -+ DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); -+ Comment cmnt(masm, "[ PrepareForTailCall"); -+ -+ // Prepare for tail call only if ES2015 tail call elimination is enabled. -+ Label done; -+ ExternalReference is_tail_call_elimination_enabled = -+ ExternalReference::is_tail_call_elimination_enabled_address( -+ masm->isolate()); -+ __ movzx_b(scratch1, -+ Operand::StaticVariable(is_tail_call_elimination_enabled)); -+ __ cmp(scratch1, Immediate(0)); -+ __ j(equal, &done, Label::kNear); -+ -+ // Drop possible interpreter handler/stub frame. -+ { -+ Label no_interpreter_frame; -+ __ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(StackFrame::STUB))); -+ __ j(not_equal, &no_interpreter_frame, Label::kNear); -+ __ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ bind(&no_interpreter_frame); -+ } -+ -+ // Check if next frame is an arguments adaptor frame. -+ Register caller_args_count_reg = scratch1; -+ Label no_arguments_adaptor, formal_parameter_count_loaded; -+ __ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ cmp(Operand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(not_equal, &no_arguments_adaptor, Label::kNear); -+ -+ // Drop current frame and load arguments count from arguments adaptor frame. -+ __ mov(ebp, scratch2); -+ __ mov(caller_args_count_reg, -+ Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ SmiUntag(caller_args_count_reg); -+ __ jmp(&formal_parameter_count_loaded, Label::kNear); -+ -+ __ bind(&no_arguments_adaptor); -+ // Load caller's formal parameter count -+ __ mov(scratch1, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(scratch1, -+ FieldOperand(scratch1, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov( -+ caller_args_count_reg, -+ FieldOperand(scratch1, SharedFunctionInfo::kFormalParameterCountOffset)); -+ -+ __ bind(&formal_parameter_count_loaded); -+ -+ ParameterCount callee_args_count(args_reg); -+ __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, -+ scratch3, ReturnAddressState::kOnStack, 0); -+ __ bind(&done); -+} -+} // namespace -+ +// static +void Builtins::Generate_CallFunction(MacroAssembler* masm, -+ ConvertReceiverMode mode, -+ TailCallMode tail_call_mode) { ++ ConvertReceiverMode mode) { + // ----------- S t a t e ------------- + // -- eax : the number of arguments (not including the receiver) + // -- edi : the function to call (checked to be a JSFunction) @@ -5062,12 +4970,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // -- esi : the function context. + // ----------------------------------- + -+ if (tail_call_mode == TailCallMode::kAllow) { -+ PrepareForTailCall(masm, eax, ebx, ecx, edx); -+ // Reload shared function info. -+ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ } -+ + __ mov(ebx, + FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); + ParameterCount actual(eax); @@ -5170,18 +5072,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +} // namespace + +// static -+void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm, -+ TailCallMode tail_call_mode) { ++void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- eax : the number of arguments (not including the receiver) + // -- edi : the function to call (checked to be a JSBoundFunction) + // ----------------------------------- + __ AssertBoundFunction(edi); + -+ if (tail_call_mode == TailCallMode::kAllow) { -+ PrepareForTailCall(masm, eax, ebx, ecx, edx); -+ } -+ + // Patch the receiver to [[BoundThis]]. + __ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); + __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); @@ -5198,8 +5095,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +} + +// static -+void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, -+ TailCallMode tail_call_mode) { ++void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) { + // ----------- S t a t e ------------- + // -- eax : the number of arguments (not including the receiver) + // -- edi : the target to call (can be any Object). @@ -5209,10 +5105,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ JumpIfSmi(edi, &non_callable); + __ bind(&non_smi); + __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); -+ __ j(equal, masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), ++ __ j(equal, masm->isolate()->builtins()->CallFunction(mode), + RelocInfo::CODE_TARGET); + __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); -+ __ j(equal, masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), ++ __ j(equal, masm->isolate()->builtins()->CallBoundFunction(), + RelocInfo::CODE_TARGET); + + // Check if target has a [[Call]] internal method. @@ -5237,7 +5133,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Let the "call_as_function_delegate" take care of the rest. + __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, edi); + __ Jump(masm->isolate()->builtins()->CallFunction( -+ ConvertReceiverMode::kNotNullOrUndefined, tail_call_mode), ++ ConvertReceiverMode::kNotNullOrUndefined), + RelocInfo::CODE_TARGET); + + // 3. Call to something that is not callable. @@ -5880,8 +5776,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile // == arm ==================================================================== diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-28 02:12:51.768596072 +0100 -@@ -0,0 +1,2800 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-28 03:58:53.829141647 +0100 +@@ -0,0 +1,2878 @@ +// Copyright 2013 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -6309,6 +6205,18 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + __ lea(esp, Operand(esp, kDoubleSize)); \ + } while (false) + ++#define ASSEMBLE_ATOMIC_BINOP(bin_inst, mov_inst, cmpxchg_inst) \ ++ do { \ ++ Label binop; \ ++ __ bind(&binop); \ ++ __ mov_inst(eax, i.MemoryOperand(1)); \ ++ __ Move(i.TempRegister(0), eax); \ ++ __ bin_inst(i.TempRegister(0), i.InputRegister(0)); \ ++ __ lock(); \ ++ __ cmpxchg_inst(i.MemoryOperand(1), i.TempRegister(0)); \ ++ __ j(not_equal, &binop); \ ++ } while (false) ++ +void CodeGenerator::AssembleDeconstructFrame() { + __ mov(esp, ebp); + __ pop(ebp); @@ -6646,7 +6554,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + if (!instr->InputAt(0)->IsFPRegister()) { + __ fld_d(i.InputOperand(0)); + } -+ __ TruncateX87TOSToI(i.OutputRegister()); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister()); + if (!instr->InputAt(0)->IsFPRegister()) { + __ fstp(0); + } @@ -7445,7 +7353,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + if (!instr->InputAt(0)->IsFPRegister()) { + __ fld_s(i.InputOperand(0)); + } -+ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); + if (!instr->InputAt(0)->IsFPRegister()) { + __ fstp(0); + } @@ -7456,7 +7364,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + __ fld_s(i.InputOperand(0)); + } + Label success; -+ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); + __ test(i.OutputRegister(0), i.OutputRegister(0)); + __ j(positive, &success); + // Need to reserve the input float32 data. @@ -7465,7 +7373,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + __ fild_s(Operand(esp, 0)); + __ lea(esp, Operand(esp, kPointerSize)); + __ faddp(); -+ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); + __ or_(i.OutputRegister(0), Immediate(0x80000000)); + // Only keep input float32 data in x87 stack when return. + __ fstp(0); @@ -7479,7 +7387,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + if (!instr->InputAt(0)->IsFPRegister()) { + __ fld_d(i.InputOperand(0)); + } -+ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); + if (!instr->InputAt(0)->IsFPRegister()) { + __ fstp(0); + } @@ -7514,7 +7422,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + __ fild_s(Operand(esp, 0)); + __ fld(1); + __ faddp(); -+ __ TruncateX87TOSToI(i.OutputRegister(0)); ++ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); + __ add(esp, Immediate(kInt32Size)); + __ add(i.OutputRegister(), Immediate(0x80000000)); + __ fstp(0); @@ -7811,24 +7719,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + } + break; + } -+ case kX87Xchgb: { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ __ xchg_b(i.InputRegister(index), operand); -+ break; -+ } -+ case kX87Xchgw: { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ __ xchg_w(i.InputRegister(index), operand); -+ break; -+ } -+ case kX87Xchgl: { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ __ xchg(i.InputRegister(index), operand); -+ break; -+ } + case kX87PushFloat32: + __ lea(esp, Operand(esp, -kFloatSize)); + if (instr->InputAt(0)->IsFPStackSlot()) { @@ -7897,6 +7787,90 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + case kCheckedStoreWord64: + UNREACHABLE(); // currently unsupported checked int64 load/store. + break; ++ case kAtomicExchangeInt8: { ++ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); ++ __ movsx_b(i.InputRegister(0), i.InputRegister(0)); ++ break; ++ } ++ case kAtomicExchangeUint8: { ++ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); ++ __ movzx_b(i.InputRegister(0), i.InputRegister(0)); ++ break; ++ } ++ case kAtomicExchangeInt16: { ++ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); ++ __ movsx_w(i.InputRegister(0), i.InputRegister(0)); ++ break; ++ } ++ case kAtomicExchangeUint16: { ++ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); ++ __ movzx_w(i.InputRegister(0), i.InputRegister(0)); ++ break; ++ } ++ case kAtomicExchangeWord32: { ++ __ xchg(i.InputRegister(0), i.MemoryOperand(1)); ++ break; ++ } ++ case kAtomicCompareExchangeInt8: { ++ __ lock(); ++ __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); ++ __ movsx_b(eax, eax); ++ break; ++ } ++ case kAtomicCompareExchangeUint8: { ++ __ lock(); ++ __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); ++ __ movzx_b(eax, eax); ++ break; ++ } ++ case kAtomicCompareExchangeInt16: { ++ __ lock(); ++ __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); ++ __ movsx_w(eax, eax); ++ break; ++ } ++ case kAtomicCompareExchangeUint16: { ++ __ lock(); ++ __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); ++ __ movzx_w(eax, eax); ++ break; ++ } ++ case kAtomicCompareExchangeWord32: { ++ __ lock(); ++ __ cmpxchg(i.MemoryOperand(2), i.InputRegister(1)); ++ break; ++ } ++#define ATOMIC_BINOP_CASE(op, inst) \ ++ case kAtomic##op##Int8: { \ ++ ASSEMBLE_ATOMIC_BINOP(inst, mov_b, cmpxchg_b); \ ++ __ movsx_b(eax, eax); \ ++ break; \ ++ } \ ++ case kAtomic##op##Uint8: { \ ++ ASSEMBLE_ATOMIC_BINOP(inst, mov_b, cmpxchg_b); \ ++ __ movzx_b(eax, eax); \ ++ break; \ ++ } \ ++ case kAtomic##op##Int16: { \ ++ ASSEMBLE_ATOMIC_BINOP(inst, mov_w, cmpxchg_w); \ ++ __ movsx_w(eax, eax); \ ++ break; \ ++ } \ ++ case kAtomic##op##Uint16: { \ ++ ASSEMBLE_ATOMIC_BINOP(inst, mov_w, cmpxchg_w); \ ++ __ movzx_w(eax, eax); \ ++ break; \ ++ } \ ++ case kAtomic##op##Word32: { \ ++ ASSEMBLE_ATOMIC_BINOP(inst, mov, cmpxchg); \ ++ break; \ ++ } ++ ATOMIC_BINOP_CASE(Add, add) ++ ATOMIC_BINOP_CASE(Sub, sub) ++ ATOMIC_BINOP_CASE(And, and_) ++ ATOMIC_BINOP_CASE(Or, or_) ++ ATOMIC_BINOP_CASE(Xor, xor_) ++#undef ATOMIC_BINOP_CASE + case kAtomicLoadInt8: + case kAtomicLoadUint8: + case kAtomicLoadInt16: @@ -8042,7 +8016,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + } + + private: -+ void GenerateCallToTrap(Runtime::FunctionId trap_id) { ++ void GenerateCallToTrap(Builtins::Name trap_id) { + if (trap_id == Builtins::builtin_count) { + // We cannot test calls to the runtime in cctest/test-run-wasm. + // Therefore we emit a call to C here instead of a call to the runtime. @@ -8684,8 +8658,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace v8 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2017-12-25 17:42:57.208465749 +0100 -@@ -0,0 +1,144 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2017-12-28 04:01:21.688880592 +0100 +@@ -0,0 +1,141 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -8787,10 +8761,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + V(X87PushFloat64) \ + V(X87PushFloat32) \ + V(X87Poke) \ -+ V(X87StackCheck) \ -+ V(X87Xchgb) \ -+ V(X87Xchgw) \ -+ V(X87Xchgl) ++ V(X87StackCheck) + +// Addressing modes represent the "shape" of inputs to an instruction. +// Many instructions support multiple addressing modes. Addressing modes @@ -8862,8 +8833,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace v8 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2017-12-25 17:42:57.210465720 +0100 -@@ -0,0 +1,1871 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2017-12-28 04:08:42.202144307 +0100 +@@ -0,0 +1,2031 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -10669,13 +10640,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + ArchOpcode opcode = kArchNop; + switch (rep) { + case MachineRepresentation::kWord8: -+ opcode = kX87Xchgb; ++ opcode = kAtomicExchangeInt8; + break; + case MachineRepresentation::kWord16: -+ opcode = kX87Xchgw; ++ opcode = kAtomicExchangeInt16; + break; + case MachineRepresentation::kWord32: -+ opcode = kX87Xchgl; ++ opcode = kAtomicExchangeWord32; + break; + default: + UNREACHABLE(); @@ -10684,6 +10655,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + AddressingMode addressing_mode; + InstructionOperand inputs[4]; + size_t input_count = 0; ++ if (rep == MachineRepresentation::kWord8) { ++ inputs[input_count++] = g.UseByteRegister(value); ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(value); ++ } + inputs[input_count++] = g.UseUniqueRegister(base); + if (g.CanBeImmediate(index)) { + inputs[input_count++] = g.UseImmediate(index); @@ -10692,11 +10668,166 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile + inputs[input_count++] = g.UseUniqueRegister(index); + addressing_mode = kMode_MR1; + } -+ inputs[input_count++] = g.UseUniqueRegister(value); + InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); + Emit(code, 0, nullptr, input_count, inputs); +} + ++void InstructionSelector::VisitAtomicExchange(Node* node) { ++ X87OperandGenerator g(this); ++ Node* base = node->InputAt(0); ++ Node* index = node->InputAt(1); ++ Node* value = node->InputAt(2); ++ ++ MachineType type = AtomicOpRepresentationOf(node->op()); ++ ArchOpcode opcode = kArchNop; ++ if (type == MachineType::Int8()) { ++ opcode = kAtomicExchangeInt8; ++ } else if (type == MachineType::Uint8()) { ++ opcode = kAtomicExchangeUint8; ++ } else if (type == MachineType::Int16()) { ++ opcode = kAtomicExchangeInt16; ++ } else if (type == MachineType::Uint16()) { ++ opcode = kAtomicExchangeUint16; ++ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { ++ opcode = kAtomicExchangeWord32; ++ } else { ++ UNREACHABLE(); ++ return; ++ } ++ InstructionOperand outputs[1]; ++ AddressingMode addressing_mode; ++ InstructionOperand inputs[3]; ++ size_t input_count = 0; ++ if (type == MachineType::Int8() || type == MachineType::Uint8()) { ++ inputs[input_count++] = g.UseFixed(value, edx); ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(value); ++ } ++ inputs[input_count++] = g.UseUniqueRegister(base); ++ if (g.CanBeImmediate(index)) { ++ inputs[input_count++] = g.UseImmediate(index); ++ addressing_mode = kMode_MRI; ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(index); ++ addressing_mode = kMode_MR1; ++ } ++ if (type == MachineType::Int8() || type == MachineType::Uint8()) { ++ // Using DefineSameAsFirst requires the register to be unallocated. ++ outputs[0] = g.DefineAsFixed(node, edx); ++ } else { ++ outputs[0] = g.DefineSameAsFirst(node); ++ } ++ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); ++ Emit(code, 1, outputs, input_count, inputs); ++} ++ ++void InstructionSelector::VisitAtomicCompareExchange(Node* node) { ++ X87OperandGenerator g(this); ++ Node* base = node->InputAt(0); ++ Node* index = node->InputAt(1); ++ Node* old_value = node->InputAt(2); ++ Node* new_value = node->InputAt(3); ++ ++ MachineType type = AtomicOpRepresentationOf(node->op()); ++ ArchOpcode opcode = kArchNop; ++ if (type == MachineType::Int8()) { ++ opcode = kAtomicCompareExchangeInt8; ++ } else if (type == MachineType::Uint8()) { ++ opcode = kAtomicCompareExchangeUint8; ++ } else if (type == MachineType::Int16()) { ++ opcode = kAtomicCompareExchangeInt16; ++ } else if (type == MachineType::Uint16()) { ++ opcode = kAtomicCompareExchangeUint16; ++ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { ++ opcode = kAtomicCompareExchangeWord32; ++ } else { ++ UNREACHABLE(); ++ return; ++ } ++ InstructionOperand outputs[1]; ++ AddressingMode addressing_mode; ++ InstructionOperand inputs[4]; ++ size_t input_count = 0; ++ inputs[input_count++] = g.UseFixed(old_value, eax); ++ if (type == MachineType::Int8() || type == MachineType::Uint8()) { ++ inputs[input_count++] = g.UseByteRegister(new_value); ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(new_value); ++ } ++ inputs[input_count++] = g.UseUniqueRegister(base); ++ if (g.CanBeImmediate(index)) { ++ inputs[input_count++] = g.UseImmediate(index); ++ addressing_mode = kMode_MRI; ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(index); ++ addressing_mode = kMode_MR1; ++ } ++ outputs[0] = g.DefineAsFixed(node, eax); ++ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); ++ Emit(code, 1, outputs, input_count, inputs); ++} ++ ++void InstructionSelector::VisitAtomicBinaryOperation( ++ Node* node, ArchOpcode int8_op, ArchOpcode uint8_op, ArchOpcode int16_op, ++ ArchOpcode uint16_op, ArchOpcode word32_op) { ++ X87OperandGenerator g(this); ++ Node* base = node->InputAt(0); ++ Node* index = node->InputAt(1); ++ Node* value = node->InputAt(2); ++ ++ MachineType type = AtomicOpRepresentationOf(node->op()); ++ ArchOpcode opcode = kArchNop; ++ if (type == MachineType::Int8()) { ++ opcode = int8_op; ++ } else if (type == MachineType::Uint8()) { ++ opcode = uint8_op; ++ } else if (type == MachineType::Int16()) { ++ opcode = int16_op; ++ } else if (type == MachineType::Uint16()) { ++ opcode = uint16_op; ++ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { ++ opcode = word32_op; ++ } else { ++ UNREACHABLE(); ++ return; ++ } ++ InstructionOperand outputs[1]; ++ AddressingMode addressing_mode; ++ InstructionOperand inputs[3]; ++ size_t input_count = 0; ++ inputs[input_count++] = g.UseUniqueRegister(value); ++ inputs[input_count++] = g.UseUniqueRegister(base); ++ if (g.CanBeImmediate(index)) { ++ inputs[input_count++] = g.UseImmediate(index); ++ addressing_mode = kMode_MRI; ++ } else { ++ inputs[input_count++] = g.UseUniqueRegister(index); ++ addressing_mode = kMode_MR1; ++ } ++ outputs[0] = g.DefineAsFixed(node, eax); ++ InstructionOperand temp[1]; ++ if (type == MachineType::Int8() || type == MachineType::Uint8()) { ++ temp[0] = g.UseByteRegister(node); ++ } else { ++ temp[0] = g.TempRegister(); ++ } ++ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); ++ Emit(code, 1, outputs, input_count, inputs, 1, temp); ++} ++ ++#define VISIT_ATOMIC_BINOP(op) \ ++ void InstructionSelector::VisitAtomic##op(Node* node) { \ ++ VisitAtomicBinaryOperation(node, kAtomic##op##Int8, kAtomic##op##Uint8, \ ++ kAtomic##op##Int16, kAtomic##op##Uint16, \ ++ kAtomic##op##Word32); \ ++ } ++VISIT_ATOMIC_BINOP(Add) ++VISIT_ATOMIC_BINOP(Sub) ++VISIT_ATOMIC_BINOP(And) ++VISIT_ATOMIC_BINOP(Or) ++VISIT_ATOMIC_BINOP(Xor) ++#undef VISIT_ATOMIC_BINOP ++ +void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { + UNREACHABLE(); +} @@ -10743,8 +10874,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +chunyang.dai@intel.com diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2017-12-25 17:42:57.210465720 +0100 -@@ -0,0 +1,157 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2017-12-28 03:21:22.149118881 +0100 +@@ -0,0 +1,141 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -10811,12 +10942,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x + { + FrameScope scope(masm, StackFrame::INTERNAL); + -+ // Load padding words on stack. -+ for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { -+ __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingValue))); -+ } -+ __ push(Immediate(Smi::FromInt(LiveEdit::kFramePaddingInitialSize))); -+ + // Push arguments for DebugBreak call. + if (mode == SAVE_RESULT_REGISTER) { + // Break on return. @@ -10844,53 +10969,43 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x + } + } + -+ __ pop(ebx); -+ // We divide stored value by 2 (untagging) and multiply it by word's size. -+ STATIC_ASSERT(kSmiTagSize == 1 && kSmiShiftSize == 0); -+ __ lea(esp, Operand(esp, ebx, times_half_pointer_size, 0)); -+ + // Get rid of the internal frame. + } + -+ // This call did not replace a call , so there will be an unwanted -+ // return address left on the stack. Here we get rid of that. -+ __ add(esp, Immediate(kPointerSize)); ++ __ MaybeDropFrames(); + -+ // Now that the break point has been handled, resume normal execution by -+ // jumping to the target address intended by the caller and that was -+ // overwritten by the address of DebugBreakXXX. -+ ExternalReference after_break_target = -+ ExternalReference::debug_after_break_target_address(masm->isolate()); -+ __ jmp(Operand::StaticVariable(after_break_target)); ++ // Return to caller. ++ __ ret(0); +} + ++void DebugCodegen::GenerateHandleDebuggerStatement(MacroAssembler* masm) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ __ CallRuntime(Runtime::kHandleDebuggerStatement, 0); ++ } ++ __ MaybeDropFrames(); + -+void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { -+ // We do not know our frame height, but set esp based on ebp. -+ __ lea(esp, Operand(ebp, FrameDropperFrameConstants::kFunctionOffset)); -+ __ pop(edi); // Function. -+ __ add(esp, Immediate(-FrameDropperFrameConstants::kCodeOffset)); // INTERNAL -+ // frame -+ // marker -+ // and code -+ __ pop(ebp); -+ -+ ParameterCount dummy(0); -+ __ CheckDebugHook(edi, no_reg, dummy, dummy); -+ -+ // Load context from the function. -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); ++ // Return to caller. ++ __ ret(0); ++} + -+ // Clear new.target register as a safety measure. -+ __ mov(edx, masm->isolate()->factory()->undefined_value()); ++void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) { ++ // Frame is being dropped: ++ // - Drop to the target frame specified by ebx. ++ // - Look up current function on the frame. ++ // - Leave the frame. ++ // - Restart the frame by calling the function. ++ __ mov(ebp, ebx); ++ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ leave(); + -+ // Get function code. + __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); -+ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); ++ __ mov(ebx, ++ FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); + -+ // Re-run JSFunction, edi is function, esi is context. -+ __ jmp(ebx); ++ ParameterCount dummy(ebx); ++ __ InvokeFunction(edi, dummy, dummy, JUMP_FUNCTION, ++ CheckDebugStepCallWrapper()); +} + + @@ -10934,8 +11049,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co static const int kCodeSizeMultiplier = 165; diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-28 02:00:30.471956182 +0100 -@@ -0,0 +1,2418 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-28 03:52:59.410562490 +0100 +@@ -0,0 +1,2410 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -11189,14 +11304,16 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); + } + if (is_strict(language_mode()) || !has_simple_parameters()) { -+ FastNewStrictArgumentsStub stub(isolate()); -+ __ CallStub(&stub); ++ __ call(isolate()->builtins()->FastNewStrictArguments(), ++ RelocInfo::CODE_TARGET); ++ RestoreContext(); + } else if (literal()->has_duplicate_parameters()) { + __ Push(edi); + __ CallRuntime(Runtime::kNewSloppyArguments_Generic); + } else { -+ FastNewSloppyArgumentsStub stub(isolate()); -+ __ CallStub(&stub); ++ __ call(isolate()->builtins()->FastNewSloppyArguments(), ++ RelocInfo::CODE_TARGET); ++ RestoreContext(); + } + + SetVar(arguments, eax, ebx, edx); @@ -12011,13 +12128,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + // allow it. + if (MustCreateObjectLiteralWithRuntime(expr)) { + __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ push(Immediate(Smi::FromInt(expr->literal_index()))); ++ __ push(Immediate(SmiFromSlot(expr->literal_slot()))); + __ push(Immediate(constant_properties)); + __ push(Immediate(Smi::FromInt(flags))); + __ CallRuntime(Runtime::kCreateObjectLiteral); + } else { + __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); ++ __ mov(ebx, Immediate(SmiFromSlot(expr->literal_slot()))); + __ mov(ecx, Immediate(constant_properties)); + __ mov(edx, Immediate(Smi::FromInt(flags))); + Callable callable = @@ -12132,13 +12249,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ push(Immediate(Smi::FromInt(expr->literal_index()))); ++ __ push(Immediate(SmiFromSlot(expr->literal_slot()))); + __ push(Immediate(constant_elements)); + __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); + __ CallRuntime(Runtime::kCreateArrayLiteral); + } else { + __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); ++ __ mov(ebx, Immediate(SmiFromSlot(expr->literal_slot()))); + __ mov(ecx, Immediate(constant_elements)); + Callable callable = + CodeFactory::FastCloneShallowArray(isolate(), TRACK_ALLOCATION_SITE); @@ -12493,18 +12610,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co + VisitForStackValue(args->at(i)); + } + -+ SetCallPosition(expr, expr->tail_call_mode()); -+ if (expr->tail_call_mode() == TailCallMode::kAllow) { -+ if (FLAG_trace) { -+ __ CallRuntime(Runtime::kTraceTailCall); -+ } -+ // Update profiling counters before the tail call since we will -+ // not return to this function. -+ EmitProfilingCounterHandlingForReturnSequence(true); -+ } -+ Handle code = -+ CodeFactory::CallICTrampoline(isolate(), mode, expr->tail_call_mode()) -+ .code(); ++ SetCallPosition(expr); ++ Handle code = CodeFactory::CallICTrampoline(isolate(), mode).code(); + __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); + __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); + __ Move(eax, Immediate(arg_count)); @@ -13513,8 +13620,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2017-12-25 17:42:57.215465646 +0100 -@@ -0,0 +1,450 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2017-12-28 03:55:18.870428775 +0100 +@@ -0,0 +1,447 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -13671,10 +13778,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ + + Isolate* isolate = masm->isolate(); + Handle api_call_info = optimization.api_call_info(); -+ bool call_data_undefined = false; + // Put call data in place. + if (api_call_info->data()->IsUndefined(isolate)) { -+ call_data_undefined = true; + __ mov(data, Immediate(isolate->factory()->undefined_value())); + } else { + if (optimization.is_constant_call()) { @@ -13692,8 +13797,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ + __ mov(api_function_address, Immediate(function_address)); + + // Jump to stub. -+ CallApiCallbackStub stub(isolate, is_store, call_data_undefined, -+ !optimization.is_constant_call()); ++ CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call()); + __ TailCallStub(&stub); +} + @@ -15776,8 +15880,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp 'mips/assembler-mips.cc', diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 01:58:14.302045167 +0100 -@@ -0,0 +1,2256 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 04:12:06.797019766 +0100 +@@ -0,0 +1,2258 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. +// @@ -16397,6 +16501,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + +void Assembler::xchg_b(Register reg, const Operand& op) { ++ DCHECK(reg.is_byte_register()); + EnsureSpace ensure_space(this); + EMIT(0x86); + emit_operand(reg, op); @@ -16422,6 +16527,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} + +void Assembler::cmpxchg_b(const Operand& dst, Register src) { ++ DCHECK(src.is_byte_register()); + EnsureSpace ensure_space(this); + EMIT(0x0F); + EMIT(0xB0); @@ -20134,8 +20240,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +#endif // V8_X87_CODEGEN_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 01:57:08.188059423 +0100 -@@ -0,0 +1,3423 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 03:38:01.563307104 +0100 +@@ -0,0 +1,2873 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -22625,556 +22731,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + GenerateCase(masm, PACKED_ELEMENTS); +} + -+void FastNewRestParameterStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edi : function -+ // -- esi : context -+ // -- ebp : frame pointer -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // Make edx point to the JavaScript frame. -+ __ mov(edx, ebp); -+ if (skip_stub_frame()) { -+ // For Ignition we need to skip the handler/stub frame to reach the -+ // JavaScript frame for the function. -+ __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); -+ } -+ if (FLAG_debug_code) { -+ Label ok; -+ __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); -+ __ j(equal, &ok); -+ __ Abort(kInvalidFrameForFastNewRestArgumentsStub); -+ __ bind(&ok); -+ } -+ -+ // Check if we have rest parameters (only possible if we have an -+ // arguments adaptor frame below the function frame). -+ Label no_rest_parameters; -+ __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); -+ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(not_equal, &no_rest_parameters, Label::kNear); -+ -+ // Check if the arguments adaptor frame contains more arguments than -+ // specified by the function's internal formal parameter count. -+ Label rest_parameters; -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ sub(eax, -+ FieldOperand(ecx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ __ j(greater, &rest_parameters); -+ -+ // Return an empty rest parameter array. -+ __ bind(&no_rest_parameters); -+ { -+ // ----------- S t a t e ------------- -+ // -- esi : context -+ // -- esp[0] : return address -+ // ----------------------------------- -+ -+ // Allocate an empty rest parameter array. -+ Label allocate, done_allocate; -+ __ Allocate(JSArray::kSize, eax, edx, ecx, &allocate, NO_ALLOCATION_FLAGS); -+ __ bind(&done_allocate); -+ -+ // Setup the rest parameter array in rax. -+ __ LoadGlobalFunction(Context::JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX, ecx); -+ __ mov(FieldOperand(eax, JSArray::kMapOffset), ecx); -+ __ mov(ecx, isolate()->factory()->empty_fixed_array()); -+ __ mov(FieldOperand(eax, JSArray::kPropertiesOrHashOffset), ecx); -+ __ mov(FieldOperand(eax, JSArray::kElementsOffset), ecx); -+ __ mov(FieldOperand(eax, JSArray::kLengthOffset), Immediate(Smi::kZero)); -+ STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); -+ __ Ret(); -+ -+ // Fall back to %AllocateInNewSpace. -+ __ bind(&allocate); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(Smi::FromInt(JSArray::kSize)); -+ __ CallRuntime(Runtime::kAllocateInNewSpace); -+ } -+ __ jmp(&done_allocate); -+ } -+ -+ __ bind(&rest_parameters); -+ { -+ // Compute the pointer to the first rest parameter (skippping the receiver). -+ __ lea(ebx, -+ Operand(ebx, eax, times_half_pointer_size, -+ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); -+ -+ // ----------- S t a t e ------------- -+ // -- esi : context -+ // -- eax : number of rest parameters (tagged) -+ // -- ebx : pointer to first rest parameters -+ // -- esp[0] : return address -+ // ----------------------------------- -+ -+ // Allocate space for the rest parameter array plus the backing store. -+ Label allocate, done_allocate; -+ __ lea(ecx, Operand(eax, times_half_pointer_size, -+ JSArray::kSize + FixedArray::kHeaderSize)); -+ __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); -+ __ bind(&done_allocate); -+ -+ // Setup the elements array in edx. -+ __ mov(FieldOperand(edx, FixedArray::kMapOffset), -+ isolate()->factory()->fixed_array_map()); -+ __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); -+ { -+ Label loop, done_loop; -+ __ Move(ecx, Smi::kZero); -+ __ bind(&loop); -+ __ cmp(ecx, eax); -+ __ j(equal, &done_loop, Label::kNear); -+ __ mov(edi, Operand(ebx, 0 * kPointerSize)); -+ __ mov(FieldOperand(edx, ecx, times_half_pointer_size, -+ FixedArray::kHeaderSize), -+ edi); -+ __ sub(ebx, Immediate(1 * kPointerSize)); -+ __ add(ecx, Immediate(Smi::FromInt(1))); -+ __ jmp(&loop); -+ __ bind(&done_loop); -+ } -+ -+ // Setup the rest parameter array in edi. -+ __ lea(edi, -+ Operand(edx, eax, times_half_pointer_size, FixedArray::kHeaderSize)); -+ __ LoadGlobalFunction(Context::JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX, ecx); -+ __ mov(FieldOperand(edi, JSArray::kMapOffset), ecx); -+ __ mov(FieldOperand(edi, JSArray::kPropertiesOrHashOffset), -+ isolate()->factory()->empty_fixed_array()); -+ __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx); -+ __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax); -+ STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); -+ __ mov(eax, edi); -+ __ Ret(); -+ -+ // Fall back to %AllocateInNewSpace (if not too big). -+ Label too_big_for_new_space; -+ __ bind(&allocate); -+ __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); -+ __ j(greater, &too_big_for_new_space); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ SmiTag(ecx); -+ __ Push(eax); -+ __ Push(ebx); -+ __ Push(ecx); -+ __ CallRuntime(Runtime::kAllocateInNewSpace); -+ __ mov(edx, eax); -+ __ Pop(ebx); -+ __ Pop(eax); -+ } -+ __ jmp(&done_allocate); -+ -+ // Fall back to %NewRestParameter. -+ __ bind(&too_big_for_new_space); -+ __ PopReturnAddressTo(ecx); -+ // We reload the function from the caller frame due to register pressure -+ // within this stub. This is the slow path, hence reloading is preferable. -+ if (skip_stub_frame()) { -+ // For Ignition we need to skip the handler/stub frame to reach the -+ // JavaScript frame for the function. -+ __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); -+ } else { -+ __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); -+ } -+ __ PushReturnAddressFrom(ecx); -+ __ TailCallRuntime(Runtime::kNewRestParameter); -+ } -+} -+ -+void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edi : function -+ // -- esi : context -+ // -- ebp : frame pointer -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // Make ecx point to the JavaScript frame. -+ __ mov(ecx, ebp); -+ if (skip_stub_frame()) { -+ // For Ignition we need to skip the handler/stub frame to reach the -+ // JavaScript frame for the function. -+ __ mov(ecx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); -+ } -+ if (FLAG_debug_code) { -+ Label ok; -+ __ cmp(edi, Operand(ecx, StandardFrameConstants::kFunctionOffset)); -+ __ j(equal, &ok); -+ __ Abort(kInvalidFrameForFastNewSloppyArgumentsStub); -+ __ bind(&ok); -+ } -+ -+ // TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub. -+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ebx, -+ FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ __ lea(edx, Operand(ecx, ebx, times_half_pointer_size, -+ StandardFrameConstants::kCallerSPOffset)); -+ -+ // ebx : number of parameters (tagged) -+ // edx : parameters pointer -+ // edi : function -+ // ecx : JavaScript frame pointer. -+ // esp[0] : return address -+ -+ // Check if the calling frame is an arguments adaptor frame. -+ Label adaptor_frame, try_allocate, runtime; -+ __ mov(eax, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); -+ __ mov(eax, Operand(eax, CommonFrameConstants::kContextOrFrameTypeOffset)); -+ __ cmp(eax, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(equal, &adaptor_frame, Label::kNear); -+ -+ // No adaptor, parameter count = argument count. -+ __ mov(ecx, ebx); -+ __ push(ebx); -+ __ jmp(&try_allocate, Label::kNear); -+ -+ // We have an adaptor frame. Patch the parameters pointer. -+ __ bind(&adaptor_frame); -+ __ push(ebx); -+ __ mov(edx, Operand(ecx, StandardFrameConstants::kCallerFPOffset)); -+ __ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ lea(edx, -+ Operand(edx, ecx, times_2, StandardFrameConstants::kCallerSPOffset)); -+ -+ // ebx = parameter count (tagged) -+ // ecx = argument count (smi-tagged) -+ // Compute the mapped parameter count = min(ebx, ecx) in ebx. -+ __ cmp(ebx, ecx); -+ __ j(less_equal, &try_allocate, Label::kNear); -+ __ mov(ebx, ecx); -+ -+ // Save mapped parameter count and function. -+ __ bind(&try_allocate); -+ __ push(edi); -+ __ push(ebx); -+ -+ // Compute the sizes of backing store, parameter map, and arguments object. -+ // 1. Parameter map, has 2 extra words containing context and backing store. -+ const int kParameterMapHeaderSize = -+ FixedArray::kHeaderSize + 2 * kPointerSize; -+ Label no_parameter_map; -+ __ test(ebx, ebx); -+ __ j(zero, &no_parameter_map, Label::kNear); -+ __ lea(ebx, Operand(ebx, times_2, kParameterMapHeaderSize)); -+ __ bind(&no_parameter_map); -+ -+ // 2. Backing store. -+ __ lea(ebx, Operand(ebx, ecx, times_2, FixedArray::kHeaderSize)); -+ -+ // 3. Arguments object. -+ __ add(ebx, Immediate(JSSloppyArgumentsObject::kSize)); -+ -+ // Do the allocation of all three objects in one go. -+ __ Allocate(ebx, eax, edi, no_reg, &runtime, NO_ALLOCATION_FLAGS); -+ -+ // eax = address of new object(s) (tagged) -+ // ecx = argument count (smi-tagged) -+ // esp[0] = mapped parameter count (tagged) -+ // esp[4] = function -+ // esp[8] = parameter count (tagged) -+ // Get the arguments map from the current native context into edi. -+ Label has_mapped_parameters, instantiate; -+ __ mov(edi, NativeContextOperand()); -+ __ mov(ebx, Operand(esp, 0 * kPointerSize)); -+ __ test(ebx, ebx); -+ __ j(not_zero, &has_mapped_parameters, Label::kNear); -+ __ mov( -+ edi, -+ Operand(edi, Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX))); -+ __ jmp(&instantiate, Label::kNear); -+ -+ __ bind(&has_mapped_parameters); -+ __ mov(edi, Operand(edi, Context::SlotOffset( -+ Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX))); -+ __ bind(&instantiate); -+ -+ // eax = address of new object (tagged) -+ // ebx = mapped parameter count (tagged) -+ // ecx = argument count (smi-tagged) -+ // edi = address of arguments map (tagged) -+ // esp[0] = mapped parameter count (tagged) -+ // esp[4] = function -+ // esp[8] = parameter count (tagged) -+ // Copy the JS object part. -+ __ mov(FieldOperand(eax, JSObject::kMapOffset), edi); -+ __ mov(FieldOperand(eax, JSObject::kPropertiesOrHashOffset), -+ masm->isolate()->factory()->empty_fixed_array()); -+ __ mov(FieldOperand(eax, JSObject::kElementsOffset), -+ masm->isolate()->factory()->empty_fixed_array()); -+ -+ // Set up the callee in-object property. -+ STATIC_ASSERT(JSSloppyArgumentsObject::kCalleeIndex == 1); -+ __ mov(edi, Operand(esp, 1 * kPointerSize)); -+ __ AssertNotSmi(edi); -+ __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kCalleeOffset), edi); -+ -+ // Use the length (smi tagged) and set that as an in-object property too. -+ __ AssertSmi(ecx); -+ __ mov(FieldOperand(eax, JSSloppyArgumentsObject::kLengthOffset), ecx); -+ -+ // Set up the elements pointer in the allocated arguments object. -+ // If we allocated a parameter map, edi will point there, otherwise to the -+ // backing store. -+ __ lea(edi, Operand(eax, JSSloppyArgumentsObject::kSize)); -+ __ mov(FieldOperand(eax, JSObject::kElementsOffset), edi); -+ -+ // eax = address of new object (tagged) -+ // ebx = mapped parameter count (tagged) -+ // ecx = argument count (tagged) -+ // edx = address of receiver argument -+ // edi = address of parameter map or backing store (tagged) -+ // esp[0] = mapped parameter count (tagged) -+ // esp[4] = function -+ // esp[8] = parameter count (tagged) -+ // Free two registers. -+ __ push(edx); -+ __ push(eax); -+ -+ // Initialize parameter map. If there are no mapped arguments, we're done. -+ Label skip_parameter_map; -+ __ test(ebx, ebx); -+ __ j(zero, &skip_parameter_map); -+ -+ __ mov(FieldOperand(edi, FixedArray::kMapOffset), -+ Immediate(isolate()->factory()->sloppy_arguments_elements_map())); -+ __ lea(eax, Operand(ebx, reinterpret_cast(Smi::FromInt(2)))); -+ __ mov(FieldOperand(edi, FixedArray::kLengthOffset), eax); -+ __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 0 * kPointerSize), esi); -+ __ lea(eax, Operand(edi, ebx, times_2, kParameterMapHeaderSize)); -+ __ mov(FieldOperand(edi, FixedArray::kHeaderSize + 1 * kPointerSize), eax); -+ -+ // Copy the parameter slots and the holes in the arguments. -+ // We need to fill in mapped_parameter_count slots. They index the context, -+ // where parameters are stored in reverse order, at -+ // MIN_CONTEXT_SLOTS .. MIN_CONTEXT_SLOTS+parameter_count-1 -+ // The mapped parameter thus need to get indices -+ // MIN_CONTEXT_SLOTS+parameter_count-1 .. -+ // MIN_CONTEXT_SLOTS+parameter_count-mapped_parameter_count -+ // We loop from right to left. -+ Label parameters_loop, parameters_test; -+ __ push(ecx); -+ __ mov(eax, Operand(esp, 3 * kPointerSize)); -+ __ mov(ebx, Immediate(Smi::FromInt(Context::MIN_CONTEXT_SLOTS))); -+ __ add(ebx, Operand(esp, 5 * kPointerSize)); -+ __ sub(ebx, eax); -+ __ mov(ecx, isolate()->factory()->the_hole_value()); -+ __ mov(edx, edi); -+ __ lea(edi, Operand(edi, eax, times_2, kParameterMapHeaderSize)); -+ // eax = loop variable (tagged) -+ // ebx = mapping index (tagged) -+ // ecx = the hole value -+ // edx = address of parameter map (tagged) -+ // edi = address of backing store (tagged) -+ // esp[0] = argument count (tagged) -+ // esp[4] = address of new object (tagged) -+ // esp[8] = address of receiver argument -+ // esp[12] = mapped parameter count (tagged) -+ // esp[16] = function -+ // esp[20] = parameter count (tagged) -+ __ jmp(¶meters_test, Label::kNear); -+ -+ __ bind(¶meters_loop); -+ __ sub(eax, Immediate(Smi::FromInt(1))); -+ __ mov(FieldOperand(edx, eax, times_2, kParameterMapHeaderSize), ebx); -+ __ mov(FieldOperand(edi, eax, times_2, FixedArray::kHeaderSize), ecx); -+ __ add(ebx, Immediate(Smi::FromInt(1))); -+ __ bind(¶meters_test); -+ __ test(eax, eax); -+ __ j(not_zero, ¶meters_loop, Label::kNear); -+ __ pop(ecx); -+ -+ __ bind(&skip_parameter_map); -+ -+ // ecx = argument count (tagged) -+ // edi = address of backing store (tagged) -+ // esp[0] = address of new object (tagged) -+ // esp[4] = address of receiver argument -+ // esp[8] = mapped parameter count (tagged) -+ // esp[12] = function -+ // esp[16] = parameter count (tagged) -+ // Copy arguments header and remaining slots (if there are any). -+ __ mov(FieldOperand(edi, FixedArray::kMapOffset), -+ Immediate(isolate()->factory()->fixed_array_map())); -+ __ mov(FieldOperand(edi, FixedArray::kLengthOffset), ecx); -+ -+ Label arguments_loop, arguments_test; -+ __ mov(ebx, Operand(esp, 2 * kPointerSize)); -+ __ mov(edx, Operand(esp, 1 * kPointerSize)); -+ __ sub(edx, ebx); // Is there a smarter way to do negative scaling? -+ __ sub(edx, ebx); -+ __ jmp(&arguments_test, Label::kNear); -+ -+ __ bind(&arguments_loop); -+ __ sub(edx, Immediate(kPointerSize)); -+ __ mov(eax, Operand(edx, 0)); -+ __ mov(FieldOperand(edi, ebx, times_2, FixedArray::kHeaderSize), eax); -+ __ add(ebx, Immediate(Smi::FromInt(1))); -+ -+ __ bind(&arguments_test); -+ __ cmp(ebx, ecx); -+ __ j(less, &arguments_loop, Label::kNear); -+ -+ // Restore. -+ __ pop(eax); // Address of arguments object. -+ __ Drop(4); -+ -+ // Return. -+ __ ret(0); -+ -+ // Do the runtime call to allocate the arguments object. -+ __ bind(&runtime); -+ __ pop(eax); // Remove saved mapped parameter count. -+ __ pop(edi); // Pop saved function. -+ __ pop(eax); // Remove saved parameter count. -+ __ pop(eax); // Pop return address. -+ __ push(edi); // Push function. -+ __ push(edx); // Push parameters pointer. -+ __ push(ecx); // Push parameter count. -+ __ push(eax); // Push return address. -+ __ TailCallRuntime(Runtime::kNewSloppyArguments); -+} -+ -+void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edi : function -+ // -- esi : context -+ // -- ebp : frame pointer -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // Make edx point to the JavaScript frame. -+ __ mov(edx, ebp); -+ if (skip_stub_frame()) { -+ // For Ignition we need to skip the handler/stub frame to reach the -+ // JavaScript frame for the function. -+ __ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); -+ } -+ if (FLAG_debug_code) { -+ Label ok; -+ __ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset)); -+ __ j(equal, &ok); -+ __ Abort(kInvalidFrameForFastNewStrictArgumentsStub); -+ __ bind(&ok); -+ } -+ -+ // Check if we have an arguments adaptor frame below the function frame. -+ Label arguments_adaptor, arguments_done; -+ __ mov(ebx, Operand(edx, StandardFrameConstants::kCallerFPOffset)); -+ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(equal, &arguments_adaptor, Label::kNear); -+ { -+ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(eax, -+ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); -+ __ lea(ebx, -+ Operand(edx, eax, times_half_pointer_size, -+ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); -+ } -+ __ jmp(&arguments_done, Label::kNear); -+ __ bind(&arguments_adaptor); -+ { -+ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ lea(ebx, -+ Operand(ebx, eax, times_half_pointer_size, -+ StandardFrameConstants::kCallerSPOffset - 1 * kPointerSize)); -+ } -+ __ bind(&arguments_done); -+ -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments (tagged) -+ // -- ebx : pointer to the first argument -+ // -- esi : context -+ // -- esp[0] : return address -+ // ----------------------------------- -+ -+ // Allocate space for the strict arguments object plus the backing store. -+ Label allocate, done_allocate; -+ __ lea(ecx, -+ Operand(eax, times_half_pointer_size, -+ JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize)); -+ __ Allocate(ecx, edx, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); -+ __ bind(&done_allocate); -+ -+ // Setup the elements array in edx. -+ __ mov(FieldOperand(edx, FixedArray::kMapOffset), -+ isolate()->factory()->fixed_array_map()); -+ __ mov(FieldOperand(edx, FixedArray::kLengthOffset), eax); -+ { -+ Label loop, done_loop; -+ __ Move(ecx, Smi::kZero); -+ __ bind(&loop); -+ __ cmp(ecx, eax); -+ __ j(equal, &done_loop, Label::kNear); -+ __ mov(edi, Operand(ebx, 0 * kPointerSize)); -+ __ mov(FieldOperand(edx, ecx, times_half_pointer_size, -+ FixedArray::kHeaderSize), -+ edi); -+ __ sub(ebx, Immediate(1 * kPointerSize)); -+ __ add(ecx, Immediate(Smi::FromInt(1))); -+ __ jmp(&loop); -+ __ bind(&done_loop); -+ } -+ -+ // Setup the rest parameter array in edi. -+ __ lea(edi, -+ Operand(edx, eax, times_half_pointer_size, FixedArray::kHeaderSize)); -+ __ LoadGlobalFunction(Context::STRICT_ARGUMENTS_MAP_INDEX, ecx); -+ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kMapOffset), ecx); -+ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kPropertiesOrHashOffset), -+ isolate()->factory()->empty_fixed_array()); -+ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx); -+ __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax); -+ STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); -+ __ mov(eax, edi); -+ __ Ret(); -+ -+ // Fall back to %AllocateInNewSpace (if not too big). -+ Label too_big_for_new_space; -+ __ bind(&allocate); -+ __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize)); -+ __ j(greater, &too_big_for_new_space); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ SmiTag(ecx); -+ __ Push(eax); -+ __ Push(ebx); -+ __ Push(ecx); -+ __ CallRuntime(Runtime::kAllocateInNewSpace); -+ __ mov(edx, eax); -+ __ Pop(ebx); -+ __ Pop(eax); -+ } -+ __ jmp(&done_allocate); -+ -+ // Fall back to %NewStrictArguments. -+ __ bind(&too_big_for_new_space); -+ __ PopReturnAddressTo(ecx); -+ // We reload the function from the caller frame due to register pressure -+ // within this stub. This is the slow path, hence reloading is preferable. -+ if (skip_stub_frame()) { -+ // For Ignition we need to skip the handler/stub frame to reach the -+ // JavaScript frame for the function. -+ __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); -+ } else { -+ __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); -+ } -+ __ PushReturnAddressFrom(ecx); -+ __ TailCallRuntime(Runtime::kNewStrictArguments); -+} -+ +// Generates an Operand for saving parameters after PrepareCallApiFunction. +static Operand ApiParameterOperand(int index) { + return Operand(esp, index * kPointerSize); @@ -26370,8 +25926,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/fra +#endif // V8_X87_FRAMES_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-25 17:42:57.223465529 +0100 -@@ -0,0 +1,386 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-28 03:38:40.380712871 +0100 +@@ -0,0 +1,375 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -26444,25 +26000,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int + data->InitializePlatformSpecific(arraysize(registers), registers, NULL); +} + -+void FastNewRestParameterDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void FastNewSloppyArgumentsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void FastNewStrictArgumentsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ +// static +const Register TypeConversionDescriptor::ArgumentRegister() { return eax; } + @@ -26754,14 +26291,22 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int + data->InitializePlatformSpecific(arraysize(registers), registers); +} + ++void FrameDropperTrampolineDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ Register registers[] = { ++ ebx, // loaded new FP ++ }; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ +} // namespace internal +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 02:06:59.546987375 +0100 -@@ -0,0 +1,2568 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 03:27:22.050899783 +0100 +@@ -0,0 +1,2571 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -27042,10 +26587,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::TruncateX87TOSToI(Register result_reg) { ++void TurboAssembler::TruncateX87TOSToI(Zone* zone, Register result_reg) { + sub(esp, Immediate(kDoubleSize)); + fst_d(MemOperand(esp, 0)); -+ SlowTruncateToI(result_reg, esp, 0); ++ SlowTruncateToIDelayed(zone, result_reg, esp, 0); + add(esp, Immediate(kDoubleSize)); +} + @@ -27335,12 +26880,14 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + bind(&done); +} + -+void MacroAssembler::DebugBreak() { -+ Move(eax, Immediate(0)); -+ mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, -+ isolate()))); -+ CEntryStub ces(isolate(), 1); -+ call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); ++void MacroAssembler::MaybeDropFrames() { ++ // Check whether we need to drop frames to restart a function on the stack. ++ ExternalReference restart_fp = ++ ExternalReference::debug_restart_fp_address(isolate()); ++ mov(ebx, Operand::StaticVariable(restart_fp)); ++ test(ebx, ebx); ++ j(not_zero, isolate()->builtins()->FrameDropperTrampoline(), ++ RelocInfo::CODE_TARGET); +} + +void TurboAssembler::ShlPair(Register high, Register low, uint8_t shift) { @@ -27477,7 +27024,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::FCmp() { ++void TurboAssembler::FCmp() { + fucompp(); + push(eax); + fnstsw_ax(); @@ -27523,7 +27070,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +// rc=01B, round down. +// rc=10B, round up. +// rc=11B, round toward zero. -+void MacroAssembler::X87SetRC(int rc) { ++void TurboAssembler::X87SetRC(int rc) { + sub(esp, Immediate(kPointerSize)); + fnstcw(MemOperand(esp, 0)); + and_(MemOperand(esp, 0), Immediate(0xF3FF)); @@ -27533,7 +27080,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + -+void MacroAssembler::X87SetFPUCW(int cw) { ++void TurboAssembler::X87SetFPUCW(int cw) { + RecordComment("-- X87SetFPUCW start --"); + push(Immediate(cw)); + fldcw(MemOperand(esp, 0)); @@ -28413,6 +27960,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + DCHECK(actual.reg().is(eax)); + DCHECK(expected.reg().is(ebx)); + } else { ++ definitely_matches = true; + Move(eax, actual.reg()); + } + } @@ -29332,8 +28880,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-28 02:05:16.624566310 +0100 -@@ -0,0 +1,921 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-28 03:27:27.352808166 +0100 +@@ -0,0 +1,920 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -29544,10 +29092,17 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + } + void LoadUint32NoSSE2(const Operand& src); + ++ // FCmp is similar to integer cmp, but requires unsigned ++ // jcc instructions (je, ja, jae, jb, jbe, je, and jz). ++ void FCmp(); ++ void X87SetRC(int rc); ++ void X87SetFPUCW(int cw); ++ + void SlowTruncateToIDelayed(Zone* zone, Register result_reg, + Register input_reg, + int offset = HeapNumber::kValueOffset - + kHeapObjectTag); ++ void TruncateX87TOSToI(Zone* zone, Register result_reg); + + void Push(Register src) { push(src); } + void Push(const Operand& src) { push(src); } @@ -29724,10 +29279,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + void RecordWriteForMap(Register object, Handle map, Register scratch1, + Register scratch2, SaveFPRegsMode save_fp); + -+ // --------------------------------------------------------------------------- -+ // Debugger Support -+ -+ void DebugBreak(); ++ // Frame restart support ++ void MaybeDropFrames(); + + // Enter specific kind of exit frame. Expects the number of + // arguments in register eax and sets up the number of arguments in @@ -29843,14 +29396,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + Condition IsObjectStringType(Register heap_object, Register map, + Register instance_type); + -+ // FCmp is similar to integer cmp, but requires unsigned -+ // jcc instructions (je, ja, jae, jb, jbe, je, and jz). -+ void FCmp(); + void FXamMinusZero(); + void FXamSign(); + void X87CheckIA(); -+ void X87SetRC(int rc); -+ void X87SetFPUCW(int cw); + + void ClampUint8(Register reg); + void ClampTOSToUint8(Register result_reg); @@ -29859,7 +29407,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + int offset = HeapNumber::kValueOffset - kHeapObjectTag); + + void TruncateHeapNumberToI(Register result_reg, Register input_reg); -+ void TruncateX87TOSToI(Register result_reg); + + void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode, + Label* lost_precision, Label* is_nan, Label* minus_zero, From c5173657c0269ef4b28df29233b80e87c2e542ea Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 28 Dec 2017 04:56:50 +0100 Subject: [PATCH 244/437] no-sse2 patch: More V8 x87 fixes (2) --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 237 ++---------------- 1 file changed, 16 insertions(+), 221 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index c26313e..d65895b 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -14256,7 +14256,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/ +chunyang.dai@intel.com diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2017-12-25 17:42:57.217465617 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2017-12-28 04:38:12.986938239 +0100 @@ -0,0 +1,1273 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -15191,7 +15191,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/ + } + + CodeDesc code_desc; -+ masm_->GetCode(&code_desc); ++ masm_->GetCode(masm_->isolate(), &code_desc); + Handle code = + isolate()->factory()->NewCode(code_desc, + Code::ComputeFlags(Code::REGEXP), @@ -15880,7 +15880,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp 'mips/assembler-mips.cc', diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 04:12:06.797019766 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 04:40:51.665451092 +0100 @@ -0,0 +1,2258 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -18132,7 +18132,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + !serializer_enabled() && !emit_debug_code()) { + return; + } -+ RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); ++ RelocInfo rinfo(pc_, rmode, data, NULL); + reloc_info_writer.Write(&rinfo); +} + @@ -19818,7 +19818,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +#endif // V8_X87_ASSEMBLER_X87_INL_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-27 22:01:35.070961553 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-28 04:52:57.450203610 +0100 @@ -0,0 +1,381 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -20017,7 +20017,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + MemMoveEmitPopAndReturn(&masm); + + CodeDesc desc; -+ masm.GetCode(&desc); ++ masm.GetCode(isolate, &desc); + DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); + Assembler::FlushICache(isolate, buffer, actual_size); + base::OS::ProtectCode(buffer, actual_size); @@ -20240,8 +20240,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +#endif // V8_X87_CODEGEN_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 03:38:01.563307104 +0100 -@@ -0,0 +1,2873 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 04:50:57.144052671 +0100 +@@ -0,0 +1,2668 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -20993,204 +20993,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); +} + -+static void IncrementCallCount(MacroAssembler* masm, Register feedback_vector, -+ Register slot) { -+ __ add(FieldOperand(feedback_vector, slot, times_half_pointer_size, -+ FixedArray::kHeaderSize + kPointerSize), -+ Immediate(Smi::FromInt(1))); -+} -+ -+void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { -+ // eax - number of arguments -+ // edi - function -+ // edx - slot id -+ // ebx - vector -+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); -+ __ cmp(edi, ecx); -+ __ j(not_equal, miss); -+ -+ // Reload ecx. -+ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, -+ FixedArray::kHeaderSize)); -+ -+ // Increment the call count for monomorphic function calls. -+ IncrementCallCount(masm, ebx, edx); -+ -+ __ mov(ebx, ecx); -+ __ mov(edx, edi); -+ ArrayConstructorStub stub(masm->isolate()); -+ __ TailCallStub(&stub); -+ -+ // Unreachable. -+} -+ -+ -+void CallICStub::Generate(MacroAssembler* masm) { -+ // edi - number of arguments -+ // edi - function -+ // edx - slot id -+ // ebx - vector -+ Isolate* isolate = masm->isolate(); -+ Label extra_checks_or_miss, call, call_function, call_count_incremented; -+ -+ // The checks. First, does edi match the recorded monomorphic target? -+ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, -+ FixedArray::kHeaderSize)); -+ -+ // We don't know that we have a weak cell. We might have a private symbol -+ // or an AllocationSite, but the memory is safe to examine. -+ // AllocationSite::kTransitionInfoOrBoilerplateOffset - contains a Smi or -+ // pointer to FixedArray. WeakCell::kValueOffset - contains a JSFunction or -+ // Smi(0) Symbol::kHashFieldSlot - if the low bit is 1, then the hash is not -+ // computed, meaning that it can't appear to be a pointer. If the low bit is -+ // 0, then hash is computed, but the 0 bit prevents the field from appearing -+ // to be a pointer. -+ STATIC_ASSERT(WeakCell::kSize >= kPointerSize); -+ STATIC_ASSERT(AllocationSite::kTransitionInfoOrBoilerplateOffset == -+ WeakCell::kValueOffset && -+ WeakCell::kValueOffset == Symbol::kHashFieldSlot); -+ -+ __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); -+ __ j(not_equal, &extra_checks_or_miss); -+ -+ // The compare above could have been a SMI/SMI comparison. Guard against this -+ // convincing us that we have a monomorphic JSFunction. -+ __ JumpIfSmi(edi, &extra_checks_or_miss); -+ -+ __ bind(&call_function); -+ -+ // Increment the call count for monomorphic function calls. -+ IncrementCallCount(masm, ebx, edx); -+ -+ __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), -+ tail_call_mode()), -+ RelocInfo::CODE_TARGET); -+ -+ __ bind(&extra_checks_or_miss); -+ Label uninitialized, miss, not_allocation_site; -+ -+ __ cmp(ecx, Immediate(FeedbackVector::MegamorphicSentinel(isolate))); -+ __ j(equal, &call); -+ -+ // Check if we have an allocation site. -+ __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), -+ Heap::kAllocationSiteMapRootIndex); -+ __ j(not_equal, ¬_allocation_site); -+ -+ // We have an allocation site. -+ HandleArrayCase(masm, &miss); -+ -+ __ bind(¬_allocation_site); -+ -+ // The following cases attempt to handle MISS cases without going to the -+ // runtime. -+ if (FLAG_trace_ic) { -+ __ jmp(&miss); -+ } -+ -+ __ cmp(ecx, Immediate(FeedbackVector::UninitializedSentinel(isolate))); -+ __ j(equal, &uninitialized); -+ -+ // We are going megamorphic. If the feedback is a JSFunction, it is fine -+ // to handle it here. More complex cases are dealt with in the runtime. -+ __ AssertNotSmi(ecx); -+ __ CmpObjectType(ecx, JS_FUNCTION_TYPE, ecx); -+ __ j(not_equal, &miss); -+ __ mov( -+ FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), -+ Immediate(FeedbackVector::MegamorphicSentinel(isolate))); -+ -+ __ bind(&call); -+ -+ // Increment the call count for megamorphic function calls. -+ IncrementCallCount(masm, ebx, edx); -+ -+ __ bind(&call_count_incremented); -+ -+ __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()), -+ RelocInfo::CODE_TARGET); -+ -+ __ bind(&uninitialized); -+ -+ // We are going monomorphic, provided we actually have a JSFunction. -+ __ JumpIfSmi(edi, &miss); -+ -+ // Goto miss case if we do not have a function. -+ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); -+ __ j(not_equal, &miss); -+ -+ // Make sure the function is not the Array() function, which requires special -+ // behavior on MISS. -+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); -+ __ cmp(edi, ecx); -+ __ j(equal, &miss); -+ -+ // Make sure the function belongs to the same native context. -+ __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); -+ __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); -+ __ cmp(ecx, NativeContextOperand()); -+ __ j(not_equal, &miss); -+ -+ // Store the function. Use a stub since we need a frame for allocation. -+ // eax - number of arguments -+ // ebx - vector -+ // edx - slot -+ // edi - function -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ CreateWeakCellStub create_stub(isolate); -+ __ SmiTag(eax); -+ __ push(eax); -+ __ push(ebx); -+ __ push(edx); -+ __ push(edi); -+ __ push(esi); -+ __ CallStub(&create_stub); -+ __ pop(esi); -+ __ pop(edi); -+ __ pop(edx); -+ __ pop(ebx); -+ __ pop(eax); -+ __ SmiUntag(eax); -+ } -+ -+ __ jmp(&call_function); -+ -+ // We are here because tracing is on or we encountered a MISS case we can't -+ // handle here. -+ __ bind(&miss); -+ GenerateMiss(masm); -+ -+ __ jmp(&call_count_incremented); -+ -+ // Unreachable -+ __ int3(); -+} -+ -+ -+void CallICStub::GenerateMiss(MacroAssembler* masm) { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Preserve the number of arguments. -+ __ SmiTag(eax); -+ __ push(eax); -+ -+ // Push the function and feedback info. -+ __ push(edi); -+ __ push(ebx); -+ __ push(edx); -+ -+ // Call the entry. -+ __ CallRuntime(Runtime::kCallIC_Miss); -+ -+ // Move result to edi and exit the internal frame. -+ __ mov(edi, eax); -+ -+ // Restore number of arguments. -+ __ pop(eax); -+ __ SmiUntag(eax); -+} -+ + +bool CEntryStub::NeedsImmovableCode() { + return false; @@ -22962,23 +22764,16 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod + // call data + __ push(call_data); + -+ Register scratch = call_data; -+ if (!call_data_undefined()) { -+ // return value -+ __ push(Immediate(masm->isolate()->factory()->undefined_value())); -+ // return value default -+ __ push(Immediate(masm->isolate()->factory()->undefined_value())); -+ } else { -+ // return value -+ __ push(scratch); -+ // return value default -+ __ push(scratch); -+ } ++ // return value ++ __ push(Immediate(masm->isolate()->factory()->undefined_value())); ++ // return value default ++ __ push(Immediate(masm->isolate()->factory()->undefined_value())); + // isolate + __ push(Immediate(reinterpret_cast(masm->isolate()))); + // holder + __ push(holder); + ++ Register scratch = call_data; + __ mov(scratch, esp); + + // push return address @@ -23519,7 +23314,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2017-12-25 17:42:57.222465544 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2017-12-28 04:55:52.791508679 +0100 @@ -0,0 +1,412 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -23599,7 +23394,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deo + new_reloc->GetDataStartAddress() + padding, 0); + intptr_t comment_string + = reinterpret_cast(RelocInfo::kFillerCommentString); -+ RelocInfo rinfo(isolate, 0, RelocInfo::COMMENT, comment_string, NULL); ++ RelocInfo rinfo(0, RelocInfo::COMMENT, comment_string, NULL); + for (int i = 0; i < additional_comments; ++i) { +#ifdef DEBUG + byte* pos_before = reloc_info_writer.pos(); @@ -23663,7 +23458,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deo + Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); + patcher.masm()->call(deopt_entry, RelocInfo::NONE32); + // We use RUNTIME_ENTRY for deoptimization bailouts. -+ RelocInfo rinfo(isolate, call_address + 1, // 1 after the call opcode. ++ RelocInfo rinfo(call_address + 1, // 1 after the call opcode. + RelocInfo::RUNTIME_ENTRY, + reinterpret_cast(deopt_entry), NULL); + reloc_info_writer.Write(&rinfo); From bbb70f9c8650bc88f03a518b6806f553dc4260cb Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 28 Dec 2017 05:26:07 +0100 Subject: [PATCH 245/437] no-sse2 patch: More V8 x87 fixes (3) --- qtwebengine-everywhere-src-5.10.0-no-sse2.patch | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index d65895b..f66ee4f 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -18142,7 +18142,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-28 01:53:26.598456142 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-28 05:24:49.899521687 +0100 @@ -0,0 +1,1140 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -18476,6 +18476,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + + friend class Operand; + friend class Assembler; ++ friend class MacroAssembler; +}; + + @@ -18573,7 +18574,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass + RelocInfo::Mode rmode_; + + friend class Assembler; -+ friend class MacroAssembler; +}; + + @@ -26100,8 +26100,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 03:27:22.050899783 +0100 -@@ -0,0 +1,2571 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 05:21:52.412245739 +0100 +@@ -0,0 +1,2572 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -26110,6 +26110,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + +#include "src/base/bits.h" +#include "src/base/division-by-constant.h" ++#include "src/base/utils/random-number-generator.h" +#include "src/bootstrapper.h" +#include "src/codegen.h" +#include "src/debug/debug.h" From 6cdb87ab31e0568784a4b17450e993dcb83a771f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 29 Dec 2017 01:08:50 +0100 Subject: [PATCH 246/437] no-sse2 patch: sync builtins-x87.cc from builtins-ia32.cc Port the newly introduced xmm* uses, merge in all other changes. --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 1350 ++++++++--------- 1 file changed, 660 insertions(+), 690 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index f66ee4f..3198c85 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -2649,8 +2649,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/bu #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-28 03:52:06.933365833 +0100 -@@ -0,0 +1,3038 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-29 01:00:28.359896864 +0100 +@@ -0,0 +1,3008 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -2745,34 +2745,14 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ jmp(ebx); +} + -+void Builtins::Generate_InOptimizationQueue(MacroAssembler* masm) { -+ // Checking whether the queued function is ready for install is optional, -+ // since we come across interrupts and stack checks elsewhere. However, -+ // not checking may delay installing ready functions, and always checking -+ // would be quite expensive. A good compromise is to first check against -+ // stack limit as a cue for an interrupt signal. -+ Label ok; -+ ExternalReference stack_limit = -+ ExternalReference::address_of_stack_limit(masm->isolate()); -+ __ cmp(esp, Operand::StaticVariable(stack_limit)); -+ __ j(above_equal, &ok, Label::kNear); -+ -+ GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); -+ -+ __ bind(&ok); -+ GenerateTailCallToSharedCode(masm); -+} -+ +namespace { + -+void Generate_JSConstructStubHelper(MacroAssembler* masm, bool is_api_function, -+ bool create_implicit_receiver, -+ bool check_derived_construct) { ++void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- eax: number of arguments -+ // -- esi: context + // -- edi: constructor function + // -- edx: new target ++ // -- esi: context + // ----------------------------------- + + // Enter a construct frame. @@ -2783,39 +2763,137 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ SmiTag(eax); + __ push(esi); + __ push(eax); ++ __ SmiUntag(eax); + -+ if (create_implicit_receiver) { -+ // Allocate the new receiver object. -+ __ Push(edi); -+ __ Push(edx); -+ __ Call(Builtins::CallableFor(masm->isolate(), Builtins::kFastNewObject) -+ .code(), -+ RelocInfo::CODE_TARGET); -+ __ mov(ebx, eax); -+ __ Pop(edx); -+ __ Pop(edi); ++ // The receiver for the builtin/api call. ++ __ PushRoot(Heap::kTheHoleValueRootIndex); + -+ // ----------- S t a t e ------------- -+ // -- edi: constructor function -+ // -- ebx: newly allocated object -+ // -- edx: new target -+ // ----------------------------------- ++ // Set up pointer to last argument. ++ __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); + -+ // Retrieve smi-tagged arguments count from the stack. -+ __ mov(eax, Operand(esp, 0)); -+ } ++ // Copy arguments and receiver to the expression stack. ++ Label loop, entry; ++ __ mov(ecx, eax); ++ // ----------- S t a t e ------------- ++ // -- eax: number of arguments (untagged) ++ // -- edi: constructor function ++ // -- edx: new target ++ // -- ebx: pointer to last argument ++ // -- ecx: counter ++ // -- sp[0*kPointerSize]: the hole (receiver) ++ // -- sp[1*kPointerSize]: number of arguments (tagged) ++ // -- sp[2*kPointerSize]: context ++ // ----------------------------------- ++ __ jmp(&entry); ++ __ bind(&loop); ++ __ push(Operand(ebx, ecx, times_4, 0)); ++ __ bind(&entry); ++ __ dec(ecx); ++ __ j(greater_equal, &loop); + -+ __ SmiUntag(eax); ++ // Call the function. ++ // eax: number of arguments (untagged) ++ // edi: constructor function ++ // edx: new target ++ ParameterCount actual(eax); ++ __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, ++ CheckDebugStepCallWrapper()); + -+ if (create_implicit_receiver) { -+ // Push the allocated receiver to the stack. We need two copies -+ // because we may have to return the original one and the calling -+ // conventions dictate that the called function pops the receiver. -+ __ push(ebx); -+ __ push(ebx); -+ } else { -+ __ PushRoot(Heap::kTheHoleValueRootIndex); -+ } ++ // Restore context from the frame. ++ __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); ++ // Restore smi-tagged arguments count from the frame. ++ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kLengthOffset)); ++ // Leave construct frame. ++ } ++ ++ // Remove caller arguments from the stack and return. ++ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); ++ __ pop(ecx); ++ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver ++ __ push(ecx); ++ __ ret(0); ++} ++ ++// The construct stub for ES5 constructor functions and ES6 class constructors. ++void Generate_JSConstructStubGeneric(MacroAssembler* masm, ++ bool restrict_constructor_return) { ++ // ----------- S t a t e ------------- ++ // -- eax: number of arguments (untagged) ++ // -- edi: constructor function ++ // -- edx: new target ++ // -- esi: context ++ // -- sp[...]: constructor arguments ++ // ----------------------------------- ++ ++ // Enter a construct frame. ++ { ++ FrameScope scope(masm, StackFrame::CONSTRUCT); ++ Label post_instantiation_deopt_entry, not_create_implicit_receiver; ++ ++ // Preserve the incoming parameters on the stack. ++ __ mov(ecx, eax); ++ __ SmiTag(ecx); ++ __ Push(esi); ++ __ Push(ecx); ++ __ Push(edi); ++ __ Push(edx); ++ ++ // ----------- S t a t e ------------- ++ // -- sp[0*kPointerSize]: new target ++ // -- edi and sp[1*kPointerSize]: constructor function ++ // -- sp[2*kPointerSize]: argument count ++ // -- sp[3*kPointerSize]: context ++ // ----------------------------------- ++ ++ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); ++ __ test(FieldOperand(ebx, SharedFunctionInfo::kCompilerHintsOffset), ++ Immediate(SharedFunctionInfo::kDerivedConstructorMask)); ++ __ j(not_zero, ¬_create_implicit_receiver); ++ ++ // If not derived class constructor: Allocate the new receiver object. ++ __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); ++ __ Call(masm->isolate()->builtins()->FastNewObject(), ++ RelocInfo::CODE_TARGET); ++ __ jmp(&post_instantiation_deopt_entry, Label::kNear); ++ ++ // Else: use TheHoleValue as receiver for constructor call ++ __ bind(¬_create_implicit_receiver); ++ __ LoadRoot(eax, Heap::kTheHoleValueRootIndex); ++ ++ // ----------- S t a t e ------------- ++ // -- eax: implicit receiver ++ // -- Slot 3 / sp[0*kPointerSize]: new target ++ // -- Slot 2 / sp[1*kPointerSize]: constructor function ++ // -- Slot 1 / sp[2*kPointerSize]: number of arguments (tagged) ++ // -- Slot 0 / sp[3*kPointerSize]: context ++ // ----------------------------------- ++ // Deoptimizer enters here. ++ masm->isolate()->heap()->SetConstructStubCreateDeoptPCOffset( ++ masm->pc_offset()); ++ __ bind(&post_instantiation_deopt_entry); ++ ++ // Restore new target. ++ __ Pop(edx); ++ ++ // Push the allocated receiver to the stack. We need two copies ++ // because we may have to return the original one and the calling ++ // conventions dictate that the called function pops the receiver. ++ __ Push(eax); ++ __ Push(eax); ++ ++ // ----------- S t a t e ------------- ++ // -- edx: new target ++ // -- sp[0*kPointerSize]: implicit receiver ++ // -- sp[1*kPointerSize]: implicit receiver ++ // -- sp[2*kPointerSize]: constructor function ++ // -- sp[3*kPointerSize]: number of arguments (tagged) ++ // -- sp[4*kPointerSize]: context ++ // ----------------------------------- ++ ++ // Restore constructor function and argument count. ++ __ mov(edi, Operand(ebp, ConstructFrameConstants::kConstructorOffset)); ++ __ mov(eax, Operand(ebp, ConstructFrameConstants::kLengthOffset)); ++ __ SmiUntag(eax); + + // Set up pointer to last argument. + __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); @@ -2823,9 +2901,20 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Copy arguments and receiver to the expression stack. + Label loop, entry; + __ mov(ecx, eax); -+ __ jmp(&entry); ++ // ----------- S t a t e ------------- ++ // -- eax: number of arguments (untagged) ++ // -- edx: new target ++ // -- ebx: pointer to last argument ++ // -- ecx: counter (tagged) ++ // -- sp[0*kPointerSize]: implicit receiver ++ // -- sp[1*kPointerSize]: implicit receiver ++ // -- edi and sp[2*kPointerSize]: constructor function ++ // -- sp[3*kPointerSize]: number of arguments (tagged) ++ // -- sp[4*kPointerSize]: context ++ // ----------------------------------- ++ __ jmp(&entry, Label::kNear); + __ bind(&loop); -+ __ push(Operand(ebx, ecx, times_4, 0)); ++ __ Push(Operand(ebx, ecx, times_pointer_size, 0)); + __ bind(&entry); + __ dec(ecx); + __ j(greater_equal, &loop); @@ -2835,85 +2924,95 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, + CheckDebugStepCallWrapper()); + ++ // ----------- S t a t e ------------- ++ // -- eax: constructor result ++ // -- sp[0*kPointerSize]: implicit receiver ++ // -- sp[1*kPointerSize]: constructor function ++ // -- sp[2*kPointerSize]: number of arguments ++ // -- sp[3*kPointerSize]: context ++ // ----------------------------------- ++ + // Store offset of return address for deoptimizer. -+ if (create_implicit_receiver && !is_api_function) { -+ masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); -+ } ++ masm->isolate()->heap()->SetConstructStubInvokeDeoptPCOffset( ++ masm->pc_offset()); + + // Restore context from the frame. + __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); + -+ if (create_implicit_receiver) { -+ // If the result is an object (in the ECMA sense), we should get rid -+ // of the receiver and use the result; see ECMA-262 section 13.2.2-7 -+ // on page 74. -+ Label use_receiver, exit; -+ -+ // If the result is a smi, it is *not* an object in the ECMA sense. -+ __ JumpIfSmi(eax, &use_receiver, Label::kNear); -+ -+ // If the type of the result (stored in its map) is less than -+ // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(above_equal, &exit, Label::kNear); -+ -+ // Throw away the result of the constructor invocation and use the -+ // on-stack receiver as the result. -+ __ bind(&use_receiver); -+ __ mov(eax, Operand(esp, 0)); -+ -+ // Restore the arguments count and leave the construct frame. The -+ // arguments count is stored below the receiver. -+ __ bind(&exit); -+ __ mov(ebx, Operand(esp, 1 * kPointerSize)); ++ // If the result is an object (in the ECMA sense), we should get rid ++ // of the receiver and use the result; see ECMA-262 section 13.2.2-7 ++ // on page 74. ++ Label use_receiver, do_throw, other_result, leave_frame; ++ ++ // If the result is undefined, we jump out to using the implicit receiver. ++ __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &use_receiver, ++ Label::kNear); ++ ++ // Otherwise we do a smi check and fall through to check if the return value ++ // is a valid receiver. ++ ++ // If the result is a smi, it is *not* an object in the ECMA sense. ++ __ JumpIfSmi(eax, &other_result, Label::kNear); ++ ++ // If the type of the result (stored in its map) is less than ++ // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. ++ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); ++ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); ++ __ j(above_equal, &leave_frame, Label::kNear); ++ ++ // The result is now neither undefined nor an object. ++ __ bind(&other_result); ++ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kConstructorOffset)); ++ __ mov(ebx, FieldOperand(ebx, JSFunction::kSharedFunctionInfoOffset)); ++ __ test(FieldOperand(ebx, SharedFunctionInfo::kCompilerHintsOffset), ++ Immediate(SharedFunctionInfo::kClassConstructorMask)); ++ ++ if (restrict_constructor_return) { ++ // Throw if constructor function is a class constructor ++ __ j(Condition::zero, &use_receiver, Label::kNear); + } else { -+ __ mov(ebx, Operand(esp, 0)); ++ __ j(not_zero, &use_receiver, Label::kNear); ++ __ CallRuntime( ++ Runtime::kIncrementUseCounterConstructorReturnNonUndefinedPrimitive); ++ __ jmp(&use_receiver, Label::kNear); + } + -+ // Leave construct frame. -+ } ++ __ bind(&do_throw); ++ __ CallRuntime(Runtime::kThrowConstructorReturnedNonObject); + -+ // ES6 9.2.2. Step 13+ -+ // Check that the result is not a Smi, indicating that the constructor result -+ // from a derived class is neither undefined nor an Object. -+ if (check_derived_construct) { -+ Label dont_throw; -+ __ JumpIfNotSmi(eax, &dont_throw); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); -+ } -+ __ bind(&dont_throw); -+ } ++ // Throw away the result of the constructor invocation and use the ++ // on-stack receiver as the result. ++ __ bind(&use_receiver); ++ __ mov(eax, Operand(esp, 0 * kPointerSize)); ++ __ JumpIfRoot(eax, Heap::kTheHoleValueRootIndex, &do_throw); + ++ __ bind(&leave_frame); ++ // Restore smi-tagged arguments count from the frame. ++ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kLengthOffset)); ++ // Leave construct frame. ++ } + // Remove caller arguments from the stack and return. + STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); + __ pop(ecx); + __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver + __ push(ecx); -+ if (create_implicit_receiver) { -+ __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); -+ } + __ ret(0); +} -+ +} // namespace + -+void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) { -+ Generate_JSConstructStubHelper(masm, false, true, false); ++void Builtins::Generate_JSConstructStubGenericRestrictedReturn( ++ MacroAssembler* masm) { ++ return Generate_JSConstructStubGeneric(masm, true); ++} ++void Builtins::Generate_JSConstructStubGenericUnrestrictedReturn( ++ MacroAssembler* masm) { ++ return Generate_JSConstructStubGeneric(masm, false); +} -+ +void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { -+ Generate_JSConstructStubHelper(masm, true, false, false); ++ Generate_JSBuiltinsConstructStubHelper(masm); +} -+ +void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { -+ Generate_JSConstructStubHelper(masm, false, false, false); -+} -+ -+void Builtins::Generate_JSBuiltinsConstructStubForDerived( -+ MacroAssembler* masm) { -+ Generate_JSConstructStubHelper(masm, false, false, true); ++ Generate_JSBuiltinsConstructStubHelper(masm); +} + +void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { @@ -3138,6 +3237,37 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ jmp(&stepping_prepared); +} + ++static void ReplaceClosureEntryWithOptimizedCode( ++ MacroAssembler* masm, Register optimized_code_entry, Register closure, ++ Register scratch1, Register scratch2, Register scratch3) { ++ Register native_context = scratch1; ++ ++ // Store the optimized code in the closure. ++ __ lea(optimized_code_entry, ++ FieldOperand(optimized_code_entry, Code::kHeaderSize)); ++ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), ++ optimized_code_entry); ++ __ RecordWriteCodeEntryField(closure, optimized_code_entry, scratch2); ++ ++ // Link the closure into the optimized function list. ++ __ mov(native_context, NativeContextOperand()); ++ __ mov(scratch3, ++ ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST)); ++ __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), scratch3); ++ __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, scratch3, ++ scratch2, kDontSaveFPRegs, EMIT_REMEMBERED_SET, ++ OMIT_SMI_CHECK); ++ const int function_list_offset = ++ Context::SlotOffset(Context::OPTIMIZED_FUNCTIONS_LIST); ++ __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), ++ closure); ++ // Save closure before the write barrier. ++ __ mov(scratch3, closure); ++ __ RecordWriteContextSlot(native_context, function_list_offset, closure, ++ scratch2, kDontSaveFPRegs); ++ __ mov(closure, scratch3); ++} ++ +static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, + Register scratch2) { + Register args_count = scratch1; @@ -3158,6 +3288,121 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ push(return_pc); +} + ++// Tail-call |function_id| if |smi_entry| == |marker| ++static void TailCallRuntimeIfMarkerEquals(MacroAssembler* masm, ++ Register smi_entry, ++ OptimizationMarker marker, ++ Runtime::FunctionId function_id) { ++ Label no_match; ++ __ cmp(smi_entry, Immediate(Smi::FromEnum(marker))); ++ __ j(not_equal, &no_match, Label::kNear); ++ GenerateTailCallToReturnedCode(masm, function_id); ++ __ bind(&no_match); ++} ++ ++static void MaybeTailCallOptimizedCodeSlot(MacroAssembler* masm, ++ Register feedback_vector, ++ Register scratch) { ++ // ----------- S t a t e ------------- ++ // -- eax : argument count (preserved for callee if needed, and caller) ++ // -- edx : new target (preserved for callee if needed, and caller) ++ // -- edi : target function (preserved for callee if needed, and caller) ++ // -- feedback vector (preserved for caller if needed) ++ // ----------------------------------- ++ DCHECK(!AreAliased(feedback_vector, eax, edx, edi, scratch)); ++ ++ Label optimized_code_slot_is_cell, fallthrough; ++ ++ Register closure = edi; ++ Register optimized_code_entry = scratch; ++ ++ const int kOptimizedCodeCellOffset = ++ FeedbackVector::kOptimizedCodeIndex * kPointerSize + ++ FeedbackVector::kHeaderSize; ++ __ mov(optimized_code_entry, ++ FieldOperand(feedback_vector, kOptimizedCodeCellOffset)); ++ ++ // Check if the code entry is a Smi. If yes, we interpret it as an ++ // optimisation marker. Otherwise, interpret is as a weak cell to a code ++ // object. ++ __ JumpIfNotSmi(optimized_code_entry, &optimized_code_slot_is_cell); ++ ++ { ++ // Optimized code slot is an optimization marker. ++ ++ // Fall through if no optimization trigger. ++ __ cmp(optimized_code_entry, ++ Immediate(Smi::FromEnum(OptimizationMarker::kNone))); ++ __ j(equal, &fallthrough); ++ ++ TailCallRuntimeIfMarkerEquals(masm, optimized_code_entry, ++ OptimizationMarker::kCompileOptimized, ++ Runtime::kCompileOptimized_NotConcurrent); ++ TailCallRuntimeIfMarkerEquals( ++ masm, optimized_code_entry, ++ OptimizationMarker::kCompileOptimizedConcurrent, ++ Runtime::kCompileOptimized_Concurrent); ++ ++ { ++ // Otherwise, the marker is InOptimizationQueue. ++ if (FLAG_debug_code) { ++ __ cmp( ++ optimized_code_entry, ++ Immediate(Smi::FromEnum(OptimizationMarker::kInOptimizationQueue))); ++ __ Assert(equal, kExpectedOptimizationSentinel); ++ } ++ ++ // Checking whether the queued function is ready for install is optional, ++ // since we come across interrupts and stack checks elsewhere. However, ++ // not checking may delay installing ready functions, and always checking ++ // would be quite expensive. A good compromise is to first check against ++ // stack limit as a cue for an interrupt signal. ++ ExternalReference stack_limit = ++ ExternalReference::address_of_stack_limit(masm->isolate()); ++ __ cmp(esp, Operand::StaticVariable(stack_limit)); ++ __ j(above_equal, &fallthrough); ++ GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); ++ } ++ } ++ ++ { ++ // Optimized code slot is a WeakCell. ++ __ bind(&optimized_code_slot_is_cell); ++ ++ __ mov(optimized_code_entry, ++ FieldOperand(optimized_code_entry, WeakCell::kValueOffset)); ++ __ JumpIfSmi(optimized_code_entry, &fallthrough); ++ ++ // Check if the optimized code is marked for deopt. If it is, bailout to a ++ // given label. ++ Label found_deoptimized_code; ++ __ test(FieldOperand(optimized_code_entry, Code::kKindSpecificFlags1Offset), ++ Immediate(1 << Code::kMarkedForDeoptimizationBit)); ++ __ j(not_zero, &found_deoptimized_code); ++ ++ // Optimized code is good, get it into the closure and link the closure into ++ // the optimized functions list, then tail call the optimized code. ++ __ push(eax); ++ __ push(edx); ++ // The feedback vector is no longer used, so re-use it as a scratch ++ // register. ++ ReplaceClosureEntryWithOptimizedCode(masm, optimized_code_entry, closure, ++ edx, eax, feedback_vector); ++ __ pop(edx); ++ __ pop(eax); ++ __ jmp(optimized_code_entry); ++ ++ // Optimized code slot contains deoptimized code, evict it and re-enter the ++ // closure's code. ++ __ bind(&found_deoptimized_code); ++ GenerateTailCallToReturnedCode(masm, Runtime::kEvictOptimizedCodeSlot); ++ } ++ ++ // Fall-through if the optimized code cell is clear and there is no ++ // optimization marker. ++ __ bind(&fallthrough); ++} ++ +// Generate code for entering a JS function with the interpreter. +// On entry to the function the receiver and arguments have been pushed on the +// stack left to right. The actual argument count matches the formal parameter @@ -3175,9 +3420,20 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { + ProfileEntryHookStub::MaybeCallEntryHook(masm); + ++ Register closure = edi; ++ Register feedback_vector = ebx; ++ ++ // Load the feedback vector from the closure. ++ __ mov(feedback_vector, ++ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); ++ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); ++ // Read off the optimized code slot in the feedback vector, and if there ++ // is optimized code or an optimization marker, call that instead. ++ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); ++ + // Open a frame scope to indicate that there is a frame on the stack. The -+ // MANUAL indicates that the scope shouldn't actually generate code to set up -+ // the frame (that is done below). ++ // MANUAL indicates that the scope shouldn't actually generate code to set ++ // up the frame (that is done below). + FrameScope frame_scope(masm, StackFrame::MANUAL); + __ push(ebp); // Caller's frame pointer. + __ mov(ebp, esp); @@ -3187,12 +3443,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + + // Get the bytecode array from the function object (or from the DebugInfo if + // it is present) and load it into kInterpreterBytecodeArrayRegister. ++ Label maybe_load_debug_bytecode_array, bytecode_array_loaded; + __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ Label load_debug_bytecode_array, bytecode_array_loaded; -+ __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), -+ &load_debug_bytecode_array); + __ mov(kInterpreterBytecodeArrayRegister, + FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); ++ __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), ++ &maybe_load_debug_bytecode_array); + __ bind(&bytecode_array_loaded); + + // Check whether we should continue to use the interpreter. @@ -3204,11 +3460,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ j(not_equal, &switch_to_different_code_kind); + + // Increment invocation count for the function. -+ __ EmitLoadFeedbackVector(ecx); -+ __ add( -+ FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize + -+ FeedbackVector::kHeaderSize), -+ Immediate(Smi::FromInt(1))); ++ __ add(FieldOperand(feedback_vector, ++ FeedbackVector::kInvocationCountIndex * kPointerSize + ++ FeedbackVector::kHeaderSize), ++ Immediate(Smi::FromInt(1))); + + // Check function data field is actually a BytecodeArray object. + if (FLAG_debug_code) { @@ -3279,12 +3534,19 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + LeaveInterpreterFrame(masm, ebx, ecx); + __ ret(0); + -+ // Load debug copy of the bytecode array. -+ __ bind(&load_debug_bytecode_array); -+ Register debug_info = kInterpreterBytecodeArrayRegister; -+ __ mov(debug_info, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); ++ // Load debug copy of the bytecode array if it exists. ++ // kInterpreterBytecodeArrayRegister is already loaded with ++ // SharedFunctionInfo::kFunctionDataOffset. ++ __ bind(&maybe_load_debug_bytecode_array); ++ __ push(ebx); // feedback_vector == ebx, so save it. ++ __ mov(ecx, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); ++ __ mov(ebx, FieldOperand(ecx, DebugInfo::kFlagsOffset)); ++ __ SmiUntag(ebx); ++ __ test(ebx, Immediate(DebugInfo::kHasBreakInfo)); ++ __ pop(ebx); ++ __ j(zero, &bytecode_array_loaded); + __ mov(kInterpreterBytecodeArrayRegister, -+ FieldOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset)); ++ FieldOperand(ecx, DebugInfo::kDebugBytecodeArrayOffset)); + __ jmp(&bytecode_array_loaded); + + // If the shared code is no longer this entry trampoline, then the underlying @@ -3349,7 +3611,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + +// static +void Builtins::Generate_InterpreterPushArgsThenCallImpl( -+ MacroAssembler* masm, InterpreterPushArgsMode mode) { ++ MacroAssembler* masm, ConvertReceiverMode receiver_mode, ++ InterpreterPushArgsMode mode) { + // ----------- S t a t e ------------- + // -- eax : the number of arguments (not including the receiver) + // -- ebx : the address of the first argument to be pushed. Subsequent @@ -3372,12 +3635,23 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Pop return address to allow tail-call after pushing arguments. + __ Pop(edx); + ++ // Push "undefined" as the receiver arg if we need to. ++ if (receiver_mode == ConvertReceiverMode::kNullOrUndefined) { ++ __ PushRoot(Heap::kUndefinedValueRootIndex); ++ __ sub(ecx, Immediate(1)); // Subtract one for receiver. ++ } ++ + // Find the address of the last argument. + __ shl(ecx, kPointerSizeLog2); + __ neg(ecx); + __ add(ecx, ebx); + Generate_InterpreterPushArgs(masm, ecx, ebx); + ++ if (mode == InterpreterPushArgsMode::kWithFinalSpread) { ++ __ Pop(ebx); // Pass the spread in a register ++ __ sub(eax, Immediate(1)); // Subtract one for spread ++ } ++ + // Call the target. + __ Push(edx); // Re-push return address. + @@ -3410,10 +3684,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +// This function modified start_addr, and only reads the contents of num_args +// register. scratch1 and scratch2 are used as temporary registers. Their +// original values are restored after the use. -+void Generate_InterpreterPushArgsThenReturnAddress( ++void Generate_InterpreterPushZeroAndArgsAndReturnAddress( + MacroAssembler* masm, Register num_args, Register start_addr, -+ Register scratch1, Register scratch2, bool receiver_in_args, -+ int num_slots_above_ret_addr, Label* stack_overflow) { ++ Register scratch1, Register scratch2, int num_slots_above_ret_addr, ++ Label* stack_overflow) { + // We have to move return address and the temporary registers above it + // before we can copy arguments onto the stack. To achieve this: + // Step 1: Increment the stack pointer by num_args + 1 (for receiver). @@ -3426,7 +3700,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // | | | return addr | (2) + // | | | arg N | (3) + // | scratch1 | <-- esp | .... | -+ // | .... | | arg 0 | ++ // | .... | | arg 1 | + // | scratch-n | | arg 0 | + // | return addr | | receiver slot | + @@ -3470,17 +3744,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + } + + // Step 3 copy arguments to correct locations. -+ if (receiver_in_args) { -+ __ mov(scratch1, num_args); -+ __ add(scratch1, Immediate(1)); -+ } else { -+ // Slot meant for receiver contains return address. Reset it so that -+ // we will not incorrectly interpret return address as an object. -+ __ mov(Operand(esp, num_args, times_pointer_size, -+ (num_slots_above_ret_addr + 1) * kPointerSize), -+ Immediate(0)); -+ __ mov(scratch1, num_args); -+ } ++ // Slot meant for receiver contains return address. Reset it so that ++ // we will not incorrectly interpret return address as an object. ++ __ mov(Operand(esp, num_args, times_pointer_size, ++ (num_slots_above_ret_addr + 1) * kPointerSize), ++ Immediate(0)); ++ __ mov(scratch1, num_args); + + Label loop_header, loop_check; + __ jmp(&loop_check); @@ -3518,14 +3787,22 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Push arguments and move return address to the top of stack. + // The eax register is readonly. The ecx register will be modified. The edx + // and edi registers will be modified but restored to their original values. -+ Generate_InterpreterPushArgsThenReturnAddress(masm, eax, ecx, edx, edi, false, -+ 2, &stack_overflow); ++ Generate_InterpreterPushZeroAndArgsAndReturnAddress(masm, eax, ecx, edx, edi, ++ 2, &stack_overflow); + + // Restore edi and edx + __ Pop(edx); + __ Pop(edi); + -+ __ AssertUndefinedOrAllocationSite(ebx); ++ if (mode == InterpreterPushArgsMode::kWithFinalSpread) { ++ __ PopReturnAddressTo(ecx); ++ __ Pop(ebx); // Pass the spread in a register ++ __ PushReturnAddressFrom(ecx); ++ __ sub(eax, Immediate(1)); // Subtract one for spread ++ } else { ++ __ AssertUndefinedOrAllocationSite(ebx); ++ } ++ + if (mode == InterpreterPushArgsMode::kJSFunction) { + // Tail call to the function-specific construct stub (still in the caller + // context at this point). @@ -3577,8 +3854,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Push arguments and move return address to the top of stack. + // The eax register is readonly. The ecx register will be modified. The edx + // and edi registers will be modified but restored to their original values. -+ Generate_InterpreterPushArgsThenReturnAddress(masm, eax, ecx, edx, edi, true, -+ 1, &stack_overflow); ++ Generate_InterpreterPushZeroAndArgsAndReturnAddress(masm, eax, ecx, edx, edi, ++ 1, &stack_overflow); + + // Restore edx. + __ Pop(edx); @@ -3667,6 +3944,33 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + Generate_InterpreterEnterBytecode(masm); +} + ++void Builtins::Generate_CheckOptimizationMarker(MacroAssembler* masm) { ++ // ----------- S t a t e ------------- ++ // -- rax : argument count (preserved for callee) ++ // -- rdx : new target (preserved for callee) ++ // -- rdi : target function (preserved for callee) ++ // ----------------------------------- ++ Register closure = edi; ++ ++ // Get the feedback vector. ++ Register feedback_vector = ebx; ++ __ mov(feedback_vector, ++ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); ++ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); ++ ++ // The feedback vector must be defined. ++ if (FLAG_debug_code) { ++ __ CompareRoot(feedback_vector, Heap::kUndefinedValueRootIndex); ++ __ Assert(not_equal, BailoutReason::kExpectedFeedbackVector); ++ } ++ ++ // Is there an optimization marker or optimized code in the feedback vector? ++ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); ++ ++ // Otherwise, tail call the SFI code. ++ GenerateTailCallToSharedCode(masm); ++} ++ +void Builtins::Generate_CompileLazy(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- eax : argument count (preserved for callee) @@ -3674,108 +3978,30 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // -- edi : target function (preserved for callee) + // ----------------------------------- + // First lookup code, maybe we don't need to compile! -+ Label gotta_call_runtime, gotta_call_runtime_no_stack; -+ Label try_shared; -+ Label loop_top, loop_bottom; ++ Label gotta_call_runtime; + + Register closure = edi; -+ Register new_target = edx; -+ Register argument_count = eax; ++ Register feedback_vector = ebx; + + // Do we have a valid feedback vector? -+ __ mov(ebx, FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); -+ __ mov(ebx, FieldOperand(ebx, Cell::kValueOffset)); -+ __ cmp(ebx, masm->isolate()->factory()->undefined_value()); -+ __ j(equal, &gotta_call_runtime_no_stack); -+ -+ __ push(argument_count); -+ __ push(new_target); -+ __ push(closure); -+ -+ Register map = argument_count; -+ Register index = ebx; -+ __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); -+ __ mov(index, FieldOperand(map, FixedArray::kLengthOffset)); -+ __ cmp(index, Immediate(Smi::FromInt(2))); -+ __ j(less, &try_shared); -+ -+ // edx : native context -+ // ebx : length / index -+ // eax : optimized code map -+ // stack[0] : new target -+ // stack[4] : closure -+ Register native_context = edx; -+ __ mov(native_context, NativeContextOperand()); ++ __ mov(feedback_vector, ++ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); ++ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); ++ __ JumpIfRoot(feedback_vector, Heap::kUndefinedValueRootIndex, ++ &gotta_call_runtime); + -+ __ bind(&loop_top); -+ Register temp = edi; ++ // Is there an optimization marker or optimized code in the feedback vector? ++ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); + -+ // Does the native context match? -+ __ mov(temp, FieldOperand(map, index, times_half_pointer_size, -+ SharedFunctionInfo::kOffsetToPreviousContext)); -+ __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); -+ __ cmp(temp, native_context); -+ __ j(not_equal, &loop_bottom); -+ // Code available? ++ // We found no optimized code. + Register entry = ecx; -+ __ mov(entry, FieldOperand(map, index, times_half_pointer_size, -+ SharedFunctionInfo::kOffsetToPreviousCachedCode)); -+ __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); -+ __ JumpIfSmi(entry, &try_shared); -+ -+ // Found code. Get it into the closure and return. -+ __ pop(closure); -+ // Store code entry in the closure. -+ __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); -+ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); -+ __ RecordWriteCodeEntryField(closure, entry, eax); -+ -+ // Link the closure into the optimized function list. -+ // ecx : code entry -+ // edx : native context -+ // edi : closure -+ __ mov(ebx, -+ ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST)); -+ __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), ebx); -+ __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, ebx, eax, -+ kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); -+ const int function_list_offset = -+ Context::SlotOffset(Context::OPTIMIZED_FUNCTIONS_LIST); -+ __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), -+ closure); -+ // Save closure before the write barrier. -+ __ mov(ebx, closure); -+ __ RecordWriteContextSlot(native_context, function_list_offset, closure, eax, -+ kDontSaveFPRegs); -+ __ mov(closure, ebx); -+ __ pop(new_target); -+ __ pop(argument_count); -+ __ jmp(entry); -+ -+ __ bind(&loop_bottom); -+ __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength))); -+ __ cmp(index, Immediate(Smi::FromInt(1))); -+ __ j(greater, &loop_top); -+ -+ // We found no code. -+ __ jmp(&gotta_call_runtime); -+ -+ __ bind(&try_shared); -+ __ pop(closure); -+ __ pop(new_target); -+ __ pop(argument_count); + __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); -+ // Is the shared function marked for tier up? -+ __ test(FieldOperand(entry, SharedFunctionInfo::kCompilerHintsOffset), -+ Immediate(SharedFunctionInfo::MarkedForTierUpBit::kMask)); -+ __ j(not_zero, &gotta_call_runtime_no_stack); + + // If SFI points to anything other than CompileLazy, install that. + __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); + __ Move(ebx, masm->CodeObject()); + __ cmp(entry, ebx); -+ __ j(equal, &gotta_call_runtime_no_stack); ++ __ j(equal, &gotta_call_runtime); + + // Install the SFI's code entry. + __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); @@ -3784,23 +4010,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ jmp(entry); + + __ bind(&gotta_call_runtime); -+ __ pop(closure); -+ __ pop(new_target); -+ __ pop(argument_count); -+ __ bind(&gotta_call_runtime_no_stack); -+ + GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); +} + -+void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { -+ GenerateTailCallToReturnedCode(masm, -+ Runtime::kCompileOptimized_NotConcurrent); -+} -+ -+void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { -+ GenerateTailCallToReturnedCode(masm, Runtime::kCompileOptimized_Concurrent); -+} -+ +void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- eax : argument count (preserved for callee) @@ -3942,6 +4154,72 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + Generate_MarkCodeAsExecutedOnce(masm); +} + ++void Builtins::Generate_NotifyBuiltinContinuation(MacroAssembler* masm) { ++ // Enter an internal frame. ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ // Preserve possible return result from lazy deopt. ++ __ push(eax); ++ __ CallRuntime(Runtime::kNotifyStubFailure, false); ++ __ pop(eax); ++ // Tear down internal frame. ++ } ++ ++ __ pop(MemOperand(esp, 0)); // Ignore state offset ++ __ ret(0); // Return to ContinueToBuiltin stub still on stack. ++} ++ ++namespace { ++void Generate_ContinueToBuiltinHelper(MacroAssembler* masm, ++ bool java_script_builtin, ++ bool with_result) { ++ const RegisterConfiguration* config(RegisterConfiguration::Turbofan()); ++ int allocatable_register_count = config->num_allocatable_general_registers(); ++ if (with_result) { ++ // Overwrite the hole inserted by the deoptimizer with the return value from ++ // the LAZY deopt point. ++ __ mov(Operand(esp, ++ config->num_allocatable_general_registers() * kPointerSize + ++ BuiltinContinuationFrameConstants::kFixedFrameSize), ++ eax); ++ } ++ for (int i = allocatable_register_count - 1; i >= 0; --i) { ++ int code = config->GetAllocatableGeneralCode(i); ++ __ pop(Register::from_code(code)); ++ if (java_script_builtin && code == kJavaScriptCallArgCountRegister.code()) { ++ __ SmiUntag(Register::from_code(code)); ++ } ++ } ++ __ mov( ++ ebp, ++ Operand(esp, BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp)); ++ const int offsetToPC = ++ BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp - kPointerSize; ++ __ pop(Operand(esp, offsetToPC)); ++ __ Drop(offsetToPC / kPointerSize); ++ __ add(Operand(esp, 0), Immediate(Code::kHeaderSize - kHeapObjectTag)); ++ __ ret(0); ++} ++} // namespace ++ ++void Builtins::Generate_ContinueToCodeStubBuiltin(MacroAssembler* masm) { ++ Generate_ContinueToBuiltinHelper(masm, false, false); ++} ++ ++void Builtins::Generate_ContinueToCodeStubBuiltinWithResult( ++ MacroAssembler* masm) { ++ Generate_ContinueToBuiltinHelper(masm, false, true); ++} ++ ++void Builtins::Generate_ContinueToJavaScriptBuiltin(MacroAssembler* masm) { ++ Generate_ContinueToBuiltinHelper(masm, true, false); ++} ++ ++void Builtins::Generate_ContinueToJavaScriptBuiltinWithResult( ++ MacroAssembler* masm) { ++ Generate_ContinueToBuiltinHelper(masm, true, true); ++} ++ +static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, + Deoptimizer::BailoutType type) { + { @@ -3997,7 +4275,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // -- esp[12] : receiver + // ----------------------------------- + -+ // 1. Load receiver into edi, argArray into eax (if present), remove all ++ // 1. Load receiver into edi, argArray into ebx (if present), remove all + // arguments from the stack (including the receiver), and push thisArg (if + // present) instead. + { @@ -4019,34 +4297,28 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); + __ Push(edx); + __ PushReturnAddressFrom(ecx); -+ __ Move(eax, ebx); + } + + // ----------- S t a t e ------------- -+ // -- eax : argArray ++ // -- ebx : argArray + // -- edi : receiver + // -- esp[0] : return address + // -- esp[4] : thisArg + // ----------------------------------- + -+ // 2. Make sure the receiver is actually callable. -+ Label receiver_not_callable; -+ __ JumpIfSmi(edi, &receiver_not_callable, Label::kNear); -+ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsCallable)); -+ __ j(zero, &receiver_not_callable, Label::kNear); ++ // 2. We don't need to check explicitly for callable receiver here, ++ // since that's the first thing the Call/CallWithArrayLike builtins ++ // will do. + + // 3. Tail call with no arguments if argArray is null or undefined. + Label no_arguments; -+ __ JumpIfRoot(eax, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); -+ __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &no_arguments, ++ __ JumpIfRoot(ebx, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); ++ __ JumpIfRoot(ebx, Heap::kUndefinedValueRootIndex, &no_arguments, + Label::kNear); + -+ // 4a. Apply the receiver to the given argArray (passing undefined for -+ // new.target). -+ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); -+ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); ++ // 4a. Apply the receiver to the given argArray. ++ __ Jump(masm->isolate()->builtins()->CallWithArrayLike(), ++ RelocInfo::CODE_TARGET); + + // 4b. The argArray is either null or undefined, so we tail call without any + // arguments to the receiver. @@ -4055,13 +4327,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ Set(eax, 0); + __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); + } -+ -+ // 4c. The receiver is not callable, throw an appropriate TypeError. -+ __ bind(&receiver_not_callable); -+ { -+ __ mov(Operand(esp, kPointerSize), edi); -+ __ TailCallRuntime(Runtime::kThrowApplyNonFunction); -+ } +} + +// static @@ -4120,7 +4385,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // -- esp[16] : receiver + // ----------------------------------- + -+ // 1. Load target into edi (if present), argumentsList into eax (if present), ++ // 1. Load target into edi (if present), argumentsList into ebx (if present), + // remove all arguments from the stack (including the receiver), and push + // thisArgument (if present) instead. + { @@ -4141,35 +4406,22 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); + __ Push(edx); + __ PushReturnAddressFrom(ecx); -+ __ Move(eax, ebx); + } + + // ----------- S t a t e ------------- -+ // -- eax : argumentsList ++ // -- ebx : argumentsList + // -- edi : target + // -- esp[0] : return address + // -- esp[4] : thisArgument + // ----------------------------------- + -+ // 2. Make sure the target is actually callable. -+ Label target_not_callable; -+ __ JumpIfSmi(edi, &target_not_callable, Label::kNear); -+ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsCallable)); -+ __ j(zero, &target_not_callable, Label::kNear); ++ // 2. We don't need to check explicitly for callable target here, ++ // since that's the first thing the Call/CallWithArrayLike builtins ++ // will do. + -+ // 3a. Apply the target to the given argumentsList (passing undefined for -+ // new.target). -+ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); -+ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); -+ -+ // 3b. The target is not callable, throw an appropriate TypeError. -+ __ bind(&target_not_callable); -+ { -+ __ mov(Operand(esp, kPointerSize), edi); -+ __ TailCallRuntime(Runtime::kThrowApplyNonFunction); -+ } ++ // 3. Apply the target to the given argumentsList. ++ __ Jump(masm->isolate()->builtins()->CallWithArrayLike(), ++ RelocInfo::CODE_TARGET); +} + +void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { @@ -4182,7 +4434,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // -- esp[16] : receiver + // ----------------------------------- + -+ // 1. Load target into edi (if present), argumentsList into eax (if present), ++ // 1. Load target into edi (if present), argumentsList into ebx (if present), + // new.target into edx (if present, otherwise use target), remove all + // arguments from the stack (including the receiver), and push thisArgument + // (if present) instead. @@ -4205,49 +4457,27 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); + __ PushRoot(Heap::kUndefinedValueRootIndex); + __ PushReturnAddressFrom(ecx); -+ __ Move(eax, ebx); + } + + // ----------- S t a t e ------------- -+ // -- eax : argumentsList ++ // -- ebx : argumentsList + // -- edx : new.target + // -- edi : target + // -- esp[0] : return address + // -- esp[4] : receiver (undefined) + // ----------------------------------- + -+ // 2. Make sure the target is actually a constructor. -+ Label target_not_constructor; -+ __ JumpIfSmi(edi, &target_not_constructor, Label::kNear); -+ __ mov(ecx, FieldOperand(edi, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsConstructor)); -+ __ j(zero, &target_not_constructor, Label::kNear); ++ // 2. We don't need to check explicitly for constructor target here, ++ // since that's the first thing the Construct/ConstructWithArrayLike ++ // builtins will do. + -+ // 3. Make sure the target is actually a constructor. -+ Label new_target_not_constructor; -+ __ JumpIfSmi(edx, &new_target_not_constructor, Label::kNear); -+ __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsConstructor)); -+ __ j(zero, &new_target_not_constructor, Label::kNear); -+ -+ // 4a. Construct the target with the given new.target and argumentsList. -+ __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); -+ -+ // 4b. The target is not a constructor, throw an appropriate TypeError. -+ __ bind(&target_not_constructor); -+ { -+ __ mov(Operand(esp, kPointerSize), edi); -+ __ TailCallRuntime(Runtime::kThrowNotConstructor); -+ } ++ // 3. We don't need to check explicitly for constructor new.target here, ++ // since that's the second thing the Construct/ConstructWithArrayLike ++ // builtins will do. + -+ // 4c. The new.target is not a constructor, throw an appropriate TypeError. -+ __ bind(&new_target_not_constructor); -+ { -+ __ mov(Operand(esp, kPointerSize), edx); -+ __ TailCallRuntime(Runtime::kThrowNotConstructor); -+ } ++ // 4. Construct the target with the given new.target and argumentsList. ++ __ Jump(masm->isolate()->builtins()->ConstructWithArrayLike(), ++ RelocInfo::CODE_TARGET); +} + +void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { @@ -4604,7 +4834,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ mov(ebp, esp); + + // Store the arguments adaptor context sentinel. -+ __ push(Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ __ push(Immediate(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); + + // Push the function on the stack. + __ push(edi); @@ -4632,97 +4862,26 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +} + +// static -+void Builtins::Generate_Apply(MacroAssembler* masm) { ++void Builtins::Generate_CallOrConstructVarargs(MacroAssembler* masm, ++ Handle code) { + // ----------- S t a t e ------------- -+ // -- eax : argumentsList + // -- edi : target ++ // -- eax : number of parameters on the stack (not including the receiver) ++ // -- ebx : arguments list (a FixedArray) ++ // -- ecx : len (number of elements to from args) + // -- edx : new.target (checked to be constructor or undefined) + // -- esp[0] : return address. -+ // -- esp[4] : thisArgument + // ----------------------------------- ++ __ AssertFixedArray(ebx); + -+ // Create the list of arguments from the array-like argumentsList. -+ { -+ Label create_arguments, create_array, create_holey_array, create_runtime, -+ done_create; -+ __ JumpIfSmi(eax, &create_runtime); -+ -+ // Load the map of argumentsList into ecx. -+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); -+ -+ // Load native context into ebx. -+ __ mov(ebx, NativeContextOperand()); -+ -+ // Check if argumentsList is an (unmodified) arguments object. -+ __ cmp(ecx, ContextOperand(ebx, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); -+ __ j(equal, &create_arguments); -+ __ cmp(ecx, ContextOperand(ebx, Context::STRICT_ARGUMENTS_MAP_INDEX)); -+ __ j(equal, &create_arguments); -+ -+ // Check if argumentsList is a fast JSArray. -+ __ CmpInstanceType(ecx, JS_ARRAY_TYPE); -+ __ j(equal, &create_array); -+ -+ // Ask the runtime to create the list (actually a FixedArray). -+ __ bind(&create_runtime); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(edi); -+ __ Push(edx); -+ __ Push(eax); -+ __ CallRuntime(Runtime::kCreateListFromArrayLike); -+ __ Pop(edx); -+ __ Pop(edi); -+ __ mov(ebx, FieldOperand(eax, FixedArray::kLengthOffset)); -+ __ SmiUntag(ebx); -+ } -+ __ jmp(&done_create); -+ -+ // Try to create the list from an arguments object. -+ __ bind(&create_arguments); -+ __ mov(ebx, FieldOperand(eax, JSArgumentsObject::kLengthOffset)); -+ __ mov(ecx, FieldOperand(eax, JSObject::kElementsOffset)); -+ __ cmp(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); -+ __ j(not_equal, &create_runtime); -+ __ SmiUntag(ebx); -+ __ mov(eax, ecx); -+ __ jmp(&done_create); -+ -+ // For holey JSArrays we need to check that the array prototype chain -+ // protector is intact and our prototype is the Array.prototype actually. -+ __ bind(&create_holey_array); -+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ mov(ecx, FieldOperand(ecx, Map::kPrototypeOffset)); -+ __ cmp(ecx, ContextOperand(ebx, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); -+ __ j(not_equal, &create_runtime); -+ __ LoadRoot(ecx, Heap::kArrayProtectorRootIndex); -+ __ cmp(FieldOperand(ecx, PropertyCell::kValueOffset), -+ Immediate(Smi::FromInt(Isolate::kProtectorValid))); -+ __ j(not_equal, &create_runtime); -+ __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); -+ __ SmiUntag(ebx); -+ __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); -+ __ jmp(&done_create); -+ -+ // Try to create the list from a JSArray object. -+ __ bind(&create_array); -+ __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); -+ __ DecodeField(ecx); -+ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); -+ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); -+ STATIC_ASSERT(PACKED_ELEMENTS == 2); -+ STATIC_ASSERT(HOLEY_ELEMENTS == 3); -+ __ cmp(ecx, Immediate(HOLEY_SMI_ELEMENTS)); -+ __ j(equal, &create_holey_array, Label::kNear); -+ __ cmp(ecx, Immediate(HOLEY_ELEMENTS)); -+ __ j(equal, &create_holey_array, Label::kNear); -+ __ j(above, &create_runtime); -+ __ mov(ebx, FieldOperand(eax, JSArray::kLengthOffset)); -+ __ SmiUntag(ebx); -+ __ mov(eax, FieldOperand(eax, JSArray::kElementsOffset)); -+ -+ __ bind(&done_create); -+ } ++ // Save edx/edi/eax to stX0/stX1/stX2. ++ __ push(edx); ++ __ push(edi); ++ __ push(eax); ++ __ fld_s(MemOperand(esp, 0)); ++ __ fld_s(MemOperand(esp, 4)); ++ __ fld_s(MemOperand(esp, 8)); ++ __ lea(esp, Operand(esp, 3 * kFloatSize)); + + // Check for stack overflow. + { @@ -4731,109 +4890,97 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + Label done; + ExternalReference real_stack_limit = + ExternalReference::address_of_real_stack_limit(masm->isolate()); -+ __ mov(ecx, Operand::StaticVariable(real_stack_limit)); -+ // Make ecx the space we have left. The stack might already be overflowed -+ // here which will cause ecx to become negative. -+ __ neg(ecx); -+ __ add(ecx, esp); -+ __ sar(ecx, kPointerSizeLog2); ++ __ mov(edx, Operand::StaticVariable(real_stack_limit)); ++ // Make edx the space we have left. The stack might already be overflowed ++ // here which will cause edx to become negative. ++ __ neg(edx); ++ __ add(edx, esp); ++ __ sar(edx, kPointerSizeLog2); + // Check if the arguments will overflow the stack. -+ __ cmp(ecx, ebx); ++ __ cmp(edx, ecx); + __ j(greater, &done, Label::kNear); // Signed comparison. + __ TailCallRuntime(Runtime::kThrowStackOverflow); + __ bind(&done); + } + -+ // ----------- S t a t e ------------- -+ // -- edi : target -+ // -- eax : args (a FixedArray built from argumentsList) -+ // -- ebx : len (number of elements to push from args) -+ // -- edx : new.target (checked to be constructor or undefined) -+ // -- esp[0] : return address. -+ // -- esp[4] : thisArgument -+ // ----------------------------------- -+ -+ // Push arguments onto the stack (thisArgument is already on the stack). ++ // Push additional arguments onto the stack. + { -+ // Save edx/edi to stX0/stX1. -+ __ push(edx); -+ __ push(edi); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 4)); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ + __ PopReturnAddressTo(edx); -+ __ Move(ecx, Immediate(0)); ++ __ Move(eax, Immediate(0)); + Label done, push, loop; + __ bind(&loop); -+ __ cmp(ecx, ebx); ++ __ cmp(eax, ecx); + __ j(equal, &done, Label::kNear); + // Turn the hole into undefined as we go. + __ mov(edi, -+ FieldOperand(eax, ecx, times_pointer_size, FixedArray::kHeaderSize)); ++ FieldOperand(ebx, eax, times_pointer_size, FixedArray::kHeaderSize)); + __ CompareRoot(edi, Heap::kTheHoleValueRootIndex); + __ j(not_equal, &push, Label::kNear); + __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); + __ bind(&push); + __ Push(edi); -+ __ inc(ecx); ++ __ inc(eax); + __ jmp(&loop); + __ bind(&done); + __ PushReturnAddressFrom(edx); ++ } + -+ // Restore edx/edi from stX0/stX1. -+ __ lea(esp, Operand(esp, -2 * kFloatSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fstp_s(MemOperand(esp, 4)); -+ __ pop(edx); -+ __ pop(edi); ++ // Restore edx/edi/eax from stX0/stX1/stX2. ++ __ lea(esp, Operand(esp, -3 * kFloatSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ fstp_s(MemOperand(esp, 4)); ++ __ fstp_s(MemOperand(esp, 8)); ++ __ pop(edx); ++ __ pop(edi); ++ __ pop(eax); + -+ __ Move(eax, ebx); -+ } ++ // Compute the actual parameter count. ++ __ add(eax, ecx); + -+ // Dispatch to Call or Construct depending on whether new.target is undefined. -+ { -+ __ CompareRoot(edx, Heap::kUndefinedValueRootIndex); -+ __ j(equal, masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); -+ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); -+ } ++ // Tail-call to the actual Call or Construct builtin. ++ __ Jump(code, RelocInfo::CODE_TARGET); +} + +// static -+void Builtins::Generate_CallForwardVarargs(MacroAssembler* masm, -+ Handle code) { ++void Builtins::Generate_CallOrConstructForwardVarargs(MacroAssembler* masm, ++ Handle code) { + // ----------- S t a t e ------------- -+ // -- edi : the target to call (can be any Object) -+ // -- ecx : start index (to support rest parameters) -+ // -- esp[0] : return address. -+ // -- esp[4] : thisArgument ++ // -- eax : the number of arguments (not including the receiver) ++ // -- edi : the target to call (can be any Object) ++ // -- edx : the new target (for [[Construct]] calls) ++ // -- ecx : start index (to support rest parameters) + // ----------------------------------- + ++ // Preserve new.target (in case of [[Construct]]). ++ __ push(edx); ++ __ fld_s(MemOperand(esp, 0)); ++ __ lea(esp, Operand(esp, kFloatSize)); ++ + // Check if we have an arguments adaptor frame below the function frame. + Label arguments_adaptor, arguments_done; + __ mov(ebx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); + __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); ++ Immediate(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); + __ j(equal, &arguments_adaptor, Label::kNear); + { -+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(eax, -+ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); ++ __ mov(edx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); ++ __ mov(edx, FieldOperand(edx, JSFunction::kSharedFunctionInfoOffset)); ++ __ mov(edx, ++ FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); + __ mov(ebx, ebp); + } + __ jmp(&arguments_done, Label::kNear); + __ bind(&arguments_adaptor); + { + // Just load the length from the ArgumentsAdaptorFrame. -+ __ mov(eax, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ SmiUntag(eax); ++ __ mov(edx, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); ++ __ SmiUntag(edx); + } + __ bind(&arguments_done); + -+ Label stack_empty, stack_done; -+ __ sub(eax, ecx); -+ __ j(less_equal, &stack_empty); ++ Label stack_done; ++ __ sub(edx, ecx); ++ __ j(less_equal, &stack_done); + { + // Check for stack overflow. + { @@ -4848,7 +4995,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ add(ecx, esp); + __ sar(ecx, kPointerSizeLog2); + // Check if the arguments will overflow the stack. -+ __ cmp(ecx, eax); ++ __ cmp(ecx, edx); + __ j(greater, &done, Label::kNear); // Signed comparison. + __ TailCallRuntime(Runtime::kThrowStackOverflow); + __ bind(&done); @@ -4857,25 +5004,25 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + // Forward the arguments from the caller frame. + { + Label loop; -+ __ mov(ecx, eax); -+ __ pop(edx); ++ __ add(eax, edx); ++ __ PopReturnAddressTo(ecx); + __ bind(&loop); + { -+ __ Push(Operand(ebx, ecx, times_pointer_size, 1 * kPointerSize)); -+ __ dec(ecx); ++ __ Push(Operand(ebx, edx, times_pointer_size, 1 * kPointerSize)); ++ __ dec(edx); + __ j(not_zero, &loop); + } -+ __ push(edx); ++ __ PushReturnAddressFrom(ecx); + } + } -+ __ jmp(&stack_done, Label::kNear); -+ __ bind(&stack_empty); -+ { -+ // We just pass the receiver, which is already on the stack. -+ __ Move(eax, Immediate(0)); -+ } + __ bind(&stack_done); + ++ // Restore new.target (in case of [[Construct]]). ++ __ lea(esp, Operand(esp, -kFloatSize)); ++ __ fstp_s(MemOperand(esp, 0)); ++ __ pop(edx); ++ ++ // Tail-call to the {code} handler. + __ Jump(code, RelocInfo::CODE_TARGET); +} + @@ -5111,12 +5258,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + __ j(equal, masm->isolate()->builtins()->CallBoundFunction(), + RelocInfo::CODE_TARGET); + -+ // Check if target has a [[Call]] internal method. ++ // Check if target is a proxy and call CallProxy external builtin + __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), + Immediate(1 << Map::kIsCallable)); + __ j(zero, &non_callable); + -+ // Check if target is a proxy and call CallProxy external builtin ++ // Call CallProxy external builtin + __ CmpInstanceType(ecx, JS_PROXY_TYPE); + __ j(not_equal, &non_function); + @@ -5145,199 +5292,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + } +} + -+static void CheckSpreadAndPushToStack(MacroAssembler* masm) { -+ // Free up some registers. -+ // Save edx/edi to stX0/stX1. -+ __ push(edx); -+ __ push(edi); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 4)); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ -+ Register argc = eax; -+ -+ Register scratch = ecx; -+ Register scratch2 = edi; -+ -+ Register spread = ebx; -+ Register spread_map = edx; -+ -+ Register spread_len = edx; -+ -+ Label runtime_call, push_args; -+ __ mov(spread, Operand(esp, kPointerSize)); -+ __ JumpIfSmi(spread, &runtime_call); -+ __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); -+ -+ // Check that the spread is an array. -+ __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); -+ __ j(not_equal, &runtime_call); -+ -+ // Check that we have the original ArrayPrototype. -+ __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); -+ __ mov(scratch2, NativeContextOperand()); -+ __ cmp(scratch, -+ ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); -+ __ j(not_equal, &runtime_call); -+ -+ // Check that the ArrayPrototype hasn't been modified in a way that would -+ // affect iteration. -+ __ LoadRoot(scratch, Heap::kArrayIteratorProtectorRootIndex); -+ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), -+ Immediate(Smi::FromInt(Isolate::kProtectorValid))); -+ __ j(not_equal, &runtime_call); -+ -+ // Check that the map of the initial array iterator hasn't changed. -+ __ mov(scratch2, NativeContextOperand()); -+ __ mov(scratch, -+ ContextOperand(scratch2, -+ Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX)); -+ __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); -+ __ cmp(scratch, -+ ContextOperand(scratch2, -+ Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX)); -+ __ j(not_equal, &runtime_call); -+ -+ // For FastPacked kinds, iteration will have the same effect as simply -+ // accessing each property in order. -+ Label no_protector_check; -+ __ mov(scratch, FieldOperand(spread_map, Map::kBitField2Offset)); -+ __ DecodeField(scratch); -+ __ cmp(scratch, Immediate(HOLEY_ELEMENTS)); -+ __ j(above, &runtime_call); -+ // For non-FastHoley kinds, we can skip the protector check. -+ __ cmp(scratch, Immediate(PACKED_SMI_ELEMENTS)); -+ __ j(equal, &no_protector_check); -+ __ cmp(scratch, Immediate(PACKED_ELEMENTS)); -+ __ j(equal, &no_protector_check); -+ // Check the ArrayProtector cell. -+ __ LoadRoot(scratch, Heap::kArrayProtectorRootIndex); -+ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), -+ Immediate(Smi::FromInt(Isolate::kProtectorValid))); -+ __ j(not_equal, &runtime_call); -+ -+ __ bind(&no_protector_check); -+ // Load the FixedArray backing store, but use the length from the array. -+ __ mov(spread_len, FieldOperand(spread, JSArray::kLengthOffset)); -+ __ SmiUntag(spread_len); -+ __ mov(spread, FieldOperand(spread, JSArray::kElementsOffset)); -+ __ jmp(&push_args); -+ -+ __ bind(&runtime_call); -+ { -+ // Call the builtin for the result of the spread. -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // Need to save these on the stack. -+ // Restore edx/edi from stX0/stX1. -+ __ lea(esp, Operand(esp, -2 * kFloatSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fstp_s(MemOperand(esp, 4)); -+ __ pop(edx); -+ __ pop(edi); -+ -+ __ Push(edi); -+ __ Push(edx); -+ __ SmiTag(argc); -+ __ Push(argc); -+ __ Push(spread); -+ __ CallRuntime(Runtime::kSpreadIterableFixed); -+ __ mov(spread, eax); -+ __ Pop(argc); -+ __ SmiUntag(argc); -+ __ Pop(edx); -+ __ Pop(edi); -+ // Free up some registers. -+ // Save edx/edi to stX0/stX1. -+ __ push(edx); -+ __ push(edi); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 4)); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ } -+ -+ { -+ // Calculate the new nargs including the result of the spread. -+ __ mov(spread_len, FieldOperand(spread, FixedArray::kLengthOffset)); -+ __ SmiUntag(spread_len); -+ -+ __ bind(&push_args); -+ // argc += spread_len - 1. Subtract 1 for the spread itself. -+ __ lea(argc, Operand(argc, spread_len, times_1, -1)); -+ } -+ -+ // Check for stack overflow. -+ { -+ // Check the stack for overflow. We are not trying to catch interruptions -+ // (i.e. debug break and preemption) here, so check the "real stack limit". -+ Label done; -+ __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); -+ // Make scratch the space we have left. The stack might already be -+ // overflowed here which will cause scratch to become negative. -+ __ neg(scratch); -+ __ add(scratch, esp); -+ __ sar(scratch, kPointerSizeLog2); -+ // Check if the arguments will overflow the stack. -+ __ cmp(scratch, spread_len); -+ __ j(greater, &done, Label::kNear); // Signed comparison. -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ __ bind(&done); -+ } -+ -+ // Put the evaluated spread onto the stack as additional arguments. -+ { -+ Register return_address = edi; -+ // Pop the return address and spread argument. -+ __ PopReturnAddressTo(return_address); -+ __ Pop(scratch); -+ -+ Register scratch2 = esi; -+ // Save esi to stX0, edx/edi in stX1/stX2 now. -+ __ push(esi); -+ __ fld_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, 1 * kFloatSize)); -+ -+ __ mov(scratch, Immediate(0)); -+ Label done, push, loop; -+ __ bind(&loop); -+ __ cmp(scratch, spread_len); -+ __ j(equal, &done, Label::kNear); -+ __ mov(scratch2, FieldOperand(spread, scratch, times_pointer_size, -+ FixedArray::kHeaderSize)); -+ __ JumpIfNotRoot(scratch2, Heap::kTheHoleValueRootIndex, &push); -+ __ LoadRoot(scratch2, Heap::kUndefinedValueRootIndex); -+ __ bind(&push); -+ __ Push(scratch2); -+ __ inc(scratch); -+ __ jmp(&loop); -+ __ bind(&done); -+ __ PushReturnAddressFrom(return_address); -+ -+ // Now Restore esi from stX0, edx/edi from stX1/stX2. -+ __ lea(esp, Operand(esp, -3 * kFloatSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fstp_s(MemOperand(esp, 4)); -+ __ fstp_s(MemOperand(esp, 8)); -+ __ pop(esi); -+ __ pop(edx); -+ __ pop(edi); -+ } -+} -+ -+// static -+void Builtins::Generate_CallWithSpread(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the target to call (can be any Object) -+ // ----------------------------------- -+ -+ // CheckSpreadAndPushToStack will push edx to save it. -+ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); -+ CheckSpreadAndPushToStack(masm); -+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, -+ TailCallMode::kDisallow), -+ RelocInfo::CODE_TARGET); -+} -+ +// static +void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { + // ----------- S t a t e ------------- @@ -5461,19 +5415,6 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +} + +// static -+void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the new target (either the same as the constructor or -+ // the JSFunction on which new was invoked initially) -+ // -- edi : the constructor to call (can be any Object) -+ // ----------------------------------- -+ -+ CheckSpreadAndPushToStack(masm); -+ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); -+} -+ -+// static +void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { + // ----------- S t a t e ------------- + // -- edx : requested object size (untagged) @@ -5684,6 +5625,35 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin + Generate_OnStackReplacementHelper(masm, true); +} + ++void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { ++ { ++ FrameScope scope(masm, StackFrame::INTERNAL); ++ ++ // Save all parameter registers (see wasm-linkage.cc). They might be ++ // overwritten in the runtime call below. We don't have any callee-saved ++ // registers in wasm, so no need to store anything else. ++ constexpr Register gp_regs[]{eax, ebx, ecx, edx, esi}; ++ ++ for (auto reg : gp_regs) { ++ __ Push(reg); ++ } ++ ++ // Initialize esi register with kZero, CEntryStub will use it to set the ++ // current context on the isolate. ++ __ Move(esi, Smi::kZero); ++ __ CallRuntime(Runtime::kWasmCompileLazy); ++ // Store returned instruction start in edi. ++ __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); ++ ++ // Restore registers. ++ for (int i = arraysize(gp_regs) - 1; i >= 0; --i) { ++ __ Pop(gp_regs[i]); ++ } ++ } ++ // Now jump to the instructions of the returned code object. ++ __ jmp(edi); ++} ++ +#undef __ +} // namespace internal +} // namespace v8 From 3e25b57a41fd2e6979413a020cf4f53d92762f92 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 29 Dec 2017 02:02:01 +0100 Subject: [PATCH 247/437] no-sse2 patch: More V8 syncing from ia32 to x87 Sync interface-descriptors-x87.cc from interface-descriptors-ia32.cc, add missing MacroAssembler::AssertFixedArray. --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 104 ++++++++++++++++-- 1 file changed, 97 insertions(+), 7 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index 3198c85..f0995ce 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -25691,8 +25691,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/fra +#endif // V8_X87_FRAMES_X87_H_ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-28 03:38:40.380712871 +0100 -@@ -0,0 +1,375 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-29 01:59:03.000000000 +0100 +@@ -0,0 +1,450 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -25851,11 +25851,79 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int + data->InitializePlatformSpecific(arraysize(registers), registers); +} + ++void CallVarargsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments (on the stack, not including receiver) ++ // edi : the target to call ++ // ebx : arguments list (FixedArray) ++ // ecx : arguments list length (untagged) ++ Register registers[] = {edi, eax, ebx, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ +void CallForwardVarargsDescriptor::InitializePlatformSpecific( + CallInterfaceDescriptorData* data) { ++ // eax : number of arguments + // ecx : start index (to support rest parameters) + // edi : the target to call -+ Register registers[] = {edi, ecx}; ++ Register registers[] = {edi, eax, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CallWithSpreadDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments (on the stack, not including receiver) ++ // edi : the target to call ++ // ebx : the object to spread ++ Register registers[] = {edi, eax, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void CallWithArrayLikeDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // edi : the target to call ++ // ebx : the arguments list ++ Register registers[] = {edi, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ConstructVarargsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments (on the stack, not including receiver) ++ // edi : the target to call ++ // edx : the new target ++ // ebx : arguments list (FixedArray) ++ // ecx : arguments list length (untagged) ++ Register registers[] = {edi, edx, eax, ebx, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ConstructForwardVarargsDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments ++ // edx : the new target ++ // ecx : start index (to support rest parameters) ++ // edi : the target to call ++ Register registers[] = {edi, edx, eax, ecx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ConstructWithSpreadDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // eax : number of arguments (on the stack, not including receiver) ++ // edi : the target to call ++ // edx : the new target ++ // ebx : the object to spread ++ Register registers[] = {edi, edx, eax, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers); ++} ++ ++void ConstructWithArrayLikeDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // edi : the target to call ++ // edx : the new target ++ // ebx : the arguments list ++ Register registers[] = {edi, edx, ebx}; + data->InitializePlatformSpecific(arraysize(registers), registers); +} + @@ -25893,6 +25961,13 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int + data->InitializePlatformSpecific(0, nullptr, nullptr); +} + ++void ArrayConstructorDescriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ // kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite ++ Register registers[] = {edi, edx, eax, ebx}; ++ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); ++} ++ +void ArrayNoArgumentConstructorDescriptor::InitializePlatformSpecific( + CallInterfaceDescriptorData* data) { + // register state @@ -26070,8 +26145,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-28 05:21:52.412245739 +0100 -@@ -0,0 +1,2572 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-29 02:00:17.837154172 +0100 +@@ -0,0 +1,2584 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -26863,6 +26938,18 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} + + ++void MacroAssembler::AssertFixedArray(Register object) { ++ if (emit_debug_code()) { ++ test(object, Immediate(kSmiTagMask)); ++ Check(not_equal, kOperandIsASmiAndNotAFixedArray); ++ Push(object); ++ CmpObjectType(object, FIXED_ARRAY_TYPE, object); ++ Pop(object); ++ Check(equal, kOperandIsNotAFixedArray); ++ } ++} ++ ++ +void MacroAssembler::AssertFunction(Register object) { + if (emit_debug_code()) { + test(object, Immediate(kSmiTagMask)); @@ -28646,8 +28733,8 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +#endif // V8_TARGET_ARCH_X87 diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-28 03:27:27.352808166 +0100 -@@ -0,0 +1,920 @@ ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-29 01:59:56.457468424 +0100 +@@ -0,0 +1,923 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -29258,6 +29345,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac + // Abort execution if argument is a smi, enabled via --debug-code. + void AssertNotSmi(Register object); + ++ // Abort execution if argument is not a FixedArray, enabled via --debug-code. ++ void AssertFixedArray(Register object); ++ + // Abort execution if argument is not a JSFunction, enabled via --debug-code. + void AssertFunction(Register object); + From 5732b3c9b51eb61d73c7de2c759f2bbf647e9a36 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 29 Dec 2017 20:15:53 +0100 Subject: [PATCH 248/437] no-sse2 patch: Fix WebRTC aec3 module FTBFS The aec3 module attempts to do SSE2 runtime detection in a way that does not compile with GCC, so disable it. (SSE2 use in that module is now compile-time only, i.e., only enabled for the x86_64 package in Fedora.) The patch also optimizes x86_64 by making the SSE2 detection return a compile-time constant, which upstream neglected doing. --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 364 ++++++++++++++++++ 1 file changed, 364 insertions(+) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index f0995ce..796fe8b 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -2280,6 +2280,370 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we #else return std::unique_ptr(new RealFourierOoura(fft_order)); #endif +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2017-12-29 20:06:31.389287437 +0100 +@@ -14,7 +14,7 @@ + #include + #endif + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -59,7 +59,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Computes and stores the frequency response of the filter. + void UpdateFrequencyResponse_SSE2( + rtc::ArrayView H, +@@ -111,7 +111,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Computes and stores the echo return loss estimate of the filter, which is the + // sum of the partition frequency responses. + void UpdateErlEstimator_SSE2( +@@ -204,7 +204,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Adapts the filter partitions. (SSE2 variant) + void AdaptPartitions_SSE2(const RenderBuffer& render_buffer, + const FftData& G, +@@ -345,7 +345,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Produces the filter output (SSE2 variant). + void ApplyFilter_SSE2(const RenderBuffer& render_buffer, + rtc::ArrayView H, +@@ -445,7 +445,7 @@ + FftData* S) const { + RTC_DCHECK(S); + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: + aec3::ApplyFilter_SSE2(render_buffer, H_, S); + break; +@@ -464,7 +464,7 @@ + const FftData& G) { + // Adapt the filter. + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: + aec3::AdaptPartitions_SSE2(render_buffer, G, H_); + break; +@@ -483,7 +483,7 @@ + + // Update the frequency response and echo return loss for the filter. + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: + aec3::UpdateFrequencyResponse_SSE2(H_, &H2_); + aec3::UpdateErlEstimator_SSE2(H2_, &erl_); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2017-12-29 20:07:57.631963762 +0100 +@@ -34,7 +34,7 @@ + rtc::ArrayView H, + std::vector>* H2); + #endif +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + void UpdateFrequencyResponse_SSE2( + rtc::ArrayView H, + std::vector>* H2); +@@ -50,7 +50,7 @@ + const std::vector>& H2, + std::array* erl); + #endif +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + void UpdateErlEstimator_SSE2( + const std::vector>& H2, + std::array* erl); +@@ -65,7 +65,7 @@ + const FftData& G, + rtc::ArrayView H); + #endif +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + void AdaptPartitions_SSE2(const RenderBuffer& render_buffer, + const FftData& G, + rtc::ArrayView H); +@@ -80,7 +80,7 @@ + rtc::ArrayView H, + FftData* S); + #endif +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + void ApplyFilter_SSE2(const RenderBuffer& render_buffer, + rtc::ArrayView H, + FftData* S); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2017-12-29 20:07:08.465718378 +0100 +@@ -15,7 +15,7 @@ + #include + #include + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include "webrtc/modules/audio_processing/aec3/aec3_fft.h" +@@ -147,7 +147,7 @@ + + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Verifies that the optimized methods for filter adaptation are bitexact to + // their reference counterparts. + TEST(AdaptiveFirFilter, FilterAdaptationSse2Optimizations) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2017-12-29 20:08:45.048236004 +0100 +@@ -16,10 +16,8 @@ + namespace webrtc { + + Aec3Optimization DetectOptimization() { +-#if defined(WEBRTC_ARCH_X86_FAMILY) +- if (WebRtc_GetCPUInfo(kSSE2) != 0) { +- return Aec3Optimization::kSse2; +- } ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) ++ return Aec3Optimization::kSse2; + #endif + + #if defined(WEBRTC_HAS_NEON) +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2017-12-29 20:07:45.343152374 +0100 +@@ -11,7 +11,7 @@ + #include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h" + + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -38,7 +38,7 @@ + + namespace aec3 { + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + + void EstimateComfortNoise_SSE2(const std::array& N2, + uint32_t* seed, +@@ -204,7 +204,7 @@ + N2_initial_ ? *N2_initial_ : N2_; + + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: + aec3::EstimateComfortNoise_SSE2(N2, &seed_, lower_band_noise, + upper_band_noise); +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2017-12-29 20:06:55.919910934 +0100 +@@ -21,7 +21,7 @@ + + namespace webrtc { + namespace aec3 { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + + void EstimateComfortNoise_SSE2(const std::array& N2, + uint32_t* seed, +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2017-12-29 20:06:11.867587061 +0100 +@@ -50,7 +50,7 @@ + + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Verifies that the optimized methods are bitexact to their reference + // counterparts. + TEST(ComfortNoiseGenerator, TestOptimizations) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2017-12-29 20:06:23.495408594 +0100 +@@ -12,7 +12,7 @@ + #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ + + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -43,7 +43,7 @@ + std::array* power_spectrum) const { + RTC_DCHECK(power_spectrum); + switch (optimization) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: { + constexpr int kNumFourBinBands = kFftLengthBy2 / 4; + constexpr int kLimit = kNumFourBinBands * 4; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2017-12-29 20:06:45.873065136 +0100 +@@ -16,7 +16,7 @@ + + namespace webrtc { + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Verifies that the optimized methods are bitexact to their reference + // counterparts. + TEST(FftData, TestOptimizations) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2017-12-29 20:05:54.793849113 +0100 +@@ -13,7 +13,7 @@ + #include + #endif + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -133,7 +133,7 @@ + + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + + void MatchedFilterCore_SSE2(size_t x_start_index, + float x2_sum_threshold, +@@ -331,7 +331,7 @@ + render_buffer.buffer.size(); + + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: + aec3::MatchedFilterCore_SSE2(x_start_index, x2_sum_threshold, + render_buffer.buffer, y, filters_[n], +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2017-12-29 20:08:03.879867867 +0100 +@@ -36,7 +36,7 @@ + + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + + // Filter core for the matched filter that is optimized for SSE2. + void MatchedFilterCore_SSE2(size_t x_start_index, +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2017-12-29 20:07:38.935250724 +0100 +@@ -11,7 +11,7 @@ + #include "webrtc/modules/audio_processing/aec3/matched_filter.h" + + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -80,7 +80,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + // Verifies that the optimized methods for SSE2 are bitexact to their reference + // counterparts. + TEST(MatchedFilter, TestSse2Optimizations) { +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2017-12-29 20:07:51.472058305 +0100 +@@ -11,7 +11,7 @@ + #include "webrtc/modules/audio_processing/aec3/suppression_gain.h" + + #include "webrtc/typedefs.h" +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2017-12-29 20:07:15.035617541 +0100 +@@ -15,7 +15,7 @@ + #if defined(WEBRTC_HAS_NEON) + #include + #endif +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + #include + #endif + #include +@@ -39,7 +39,7 @@ + // Elementwise square root. + void Sqrt(rtc::ArrayView x) { + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: { + const int x_size = static_cast(x.size()); + const int vector_limit = x_size >> 2; +@@ -113,7 +113,7 @@ + RTC_DCHECK_EQ(z.size(), x.size()); + RTC_DCHECK_EQ(z.size(), y.size()); + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: { + const int x_size = static_cast(x.size()); + const int vector_limit = x_size >> 2; +@@ -159,7 +159,7 @@ + void Accumulate(rtc::ArrayView x, rtc::ArrayView z) { + RTC_DCHECK_EQ(z.size(), x.size()); + switch (optimization_) { +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + case Aec3Optimization::kSse2: { + const int x_size = static_cast(x.size()); + const int vector_limit = x_size >> 2; +diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2017-11-28 14:06:53.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2017-12-29 20:06:38.812173509 +0100 +@@ -77,7 +77,7 @@ + } + #endif + +-#if defined(WEBRTC_ARCH_X86_FAMILY) ++#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) + + TEST(VectorMath, Sqrt) { + if (WebRtc_GetCPUInfo(kSSE2) != 0) { diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn --- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 +++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-12-26 01:32:06.842303361 +0100 From 02167f0744c8c6b58d87ef06d94700516f642037 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 30 Dec 2017 00:43:58 +0100 Subject: [PATCH 249/437] no-sse2 patch: Update path for -Wl,-rpath-link The src/core/Release directory was renamed to src/core/release. --- ...engine-everywhere-src-5.10.0-no-sse2.patch | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch index 796fe8b..b1de924 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.0-no-sse2.patch @@ -1,164 +1,164 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro --- qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-12-25 12:48:31.714986364 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-12-30 00:42:17.069800971 +0100 @@ -1,5 +1,7 @@ QT += webengine -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ server.h diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro --- qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-12-25 12:48:31.752985827 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-12-30 00:42:00.003067640 +0100 @@ -2,6 +2,8 @@ QT += webengine -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + SOURCES += main.cpp RESOURCES += qml.qrc diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro --- qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-12-25 12:48:31.815984938 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-12-30 00:42:06.126971953 +0100 @@ -20,5 +20,7 @@ QT += widgets # QApplication is required to get native styling with QtQuickControls } -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser INSTALLS += target diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro --- qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-12-25 12:48:31.937983215 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-12-30 00:42:11.598886454 +0100 @@ -2,6 +2,8 @@ QT += quick qml quickcontrols2 webengine -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + cross_compile { posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED } diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-12-25 12:48:31.938983201 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-12-30 00:41:54.676150874 +0100 @@ -1,5 +1,7 @@ QT += webenginewidgets -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS = mainwindow.h SOURCES = main.cpp \ mainwindow.cpp diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-12-25 12:48:32.492975378 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-12-30 00:39:17.808601947 +0100 @@ -3,6 +3,8 @@ TEMPLATE = app CONFIG += c++11 -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + SOURCES += \ main.cpp\ mainwindow.cpp diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-12-25 12:49:15.954361683 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-12-30 00:39:29.007426964 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + SOURCES += html2pdf.cpp target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-12-25 12:49:16.125359268 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-12-30 00:39:43.928193826 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ mainwindow.h diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-12-25 12:49:16.187358393 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-12-30 00:41:37.256423059 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets webchannel CONFIG += c++11 -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ mainwindow.h \ previewpage.h \ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-12-25 12:49:16.247357545 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-12-30 00:39:11.992692822 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + SOURCES += main.cpp target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-12-25 12:49:16.314356599 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-12-30 00:39:37.644292012 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets CONFIG += c++11 -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ browser.h \ browserwindow.h \ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-12-25 12:49:16.314356599 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-12-30 00:41:43.565324482 +0100 @@ -9,6 +9,8 @@ error("Spellcheck example can not be built when using native OS dictionaries.") } -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ webview.h diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-12-25 12:50:32.558279999 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-12-30 00:41:49.055238701 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets CONFIG += c++11 -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ mainwindow.h \ stylesheetdialog.h diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro --- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-12-25 12:49:16.314356599 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-12-30 00:39:23.960505823 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release + HEADERS += \ mainwindow.h \ @@ -30280,12 +30280,12 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro qtwebengine icu.CONFIG += no_check_exist diff -Nur qtwebengine-everywhere-src-5.10.0/src/process/process.pro qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro --- qtwebengine-everywhere-src-5.10.0/src/process/process.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro 2017-12-25 13:05:24.093938639 +0100 ++++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro 2017-12-30 00:42:27.968630675 +0100 @@ -9,6 +9,8 @@ SOURCES = main.cpp -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/Release ++QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/release + win32 { SOURCES += \ From 02d539ac59d36597471627da71a39e9318df2a1c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 30 Dec 2017 08:52:19 -0600 Subject: [PATCH 250/437] rebuild (qt-5.10.0) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a6f6bcb..db75245 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,7 +52,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Sat Dec 30 2017 Rex Dieter - 5.10.0-2 +- rebuild (qt-5.10.0) + * Thu Dec 28 2017 Kevin Kofler - 5.10.0-1 - Update to 5.10.0 - Update version numbers of bundled stuff From ac1f296b5730bb1898c823e56e3fbcebb626f877 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 26 Jan 2018 22:22:14 -0500 Subject: [PATCH 251/437] rebuild for new libvpx --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index db75245..8f2e3c6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,7 +52,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Fri Jan 26 2018 Tom Callaway - 5.10.0-3 +- rebuild for new libvpx + * Sat Dec 30 2017 Rex Dieter - 5.10.0-2 - rebuild (qt-5.10.0) From 0d9361e566f3600db8f4fe33e0db9abf4553257c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 12:27:38 +0000 Subject: [PATCH 252/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8f2e3c6..b49e7b1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,7 +52,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 5.10.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Jan 26 2018 Tom Callaway - 5.10.0-3 - rebuild for new libvpx From 88482cbf984b58600bf5574fe73c56ef83cf941d Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 10 Feb 2018 18:16:18 +0100 Subject: [PATCH 253/437] Reenable system libvpx on F28+, Rawhide (future F28) has libvpx 1.7.0 now * Sat Feb 10 2018 Kevin Kofler - 5.10.0-5 - Reenable system libvpx on F28+, Rawhide (future F28) has libvpx 1.7.0 now --- qt5-qtwebengine.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b49e7b1..8c9055c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,10 +10,8 @@ %global docs 1 %endif -%if 0 -# need libvpx >= 1.6.2 -# (The needed commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e was added after -# 1.6.1, not released anywhere yet.) +%if 0%{?fedora} > 27 +# need libvpx >= 1.7.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 %endif # need libwebp >= 0.6.0 @@ -52,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.0 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -187,7 +185,7 @@ BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter BuildRequires: python %if 0%{?use_system_libvpx} -BuildRequires: pkgconfig(vpx) >= 1.6.2 +BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif # extra (non-upstream) functions needed, see @@ -572,6 +570,9 @@ done %changelog +* Sat Feb 10 2018 Kevin Kofler - 5.10.0-5 +- Reenable system libvpx on F28+, Rawhide (future F28) has libvpx 1.7.0 now + * Fri Feb 09 2018 Fedora Release Engineering - 5.10.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 3d5ab9af850d8cc08c7f262b7fd4df4a74590c39 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 16 Feb 2018 13:42:53 -0600 Subject: [PATCH 254/437] workaround FTBFS, build with -fabi-version=11 (#1545918) --- qt5-qtwebengine.spec | 8 +++++++- qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8c9055c..f318164 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.0 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -117,6 +117,8 @@ Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts # backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch +# workaround FTBFS +Patch101: qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -365,6 +367,7 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 %patch100 -p1 -b .no-aspirational-scripts +%patch101 -p1 -b .QTBUG-64759 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -570,6 +573,9 @@ done %changelog +* Fri Feb 16 2018 Rex Dieter - 5.10.0-6 +- workaround FTBFS, build with -fabi-version=11 (#1545918) + * Sat Feb 10 2018 Kevin Kofler - 5.10.0-5 - Reenable system libvpx on F28+, Rawhide (future F28) has libvpx 1.7.0 now diff --git a/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch b/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch new file mode 100644 index 0000000..7c5d32b --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch @@ -0,0 +1,13 @@ +diff -up qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py.QTBUG-64759 qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py +--- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py.QTBUG-64759 2018-02-16 12:52:27.991861536 -0600 ++++ qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2018-02-16 13:16:30.778130158 -0600 +@@ -331,6 +331,9 @@ def write_gn_ninja(path, root_gen_dir, o + cflags_cc = [] + ldflags = [] + ++ cflags.extend(['-fabi-version=11']) ++ cflags_cc.extend(['-fabi-version=11']) ++ + include_dirs = [root_gen_dir, SRC_ROOT] + libs = [] + From 8da52afa4dacf02cb15e2ca6159e418d38df88f9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 16 Feb 2018 13:44:17 -0600 Subject: [PATCH 255/437] apply new patch conditionally f28+ only --- qt5-qtwebengine.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f318164..1163051 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -367,7 +367,9 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 %patch100 -p1 -b .no-aspirational-scripts +%if 0%{?fedora} > 27 %patch101 -p1 -b .QTBUG-64759 +%endif # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc From 6af8bf77ca6d6ab6136f380c1bb596d06b49f512 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 18 Feb 2018 18:56:11 +0100 Subject: [PATCH 256/437] Renumber Patch101 to Patch23 This is a downstream patch, it should not have a number >= 100. Also make the comment more verbose. --- qt5-qtwebengine.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1163051..002c05d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -112,13 +112,14 @@ Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # https://codereview.qt-project.org/#/c/196922/ # see QTBUG-60886 and QTBUG-65090 Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch +# workaround FTBFS with GCC 8 (#1546255, gcc#84286, #1545918, QTBUG-64759) +# build GN with -fabi-version=11 for now +Patch23: qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts # backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch -# workaround FTBFS -Patch101: qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -366,10 +367,10 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 -%patch100 -p1 -b .no-aspirational-scripts %if 0%{?fedora} > 27 -%patch101 -p1 -b .QTBUG-64759 +%patch23 -p1 -b .QTBUG-64759 %endif +%patch100 -p1 -b .no-aspirational-scripts # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc From 89edf3d4d37a7fdc584c6123cc6684cee6e4aeb3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 18 Feb 2018 19:13:38 +0100 Subject: [PATCH 257/437] Update to 5.10.1 * Sun Feb 18 2018 Kevin Kofler - 5.10.1-1 - Update to 5.10.1 - Rediff (unfuzz) no-sse2 patch --- .gitignore | 1 + qt5-qtwebengine.spec | 18 +- ...engine-everywhere-src-5.10.1-no-sse2.patch | 918 +++++++++--------- sources | 2 +- 4 files changed, 472 insertions(+), 467 deletions(-) rename qtwebengine-everywhere-src-5.10.0-no-sse2.patch => qtwebengine-everywhere-src-5.10.1-no-sse2.patch (94%) diff --git a/.gitignore b/.gitignore index 35206c6..ef889b6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /qtwebengine-opensource-src-5.9.2-clean.tar.xz /qtwebengine-opensource-src-5.9.3-clean.tar.xz /qtwebengine-everywhere-src-5.10.0-clean.tar.xz +/qtwebengine-everywhere-src-5.10.1-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 002c05d..df8149a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -49,8 +49,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.10.0 -Release: 6%{?dist} +Version: 5.10.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -58,8 +58,8 @@ Release: 6%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.10/5.10.0/submodules/qtwebengine-everywhere-src-5.10.0.tar.xz -# ./clean_qtwebengine.sh 5.10.0 +# wget http://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qtwebengine-everywhere-src-5.10.1.tar.xz +# ./clean_qtwebengine.sh 5.10.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -95,7 +95,7 @@ Patch5: qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch # Gerrit review 570351 and V8 Gerrit review 575756, along with some custom fixes # and improvements # also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch6: qtwebengine-everywhere-src-5.10.0-no-sse2.patch +Patch6: qtwebengine-everywhere-src-5.10.1-no-sse2.patch # fix missing ARM -mfpu setting Patch9: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) @@ -208,9 +208,9 @@ BuildRequires: pkgconfig(vpx) >= 1.7.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 62.0.3202.94) are backported, see: +# Some security fixes (up to version 64.0.3282.140) are backported, see: # http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=61-based -# see dist/changes-5.10.0 for the version numbers (base, security fixes) and for +# see dist/changes-5.10.1 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports Provides: bundled(chromium) = 61.0.3163.140 @@ -576,6 +576,10 @@ done %changelog +* Sun Feb 18 2018 Kevin Kofler - 5.10.1-1 +- Update to 5.10.1 +- Rediff (unfuzz) no-sse2 patch + * Fri Feb 16 2018 Rex Dieter - 5.10.0-6 - workaround FTBFS, build with -fabi-version=11 (#1545918) diff --git a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch b/qtwebengine-everywhere-src-5.10.1-no-sse2.patch similarity index 94% rename from qtwebengine-everywhere-src-5.10.0-no-sse2.patch rename to qtwebengine-everywhere-src-5.10.1-no-sse2.patch index b1de924..084b795 100644 --- a/qtwebengine-everywhere-src-5.10.0-no-sse2.patch +++ b/qtwebengine-everywhere-src-5.10.1-no-sse2.patch @@ -1,6 +1,6 @@ -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/customdialogs.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2017-12-30 00:42:17.069800971 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/customdialogs/customdialogs.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webengine/customdialogs/customdialogs.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2018-02-18 19:00:43.343577798 +0100 @@ -1,5 +1,7 @@ QT += webengine @@ -9,9 +9,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/customdialogs/cus HEADERS += \ server.h -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/minimal/minimal.pro 2017-12-30 00:42:00.003067640 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/minimal/minimal.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/minimal/minimal.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webengine/minimal/minimal.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/minimal/minimal.pro 2018-02-18 19:00:44.647558618 +0100 @@ -2,6 +2,8 @@ QT += webengine @@ -21,9 +21,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/minimal/minimal.p SOURCES += main.cpp RESOURCES += qml.qrc -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2017-12-30 00:42:06.126971953 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2018-02-18 19:00:51.606456259 +0100 @@ -20,5 +20,7 @@ QT += widgets # QApplication is required to get native styling with QtQuickControls } @@ -32,9 +32,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/quicknanobrowser/ + target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser INSTALLS += target -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/recipebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2017-12-30 00:42:11.598886454 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webengine/recipebrowser/recipebrowser.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2018-02-18 19:00:52.096449052 +0100 @@ -2,6 +2,8 @@ QT += quick qml quickcontrols2 webengine @@ -44,9 +44,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webengine/recipebrowser/rec cross_compile { posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED } -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2017-12-30 00:41:54.676150874 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2018-02-18 19:00:52.381444860 +0100 @@ -1,5 +1,7 @@ QT += webenginewidgets @@ -55,9 +55,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/contentman HEADERS = mainwindow.h SOURCES = main.cpp \ mainwindow.cpp -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2017-12-30 00:39:17.808601947 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2018-02-18 19:00:52.432444110 +0100 @@ -3,6 +3,8 @@ TEMPLATE = app CONFIG += c++11 @@ -67,9 +67,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/cookiebrow SOURCES += \ main.cpp\ mainwindow.cpp -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2017-12-30 00:39:29.007426964 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/html2pdf/html2pdf.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2018-02-18 19:00:52.563442183 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -79,9 +79,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/html2pdf/h SOURCES += html2pdf.cpp target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/maps/maps.pro 2017-12-30 00:39:43.928193826 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/maps/maps.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/maps/maps.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/maps/maps.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/maps/maps.pro 2018-02-18 19:00:52.647440947 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -91,9 +91,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/maps/maps. HEADERS += \ mainwindow.h -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2017-12-30 00:41:37.256423059 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2018-02-18 19:00:52.710440020 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets webchannel CONFIG += c++11 @@ -103,9 +103,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/markdowned HEADERS += \ mainwindow.h \ previewpage.h \ -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/minimal.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2017-12-30 00:39:11.992692822 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/minimal/minimal.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/minimal/minimal.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2018-02-18 19:00:52.766439197 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -115,9 +115,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/minimal/mi SOURCES += main.cpp target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2017-12-30 00:39:37.644292012 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2018-02-18 19:00:52.844438049 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets CONFIG += c++11 @@ -127,9 +127,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/simplebrow HEADERS += \ browser.h \ browserwindow.h \ -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2017-12-30 00:41:43.565324482 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/spellchecker/spellchecker.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2018-02-18 19:00:52.899437241 +0100 @@ -9,6 +9,8 @@ error("Spellcheck example can not be built when using native OS dictionaries.") } @@ -139,9 +139,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/spellcheck HEADERS += \ webview.h -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2017-12-30 00:41:49.055238701 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2018-02-18 19:00:52.963436299 +0100 @@ -3,6 +3,8 @@ QT += webenginewidgets CONFIG += c++11 @@ -151,9 +151,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/stylesheet HEADERS += \ mainwindow.h \ stylesheetdialog.h -diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro ---- qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2017-12-30 00:39:23.960505823 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro +--- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/videoplayer/videoplayer.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2018-02-18 19:00:53.022435432 +0100 @@ -2,6 +2,8 @@ QT += webenginewidgets @@ -163,10 +163,10 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/examples/webenginewidgets/videoplaye HEADERS += \ mainwindow.h \ fullscreenwindow.h \ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2017-12-25 12:49:16.315356585 +0100 -@@ -600,13 +600,6 @@ +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2018-02-18 19:00:53.089434446 +0100 +@@ -604,13 +604,6 @@ } else if (current_cpu == "x86") { cflags += [ "-m32" ] ldflags += [ "-m32" ] @@ -180,9 +180,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/c } else if (current_cpu == "arm") { if (is_clang && !is_android && !is_nacl) { cflags += [ "--target=arm-linux-gnueabihf" ] -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2017-12-25 12:49:16.315356585 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2018-02-18 19:00:53.089434446 +0100 @@ -59,3 +59,11 @@ # It should never be explicitly set by the user. v8_current_cpu = v8_target_cpu @@ -195,9 +195,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/config/v + v8_current_cpu = "x87" + } +} -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2017-12-25 12:49:16.454354623 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2018-02-18 19:00:53.143433652 +0100 @@ -266,6 +266,10 @@ enable_linker_map = defined(invoker.enable_linker_map) && invoker.enable_linker_map && generate_linker_map @@ -209,9 +209,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchai # These library switches can apply to all tools below. lib_switch = "-l" lib_dir_switch = "-L" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2017-12-25 12:49:16.454354623 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2018-02-18 19:00:53.144433637 +0100 @@ -110,6 +110,26 @@ } } @@ -239,9 +239,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/build/toolchai clang_toolchain("clang_x64") { # Output linker map files for binary size analysis. enable_linker_map = true -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc 2017-12-26 23:04:53.301868189 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc 2018-02-18 19:00:53.144433637 +0100 @@ -7,7 +7,7 @@ #include #include @@ -269,9 +269,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_u _mm_setcsr(orig_state_); #endif } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_util.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/base/math_util.h 2017-12-26 23:04:53.301868189 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.h 2018-02-18 19:00:53.177433152 +0100 @@ -11,7 +11,6 @@ #include @@ -289,9 +289,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/base/math_u unsigned int orig_state_; #endif DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2017-12-25 13:16:20.896994372 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2018-02-18 19:00:53.177433152 +0100 @@ -445,13 +445,6 @@ "trees/tree_synchronizer.h", ] @@ -351,9 +351,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/cc/BUILD.gn qt cc_static_library("test_support") { testonly = true sources = [ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2017-12-25 12:49:16.454354623 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/content/renderer/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2018-02-18 19:00:53.178433137 +0100 @@ -514,6 +514,13 @@ "//ui/surface", "//v8", @@ -368,9 +368,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/render allow_circular_includes_from = [] if (use_aura && !use_qt) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2017-12-25 13:30:14.473844548 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2018-02-18 19:00:53.242432196 +0100 @@ -344,6 +344,12 @@ defines += [ "DISABLE_USER_INPUT_MONITOR" ] } @@ -406,9 +406,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/BUI if (is_android) { java_cpp_enum("java_enums") { sources = [ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/media.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/media.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/media.cc 2017-12-25 13:32:19.234052101 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/media.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/media.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2018-02-18 19:00:53.299431357 +0100 @@ -10,6 +10,8 @@ #include "base/metrics/field_trial.h" #include "base/trace_event/trace_event.h" @@ -428,9 +428,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/med libyuv::InitCpuFlags(); #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2017-12-25 12:57:58.624478849 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2018-02-18 19:00:53.299431357 +0100 @@ -81,17 +81,12 @@ #include #include @@ -541,9 +541,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sin float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, const float* k2, double kernel_interpolation_factor) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2017-12-25 12:57:58.798476686 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2018-02-18 19:00:53.300431343 +0100 @@ -36,6 +36,10 @@ kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), }; @@ -555,9 +555,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sin // Callback type for providing more data into the resampler. Expects |frames| // of data to be rendered into |destination|; zero padded if not enough frames // are available to satisfy the request. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2017-12-25 12:57:58.798476686 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2018-02-18 19:00:53.300431343 +0100 @@ -4,6 +4,7 @@ #include "base/bind.h" @@ -576,9 +576,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sin RunConvolveBenchmark( &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); RunConvolveBenchmark( -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 2017-07-01 03:36:35.000000000 +0200 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 2018-02-18 19:00:53.300431343 +0100 @@ -0,0 +1,50 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -630,9 +630,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sin +} + +} // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2017-12-25 12:57:58.798476686 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2018-02-18 19:00:53.301431328 +0100 @@ -10,6 +10,7 @@ #include "base/bind.h" @@ -652,9 +652,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/sin // Initialize a dummy resampler. MockSource mock_source; SincResampler resampler( -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2017-12-25 12:57:58.799476673 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2018-02-18 19:00:53.301431328 +0100 @@ -7,12 +7,17 @@ #include @@ -842,9 +842,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) void FMAC_NEON(const float src[], float scale, int len, float dest[]) { const int rem = len % 4; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2017-12-25 12:57:58.799476673 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2018-02-18 19:00:53.301431328 +0100 @@ -15,6 +15,11 @@ // Required alignment for inputs and outputs to all vector math functions enum { kRequiredAlignment = 16 }; @@ -857,9 +857,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. // |src| and |dest| must be aligned by kRequiredAlignment. MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2017-12-25 12:57:58.800476661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2018-02-18 19:00:53.302431313 +0100 @@ -5,6 +5,7 @@ #include @@ -952,9 +952,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec +#undef EWMAAndMaxPower_FUNC + } // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_sse.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc 2017-07-01 03:36:35.000000000 +0200 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_sse.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc 2018-02-18 19:00:53.302431313 +0100 @@ -0,0 +1,118 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -1074,9 +1074,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec + +} // namespace vector_math +} // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2017-12-25 12:57:58.800476661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2018-02-18 19:00:53.302431313 +0100 @@ -19,7 +19,7 @@ MEDIA_EXPORT std::pair EWMAAndMaxPower_C( float initial_value, const float src[], int len, float smoothing_factor); @@ -1086,9 +1086,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, float dest[]); MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2017-12-25 12:57:58.800476661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2018-02-18 19:00:53.302431313 +0100 @@ -9,6 +9,7 @@ #include @@ -1121,9 +1121,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/base/vec SCOPED_TRACE("EWMAAndMaxPower_SSE"); const std::pair& result = vector_math::EWMAAndMaxPower_SSE( initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2017-12-25 13:38:30.438718953 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2018-02-18 19:00:53.303431298 +0100 @@ -534,6 +534,26 @@ "//base", "//ui/gfx/geometry", @@ -1151,9 +1151,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/BUILD.gn } # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2017-12-26 23:00:39.631753174 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/filters/wsola_internals.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2018-02-18 19:00:53.372430283 +0100 @@ -15,7 +15,7 @@ #include "base/logging.h" #include "media/base/audio_bus.h" @@ -1163,9 +1163,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/media/filters/ #define USE_SIMD 1 #include #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2017-12-25 13:45:09.341998517 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2018-02-18 19:00:53.444429225 +0100 @@ -257,17 +257,6 @@ "ext/platform_canvas.h", ] @@ -1245,9 +1245,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn } else { sources = skia_opts.none_sources } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2017-12-25 13:05:23.911940902 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2018-02-18 19:00:53.510428253 +0100 @@ -362,10 +362,13 @@ void SetupSIMD(ConvolveProcs *procs) { @@ -1266,9 +1266,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convo #elif defined SIMD_MIPS_DSPR2 procs->extra_horizontal_reads = 3; procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convolver.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2017-12-25 13:05:23.951940405 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2018-02-18 19:00:53.511428239 +0100 @@ -11,6 +11,7 @@ #include @@ -1277,9 +1277,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/ext/convo #include "third_party/skia/include/core/SkSize.h" #include "third_party/skia/include/core/SkTypes.h" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2017-12-25 13:05:23.951940405 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2018-02-18 19:00:53.511428239 +0100 @@ -192,6 +192,26 @@ public_deps = [ ":angle_common", @@ -1307,9 +1307,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/an } config("angle_gpu_info_util_config") { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2017-12-25 13:05:23.951940405 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2018-02-18 19:00:53.566427430 +0100 @@ -124,9 +124,42 @@ } } @@ -1373,9 +1373,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/an #else // defined(ANGLE_USE_SSE) return false; #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2017-12-25 13:05:23.951940405 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2018-02-18 19:00:53.566427430 +0100 @@ -87,7 +87,9 @@ #include #define ANGLE_USE_SSE @@ -1386,9 +1386,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/an #define ANGLE_USE_SSE #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2017-12-25 13:05:23.952940392 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2018-02-18 19:00:53.567427415 +0100 @@ -12,9 +12,17 @@ #include "common/platform.h" #include "image_util/imageformats.h" @@ -1485,9 +1485,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/an +#endif + } // namespace angle -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2017-12-25 13:05:24.018939571 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2018-02-18 19:00:53.567427415 +0100 @@ -651,6 +651,32 @@ size_t outputRowPitch, size_t outputDepthPitch); @@ -1521,15 +1521,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/an } // namespace angle #include "loadimage.inl" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2017-12-25 13:05:24.018939571 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2018-02-18 19:00:53.567427415 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "loadimage.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2017-12-25 13:51:32.804702578 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2018-02-18 19:00:53.568427401 +0100 @@ -34,8 +34,8 @@ defines = [] @@ -1557,9 +1557,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/qc + cflags = [ "-msse2" ] + } +} -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2017-12-25 14:03:37.424681528 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2018-02-18 19:00:53.599426945 +0100 @@ -35,7 +35,7 @@ #include "platform/wtf/MathExtras.h" #include "platform/wtf/PtrUtil.h" @@ -1614,9 +1614,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We if (fill_to_frame > write_index) { const __m128 v_curve_virtual_index = _mm_set_ps1(curve_virtual_index); const __m128 v_curve_points_per_frame = _mm_set_ps1(curve_points_per_frame); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2017-12-27 00:16:35.571877993 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2018-02-18 19:00:53.600426930 +0100 @@ -26,6 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -1709,9 +1709,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We +#endif + } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2017-12-25 14:39:21.094641400 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2018-02-18 19:00:53.600426930 +0100 @@ -29,6 +29,7 @@ #ifndef DirectConvolver_h #define DirectConvolver_h @@ -1735,15 +1735,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We }; } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2017-12-25 13:05:24.021939534 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2018-02-18 19:00:53.600426930 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "DirectConvolver.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2017-12-25 14:41:03.697194334 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2018-02-18 19:00:53.601426915 +0100 @@ -26,16 +26,23 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -1822,9 +1822,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We // If the sourceP address is not 16-byte aligned, the first several // frames (at most three) should be processed seperately. while ((reinterpret_cast(input_p) & 0x0F) && n) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2017-12-25 14:40:36.454578552 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2018-02-18 19:00:53.601426915 +0100 @@ -29,6 +29,7 @@ #ifndef SincResampler_h #define SincResampler_h @@ -1848,15 +1848,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We }; } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2017-12-25 13:05:24.022939522 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2018-02-18 19:00:53.601426915 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "SincResampler.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2017-12-25 14:48:07.515216969 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2018-02-18 19:00:53.602426901 +0100 @@ -23,6 +23,9 @@ * DAMAGE. */ @@ -2066,9 +2066,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We #endif // defined(OS_MACOSX) } // namespace VectorMath -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2017-12-25 14:51:17.547536826 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2018-02-18 19:00:53.602426901 +0100 @@ -27,6 +27,7 @@ #define VectorMath_h @@ -2140,16 +2140,16 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We } // namespace VectorMath } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2017-12-25 13:05:24.024939497 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2018-02-18 19:00:53.602426901 +0100 @@ -0,0 +1,2 @@ +#define BUILD_ONLY_THE_SSE2_PARTS +#include "VectorMath.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2017-12-26 01:28:56.946048732 +0100 -@@ -1693,6 +1693,10 @@ +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2018-02-18 19:00:53.603426886 +0100 +@@ -1695,6 +1695,10 @@ deps += [ ":blink_x86_sse" ] } @@ -2160,7 +2160,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We if (use_webaudio_ffmpeg) { include_dirs += [ "//third_party/ffmpeg" ] deps += [ "//third_party/ffmpeg" ] -@@ -2139,6 +2143,23 @@ +@@ -2142,6 +2146,23 @@ } } @@ -2184,9 +2184,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We # This source set is used for fuzzers that need an environment similar to unit # tests. source_set("blink_fuzzer_test_support") { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2017-12-25 17:01:28.182182131 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2018-02-18 19:00:53.603426886 +0100 @@ -7,7 +7,7 @@ #include "build/build_config.h" @@ -2196,9 +2196,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We #include namespace blink { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2017-12-25 17:03:30.477435712 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2018-02-18 19:00:53.604426871 +0100 @@ -444,7 +444,7 @@ const uint32_t* source32 = reinterpret_cast_ptr(source); uint32_t* destination32 = reinterpret_cast_ptr(destination); @@ -2253,9 +2253,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/We SIMD::PackOneRowOfRGBA8LittleToRGBA8(source, destination, pixels_per_row); #endif #if HAVE(MIPS_MSA_INTRINSICS) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2017-12-25 17:05:49.957443890 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2018-02-18 19:00:53.605426856 +0100 @@ -14,6 +14,7 @@ #include "webrtc/common_audio/real_fourier_openmax.h" #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" @@ -2280,9 +2280,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we #else return std::unique_ptr(new RealFourierOoura(fft_order)); #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2017-12-29 20:06:31.389287437 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2018-02-18 19:00:53.644426283 +0100 @@ -14,7 +14,7 @@ #include #endif @@ -2355,9 +2355,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we case Aec3Optimization::kSse2: aec3::UpdateFrequencyResponse_SSE2(H_, &H2_); aec3::UpdateErlEstimator_SSE2(H2_, &erl_); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2017-12-29 20:07:57.631963762 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2018-02-18 19:00:53.644426283 +0100 @@ -34,7 +34,7 @@ rtc::ArrayView H, std::vector>* H2); @@ -2394,9 +2394,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we void ApplyFilter_SSE2(const RenderBuffer& render_buffer, rtc::ArrayView H, FftData* S); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2017-12-29 20:07:08.465718378 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2018-02-18 19:00:53.644426283 +0100 @@ -15,7 +15,7 @@ #include #include @@ -2415,9 +2415,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we // Verifies that the optimized methods for filter adaptation are bitexact to // their reference counterparts. TEST(AdaptiveFirFilter, FilterAdaptationSse2Optimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2017-12-29 20:08:45.048236004 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2018-02-18 19:00:53.645426268 +0100 @@ -16,10 +16,8 @@ namespace webrtc { @@ -2431,9 +2431,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we #endif #if defined(WEBRTC_HAS_NEON) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2017-12-29 20:07:45.343152374 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2018-02-18 19:00:53.645426268 +0100 @@ -11,7 +11,7 @@ #include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h" @@ -2461,9 +2461,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we case Aec3Optimization::kSse2: aec3::EstimateComfortNoise_SSE2(N2, &seed_, lower_band_noise, upper_band_noise); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2017-12-29 20:06:55.919910934 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2018-02-18 19:00:53.645426268 +0100 @@ -21,7 +21,7 @@ namespace webrtc { @@ -2473,9 +2473,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we void EstimateComfortNoise_SSE2(const std::array& N2, uint32_t* seed, -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2017-12-29 20:06:11.867587061 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2018-02-18 19:00:53.646426253 +0100 @@ -50,7 +50,7 @@ #endif @@ -2485,9 +2485,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we // Verifies that the optimized methods are bitexact to their reference // counterparts. TEST(ComfortNoiseGenerator, TestOptimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2017-12-29 20:06:23.495408594 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2018-02-18 19:00:53.646426253 +0100 @@ -12,7 +12,7 @@ #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ @@ -2506,9 +2506,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we case Aec3Optimization::kSse2: { constexpr int kNumFourBinBands = kFftLengthBy2 / 4; constexpr int kLimit = kNumFourBinBands * 4; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2017-12-29 20:06:45.873065136 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2018-02-18 19:00:53.646426253 +0100 @@ -16,7 +16,7 @@ namespace webrtc { @@ -2518,9 +2518,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we // Verifies that the optimized methods are bitexact to their reference // counterparts. TEST(FftData, TestOptimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2017-12-29 20:05:54.793849113 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2018-02-18 19:00:53.647426239 +0100 @@ -13,7 +13,7 @@ #include #endif @@ -2548,9 +2548,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we case Aec3Optimization::kSse2: aec3::MatchedFilterCore_SSE2(x_start_index, x2_sum_threshold, render_buffer.buffer, y, filters_[n], -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2017-12-29 20:08:03.879867867 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2018-02-18 19:00:53.647426239 +0100 @@ -36,7 +36,7 @@ #endif @@ -2560,9 +2560,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we // Filter core for the matched filter that is optimized for SSE2. void MatchedFilterCore_SSE2(size_t x_start_index, -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2017-12-29 20:07:38.935250724 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2018-02-18 19:00:53.647426239 +0100 @@ -11,7 +11,7 @@ #include "webrtc/modules/audio_processing/aec3/matched_filter.h" @@ -2581,9 +2581,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we // Verifies that the optimized methods for SSE2 are bitexact to their reference // counterparts. TEST(MatchedFilter, TestSse2Optimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2017-12-29 20:07:51.472058305 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2018-02-18 19:00:53.648426224 +0100 @@ -11,7 +11,7 @@ #include "webrtc/modules/audio_processing/aec3/suppression_gain.h" @@ -2593,9 +2593,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we #include #endif #include -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2017-12-29 20:07:15.035617541 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2018-02-18 19:00:53.648426224 +0100 @@ -15,7 +15,7 @@ #if defined(WEBRTC_HAS_NEON) #include @@ -2632,9 +2632,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we case Aec3Optimization::kSse2: { const int x_size = static_cast(x.size()); const int vector_limit = x_size >> 2; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2017-12-29 20:06:38.812173509 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2018-02-18 19:00:53.648426224 +0100 @@ -77,7 +77,7 @@ } #endif @@ -2644,9 +2644,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/we TEST(VectorMath, Sqrt) { if (WebRtc_GetCPUInfo(kSSE2) != 0) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2017-12-26 01:32:06.842303361 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2018-02-18 19:00:53.649426209 +0100 @@ -116,9 +116,9 @@ v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ] @@ -2822,9 +2822,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/BUILD.gn qt v8_component("v8") { sources = [ "src/v8dll-main.cc", -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gni/v8.gni 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2017-12-25 18:02:06.095884970 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gni/v8.gni 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2018-02-18 19:00:53.705425385 +0100 @@ -42,6 +42,9 @@ # add a dependency on the ICU library. v8_enable_i18n_support = true @@ -2847,9 +2847,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gni/v8.gni # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute # paths for all configs in templates as they are shared in different # subdirectories. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2017-12-25 17:42:57.200465867 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2018-02-18 19:00:53.777424326 +0100 @@ -262,14 +262,14 @@ # goma doesn't support PDB yet. 'fastbuild%': 1, @@ -2876,9 +2876,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/st # The x86 toolchain currently has problems with stack-protector. 'cflags!': [ '-fstack-protector', -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2017-12-25 17:42:57.200465867 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2018-02-18 19:00:53.778424312 +0100 @@ -144,7 +144,7 @@ 'host_cxx_is_biarch%': 0, }, @@ -2913,9 +2913,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/gypfiles/to 'target_conditions': [ ['_toolset=="host"', { 'conditions': [ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/Makefile qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/Makefile ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/Makefile 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/Makefile 2017-12-25 17:42:57.200465867 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/Makefile qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/Makefile +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/Makefile 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/Makefile 2018-02-18 19:00:53.778424312 +0100 @@ -255,13 +255,14 @@ # Architectures and modes to be compiled. Consider these to be internal @@ -2934,9 +2934,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/Makefile qt # List of files that trigger Makefile regeneration: GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc 2017-12-25 17:42:57.201465852 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc 2018-02-18 19:00:53.779424297 +0100 @@ -85,6 +85,8 @@ #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" // NOLINT #elif V8_TARGET_ARCH_S390 @@ -2955,9 +2955,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembl #else UNREACHABLE(); #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembler-inl.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h 2017-12-25 17:42:57.201465852 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler-inl.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h 2018-02-18 19:00:53.864423047 +0100 @@ -23,6 +23,8 @@ #include "src/mips64/assembler-mips64-inl.h" #elif V8_TARGET_ARCH_S390 @@ -2967,9 +2967,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/assembl #else #error Unknown architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/build_config.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/build_config.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h 2017-12-25 17:42:57.201465852 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/base/build_config.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/base/build_config.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h 2018-02-18 19:00:53.864423047 +0100 @@ -76,9 +76,9 @@ // Target architecture detection. This may be set externally. If not, detect // in the same way as the host architecture, that is, target the native @@ -3011,9 +3011,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/base/bu #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 1 #else #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2017-12-29 01:00:28.359896864 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2018-02-18 19:00:53.934422017 +0100 @@ -0,0 +1,3008 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -6023,15 +6023,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtin +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 2017-12-25 17:42:57.201465852 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 2018-02-18 19:00:53.934422017 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/codegen.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/codegen.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/codegen.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/codegen.h 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/codegen.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/codegen.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/codegen.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/codegen.h 2018-02-18 19:00:53.934422017 +0100 @@ -59,6 +59,8 @@ #include "src/mips64/codegen-mips64.h" // NOLINT #elif V8_TARGET_ARCH_S390 @@ -6041,9 +6041,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/codegen #else #error Unsupported target architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/code-stubs.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/code-stubs.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/code-stubs.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/code-stubs.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h 2018-02-18 19:00:53.935422002 +0100 @@ -514,6 +514,8 @@ #include "src/mips64/code-stubs-mips64.h" #elif V8_TARGET_ARCH_S390 @@ -6053,9 +6053,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/code-st #else #error Unsupported target architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2018-02-18 19:00:53.935422002 +0100 @@ -50,6 +50,12 @@ rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit() #endif @@ -6078,9 +6078,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile for (size_t i = 0; i < msig->return_count(); i++) { MachineRepresentation rep = msig->GetReturn(i).representation(); CHECK_NE(MachineRepresentation::kFloat32, rep); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2018-02-18 19:00:54.010420900 +0100 @@ -23,6 +23,8 @@ #include "src/compiler/ppc/instruction-codes-ppc.h" #elif V8_TARGET_ARCH_S390 @@ -6090,9 +6090,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile #else #define TARGET_ARCH_OPCODE_LIST(V) #define TARGET_ADDRESSING_MODE_LIST(V) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2018-02-18 19:00:54.011420885 +0100 @@ -69,6 +69,14 @@ #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 #define FP_RETURN_REGISTERS xmm1, xmm2 @@ -6108,9 +6108,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile #elif V8_TARGET_ARCH_ARM // =========================================================================== // == arm ==================================================================== -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2017-12-28 03:58:53.829141647 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2018-02-18 19:00:54.012420870 +0100 @@ -0,0 +1,2878 @@ +// Copyright 2013 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -8990,9 +8990,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace compiler +} // namespace internal +} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2017-12-28 04:01:21.688880592 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2018-02-18 19:00:54.013420855 +0100 @@ -0,0 +1,141 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -9135,9 +9135,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace v8 + +#endif // V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 2017-12-25 17:42:57.208465749 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 2018-02-18 19:00:54.013420855 +0100 @@ -0,0 +1,26 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -9165,9 +9165,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace compiler +} // namespace internal +} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2017-12-28 04:08:42.202144307 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2018-02-18 19:00:54.014420841 +0100 @@ -0,0 +1,2031 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -11200,15 +11200,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compile +} // namespace compiler +} // namespace internal +} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 2017-12-25 17:42:57.205465793 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 2018-02-18 19:00:54.014420841 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2017-12-28 03:21:22.149118881 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2018-02-18 19:00:54.014420841 +0100 @@ -0,0 +1,141 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -11351,15 +11351,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 2017-12-25 17:42:57.210465720 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 2018-02-18 19:00:54.015420826 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/frames-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/frames-inl.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h 2017-12-25 17:42:57.210465720 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/frames-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/frames-inl.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h 2018-02-18 19:00:54.015420826 +0100 @@ -26,6 +26,8 @@ #include "src/mips64/frames-mips64.h" // NOLINT #elif V8_TARGET_ARCH_S390 @@ -11369,9 +11369,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/frames- #else #error Unsupported target architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2017-12-25 17:42:57.211465705 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2018-02-18 19:00:54.015420826 +0100 @@ -45,7 +45,7 @@ static const int kMaxBackEdgeWeight = 127; @@ -11381,9 +11381,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co static const int kCodeSizeMultiplier = 105; #elif V8_TARGET_ARCH_X64 static const int kCodeSizeMultiplier = 165; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2017-12-28 03:52:59.410562490 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2018-02-18 19:00:54.100419575 +0100 @@ -0,0 +1,2410 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -13795,15 +13795,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-co +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 2017-12-25 17:42:57.211465705 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 2018-02-18 19:00:54.100419575 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/gdb-jit.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/gdb-jit.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc 2017-12-25 17:42:57.213465676 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/gdb-jit.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/gdb-jit.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc 2018-02-18 19:00:54.101419561 +0100 @@ -199,7 +199,7 @@ struct MachOSectionHeader { char sectname[16]; @@ -13878,9 +13878,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/gdb-jit w->Write(DW_OP_reg5); // The frame pointer's here on ia32 #elif V8_TARGET_ARCH_X64 w->Write(DW_OP_reg6); // and here on x64. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/globals.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/globals.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/globals.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/globals.h 2017-12-25 17:42:57.214465661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/globals.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/globals.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/globals.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/globals.h 2018-02-18 19:00:54.102419546 +0100 @@ -167,7 +167,7 @@ const int kPCOnStackSize = kRegisterSize; const int kFPOnStackSize = kRegisterSize; @@ -13908,9 +13908,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/globals const uint32_t kHoleNanUpper32 = 0xFFFF7FFF; const uint32_t kHoleNanLower32 = 0xFFFF7FFF; #else -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 2017-12-25 17:42:57.214465661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 2018-02-18 19:00:54.102419546 +0100 @@ -0,0 +1,40 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -13952,9 +13952,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2017-12-28 03:55:18.870428775 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2018-02-18 19:00:54.102419546 +0100 @@ -0,0 +1,447 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -14403,9 +14403,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 2017-12-25 17:42:57.215465646 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 2018-02-18 19:00:54.103419531 +0100 @@ -0,0 +1,84 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -14491,15 +14491,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/ +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 2017-12-25 17:42:57.214465661 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 2018-02-18 19:00:54.103419531 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2017-12-25 13:05:24.029939435 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2018-02-18 19:00:54.103419531 +0100 @@ -106,7 +106,7 @@ "/wd4996", # Deprecated function call. ] @@ -14509,9 +14509,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/inspect defines = [ "BUILDING_V8_SHARED" ] } } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interface-descriptors.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interface-descriptors.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h 2017-12-25 17:42:57.215465646 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interface-descriptors.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interface-descriptors.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h 2018-02-18 19:00:54.103419531 +0100 @@ -392,7 +392,7 @@ static const Register ValueRegister(); static const Register SlotRegister(); @@ -14521,9 +14521,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interfa static const bool kPassLastArgsOnStack = true; #else static const bool kPassLastArgsOnStack = false; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2017-12-25 17:42:57.215465646 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2018-02-18 19:00:54.104419517 +0100 @@ -1367,8 +1367,9 @@ bool InterpreterAssembler::TargetSupportsUnalignedAccess() { #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 @@ -14536,9 +14536,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/interpr return true; #else #error "Unknown Architecture" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/log.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/log.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/log.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/log.cc 2017-12-25 17:42:57.216465632 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/log.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/log.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/log.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/log.cc 2018-02-18 19:00:54.104419517 +0100 @@ -370,6 +370,8 @@ const char arch[] = "ppc"; #elif V8_TARGET_ARCH_MIPS @@ -14548,9 +14548,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/log.cc #elif V8_TARGET_ARCH_ARM64 const char arch[] = "arm64"; #elif V8_TARGET_ARCH_S390 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/macro-assembler.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/macro-assembler.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h 2017-12-25 17:42:57.216465632 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/macro-assembler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/macro-assembler.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h 2018-02-18 19:00:54.105419502 +0100 @@ -52,6 +52,8 @@ #elif V8_TARGET_ARCH_S390 #include "src/s390/constants-s390.h" @@ -14560,9 +14560,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/macro-a #else #error Unsupported target architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2017-12-25 17:42:57.217465617 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2018-02-18 19:00:54.106419487 +0100 @@ -48,6 +48,8 @@ #include "src/regexp/mips/regexp-macro-assembler-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -14582,15 +14582,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/ #else #error "Unsupported architecture" #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 2017-12-25 17:42:57.217465617 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 2018-02-18 19:00:54.189418266 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2017-12-28 04:38:12.986938239 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2018-02-18 19:00:54.190418252 +0100 @@ -0,0 +1,1273 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -15865,9 +15865,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/ +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 2018-02-18 19:00:54.190418252 +0100 @@ -0,0 +1,204 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -16073,9 +16073,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/regexp/ +} // namespace v8 + +#endif // V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc 2018-02-18 19:00:54.190418252 +0100 @@ -74,6 +74,9 @@ #if V8_TARGET_ARCH_IA32 kMaxAllocatableGeneralRegisterCount, @@ -16086,9 +16086,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/registe #elif V8_TARGET_ARCH_X64 kMaxAllocatableGeneralRegisterCount, kMaxAllocatableDoubleRegisterCount, -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/register-configuration.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h 2018-02-18 19:00:54.190418252 +0100 @@ -28,7 +28,8 @@ static const int kMaxFPRegisters = 32; @@ -16099,9 +16099,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/registe static const RegisterConfiguration* Crankshaft(); static const RegisterConfiguration* Turbofan(); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/simulator.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/simulator.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/simulator.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/simulator.h 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/simulator.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/simulator.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/simulator.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/simulator.h 2018-02-18 19:00:54.191418237 +0100 @@ -21,6 +21,8 @@ #include "src/mips64/simulator-mips64.h" #elif V8_TARGET_ARCH_S390 @@ -16111,9 +16111,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/simulat #else #error Unsupported target architecture. #endif -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/strtod.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/strtod.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/strtod.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/strtod.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc 2018-02-18 19:00:54.191418237 +0100 @@ -154,7 +154,8 @@ static bool DoubleStrtod(Vector trimmed, int exponent, @@ -16124,9 +16124,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/strtod. // On x86 the floating-point stack can be 64 or 80 bits wide. If it is // 80 bits wide (as is the case on Linux) then double-rounding occurs and the // result is not accurate. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.cc 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.cc 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.cc 2018-02-18 19:00:54.191418237 +0100 @@ -356,7 +356,8 @@ } } @@ -16146,9 +16146,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.c MemMoveFunction generated_memmove = CreateMemMoveFunction(isolate); if (generated_memmove != NULL) { memmove_function = generated_memmove; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/utils.h 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.h 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.h 2018-02-18 19:00:54.192418222 +0100 @@ -431,7 +431,7 @@ // Initializes the codegen support that depends on CPU features. void init_memcopy_functions(Isolate* isolate); @@ -16158,9 +16158,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/utils.h // Limit below which the extra overhead of the MemCopy function is likely // to outweigh the benefits of faster copying. const int kMinComplexMemCopy = 64; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/v8.gyp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2018-02-18 19:00:54.193418208 +0100 @@ -279,6 +279,11 @@ 'builtins/s390/builtins-s390.cc', ], @@ -16212,9 +16212,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/v8.gyp ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { 'sources': [ ### gcmole(arch:mipsel) ### 'mips/assembler-mips.cc', -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2017-12-28 04:40:51.665451092 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2018-02-18 19:00:54.194418193 +0100 @@ -0,0 +1,2258 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -18474,9 +18474,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2017-12-28 05:24:49.899521687 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2018-02-18 19:00:54.195418178 +0100 @@ -0,0 +1,1140 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -19618,9 +19618,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} // namespace v8 + +#endif // V8_X87_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2017-12-28 01:52:55.041936208 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2018-02-18 19:00:54.195418178 +0100 @@ -0,0 +1,528 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -20150,9 +20150,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/ass +} // namespace v8 + +#endif // V8_X87_ASSEMBLER_X87_INL_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2017-12-28 04:52:57.450203610 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2018-02-18 19:00:54.195418178 +0100 @@ -0,0 +1,381 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -20535,9 +20535,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 2017-12-25 17:42:57.221465559 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 2018-02-18 19:00:54.195418178 +0100 @@ -0,0 +1,33 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -20572,9 +20572,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +} // namespace v8 + +#endif // V8_X87_CODEGEN_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2017-12-28 04:50:57.144052671 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2018-02-18 19:00:54.197418149 +0100 @@ -0,0 +1,2668 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -23244,9 +23244,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 2017-12-25 17:42:57.221465559 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 2018-02-18 19:00:54.197418149 +0100 @@ -0,0 +1,351 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -23599,9 +23599,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cod +} // namespace v8 + +#endif // V8_X87_CODE_STUBS_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 2017-12-25 17:42:57.221465559 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 2018-02-18 19:00:54.197418149 +0100 @@ -0,0 +1,43 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -23646,9 +23646,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/cpu +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2017-12-28 04:55:52.791508679 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2018-02-18 19:00:54.198418134 +0100 @@ -0,0 +1,412 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -24062,9 +24062,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/deo +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 2017-12-25 17:42:57.222465544 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 2018-02-18 19:00:54.199418119 +0100 @@ -0,0 +1,1874 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -25940,9 +25940,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/dis +} // namespace disasm + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 2017-12-25 17:42:57.222465544 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 2018-02-18 19:00:54.199418119 +0100 @@ -0,0 +1,27 @@ +// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -25971,9 +25971,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/fra +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/frames-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h 2017-12-25 17:42:57.222465544 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h 2018-02-18 19:00:54.199418119 +0100 @@ -0,0 +1,78 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -26053,9 +26053,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/fra +} // namespace v8 + +#endif // V8_X87_FRAMES_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2017-12-29 01:59:03.000000000 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2018-02-18 19:00:54.199418119 +0100 @@ -0,0 +1,450 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -26507,9 +26507,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/int +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2017-12-29 02:00:17.837154172 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2018-02-18 19:00:54.200418105 +0100 @@ -0,0 +1,2584 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -29095,9 +29095,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} // namespace v8 + +#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2017-12-29 01:59:56.457468424 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2018-02-18 19:00:54.200418105 +0100 @@ -0,0 +1,923 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -30022,15 +30022,15 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/mac +} // namespace v8 + +#endif // V8_X87_MACRO_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/OWNERS qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS 2017-12-25 17:42:57.218465603 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS 2018-02-18 19:00:54.200418105 +0100 @@ -0,0 +1,2 @@ +weiliang.lin@intel.com +chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 2017-12-25 17:42:57.224465515 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 2018-02-18 19:00:54.200418105 +0100 @@ -0,0 +1,7 @@ +// Copyright 2008 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -30039,9 +30039,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/sim +#include "src/x87/simulator-x87.h" + +// Since there is no simulator for the ia32 architecture this file is empty. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.h qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 2017-12-25 17:42:57.224465515 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 1970-01-01 01:00:00.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 2018-02-18 19:00:54.200418105 +0100 @@ -0,0 +1,52 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -30095,9 +30095,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/x87/sim +} // namespace v8 + +#endif // V8_X87_SIMULATOR_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2017-12-25 17:42:57.224465515 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2018-02-18 19:00:54.200418105 +0100 @@ -287,6 +287,17 @@ "test-macro-assembler-x64.cc", "test-run-wasm-relocation-x64.cc", @@ -30125,9 +30125,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest # cctest can't be built against a shared library, so we # need to depend on the underlying static target in that case. deps += [ "../..:v8_maybe_snapshot" ] -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/cctest.gyp qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2017-12-25 17:43:10.318273560 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/cctest.gyp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2018-02-18 19:00:54.289416795 +0100 @@ -308,6 +308,16 @@ 'test-disasm-mips64.cc', 'test-macro-assembler-mips64.cc', @@ -30157,9 +30157,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/test/cctest [ 'OS=="linux" or OS=="qnx"', { 'sources': [ 'test-platform-linux.cc', -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gen-tags.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2017-12-25 17:43:15.534197094 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gen-tags.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2018-02-18 19:00:54.289416795 +0100 @@ -20,7 +20,7 @@ import sys @@ -30169,9 +30169,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/g def PrintHelpAndExit(): print(__doc__) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gm.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/gm.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py 2017-12-25 17:43:15.534197094 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gm.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gm.py 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py 2018-02-18 19:00:54.366415663 +0100 @@ -33,7 +33,7 @@ # All arches that this script understands. @@ -30181,9 +30181,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/dev/g # Arches that get built/run when you don't specify any. DEFAULT_ARCHES = ["ia32", "x64", "arm", "arm64"] # Modes that this script understands. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/run-tests.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/run-tests.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py 2017-12-25 17:43:15.534197094 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/run-tests.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/run-tests.py 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py 2018-02-18 19:00:54.366415663 +0100 @@ -187,6 +187,7 @@ "android_x64", "arm", @@ -30200,9 +30200,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/run-t "arm64"] -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2017-12-25 17:43:15.534197094 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2018-02-18 19:00:54.443414530 +0100 @@ -59,10 +59,10 @@ # Support arches, modes to be written as keywords instead of strings. VARIABLES = {ALWAYS: True} @@ -30218,9 +30218,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/testr VARIABLES[var] = var # Allow using variants as keywords. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/verify_source_deps.py qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2017-12-25 17:43:15.535197080 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/verify_source_deps.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2018-02-02 11:39:52.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2018-02-18 19:00:54.514413486 +0100 @@ -82,6 +82,7 @@ 'solaris', 'vtune', @@ -30229,11 +30229,11 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/tools/verif ] ALL_GN_PREFIXES = [ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro qtwebengine-everywhere-src-5.10.0-no-sse2/src/core/core_module.pro ---- qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/core/core_module.pro 2017-12-25 13:05:24.093938639 +0100 -@@ -44,6 +44,31 @@ - else: QMAKE_LFLAGS += $$NINJA_LFLAGS +diff -Nur qtwebengine-everywhere-src-5.10.1/src/core/core_module.pro qtwebengine-everywhere-src-5.10.1-no-sse2/src/core/core_module.pro +--- qtwebengine-everywhere-src-5.10.1/src/core/core_module.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/core/core_module.pro 2018-02-18 19:00:54.514413486 +0100 +@@ -53,6 +53,31 @@ + POST_TARGETDEPS += $$NINJA_TARGETDEPS +# go through the shared libraries that GN wants to link to @@ -30264,7 +30264,7 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro qtwebengine LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge -@@ -113,7 +138,12 @@ +@@ -122,7 +147,12 @@ locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales resources.CONFIG += no_check_exist resources.path = $$[QT_INSTALL_DATA]/resources @@ -30278,9 +30278,9 @@ diff -Nur qtwebengine-everywhere-src-5.10.0/src/core/core_module.pro qtwebengine !qtConfig(webengine-system-icu) { icu.CONFIG += no_check_exist -diff -Nur qtwebengine-everywhere-src-5.10.0/src/process/process.pro qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro ---- qtwebengine-everywhere-src-5.10.0/src/process/process.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-sse2/src/process/process.pro 2017-12-30 00:42:27.968630675 +0100 +diff -Nur qtwebengine-everywhere-src-5.10.1/src/process/process.pro qtwebengine-everywhere-src-5.10.1-no-sse2/src/process/process.pro +--- qtwebengine-everywhere-src-5.10.1/src/process/process.pro 2018-02-09 05:07:39.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/process/process.pro 2018-02-18 19:00:54.515413471 +0100 @@ -9,6 +9,8 @@ SOURCES = main.cpp diff --git a/sources b/sources index a081baa..61e3d5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.10.0-clean.tar.xz) = d89fa0898176749b30a13dd50b58ca5c65a2a3ab67f210a567d791374cb95d206eff6aa6d41fa444dd9b88e4bf7f0544ed58486875b4c66d1d3974a2a7675c46 +SHA512 (qtwebengine-everywhere-src-5.10.1-clean.tar.xz) = b992aef0d2f9fe7d40b5378519113d5c41577b120830bee86eda211ffc97649022d1deacf82916007fb9fd1b6e18a855d4890c79752142165e66e2ea047486b8 From be616902c9ffb23f8d37bdc9dd9508729f2e9197 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 23 Feb 2018 18:37:58 +0100 Subject: [PATCH 258/437] Drop -fabi-version=11 workaround, gcc-8.0.1-0.16.fc28 should fix this * Fri Feb 23 2018 Kevin Kofler - 5.10.1-2 - Drop -fabi-version=11 workaround, gcc-8.0.1-0.16.fc28 should fix this --- qt5-qtwebengine.spec | 11 ++++------- qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch | 13 ------------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index df8149a..f281984 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -112,9 +112,6 @@ Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # https://codereview.qt-project.org/#/c/196922/ # see QTBUG-60886 and QTBUG-65090 Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch -# workaround FTBFS with GCC 8 (#1546255, gcc#84286, #1545918, QTBUG-64759) -# build GN with -fabi-version=11 for now -Patch23: qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts @@ -367,9 +364,6 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 -%if 0%{?fedora} > 27 -%patch23 -p1 -b .QTBUG-64759 -%endif %patch100 -p1 -b .no-aspirational-scripts # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ @@ -576,6 +570,9 @@ done %changelog +* Fri Feb 23 2018 Kevin Kofler - 5.10.1-2 +- Drop -fabi-version=11 workaround, gcc-8.0.1-0.16.fc28 should fix this + * Sun Feb 18 2018 Kevin Kofler - 5.10.1-1 - Update to 5.10.1 - Rediff (unfuzz) no-sse2 patch diff --git a/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch b/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch deleted file mode 100644 index 7c5d32b..0000000 --- a/qtwebengine-everywhere-src-5.10.0-QTBUG-64759.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py.QTBUG-64759 qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py.QTBUG-64759 2018-02-16 12:52:27.991861536 -0600 -+++ qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2018-02-16 13:16:30.778130158 -0600 -@@ -331,6 +331,9 @@ def write_gn_ninja(path, root_gen_dir, o - cflags_cc = [] - ldflags = [] - -+ cflags.extend(['-fabi-version=11']) -+ cflags_cc.extend(['-fabi-version=11']) -+ - include_dirs = [root_gen_dir, SRC_ROOT] - libs = [] - From b58078eac9d4e672c3b73e19853e49a14f1f46b1 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 17 Mar 2018 04:06:44 +0100 Subject: [PATCH 259/437] Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) * Sat Mar 17 2018 Kevin Kofler - 5.10.1-3 - Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) --- qt5-qtwebengine.spec | 12 +- ...everywhere-src-5.10.1-security-5.9.5.patch | 1245 +++++++++++++++++ 2 files changed, 1256 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f281984..2e7d1b7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -112,11 +112,16 @@ Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # https://codereview.qt-project.org/#/c/196922/ # see QTBUG-60886 and QTBUG-65090 Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch +## Upstream patches: # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) # see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts # backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch +# forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) +# see the patch metadata for the list of fixed CVEs and Chromium bug IDs +# omit the Chromium bug 806122 fix because we do not ship that FFmpeg file +Patch101: qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -209,6 +214,7 @@ BuildRequires: pkgconfig(vpx) >= 1.7.0 # http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=61-based # see dist/changes-5.10.1 for the version numbers (base, security fixes) and for # a list of CVEs fixed by the added security backports +# See Patch101 for additional fixes applied (up to version 65.0.3325.146) Provides: bundled(chromium) = 61.0.3163.140 # Bundled in src/3rdparty/chromium/third_party: @@ -365,6 +371,7 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 %patch100 -p1 -b .no-aspirational-scripts +%patch101 -p1 -b .security-5.9.5 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -570,6 +577,9 @@ done %changelog +* Sat Mar 17 2018 Kevin Kofler - 5.10.1-3 +- Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) + * Fri Feb 23 2018 Kevin Kofler - 5.10.1-2 - Drop -fabi-version=11 workaround, gcc-8.0.1-0.16.fc28 should fix this diff --git a/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch b/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch new file mode 100644 index 0000000..78b3e55 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch @@ -0,0 +1,1245 @@ +From d58330a607981f2e12c65c4b72ecbc36c5c52801 Mon Sep 17 00:00:00 2001 +Message-Id: +From: Michal Klocek +Date: Thu, 8 Mar 2018 11:26:33 +0100 +Subject: [PATCH] Backport security fixes from QtWebEngine 5.9.5 (minus FFmpeg + fix) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[Backport] CVE-2017-15429 + +Only open windows with js URLs if the entered window has access + +It's not enough to check that the current window has access, if other +security checks failed and the entered window shouldn't have access to +the current window. + +BUG=788453 +R=haraken@chromium.org,mkwst@chromium.org + +Change-Id: Iea10c52f20bdc49f00eba067cab69dab06f79f01 +Reviewed-on: https://chromium-review.googlesource.com/792934 +Commit-Queue: Jochen Eisinger +Reviewed-by: Mike West +Reviewed-by: Kentaro Hara +Reviewed-by: Yuki Shiino +Cr-Commit-Position: refs/heads/master@{#519683} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6069 + +check for bad buffers in Unpack8 + +Bug:799918 +Change-Id: I0502a487d67ce757bf818823cf0ad46b7703294c +Reviewed-on: https://skia-review.googlesource.com/92841 +Commit-Queue: Mike Reed +Reviewed-by: Florin Malita +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6071 + +detect too many points + +Bug:777318 +Change-Id: Idb52688b6ee4ae020004400da995620c1f548559 +Reviewed-on: https://skia-review.googlesource.com/73821 +Commit-Queue: Mike Reed +Reviewed-by: Herb Derby +Reviewed-by: Allan Sandfeld Jensen + +[Backport] Security Bug 770734 + +Fix a crash in TemplateURLParser. + +It was caused by dereferencing an invalid URL during parsing. + +Bug: 770734 +Change-Id: I4fedd3f310aaf7e1e1d2384aa64939d46b8b2a5a +Reviewed-on: https://chromium-review.googlesource.com/773902 +Commit-Queue: Vasilii Sukhanov +Reviewed-by: Peter Kasting +Cr-Commit-Position: refs/heads/master@{#517751} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] Security Bug 774833 + +Intl.DateTimeFormat: throw RangeError for non-finite input + +intl.js throws an exception when datetime-value to format is +Infinity or NaN, but there was a way to thwart the check. + +Moreover, intl.js and runtime-intl.cc have unnecessary conversions +of 'Number->Date->Number'. I removed the unnecessary conversion +and made 'Number' be passed to %InternalDateFormat. With this +streamlining, the work-around mentioned above does not work +anymore. + +Add a check in runtime_intl.cc for Infinity/NaN and throw a +RangeError. + +Add invalid-time test for invalid datetime-values passed to +Intl.DateTimeFormat.format(). + +Bug: chromium:774833 +Test: intl/date-format/invalid-time.js +Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng +Change-Id: Idc575e532a86ee110dc4bb945ae023d6516650ee +Reviewed-on: https://chromium-review.googlesource.com/724860 +Commit-Queue: Jungshik Shin +Reviewed-by: Adam Klein +Cr-Commit-Position: refs/heads/master@{#48765} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6073 + +Fix CopyTexImage behavior when cubemap workaround is involved. + +The bug is, we need to reset PIXEL_UNPACK_BUFFER as well as UNPACK params +in order to upload data to textures correctly. + +BUG=804118 +TEST=tests in the bug +R=piman@chromium.org +TBR=zmo@chromium.org +NOTRY=true + +(cherry picked from commit a89aa4642cefb79e312c95ca3c66bbaff5263a22) + +Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +Change-Id: I743f03cdc98b2c6993449ca615b246eb42ef4dfa +Reviewed-on: https://chromium-review.googlesource.com/892282 +Commit-Queue: Zhenyao Mo +Reviewed-by: Antoine Labour +Reviewed-by: Kai Ninomiya +Cr-Original-Commit-Position: refs/heads/master@{#532749} +Reviewed-on: https://chromium-review.googlesource.com/895907 +Reviewed-by: Zhenyao Mo +Cr-Commit-Position: refs/branch-heads/3325@{#208} +Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6076 + +Percent-encode UTF8 characters in URL fragment identifiers. + +This brings us into line with Firefox, Safari, and the spec. + +Bug: 758523 +Reviewed-on: https://chromium-review.googlesource.com/668363 +Commit-Queue: Mike West +Reviewed-by: Jochen Eisinger +Reviewed-by: Andy Paicu +Cr-Commit-Position: refs/heads/master@{#507481} + +Encode ' ', '"', '<', '>', and '`' in URL fragments. + +Implements the changes to fragment processing described in +https://github.com/whatwg/url/pull/347, which adds a new "fragment +percent-encode set" which contains the C0 control percent-encode set, +along with: + +* 0x20 SPACE +* 0x22 (") +* 0x3C (<) +* 0x3E (>) +* 0x60 (`) + +This brings our implementation into line with Firefox. + +Bug: 758523 +Reviewed-on: https://chromium-review.googlesource.com/719004 +Commit-Queue: Mike West +Reviewed-by: Jochen Eisinger +Cr-Commit-Position: refs/heads/master@{#523383} + +Change-Id: I25de642017ccb69473626a327ad194b3431a11ed +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6079 + +Fix tabs sharing TEXTURE_2D_ARRAY/TEXTURE_3D data. + +In linux and android, we are seeing an issue where texture data from one +tab overwrites the texture data of another tab. This is happening for apps +which are using webgl2 texture of type TEXTURE_2D_ARRAY/TEXTURE_3D. +Due to a bug in virtual context save/restore code for above texture formats, +the texture data is not properly restored while switching tabs. Hence +texture data from one tab overwrites other. + +This CL has fix for that issue, an update for existing test expectations +and a new unit test for this bug. + +Bug: 788448 +Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +Change-Id: Ie933984cdd2d1381f42eb4638f730c8245207a28 +Reviewed-on: https://chromium-review.googlesource.com/930327 +Reviewed-by: Zhenyao Mo +Commit-Queue: vikas soni +Cr-Original-Commit-Position: refs/heads/master@{#539111}(cherry picked from commit d128139d53e9268e87921e82d89b3f2053cb83fd) +Reviewed-on: https://chromium-review.googlesource.com/939878 +Cr-Commit-Position: refs/branch-heads/3325@{#610} +Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6081 + +Fix XSS in supervised user interstitial + +BUG=797525 + +Change-Id: Ib5cfa732b0f4de8645031c0166e4d67633a65c93 +Reviewed-on: https://chromium-review.googlesource.com/844075 +Reviewed-by: Bernhard Bauer +Commit-Queue: Rob Wu +Cr-Commit-Position: refs/heads/master@{#526158} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6082 + +Remove port 22 from the set of allowed FTP ports. + +The collision with SSH ports caused some possible concerns with being +able to enumerate internal hosts. Analysis shows that Internet hosts +supporting FTP over port 22 are a small fraction, and likely not +accessed over the web. + +Bug: 767354 +Change-Id: I8958b4cc818b34127fd739d2dea58f498fb073c0 +Reviewed-on: https://chromium-review.googlesource.com/860753 +Reviewed-by: Matt Menke +Commit-Queue: Christopher Thompson +Cr-Commit-Position: refs/heads/master@{#528461} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6064 + +[elements] Fix Object.entries/values with changing elements + +Drive-by-cleanup: +- Add InternalElementsAccessor to expose protected instance methods +to ElementsAccessor subclasses. +- Make some more ElementsAccessor methods protected that take the +raw entry as parameter. + +Bug: chromium:798644 +Change-Id: Iffd00f1953461e8dd22c123e62298410fb6e049c +Reviewed-on: https://chromium-review.googlesource.com/856816 +Commit-Queue: Camillo Bruni +Reviewed-by: Jakob Kummerow +Cr-Commit-Position: refs/heads/master@{#50480} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6062 + +use safemath::mull for buffer sizes + +Bug:780104 +Change-Id: Ic683abd9c7d15ebb01b6e5d40dbeb6e76f102eff +Reviewed-on: https://skia-review.googlesource.com/95760 +Reviewed-by: Brian Salomon +Commit-Queue: Mike Reed +(cherry picked from commit fe266c2bce2b8ac4ef953f16c8e1a7801da9c57d) +Reviewed-on: https://skia-review.googlesource.com/101780 +Reviewed-by: Allan Sandfeld Jensen + +[Backport] CVE-2018-6060 + +Keep AudioHandlers alive until they can be safely deleted. + +When an AudioNode is disposed, the handler is also disposed. But add +the handler to the orphan list so that the handler stays alive until +the context can safely delete it. If we don't do this, the handler +may get deleted while the audio thread is processing the handler (due +to, say, channel count changes and such). + +For an realtime context, save the handler if the context is not closed. +(Nothing will clean up the handler if the context is closed.) + +For an offline context, only need to do this when the context is +running because the context is guaranteed to be stopped if we're not +in the running state. Hence, there's no possibility of deleting the +handler while the graph is running. + +Bug: 780919 +Change-Id: Id8ba47f48504c5681121facebfc5acb85b05de87 +Reviewed-on: https://chromium-review.googlesource.com/868841 +Reviewed-by: Hongchan Choi +Commit-Queue: Raymond Toy +Cr-Original-Commit-Position: refs/heads/master@{#530892}(cherry picked from commit ebcf9595bf908b515ffcd31374b071697a69faed) +Reviewed-on: https://chromium-review.googlesource.com/893626 +Reviewed-by: Raymond Toy +Cr-Commit-Position: refs/branch-heads/3325@{#180} +Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] Security Bug 798410 + +Crash fix for th with role gridcell in a table with nontraditional css + +Do not assume we can use ToLayoutCell() in an object that can be created +for an ARIA cell and may not be associated with an actual table cell. + +Bug: 798410 +Change-Id: I3db7d09ca146469a4fb87ef04a03e9d4ba8525d3 +Reviewed-on: https://chromium-review.googlesource.com/906953 +Commit-Queue: Aaron Leventhal +Reviewed-by: Nektarios Paisios +Cr-Original-Commit-Position: refs/heads/master@{#535462}(cherry picked from commit b0d1618cc5e95f77c152022232257b61b61a952e) +Reviewed-on: https://chromium-review.googlesource.com/916527 +Reviewed-by: Aaron Leventhal +Cr-Commit-Position: refs/branch-heads/3325@{#447} +Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} +Reviewed-by: Allan Sandfeld Jensen + +[Backport] Security Bug 789764 + +[parser] Fix func numbering inside for in. + +BUG=chromium:789764 + +Change-Id: I6a466660159721683c4979af32019d740094151b +Reviewed-on: https://chromium-review.googlesource.com/803217 +Reviewed-by: Ross McIlroy +Reviewed-by: Jochen Eisinger +Commit-Queue: Marja Hölttä +Cr-Commit-Position: refs/heads/master@{#49795} +Reviewed-by: Allan Sandfeld Jensen +--- + .../search_engines/template_url_parser.cc | 2 +- + .../supervised_user_block_interstitial.js | 8 +-- + .../gpu/command_buffer/service/context_state.cc | 34 +++++++++- + .../gpu/command_buffer/service/texture_manager.cc | 6 +- + chromium/net/base/port_util.cc | 3 +- + .../bindings/core/v8/custom/V8WindowCustom.cpp | 9 +++ + .../WebKit/Source/core/frame/LocalFrameView.cpp | 5 +- + .../Source/modules/accessibility/AXTableCell.cpp | 8 +++ + .../WebKit/Source/modules/webaudio/AudioNode.cpp | 41 ++++++++++-- + chromium/third_party/skia/include/core/SkTypes.h | 1 + + chromium/third_party/skia/src/core/SkMath.cpp | 16 +++++ + chromium/third_party/skia/src/core/SkPathRef.cpp | 22 +++++-- + chromium/third_party/skia/src/core/SkSafeMath.h | 19 ++++++ + .../third_party/skia/src/effects/SkPackBits.cpp | 5 +- + chromium/third_party/skia/src/effects/SkPackBits.h | 2 +- + .../third_party/skia/src/gpu/GrBufferAllocPool.cpp | 6 +- + chromium/url/url_canon_etc.cc | 61 ++++++++++++----- + chromium/v8/src/ast/ast-traversal-visitor.h | 1 + + chromium/v8/src/elements.cc | 76 ++++++++++++++++++---- + chromium/v8/src/elements.h | 17 ++--- + chromium/v8/src/js/intl.js | 8 +-- + chromium/v8/src/runtime/runtime-intl.cc | 25 ++++--- + 22 files changed, 293 insertions(+), 82 deletions(-) + +diff --git a/src/3rdparty/chromium/components/search_engines/template_url_parser.cc b/src/3rdparty/chromium/components/search_engines/template_url_parser.cc +index 64b1385e05..476d879b5f 100644 +--- a/src/3rdparty/chromium/components/search_engines/template_url_parser.cc ++++ b/src/3rdparty/chromium/components/search_engines/template_url_parser.cc +@@ -438,7 +438,7 @@ void TemplateURLParsingContext::ProcessURLParams() { + return; + + GURL url(is_suggest_url_ ? data_.suggestions_url : data_.url()); +- if (url.is_empty()) ++ if (!url.is_valid()) + return; + + // If there is a parameter filter, parse the existing URL and remove any +diff --git a/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js b/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js +index d6b9327584..bee21be919 100644 +--- a/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js ++++ b/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js +@@ -67,8 +67,8 @@ function initialize() { + $('custodian-avatar-img').style.content = + makeImageSet(avatarURL1x, avatarURL2x); + } +- $('custodian-name').innerHTML = custodianName; +- $('custodian-email').innerHTML = loadTimeData.getString('custodianEmail'); ++ $('custodian-name').textContent = custodianName; ++ $('custodian-email').textContent = loadTimeData.getString('custodianEmail'); + var secondAvatarURL1x = loadTimeData.getString('secondAvatarURL1x'); + var secondAvatarURL2x = loadTimeData.getString('secondAvatarURL2x'); + var secondCustodianName = loadTimeData.getString('secondCustodianName'); +@@ -79,8 +79,8 @@ function initialize() { + $('second-custodian-avatar-img').style.content = + makeImageSet(secondAvatarURL1x, secondAvatarURL2x); + } +- $('second-custodian-name').innerHTML = secondCustodianName; +- $('second-custodian-email').innerHTML = loadTimeData.getString( ++ $('second-custodian-name').textContent = secondCustodianName; ++ $('second-custodian-email').textContent = loadTimeData.getString( + 'secondCustodianEmail'); + } + } +diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc b/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc +index 3c71d38b25..1b1d647c36 100644 +--- a/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc ++++ b/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc +@@ -29,6 +29,16 @@ GLuint Get2dServiceId(const TextureUnit& unit) { + ? unit.bound_texture_2d->service_id() : 0; + } + ++GLuint Get2dArrayServiceId(const TextureUnit& unit) { ++ return unit.bound_texture_2d_array.get() ++ ? unit.bound_texture_2d_array->service_id() ++ : 0; ++} ++ ++GLuint Get3dServiceId(const TextureUnit& unit) { ++ return unit.bound_texture_3d.get() ? unit.bound_texture_3d->service_id() : 0; ++} ++ + GLuint GetCubeServiceId(const TextureUnit& unit) { + return unit.bound_texture_cube_map.get() + ? unit.bound_texture_cube_map->service_id() : 0; +@@ -239,6 +249,8 @@ void ContextState::RestoreTextureUnitBindings( + DCHECK_LT(unit, texture_units.size()); + const TextureUnit& texture_unit = texture_units[unit]; + GLuint service_id_2d = Get2dServiceId(texture_unit); ++ GLuint service_id_2d_array = Get2dArrayServiceId(texture_unit); ++ GLuint service_id_3d = Get3dServiceId(texture_unit); + GLuint service_id_cube = GetCubeServiceId(texture_unit); + GLuint service_id_oes = GetOesServiceId(texture_unit); + GLuint service_id_arb = GetArbServiceId(texture_unit); +@@ -249,10 +261,22 @@ void ContextState::RestoreTextureUnitBindings( + feature_info_->feature_flags().oes_egl_image_external || + feature_info_->feature_flags().nv_egl_stream_consumer_external; + bool bind_texture_arb = feature_info_->feature_flags().arb_texture_rectangle; ++ // TEXTURE_2D_ARRAY and TEXTURE_3D are only applicable from ES3 version. ++ // So set it to FALSE by default. ++ bool bind_texture_2d_array = false; ++ bool bind_texture_3d = false; ++ // set the variables to true only if the application is ES3 or newer ++ if (feature_info_->IsES3Capable()) { ++ bind_texture_2d_array = true; ++ bind_texture_3d = true; ++ } + + if (prev_state) { + const TextureUnit& prev_unit = prev_state->texture_units[unit]; + bind_texture_2d = service_id_2d != Get2dServiceId(prev_unit); ++ bind_texture_2d_array = ++ service_id_2d_array != Get2dArrayServiceId(prev_unit); ++ bind_texture_3d = service_id_3d != Get3dServiceId(prev_unit); + bind_texture_cube = service_id_cube != GetCubeServiceId(prev_unit); + bind_texture_oes = + bind_texture_oes && service_id_oes != GetOesServiceId(prev_unit); +@@ -261,8 +285,8 @@ void ContextState::RestoreTextureUnitBindings( + } + + // Early-out if nothing has changed from the previous state. +- if (!bind_texture_2d && !bind_texture_cube +- && !bind_texture_oes && !bind_texture_arb) { ++ if (!bind_texture_2d && !bind_texture_2d_array && !bind_texture_3d && ++ !bind_texture_cube && !bind_texture_oes && !bind_texture_arb) { + return; + } + +@@ -279,6 +303,12 @@ void ContextState::RestoreTextureUnitBindings( + if (bind_texture_arb) { + glBindTexture(GL_TEXTURE_RECTANGLE_ARB, service_id_arb); + } ++ if (bind_texture_2d_array) { ++ glBindTexture(GL_TEXTURE_2D_ARRAY, service_id_2d_array); ++ } ++ if (bind_texture_3d) { ++ glBindTexture(GL_TEXTURE_3D, service_id_3d); ++ } + } + + void ContextState::RestoreSamplerBinding(GLuint unit, +diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc b/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc +index f56e04f411..cac58af031 100644 +--- a/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc ++++ b/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc +@@ -2634,9 +2634,6 @@ void TextureManager::DoCubeMapWorkaround( + TextureRef* texture_ref, + const char* function_name, + const DoTexImageArguments& args) { +- // This workaround code does not work with an unpack buffer bound. +- ScopedResetPixelUnpackBuffer scoped_reset_pbo(state); +- + std::vector undefined_faces; + Texture* texture = texture_ref->texture(); + if (texture_state->force_cube_complete || +@@ -2668,6 +2665,8 @@ void TextureManager::DoCubeMapWorkaround( + DoTexImageArguments new_args = args; + std::unique_ptr zero(new char[args.pixels_size]); + memset(zero.get(), 0, args.pixels_size); ++ // Need to clear PIXEL_UNPACK_BUFFER and UNPACK params for data uploading. ++ state->PushTextureDecompressionUnpackState(); + for (GLenum face : undefined_faces) { + new_args.target = face; + new_args.pixels = zero.get(); +@@ -2675,6 +2674,7 @@ void TextureManager::DoCubeMapWorkaround( + function_name, texture_ref, new_args); + texture->MarkLevelAsInternalWorkaround(face, args.level); + } ++ state->RestoreUnpackState(); + } + + void TextureManager::ValidateAndDoTexImage( +diff --git a/src/3rdparty/chromium/net/base/port_util.cc b/src/3rdparty/chromium/net/base/port_util.cc +index 543d9db943..83c9821398 100644 +--- a/src/3rdparty/chromium/net/base/port_util.cc ++++ b/src/3rdparty/chromium/net/base/port_util.cc +@@ -90,10 +90,9 @@ const int kRestrictedPorts[] = { + // KURL::port()) + }; + +-// FTP overrides the following restricted ports. ++// FTP overrides the following restricted port. + const int kAllowedFtpPorts[] = { + 21, // ftp data +- 22, // ssh + }; + + base::LazyInstance>::Leaky g_explicitly_allowed_ports = +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp +index 90883c712f..9abef3a420 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp +@@ -262,6 +262,15 @@ void V8Window::openMethodCustom( + return; + } + ++ // If the bindings implementation is 100% correct, the current realm and the ++ // entered realm should be same origin-domain. However, to be on the safe ++ // side and add some defense in depth, we'll check against the entered realm ++ // as well here. ++ if (!BindingSecurity::ShouldAllowAccessTo(EnteredDOMWindow(info.GetIsolate()), ++ impl, exception_state)) { ++ return; ++ } ++ + TOSTRING_VOID(V8StringResource, + url_string, info[0]); + AtomicString frame_name; +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp +index 8ce1574d45..1c5b193eda 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp +@@ -1862,9 +1862,12 @@ void LocalFrameView::ProcessUrlFragment(const KURL& url, + !frame_->GetDocument()->IsSVGDocument()) + return; + ++ // Try the raw fragment for HTML documents, but skip it for `svgView()`: + String fragment_identifier = url.FragmentIdentifier(); +- if (ProcessUrlFragmentHelper(fragment_identifier, behavior)) ++ if (!frame_->GetDocument()->IsSVGDocument() && ++ ProcessUrlFragmentHelper(fragment_identifier, behavior)) { + return; ++ } + + // Try again after decoding the ref, based on the document's encoding. + if (frame_->GetDocument()->Encoding().IsValid()) { +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp +index bbe7147921..1b88d0bd4e 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp +@@ -156,6 +156,14 @@ AccessibilityRole AXTableCell::ScanToDecideHeaderRole() { + if (IsColumnHeaderCell()) + return kColumnHeaderRole; + ++ // This occurs in an edge case that mixes non-table CSS into a ++ // table, and , see bug 798410. ++ // The odd CSS causes the to not be a LayoutTableCell, ++ // and the ARIA role causes it to fall through to here, because ++ // it is not an ARIA/HTML column/row header. ++ if (!layout_object_ || !layout_object_->IsTableCell()) ++ return kCellRole; // . ++ + // Check the previous cell and the next cell on the same row. + LayoutTableCell* layout_cell = ToLayoutTableCell(layout_object_); + AccessibilityRole header_role = kCellRole; +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp +index 64cc1d575f..b764fb6145 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp +@@ -64,6 +64,15 @@ AudioHandler::AudioHandler(NodeType node_type, + } + #endif + InstanceCounters::IncrementCounter(InstanceCounters::kAudioHandlerCounter); ++ ++#if DEBUG_AUDIONODE_REFERENCES ++ fprintf( ++ stderr, ++ "[%16p]: %16p: %2d: AudioHandler::AudioHandler() %d [%d] total: %u\n", ++ Context(), this, GetNodeType(), connection_ref_count_, ++ node_count_[GetNodeType()], ++ InstanceCounters::CounterValue(InstanceCounters::kAudioHandlerCounter)); ++#endif + } + + AudioHandler::~AudioHandler() { +@@ -73,9 +82,13 @@ AudioHandler::~AudioHandler() { + InstanceCounters::DecrementCounter(InstanceCounters::kAudioHandlerCounter); + #if DEBUG_AUDIONODE_REFERENCES + --node_count_[GetNodeType()]; +- fprintf(stderr, "[%16p]: %16p: %2d: AudioHandler::~AudioHandler() %d [%d]\n", +- Context(), this, GetNodeType(), connection_ref_count_, +- node_count_[GetNodeType()]); ++ fprintf( ++ stderr, ++ "[%16p]: %16p: %2d: AudioHandler::~AudioHandler() %d [%d] remaining: " ++ "%u\n", ++ Context(), this, GetNodeType(), connection_ref_count_, ++ node_count_[GetNodeType()], ++ InstanceCounters::CounterValue(InstanceCounters::kAudioHandlerCounter)); + #endif + } + +@@ -542,9 +555,25 @@ void AudioNode::Dispose() { + #endif + BaseAudioContext::AutoLocker locker(context()); + Handler().Dispose(); +- if (context()->ContextState() == BaseAudioContext::kRunning) { +- context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( +- std::move(handler_)); ++ if (context()->HasRealtimeConstraint()) { ++ // Add the handler to the orphan list if the context is not ++ // closed. (Nothing will clean up the orphan list if the context ++ // is closed.) These will get cleaned up in the post render task ++ // if audio thread is running or when the context is colleced (in ++ // the worst case). ++ if (context()->ContextState() != BaseAudioContext::kClosed) { ++ context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( ++ std::move(handler_)); ++ } ++ } else { ++ // For an offline context, only need to save the handler when the ++ // context is running. The change in the context state is ++ // synchronous with the main thread (even though the offline ++ // thread is not synchronized to the main thread). ++ if (context()->ContextState() == BaseAudioContext::kRunning) { ++ context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( ++ std::move(handler_)); ++ } + } + } + +diff --git a/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h b/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h +index 1dd672bea4..a3e295e285 100644 +--- a/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h ++++ b/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h +@@ -235,6 +235,7 @@ template D SkTo(S s) { + #define SK_MaxU32 0xFFFFFFFF + #define SK_MinU32 0 + #define SK_NaN32 ((int) (1U << 31)) ++#define SK_MaxSizeT SIZE_MAX + + /** Returns true if the value can be represented with signed 16bits + */ +diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp b/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp +index 6eff790c85..947c125b27 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp +@@ -10,6 +10,8 @@ + #include "SkFloatBits.h" + #include "SkFloatingPoint.h" + #include "SkScalar.h" ++#include "SkSafeMath.h" ++ + + #define sub_shift(zeros, x, n) \ + zeros -= n; \ +@@ -84,3 +86,17 @@ float SkScalarSinCos(float radians, float* cosValue) { + } + return sinValue; + } ++ ++/////////////////////////////////////////////////////////////////////////////////////////////////// ++ ++size_t SkSafeMath::Add(size_t x, size_t y) { ++ SkSafeMath tmp; ++ size_t sum = tmp.add(x, y); ++ return tmp.ok() ? sum : SK_MaxSizeT; ++} ++ ++size_t SkSafeMath::Mul(size_t x, size_t y) { ++ SkSafeMath tmp; ++ size_t prod = tmp.mul(x, y); ++ return tmp.ok() ? prod : SK_MaxSizeT; ++} +diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp b/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp +index 094e6717e6..33008ead35 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp +@@ -9,7 +9,7 @@ + #include "SkOnce.h" + #include "SkPath.h" + #include "SkPathRef.h" +-#include ++#include "SkSafeMath.h" + + ////////////////////////////////////////////////////////////////////////////// + SkPathRef::Editor::Editor(sk_sp* pathRef, +@@ -195,22 +195,23 @@ static bool deduce_pts_conics(const uint8_t verbs[], int vCount, int* ptCountPtr + return false; + } + ++ SkSafeMath safe; + int ptCount = 0; + int conicCount = 0; + for (int i = 0; i < vCount; ++i) { + switch (verbs[i]) { + case SkPath::kMove_Verb: + case SkPath::kLine_Verb: +- ptCount += 1; ++ ptCount = safe.addInt(ptCount, 1); + break; + case SkPath::kConic_Verb: + conicCount += 1; + // fall-through + case SkPath::kQuad_Verb: +- ptCount += 2; ++ ptCount = safe.addInt(ptCount, 2); + break; + case SkPath::kCubic_Verb: +- ptCount += 3; ++ ptCount = safe.addInt(ptCount, 3); + break; + case SkPath::kClose_Verb: + break; +@@ -218,6 +219,9 @@ static bool deduce_pts_conics(const uint8_t verbs[], int vCount, int* ptCountPtr + return false; + } + } ++ if (!safe) { ++ return false; ++ } + *ptCountPtr = ptCount; + *conicCountPtr = conicCount; + return true; +@@ -554,12 +558,18 @@ SkPoint* SkPathRef::growForVerb(int /* SkPath::Verb*/ verb, SkScalar weight) { + dirtyAfterEdit = false; + pCnt = 0; + } ++ SkSafeMath safe; ++ int newPointCnt = safe.addInt(fPointCnt, pCnt); ++ int newVerbCnt = safe.addInt(fVerbCnt, 1); ++ if (!safe) { ++ SK_ABORT("cannot grow path"); ++ } + size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint); + this->makeSpace(space); + this->fVerbs[~fVerbCnt] = verb; + SkPoint* ret = fPoints + fPointCnt; +- fVerbCnt += 1; +- fPointCnt += pCnt; ++ fVerbCnt = newVerbCnt; ++ fPointCnt = newPointCnt; + fFreeSpace -= space; + fBoundsIsDirty = true; // this also invalidates fIsFinite + if (dirtyAfterEdit) { +diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h b/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h +index 91200fbb56..74089633ae 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h ++++ b/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h +@@ -28,6 +28,25 @@ public: + return result; + } + ++ /** ++ * Return a + b, unless this result is an overflow/underflow. In those cases, fOK will ++ * be set to false, and it is undefined what this returns. ++ */ ++ int addInt(int a, int b) { ++ if (b < 0 && a < std::numeric_limits::min() - b) { ++ fOK = false; ++ return a; ++ } else if (b > 0 && a > std::numeric_limits::max() - b) { ++ fOK = false; ++ return a; ++ } ++ return a + b; ++ } ++ ++ // These saturate to their results ++ static size_t Add(size_t x, size_t y); ++ static size_t Mul(size_t x, size_t y); ++ + private: + uint32_t mul32(uint32_t x, uint32_t y) { + uint64_t bx = x; +diff --git a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp +index 286d9d140c..d2dfed9de1 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp +@@ -88,13 +88,13 @@ int SkPackBits::Unpack8(const uint8_t* SK_RESTRICT src, size_t srcSize, + unsigned n = *src++; + if (n <= 127) { // repeat count (n + 1) + n += 1; +- if (dst >(endDst - n)) { ++ if (dst > (endDst - n) || src >= stop) { + return 0; + } + memset(dst, *src++, n); + } else { // same count (n - 127) + n -= 127; +- if (dst > (endDst - n)) { ++ if (dst > (endDst - n) || src > (stop - n)) { + return 0; + } + memcpy(dst, src, n); +@@ -103,5 +103,6 @@ int SkPackBits::Unpack8(const uint8_t* SK_RESTRICT src, size_t srcSize, + dst += n; + } + SkASSERT(src <= stop); ++ SkASSERT(dst <= endDst); + return SkToInt(dst - origDst); + } +diff --git a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h +index 2dc7677afc..773b13e0c1 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h ++++ b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h +@@ -36,7 +36,7 @@ public: + @param srcSize Number of bytes of src to unpack + @param dst Buffer (allocated by caller) to expand the src[] into. + @param dstSize Number of bytes in the output buffer. +- @return the number of bytes written into dst. ++ @return the number of bytes written into dst, or 0 if srcSize or dstSize are too small. + */ + static int Unpack8(const uint8_t src[], size_t srcSize, uint8_t dst[], + size_t dstSize); +diff --git a/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp b/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp +index 3096ae5eeb..050b5db164 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp +@@ -13,7 +13,7 @@ + #include "GrGpu.h" + #include "GrResourceProvider.h" + #include "GrTypes.h" +- ++#include "SkSafeMath.h" + #include "SkTraceEvent.h" + + #ifdef SK_DEBUG +@@ -393,7 +393,7 @@ void* GrVertexBufferAllocPool::makeSpace(size_t vertexSize, + SkASSERT(startVertex); + + size_t offset SK_INIT_TO_AVOID_WARNING; +- void* ptr = INHERITED::makeSpace(vertexSize * vertexCount, ++ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(vertexSize, vertexCount), + vertexSize, + buffer, + &offset); +@@ -447,7 +447,7 @@ void* GrIndexBufferAllocPool::makeSpace(int indexCount, + SkASSERT(startIndex); + + size_t offset SK_INIT_TO_AVOID_WARNING; +- void* ptr = INHERITED::makeSpace(indexCount * sizeof(uint16_t), ++ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(indexCount, sizeof(uint16_t)), + sizeof(uint16_t), + buffer, + &offset); +diff --git a/src/3rdparty/chromium/url/url_canon_etc.cc b/src/3rdparty/chromium/url/url_canon_etc.cc +index 31e9fb5cfa..bbc46270a1 100644 +--- a/src/3rdparty/chromium/url/url_canon_etc.cc ++++ b/src/3rdparty/chromium/url/url_canon_etc.cc +@@ -233,6 +233,43 @@ bool DoPort(const CHAR* spec, + return true; + } + ++// clang-format off ++// Percent-escape all "C0 controls" (0x00-0x1F) ++// https://infra.spec.whatwg.org/#c0-control along with the characters ' ' ++// (0x20), '"' (0x22), '<' (0x3C), '>' (0x3E), and '`' (0x60): ++const bool kShouldEscapeCharInRef[0x80] = { ++// Control characters (0x00-0x1F) ++ true, true, true, true, true, true, true, true, ++ true, true, true, true, true, true, true, true, ++ true, true, true, true, true, true, true, true, ++ true, true, true, true, true, true, true, true, ++// ' ' ! " # $ % & ' ++ true, false, true, false, false, false, false, false, ++// ( ) * + , - . / ++ false, false, false, false, false, false, false, false, ++// 0 1 2 3 4 5 6 7 ++ false, false, false, false, false, false, false, false, ++// 8 9 : ; < = > ? ++ false, false, false, false, true, false, true, false, ++// @ A B C D E F G ++ false, false, false, false, false, false, false, false, ++// H I J K L M N O ++ false, false, false, false, false, false, false, false, ++// P Q R S T U V W ++ false, false, false, false, false, false, false, false, ++// X Y Z [ \ ] ^ _ ++ false, false, false, false, false, false, false, false, ++// ` a b c d e f g ++ true, false, false, false, false, false, false, false, ++// h i j k l m n o ++ false, false, false, false, false, false, false, false, ++// p q r s t u v w ++ false, false, false, false, false, false, false, false, ++// x y z { | } ~ ++ false, false, false, false, false, false, false ++}; ++// clang-format on ++ + template + void DoCanonicalizeRef(const CHAR* spec, + const Component& ref, +@@ -255,22 +292,16 @@ void DoCanonicalizeRef(const CHAR* spec, + if (spec[i] == 0) { + // IE just strips NULLs, so we do too. + continue; +- } else if (static_cast(spec[i]) < 0x20) { +- // Unline IE seems to, we escape control characters. This will probably +- // make the reference fragment unusable on a web page, but people +- // shouldn't be using control characters in their anchor names. +- AppendEscapedChar(static_cast(spec[i]), output); +- } else if (static_cast(spec[i]) < 0x80) { +- // Normal ASCII characters are just appended. +- output->push_back(static_cast(spec[i])); ++ } ++ ++ UCHAR current_char = static_cast(spec[i]); ++ if (current_char < 0x80) { ++ if (kShouldEscapeCharInRef[current_char]) ++ AppendEscapedChar(static_cast(spec[i]), output); ++ else ++ output->push_back(static_cast(spec[i])); + } else { +- // Non-ASCII characters are appended unescaped, but only when they are +- // valid. Invalid Unicode characters are replaced with the "invalid +- // character" as IE seems to (ReadUTFChar puts the unicode replacement +- // character in the output on failure for us). +- unsigned code_point; +- ReadUTFChar(spec, &i, end, &code_point); +- AppendUTF8Value(code_point, output); ++ AppendUTF8EscapedChar(spec, &i, end, output); + } + } + +diff --git a/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h b/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h +index 5eee300cc3..7026268b77 100644 +--- a/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h ++++ b/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h +@@ -248,6 +248,7 @@ void AstTraversalVisitor::VisitForStatement(ForStatement* stmt) { + template + void AstTraversalVisitor::VisitForInStatement(ForInStatement* stmt) { + PROCESS_NODE(stmt); ++ RECURSE(Visit(stmt->each())); + RECURSE(Visit(stmt->enumerable())); + RECURSE(Visit(stmt->body())); + } +diff --git a/src/3rdparty/chromium/v8/src/elements.cc b/src/3rdparty/chromium/v8/src/elements.cc +index 716cc00b9a..bc89c77047 100644 +--- a/src/3rdparty/chromium/v8/src/elements.cc ++++ b/src/3rdparty/chromium/v8/src/elements.cc +@@ -518,6 +518,21 @@ static Maybe IndexOfValueSlowPath(Isolate* isolate, + return Just(-1); + } + ++// The InternalElementsAccessor is a helper class to expose otherwise protected ++// methods to its subclasses. Namely, we don't want to publicly expose methods ++// that take an entry (instead of an index) as an argument. ++class InternalElementsAccessor : public ElementsAccessor { ++ public: ++ explicit InternalElementsAccessor(const char* name) ++ : ElementsAccessor(name) {} ++ ++ virtual uint32_t GetEntryForIndex(Isolate* isolate, JSObject* holder, ++ FixedArrayBase* backing_store, ++ uint32_t index) = 0; ++ ++ virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; ++}; ++ + // Base class for element handler implementations. Contains the + // the common logic for objects with different ElementsKinds. + // Subclasses must specialize method for which the element +@@ -536,10 +551,10 @@ static Maybe IndexOfValueSlowPath(Isolate* isolate, + // CRTP to guarantee aggressive compile time optimizations (i.e. inlining and + // specialization of SomeElementsAccessor methods). + template +-class ElementsAccessorBase : public ElementsAccessor { ++class ElementsAccessorBase : public InternalElementsAccessor { + public: + explicit ElementsAccessorBase(const char* name) +- : ElementsAccessor(name) { } ++ : InternalElementsAccessor(name) {} + + typedef ElementsTraitsParam ElementsTraits; + typedef typename ElementsTraitsParam::BackingStore BackingStore; +@@ -1040,35 +1055,67 @@ class ElementsAccessorBase : public ElementsAccessor { + Isolate* isolate, Handle object, + Handle values_or_entries, bool get_entries, int* nof_items, + PropertyFilter filter) { +- int count = 0; ++ DCHECK_EQ(*nof_items, 0); + KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly, + ALL_PROPERTIES); + Subclass::CollectElementIndicesImpl( + object, handle(object->elements(), isolate), &accumulator); + Handle keys = accumulator.GetKeys(); + +- for (int i = 0; i < keys->length(); ++i) { ++ int count = 0; ++ int i = 0; ++ Handle original_map(object->map(), isolate); ++ ++ for (; i < keys->length(); ++i) { + Handle key(keys->get(i), isolate); +- Handle value; + uint32_t index; + if (!key->ToUint32(&index)) continue; + ++ DCHECK_EQ(object->map(), *original_map); + uint32_t entry = Subclass::GetEntryForIndexImpl( + isolate, *object, object->elements(), index, filter); + if (entry == kMaxUInt32) continue; + + PropertyDetails details = Subclass::GetDetailsImpl(*object, entry); + ++ Handle value; + if (details.kind() == kData) { + value = Subclass::GetImpl(isolate, object->elements(), entry); + } else { ++ // This might modify the elements and/or change the elements kind. + LookupIterator it(isolate, object, index, LookupIterator::OWN); + ASSIGN_RETURN_ON_EXCEPTION_VALUE( + isolate, value, Object::GetProperty(&it), Nothing()); + } +- if (get_entries) { +- value = MakeEntryPair(isolate, index, value); ++ if (get_entries) value = MakeEntryPair(isolate, index, value); ++ values_or_entries->set(count++, *value); ++ if (object->map() != *original_map) break; ++ } ++ ++ // Slow path caused by changes in elements kind during iteration. ++ for (; i < keys->length(); i++) { ++ Handle key(keys->get(i), isolate); ++ uint32_t index; ++ if (!key->ToUint32(&index)) continue; ++ ++ if (filter & ONLY_ENUMERABLE) { ++ InternalElementsAccessor* accessor = ++ reinterpret_cast( ++ object->GetElementsAccessor()); ++ ++ uint32_t entry = accessor->GetEntryForIndex(isolate, *object, ++ object->elements(), index); ++ if (entry == kMaxUInt32) continue; ++ PropertyDetails details = accessor->GetDetails(*object, entry); ++ if (!details.IsEnumerable()) continue; + } ++ ++ Handle value; ++ LookupIterator it(isolate, object, index, LookupIterator::OWN); ++ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, value, Object::GetProperty(&it), ++ Nothing()); ++ ++ if (get_entries) value = MakeEntryPair(isolate, index, value); + values_or_entries->set(count++, *value); + } + +@@ -1668,12 +1715,13 @@ class DictionaryElementsAccessor + return result; + } + } +- ++ Handle original_map(receiver->map(), isolate); + Handle dictionary( + SeededNumberDictionary::cast(receiver->elements()), isolate); + // Iterate through entire range, as accessing elements out of order is + // observable + for (uint32_t k = start_from; k < length; ++k) { ++ DCHECK_EQ(receiver->map(), *original_map); + int entry = dictionary->FindEntry(isolate, k); + if (entry == SeededNumberDictionary::kNotFound) { + if (search_for_hole) return Just(true); +@@ -1738,15 +1786,15 @@ class DictionaryElementsAccessor + uint32_t start_from, uint32_t length) { + DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver)); + ++ Handle original_map(receiver->map(), isolate); + Handle dictionary( + SeededNumberDictionary::cast(receiver->elements()), isolate); + // Iterate through entire range, as accessing elements out of order is + // observable. + for (uint32_t k = start_from; k < length; ++k) { ++ DCHECK_EQ(receiver->map(), *original_map); + int entry = dictionary->FindEntry(isolate, k); +- if (entry == SeededNumberDictionary::kNotFound) { +- continue; +- } ++ if (entry == SeededNumberDictionary::kNotFound) continue; + + PropertyDetails details = GetDetailsImpl(*dictionary, entry); + switch (details.kind()) { +@@ -3622,12 +3670,13 @@ class SloppyArgumentsElementsAccessor + Handle value, + uint32_t start_from, uint32_t length) { + DCHECK(JSObject::PrototypeHasNoElements(isolate, *object)); +- Handle original_map = handle(object->map(), isolate); ++ Handle original_map(object->map(), isolate); + Handle elements( + SloppyArgumentsElements::cast(object->elements()), isolate); + bool search_for_hole = value->IsUndefined(isolate); + + for (uint32_t k = start_from; k < length; ++k) { ++ DCHECK_EQ(object->map(), *original_map); + uint32_t entry = + GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES); + if (entry == kMaxUInt32) { +@@ -3663,11 +3712,12 @@ class SloppyArgumentsElementsAccessor + Handle value, + uint32_t start_from, uint32_t length) { + DCHECK(JSObject::PrototypeHasNoElements(isolate, *object)); +- Handle original_map = handle(object->map(), isolate); ++ Handle original_map(object->map(), isolate); + Handle elements( + SloppyArgumentsElements::cast(object->elements()), isolate); + + for (uint32_t k = start_from; k < length; ++k) { ++ DCHECK_EQ(object->map(), *original_map); + uint32_t entry = + GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES); + if (entry == kMaxUInt32) { +diff --git a/src/3rdparty/chromium/v8/src/elements.h b/src/3rdparty/chromium/v8/src/elements.h +index 9e64764bb0..350264daae 100644 +--- a/src/3rdparty/chromium/v8/src/elements.h ++++ b/src/3rdparty/chromium/v8/src/elements.h +@@ -52,7 +52,6 @@ class ElementsAccessor { + + virtual Handle Get(Handle holder, uint32_t entry) = 0; + +- virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; + virtual bool HasAccessors(JSObject* holder) = 0; + virtual uint32_t NumberOfElements(JSObject* holder) = 0; + +@@ -63,8 +62,6 @@ class ElementsAccessor { + // element that is non-deletable. + virtual void SetLength(Handle holder, uint32_t new_length) = 0; + +- // Deletes an element in an object. +- virtual void Delete(Handle holder, uint32_t entry) = 0; + + // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all + // of elements from source after source_start to the destination array. +@@ -122,11 +119,6 @@ class ElementsAccessor { + + virtual void Set(Handle holder, uint32_t entry, Object* value) = 0; + +- virtual void Reconfigure(Handle object, +- Handle backing_store, uint32_t entry, +- Handle value, +- PropertyAttributes attributes) = 0; +- + virtual void Add(Handle object, uint32_t index, + Handle value, PropertyAttributes attributes, + uint32_t new_capacity) = 0; +@@ -208,6 +200,15 @@ class ElementsAccessor { + FixedArrayBase* backing_store, + uint32_t index) = 0; + ++ virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; ++ virtual void Reconfigure(Handle object, ++ Handle backing_store, uint32_t entry, ++ Handle value, ++ PropertyAttributes attributes) = 0; ++ ++ // Deletes an element in an object. ++ virtual void Delete(Handle holder, uint32_t entry) = 0; ++ + // NOTE: this method violates the handlified function signature convention: + // raw pointer parameter |source_holder| in the function that allocates. + // This is done intentionally to avoid ArrayConcat() builtin performance +diff --git a/src/3rdparty/chromium/v8/src/js/intl.js b/src/3rdparty/chromium/v8/src/js/intl.js +index 1579337fc1..7fc137f5c7 100644 +--- a/src/3rdparty/chromium/v8/src/js/intl.js ++++ b/src/3rdparty/chromium/v8/src/js/intl.js +@@ -1682,9 +1682,7 @@ function formatDate(formatter, dateValue) { + dateMs = TO_NUMBER(dateValue); + } + +- if (!NUMBER_IS_FINITE(dateMs)) throw %make_range_error(kDateRange); +- +- return %InternalDateFormat(formatter, new GlobalDate(dateMs)); ++ return %InternalDateFormat(formatter, dateMs); + } + + DEFINE_METHOD( +@@ -1706,9 +1704,7 @@ DEFINE_METHOD( + dateMs = TO_NUMBER(dateValue); + } + +- if (!NUMBER_IS_FINITE(dateMs)) throw %make_range_error(kDateRange); +- +- return %InternalDateFormatToParts(this, new GlobalDate(dateMs)); ++ return %InternalDateFormatToParts(this, dateMs); + } + ); + +diff --git a/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc b/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc +index 4bd6bebdc7..875fd719ef 100644 +--- a/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc ++++ b/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc +@@ -7,7 +7,7 @@ + #endif // V8_INTL_SUPPORT + + #include "src/runtime/runtime-utils.h" +- ++#include + #include + + #include "src/api-natives.h" +@@ -247,17 +247,21 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormat) { + DCHECK_EQ(2, args.length()); + + CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0); +- CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1); ++ CONVERT_NUMBER_ARG_HANDLE_CHECKED(date, 1); + +- Handle value; +- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, Object::ToNumber(date)); ++ double date_value = date->Number(); ++ // Check for +-Infinity and Nan ++ if (!std::isfinite(date_value)) { ++ THROW_NEW_ERROR_RETURN_FAILURE( ++ isolate, NewRangeError(MessageTemplate::kInvalidTimeValue)); ++ } + + icu::SimpleDateFormat* date_format = + DateFormat::UnpackDateFormat(isolate, date_format_holder); + CHECK_NOT_NULL(date_format); + + icu::UnicodeString result; +- date_format->format(value->Number(), result); ++ date_format->format(date_value, result); + + RETURN_RESULT_OR_FAILURE( + isolate, isolate->factory()->NewStringFromTwoByte(Vector( +@@ -349,10 +353,13 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { + DCHECK_EQ(2, args.length()); + + CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0); +- CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1); ++ CONVERT_NUMBER_ARG_HANDLE_CHECKED(date, 1); + +- Handle value; +- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, Object::ToNumber(date)); ++ double date_value = date->Number(); ++ if (!std::isfinite(date_value)) { ++ THROW_NEW_ERROR_RETURN_FAILURE( ++ isolate, NewRangeError(MessageTemplate::kInvalidTimeValue)); ++ } + + icu::SimpleDateFormat* date_format = + DateFormat::UnpackDateFormat(isolate, date_format_holder); +@@ -362,7 +369,7 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { + icu::FieldPositionIterator fp_iter; + icu::FieldPosition fp; + UErrorCode status = U_ZERO_ERROR; +- date_format->format(value->Number(), formatted, &fp_iter, status); ++ date_format->format(date_value, formatted, &fp_iter, status); + if (U_FAILURE(status)) return isolate->heap()->undefined_value(); + + Handle result = factory->NewJSArray(0); +-- +2.14.3 + From 4aaa03945920cc3d399277d358522ef384ac5d01 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 18 Mar 2018 16:36:09 +0100 Subject: [PATCH 260/437] Fix (from 5.9.5) for incomplete, ineffective fix for CVE-2018-6033 in 5.10.1 * Sun Mar 18 2018 Kevin Kofler - 5.10.1-4 - Fix (from 5.9.5) for incomplete, ineffective fix for CVE-2018-6033 in 5.10.1 --- qt5-qtwebengine.spec | 9 ++- ...-everywhere-src-5.10.1-CVE-2018-6033.patch | 64 +++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2e7d1b7..cd048c7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -122,6 +122,9 @@ Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch # see the patch metadata for the list of fixed CVEs and Chromium bug IDs # omit the Chromium bug 806122 fix because we do not ship that FFmpeg file Patch101: qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch +# fix incomplete (and thus having no effect) fix for CVE-2018-6033 in 5.10.1 +# (forward-ported from 5.9.5, will also be included in 5.11) +Patch102: qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -372,6 +375,7 @@ BuildArch: noarch %patch22 -p1 -b .icu59 %patch100 -p1 -b .no-aspirational-scripts %patch101 -p1 -b .security-5.9.5 +%patch102 -p1 -b .CVE-2018-6033 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -577,6 +581,9 @@ done %changelog +* Sun Mar 18 2018 Kevin Kofler - 5.10.1-4 +- Fix incomplete fix for CVE-2018-6033 in 5.10.1 (forward-ported from 5.9.5) + * Sat Mar 17 2018 Kevin Kofler - 5.10.1-3 - Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) diff --git a/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch b/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch new file mode 100644 index 0000000..8b97a2c --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch @@ -0,0 +1,64 @@ +From 1fd21185614dcae0c7a6e5647ba56cff0120f563 Mon Sep 17 00:00:00 2001 +Message-Id: <1fd21185614dcae0c7a6e5647ba56cff0120f563.1521386919.git.kevin.kofler@chello.at> +From: Michal Klocek +Date: Wed, 7 Mar 2018 18:36:25 +0100 +Subject: [PATCH] Implement IsMostRecentDownloadItemAtFilePath call + +Implement IsMostRecentDownloadItemAtFilePath +for download_manager_delegate_qt. This is required for +CVE-2018-6033. + +Change-Id: I9f48dfa159d684f0fda894e68b81ff622aceaae2 +Reviewed-by: Allan Sandfeld Jensen +--- + src/core/download_manager_delegate_qt.cpp | 20 ++++++++++++++++++++ + src/core/download_manager_delegate_qt.h | 2 ++ + 2 files changed, 22 insertions(+) + +diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp +index 40df9b3a..487a831e 100644 +--- a/src/core/download_manager_delegate_qt.cpp ++++ b/src/core/download_manager_delegate_qt.cpp +@@ -293,6 +293,26 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content + m_weakPtrFactory.GetWeakPtr())); + } + ++bool DownloadManagerDelegateQt::IsMostRecentDownloadItemAtFilePath(content::DownloadItem *download) ++{ ++ content::BrowserContext *context = download->GetBrowserContext(); ++ std::vector all_downloads; ++ ++ content::DownloadManager* manager = ++ content::BrowserContext::GetDownloadManager(context); ++ if (manager) ++ manager->GetAllDownloads(&all_downloads); ++ ++ for (const auto* item : all_downloads) { ++ if (item->GetGuid() == download->GetGuid() || ++ item->GetTargetFilePath() != download->GetTargetFilePath()) ++ continue; ++ if (item->GetState() == content::DownloadItem::IN_PROGRESS) ++ return false; ++ } ++ return true; ++} ++ + void DownloadManagerDelegateQt::savePackageDownloadCreated(content::DownloadItem *item) + { + OnDownloadUpdated(item); +diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h +index df43211e..7563d5d3 100644 +--- a/src/core/download_manager_delegate_qt.h ++++ b/src/core/download_manager_delegate_qt.h +@@ -81,6 +81,8 @@ public: + const base::FilePath::StringType &default_extension, + bool can_save_as_complete, + const content::SavePackagePathPickedCallback &callback) override; ++ bool IsMostRecentDownloadItemAtFilePath(content::DownloadItem* download) override; ++ + + void cancelDownload(quint32 downloadId); + void pauseDownload(quint32 downloadId); +-- +2.14.3 + From c17b1afe2c524538c9f803234ea7d743f7b4507f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 18 Mar 2018 16:53:45 +0100 Subject: [PATCH 261/437] Improve changelog entry --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index cd048c7..72bcb53 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -582,7 +582,7 @@ done %changelog * Sun Mar 18 2018 Kevin Kofler - 5.10.1-4 -- Fix incomplete fix for CVE-2018-6033 in 5.10.1 (forward-ported from 5.9.5) +- Fix (from 5.9.5) for incomplete, ineffective fix for CVE-2018-6033 in 5.10.1 * Sat Mar 17 2018 Kevin Kofler - 5.10.1-3 - Forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) From 6fba713e0852f16de200b5db185eee81d1d76c40 Mon Sep 17 00:00:00 2001 From: Iryna Shcherbina Date: Mon, 19 Mar 2018 00:55:57 +0100 Subject: [PATCH 262/437] Update Python 2 dependency declarations to new packaging standards --- qt5-qtwebengine.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 72bcb53..c42f0db 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -191,7 +191,7 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter -BuildRequires: python +BuildRequires: python2 %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif @@ -581,6 +581,10 @@ done %changelog +* Sun Mar 18 2018 Iryna Shcherbina - 5.10.1-5 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + * Sun Mar 18 2018 Kevin Kofler - 5.10.1-4 - Fix (from 5.9.5) for incomplete, ineffective fix for CVE-2018-6033 in 5.10.1 From 2d4379aac1e2197350cf08a9528f98740edf486e Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Mon, 30 Apr 2018 20:39:20 +0100 Subject: [PATCH 263/437] Rebuild for ICU 61.1 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c42f0db..3a67b13 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -581,6 +581,9 @@ done %changelog +* Mon Apr 30 2018 Pete Walter - 5.10.1-6 +- Rebuild for ICU 61.1 + * Sun Mar 18 2018 Iryna Shcherbina - 5.10.1-5 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) From aee3cb4c6f5c776e7a232bce209e7a93d6c7cb85 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 27 May 2018 14:08:00 -0500 Subject: [PATCH 264/437] rebuild (qt5 5.11.0) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3a67b13..84dd313 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,7 +50,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.10.1 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -581,6 +581,9 @@ done %changelog +* Sun May 27 2018 Rex Dieter - 5.10.1-7 +- rebuild (qt5 5.11.0) + * Mon Apr 30 2018 Pete Walter - 5.10.1-6 - Rebuild for ICU 61.1 From ba69fc4e9485743ccfcc5ccf2ee86b12661a9dc7 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 May 2018 07:35:20 -0500 Subject: [PATCH 265/437] Add patch by spot from the Fedora Chromium RPM for FTBFS with GCC 8 on i686 --- qt5-qtwebengine.spec | 7 +++++++ ...ne-everywhere-src-5.10.1-gcc8-alignof.patch | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 84dd313..62feef4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -112,6 +112,11 @@ Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch # https://codereview.qt-project.org/#/c/196922/ # see QTBUG-60886 and QTBUG-65090 Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch +# Fix FTBFS with GCC 8 on i686: GCC8 has changed the alignof operator to return +# the minimal alignment required by the target ABI instead of the preferred +# alignment. This means int64_t is now 4 on i686 (instead of 8). Use __alignof__ +# to get the value we expect (and chromium checks for). Patch by spot. +Patch23: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch ## Upstream patches: # drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), # fixes #error with ICU >= 60 (which was a reminder to double-check the list) @@ -373,6 +378,7 @@ BuildArch: noarch %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose %patch22 -p1 -b .icu59 +%patch23 -p1 -b .gcc8 %patch100 -p1 -b .no-aspirational-scripts %patch101 -p1 -b .security-5.9.5 %patch102 -p1 -b .CVE-2018-6033 @@ -583,6 +589,7 @@ done %changelog * Sun May 27 2018 Rex Dieter - 5.10.1-7 - rebuild (qt5 5.11.0) +- Add patch by spot from the Fedora Chromium RPM for FTBFS with GCC 8 on i686 * Mon Apr 30 2018 Pete Walter - 5.10.1-6 - Rebuild for ICU 61.1 diff --git a/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch b/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch new file mode 100644 index 0000000..ff007b7 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch @@ -0,0 +1,18 @@ +diff -up qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof 2018-05-15 14:58:46.448912634 -0400 ++++ qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400 +@@ -18,7 +18,13 @@ + #endif + + // Like the C++11 |alignof| operator. +-#if __cplusplus >= 201103L ++#if defined(__GNUC__) && __GNUC__ >= 8 ++// GCC 8 has changed the alignof operator to return the minimal alignment ++// required by the target ABI, instead of the preferred alignment. ++// This means that on 32-bit x86, it will return 4 instead of 8. ++// Use __alignof__ instead to avoid this. ++#define MOJO_ALIGNOF(type) __alignof__(type) ++#elif __cplusplus >= 201103L + #define MOJO_ALIGNOF(type) alignof(type) + #elif defined(__GNUC__) + #define MOJO_ALIGNOF(type) __alignof__(type) From 2ef1c5e991ecc415bc054a2493bf50834f5256a6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 May 2018 16:39:03 -0500 Subject: [PATCH 266/437] include 0027-Fix-compilation-of-simplebrowser-example.patch (5.11 branch) --- ...compilation-of-simplebrowser-example.patch | 35 +++++++++++++++++++ qt5-qtwebengine.spec | 4 +++ 2 files changed, 39 insertions(+) create mode 100644 0027-Fix-compilation-of-simplebrowser-example.patch diff --git a/0027-Fix-compilation-of-simplebrowser-example.patch b/0027-Fix-compilation-of-simplebrowser-example.patch new file mode 100644 index 0000000..e6c895f --- /dev/null +++ b/0027-Fix-compilation-of-simplebrowser-example.patch @@ -0,0 +1,35 @@ +From c041711febbee334ce5369f25cfae3f560819855 Mon Sep 17 00:00:00 2001 +From: Kai Koehne +Date: Tue, 16 Jan 2018 14:09:50 +0100 +Subject: [PATCH 027/230] Fix compilation of simplebrowser example +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Previously qstyle.h was included indirectly through the uic +generated code, but this got changed in qtbase +commit 058474884c2505a8a0. + +Task-number: QTBUG-65793 +Change-Id: I56a1cd045d53b268999d728f6907ee8d952ba6e9 +Reviewed-by: Jüri Valdmann +Reviewed-by: Michal Klocek +--- + examples/webenginewidgets/simplebrowser/webpage.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/examples/webenginewidgets/simplebrowser/webpage.cpp b/examples/webenginewidgets/simplebrowser/webpage.cpp +index 3b78b861..90395641 100644 +--- a/examples/webenginewidgets/simplebrowser/webpage.cpp ++++ b/examples/webenginewidgets/simplebrowser/webpage.cpp +@@ -56,6 +56,7 @@ + #include "webview.h" + #include + #include ++#include + + WebPage::WebPage(QWebEngineProfile *profile, QObject *parent) + : QWebEnginePage(profile, parent) +-- +2.17.0 + diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 62feef4..5939aaa 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -130,6 +130,8 @@ Patch101: qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch # fix incomplete (and thus having no effect) fix for CVE-2018-6033 in 5.10.1 # (forward-ported from 5.9.5, will also be included in 5.11) Patch102: qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch +# From 5.11 branch, fix build against Qt 5.11.x +Patch103: 0027-Fix-compilation-of-simplebrowser-example.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -382,6 +384,7 @@ BuildArch: noarch %patch100 -p1 -b .no-aspirational-scripts %patch101 -p1 -b .security-5.9.5 %patch102 -p1 -b .CVE-2018-6033 +%patch103 -p1 -b .0027 # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -590,6 +593,7 @@ done * Sun May 27 2018 Rex Dieter - 5.10.1-7 - rebuild (qt5 5.11.0) - Add patch by spot from the Fedora Chromium RPM for FTBFS with GCC 8 on i686 +- include 0027-Fix-compilation-of-simplebrowser-example.patch (5.11 branch) * Mon Apr 30 2018 Pete Walter - 5.10.1-6 - Rebuild for ICU 61.1 From 635c366f482ac6d4ce000694e9ac0613e225b133 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 16 Jun 2018 08:29:33 -0500 Subject: [PATCH 267/437] 5.11.0 drop shadow build (to match other qt5 packages where it has been problematic) drop upstreamed patches rebase no-icudtl-dat.patch pull in upstream gcc8 FTBFS fix update clean_ffmpeg whitelist patches needswork: system-nspr-prtime,system-icu-utf,no-sse2,skia-neon,icu59 minimal debug/debuginfo (for now) use macros %make_build %ldconfig_scriptlets %__ninja %__ninja_common_opts --- .gitignore | 1 + 0002-Fix-build-with-GCC-8.1.0.patch | 84 ++ clean_ffmpeg.sh | 19 +- clean_qtwebengine.sh | 2 +- qt5-qtwebengine.spec | 88 +- ...e-src-5.10.0-no-aspirational-scripts.patch | 86 -- ...-everywhere-src-5.10.1-CVE-2018-6033.patch | 64 - ...everywhere-src-5.10.1-security-5.9.5.patch | 1245 ----------------- ...-everywhere-src-5.11.0-no-icudtl-dat.patch | 22 +- sources | 2 +- 10 files changed, 163 insertions(+), 1450 deletions(-) create mode 100644 0002-Fix-build-with-GCC-8.1.0.patch delete mode 100644 qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch delete mode 100644 qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch delete mode 100644 qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch rename qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch => qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch (63%) diff --git a/.gitignore b/.gitignore index ef889b6..a4bcc76 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /qtwebengine-opensource-src-5.9.3-clean.tar.xz /qtwebengine-everywhere-src-5.10.0-clean.tar.xz /qtwebengine-everywhere-src-5.10.1-clean.tar.xz +/qtwebengine-everywhere-src-5.11.0-clean.tar.xz diff --git a/0002-Fix-build-with-GCC-8.1.0.patch b/0002-Fix-build-with-GCC-8.1.0.patch new file mode 100644 index 0000000..ee1bfe3 --- /dev/null +++ b/0002-Fix-build-with-GCC-8.1.0.patch @@ -0,0 +1,84 @@ +From 96f354df27c2f3c7c1b221b676c7a1af6b3da375 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=BCri=20Valdmann?= +Date: Mon, 14 May 2018 10:15:50 +0200 +Subject: [PATCH 02/29] Fix build with GCC 8.1.0 + +Task-number: QTBUG-68203 +Change-Id: I780d884d5e20ef04e902d7b449da4aa3f97d8d0b +Reviewed-by: Allan Sandfeld Jensen +--- + .../mojo/public/cpp/bindings/associated_interface_ptr_info.h | 2 +- + .../mojo/public/cpp/bindings/associated_interface_request.h | 2 +- + chromium/mojo/public/cpp/bindings/interface_request.h | 2 +- + .../mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h | 2 ++ + chromium/mojo/public/cpp/system/handle.h | 2 +- + 5 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h +index 1f79662bd7..184ba6a9e8 100644 +--- a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h ++++ b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h +@@ -45,7 +45,7 @@ class AssociatedInterfacePtrInfo { + + bool is_valid() const { return handle_.is_valid(); } + +- explicit operator bool() const { return handle_; } ++ explicit operator bool() const { return !!handle_; } + + ScopedInterfaceEndpointHandle PassHandle() { + return std::move(handle_); +diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_request.h b/chromium/mojo/public/cpp/bindings/associated_interface_request.h +index 12d2f3ce1d..fcdc2b9321 100644 +--- a/chromium/mojo/public/cpp/bindings/associated_interface_request.h ++++ b/chromium/mojo/public/cpp/bindings/associated_interface_request.h +@@ -50,7 +50,7 @@ class AssociatedInterfaceRequest { + // handle. + bool is_pending() const { return handle_.is_valid(); } + +- explicit operator bool() const { return handle_; } ++ explicit operator bool() const { return !!handle_; } + + ScopedInterfaceEndpointHandle PassHandle() { return std::move(handle_); } + +diff --git a/chromium/mojo/public/cpp/bindings/interface_request.h b/chromium/mojo/public/cpp/bindings/interface_request.h +index 1007cb0b8c..da1f3244a3 100644 +--- a/chromium/mojo/public/cpp/bindings/interface_request.h ++++ b/chromium/mojo/public/cpp/bindings/interface_request.h +@@ -54,7 +54,7 @@ class InterfaceRequest { + // Indicates whether the request currently contains a valid message pipe. + bool is_pending() const { return handle_.is_valid(); } + +- explicit operator bool() const { return handle_; } ++ explicit operator bool() const { return !!handle_; } + + // Removes the message pipe from the request and returns it. + ScopedMessagePipeHandle PassMessagePipe() { return std::move(handle_); } +diff --git a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h +index 5d00e5019e..ef8a927ba6 100644 +--- a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h ++++ b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h +@@ -45,6 +45,8 @@ class MOJO_CPP_BINDINGS_EXPORT ScopedInterfaceEndpointHandle { + + bool is_valid() const; + ++ explicit operator bool() const { return is_valid(); } ++ + // Returns true if the interface hasn't associated with a message pipe. + bool pending_association() const; + +diff --git a/chromium/mojo/public/cpp/system/handle.h b/chromium/mojo/public/cpp/system/handle.h +index 7c886e8825..c9f9e961db 100644 +--- a/chromium/mojo/public/cpp/system/handle.h ++++ b/chromium/mojo/public/cpp/system/handle.h +@@ -121,7 +121,7 @@ class ScopedHandleBase { + + bool is_valid() const { return handle_.is_valid(); } + +- explicit operator bool() const { return handle_; } ++ explicit operator bool() const { return !!handle_; } + + bool operator==(const ScopedHandleBase& other) const { + return handle_.value() == other.get().value(); +-- +2.17.1 + diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 51b6854..77f0b57 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -99,10 +99,15 @@ header_files=" libavutil/x86/asm.h \ libavcodec/arm/vp56_arith.h \ libavcodec/arm/vp8.h \ libavcodec/arm/vp8dsp.h \ + libavcodec/aac_ac3_parser.h \ + libavcodec/ac3_parser_internal.h \ + libavcodec/ac3.h \ + libavcodec/adts_header.h \ libavcodec/avcodec.h \ libavcodec/blockdsp.h \ libavcodec/bytestream.h \ libavcodec/dct.h \ + libavcodec/dct32.h \ libavcodec/dsputil.h \ libavcodec/dv_profile_internal.h \ libavcodec/error_resilience.h \ @@ -119,12 +124,19 @@ header_files=" libavutil/x86/asm.h \ libavcodec/h264pred.h \ libavcodec/hpeldsp.h \ libavcodec/hwaccel.h \ + libavcodec/hwaccels.h \ libavcodec/idctdsp.h \ libavcodec/internal.h \ libavcodec/mathops.h \ + libavcodec/mdct15.h \ libavcodec/me_cmp.h \ libavcodec/motion_est.h \ + libavcodec/mpegaudio_tablegen.h \ + libavcodec/mpegaudiodectab.h \ + libavcodec/mpegaudiodsp.h \ + libavcodec/mpeg12.h \ libavcodec/mpeg12data.h \ + libavcodec/mpeg12vlc.h \ libavcodec/mpegpicture.h \ libavcodec/mpegutils.h \ libavcodec/mpegvideo.h \ @@ -132,6 +144,8 @@ header_files=" libavutil/x86/asm.h \ libavcodec/mpegvideoencdsp.h \ libavcodec/old_codec_ids.h \ libavcodec/options_table.h \ + libavcodec/opus_celt.h \ + libavcodec/opus_pvq.h \ libavcodec/opus_rc.h \ libavcodec/pcm_tablegen.h \ libavcodec/pel_template.c \ @@ -211,12 +225,15 @@ manual_files=" libavutil/x86/x86inc.asm \ libavutil/x86/float_dsp.asm \ libavutil/x86/lls.asm \ libavcodec/bit_depth_template.c \ + libavcodec/dct32_template.c \ libavcodec/fft_template.c \ libavcodec/h264pred_template.c \ libavcodec/hpel_template.c \ libavcodec/hpeldsp_template.c \ libavcodec/mdct_template.c \ - libavcodec/pel_template.c \ + libavcodec/mpegaudiodec_template.c \ + libavcodec/mpegaudiodsp_template.c + libavcodec/mpegaudiodsp.c \ libavcodec/videodsp_template.c \ libavcodec/flacdec.c \ libavcodec/flacdsp.c \ diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index cc3fe6a..3b3ae9a 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.10.0" + echo "e.g.: ./clean_qtwebengine.sh 5.11.0" exit 1 fi diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5939aaa..5f66bf2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -6,7 +6,7 @@ # define to build docs, need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available # disable on Rawhide for now -%if 0%{?fedora} < 28 +%if 0%{?fedora} < 29 %global docs 1 %endif @@ -23,7 +23,8 @@ # the QMake CONFIG flags to force debugging information to be produced in # release builds, and for all parts of the code -%ifarch %{arm} +#ifarch %{arm} +%if 1 # the ARM builder runs out of memory during linking with the full setting below, # so omit debugging information for the parts upstream deems it dispensable for # (webcore, v8base) @@ -49,8 +50,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.10.1 -Release: 7%{?dist} +Version: 5.11.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -58,7 +59,7 @@ Release: 7%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qtwebengine-everywhere-src-5.10.1.tar.xz +# wget http://download.qt.io/official_releases/qt/5.11/5.11.0/submodules/qtwebengine-everywhere-src-5.11.0.tar.xz # ./clean_qtwebengine.sh 5.10.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above @@ -73,7 +74,7 @@ Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because # we use the system ICU, which embeds the data statically) completely -Patch1: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch +Patch1: qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch2: qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch @@ -118,20 +119,7 @@ Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch # to get the value we expect (and chromium checks for). Patch by spot. Patch23: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch ## Upstream patches: -# drop support for obsolete Unicode "aspirational scripts" (dropped in UTS 31), -# fixes #error with ICU >= 60 (which was a reminder to double-check the list) -# see: http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts -# backport of: https://chromium-review.googlesource.com/c/chromium/src/+/731871 -Patch100: qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch -# forward-port security backports from 5.9.5 LTS (up to Chromium 65.0.3325.146) -# see the patch metadata for the list of fixed CVEs and Chromium bug IDs -# omit the Chromium bug 806122 fix because we do not ship that FFmpeg file -Patch101: qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch -# fix incomplete (and thus having no effect) fix for CVE-2018-6033 in 5.10.1 -# (forward-ported from 5.9.5, will also be included in 5.11) -Patch102: qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch -# From 5.11 branch, fix build against Qt 5.11.x -Patch103: 0027-Fix-compilation-of-simplebrowser-example.patch +Patch102: 0002-Fix-build-with-GCC-8.1.0.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -371,20 +359,27 @@ BuildArch: noarch %if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif -%patch4 -p1 -b .system-nspr-prtime -%patch5 -p1 -b .system-icu-utf -%patch6 -p1 -b .no-sse2 + +## upstream patches +pushd src/3rdparty/chromium +%patch102 -p2 -b .0002 +popd + +##FIXME/TODO rebase +#patch4 -p1 -b .system-nspr-prtime +#patch5 -p1 -b .system-icu-utf +#patch6 -p1 -b .no-sse2 +%ifarch %{ix86} +#global sse2 1 +%endif %patch9 -p1 -b .arm-fpu-fix %patch10 -p1 -b .openmax-dl-neon -%patch11 -p1 -b .skia-neon +#patch11 -p1 -b .skia-neon %patch12 -p1 -b .webrtc-neon-detect %patch21 -p1 -b .gn-bootstrap-verbose -%patch22 -p1 -b .icu59 +#patch22 -p1 -b .icu59 %patch23 -p1 -b .gcc8 -%patch100 -p1 -b .no-aspirational-scripts -%patch101 -p1 -b .security-5.9.5 -%patch102 -p1 -b .CVE-2018-6033 -%patch103 -p1 -b .0027 + # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc @@ -427,27 +422,23 @@ cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium %build export STRIP=strip -export NINJAFLAGS="-v %{_smp_mflags}" -export NINJA_PATH=%{_bindir}/ninja-build - -mkdir %{_target_platform} -pushd %{_target_platform} +export NINJAFLAGS="%{__ninja_common_opts}" +export NINJA_PATH=%{__ninja} %{qmake_qt5} CONFIG+="%{debug_config}" \ - QMAKE_EXTRA_ARGS+="-system-webengine-icu" .. + QMAKE_EXTRA_ARGS+="-system-webengine-icu" . -make %{?_smp_mflags} +%make_build %if 0%{?docs} -make %{?_smp_mflags} docs +%make_build docs %endif -popd %install -make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +make install INSTALL_ROOT=%{buildroot} %if 0%{?docs} -make install_docs INSTALL_ROOT=%{buildroot} -C %{_target_platform} +make install_docs INSTALL_ROOT=%{buildroot} %endif # rpm macros @@ -489,8 +480,7 @@ sed -i -e "s|%{version} \${_Qt5WebEngine|%{lesser_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %filetriggerin -- %{_datadir}/myspell while read filename ; do @@ -509,7 +499,8 @@ done %{_qt5_bindir}/qwebengine_convert_dict %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess -%ifarch %{ix86} +#ifarch %{ix86} +%if 0%{?sse2} # shared V8 library and its SSE2 version %{_qt5_libdir}/qtwebengine/ %endif @@ -590,6 +581,17 @@ done %changelog +* Thu Jun 14 2018 Rex Dieter - 5.11.0-1 +- 5.11.0 +- drop shadow build (to match other qt5 packages where it has been problematic) +- drop upstreamed patches +- rebase no-icudtl-dat.patch +- pull in upstream gcc8 FTBFS fix +- update clean_ffmpeg whitelist +- patches needswork: system-nspr-prtime,system-icu-utf,no-sse2,skia-neon,icu59 +- minimal debug/debuginfo (for now) +- use macros %%make_build %%ldconfig_scriptlets %%__ninja %%__ninja_common_opts + * Sun May 27 2018 Rex Dieter - 5.10.1-7 - rebuild (qt5 5.11.0) - Add patch by spot from the Fedora Chromium RPM for FTBFS with GCC 8 on i686 diff --git a/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch b/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch deleted file mode 100644 index 967f452..0000000 --- a/qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-12-25 19:38:17.621271052 +0100 -@@ -331,39 +331,6 @@ - const icu::UnicodeSet* inclusion_set = uspoof_getInclusionUnicodeSet(status); - allowed_set.addAll(*inclusion_set); - --// Five aspirational scripts are taken from UTR 31 Table 6 at --// http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . --// Not all the characters of aspirational scripts are suitable for --// identifiers. Therefore, only characters belonging to --// [:Identifier_Type=Aspirational:] (listed in 'Status/Type=Aspirational' --// section at --// http://www.unicode.org/Public/security/latest/xidmodifications.txt) are --// are added to the allowed set. The list has to be updated when a new --// version of Unicode is released. The current version is 9.0.0 and ICU 60 --// will have Unicode 10.0 data. --#if U_ICU_VERSION_MAJOR_NUM < 60 -- const icu::UnicodeSet aspirational_scripts( -- icu::UnicodeString( -- // Unified Canadian Syllabics -- "[\\u1401-\\u166C\\u166F-\\u167F" -- // Mongolian -- "\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA" -- // Unified Canadian Syllabics -- "\\u18B0-\\u18F5" -- // Tifinagh -- "\\u2D30-\\u2D67\\u2D7F" -- // Yi -- "\\uA000-\\uA48C" -- // Miao -- "\\U00016F00-\\U00016F44\\U00016F50-\\U00016F7E" -- "\\U00016F8F-\\U00016F9F]", -- -1, US_INV), -- *status); -- allowed_set.addAll(aspirational_scripts); --#else --#error "Update aspirational_scripts per Unicode 10.0" --#endif -- - // The sections below refer to Mozilla's IDN blacklist: - // http://kb.mozillazine.org/Network.IDN.blacklist_chars - // -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-no-aspirational-scripts/src/3rdparty/chromium/components/url_formatter/url_formatter_unittest.cc 2017-12-25 19:38:17.621271052 +0100 -@@ -132,22 +132,24 @@ - {"xn---123-kbjl2j0bl2k.in", L"\x0939\x093f\x0928\x094d\x0926\x0940-123.in", - true}, - -- // 5 Aspirational scripts -+ // What used to be 5 Aspirational scripts in the earlier versions of UAX 31. -+ // UAX 31 does not define aspirational scripts any more. -+ // See http://www.unicode.org/reports/tr31/#Aspirational_Use_Scripts . - // Unifieid Canadian Syllabary -- {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", true}, -+ {"xn--dfe0tte.ca", L"\x1456\x14c2\x14ef.ca", false}, - // Tifinagh - {"xn--4ljxa2bb4a6bxb.ma", L"\x2d5c\x2d49\x2d3c\x2d49\x2d4f\x2d30\x2d56.ma", -- true}, -+ false}, - // Tifinagh with a disallowed character(U+2D6F) - {"xn--hmjzaby5d5f.ma", L"\x2d5c\x2d49\x2d3c\x2d6f\x2d49\x2d4f.ma", false}, - // Yi -- {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", true}, -+ {"xn--4o7a6e1x64c.cn", L"\xa188\xa320\xa071\xa0b7.cn", false}, - // Mongolian - 'ordu' (place, camp) -- {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", true}, -+ {"xn--56ec8bp.cn", L"\x1823\x1837\x1833\x1824.cn", false}, - // Mongolian with a disallowed character - {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, - // Miao/Pollad -- {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, -+ {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", false}, - - // Script mixing tests - // The following script combinations are allowed. -@@ -606,7 +608,7 @@ - L"a\x144a" - L"b.com", - false}, -- {"xn--xcec9s.com", L"\x1401\x144a\x1402.com", true}, -+ {"xn--xcec9s.com", L"\x1401\x144a\x1402.com", false}, - - // Custom dangerous patterns - // Two Katakana-Hiragana combining mark in a row diff --git a/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch b/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch deleted file mode 100644 index 8b97a2c..0000000 --- a/qtwebengine-everywhere-src-5.10.1-CVE-2018-6033.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 1fd21185614dcae0c7a6e5647ba56cff0120f563 Mon Sep 17 00:00:00 2001 -Message-Id: <1fd21185614dcae0c7a6e5647ba56cff0120f563.1521386919.git.kevin.kofler@chello.at> -From: Michal Klocek -Date: Wed, 7 Mar 2018 18:36:25 +0100 -Subject: [PATCH] Implement IsMostRecentDownloadItemAtFilePath call - -Implement IsMostRecentDownloadItemAtFilePath -for download_manager_delegate_qt. This is required for -CVE-2018-6033. - -Change-Id: I9f48dfa159d684f0fda894e68b81ff622aceaae2 -Reviewed-by: Allan Sandfeld Jensen ---- - src/core/download_manager_delegate_qt.cpp | 20 ++++++++++++++++++++ - src/core/download_manager_delegate_qt.h | 2 ++ - 2 files changed, 22 insertions(+) - -diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp -index 40df9b3a..487a831e 100644 ---- a/src/core/download_manager_delegate_qt.cpp -+++ b/src/core/download_manager_delegate_qt.cpp -@@ -293,6 +293,26 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content - m_weakPtrFactory.GetWeakPtr())); - } - -+bool DownloadManagerDelegateQt::IsMostRecentDownloadItemAtFilePath(content::DownloadItem *download) -+{ -+ content::BrowserContext *context = download->GetBrowserContext(); -+ std::vector all_downloads; -+ -+ content::DownloadManager* manager = -+ content::BrowserContext::GetDownloadManager(context); -+ if (manager) -+ manager->GetAllDownloads(&all_downloads); -+ -+ for (const auto* item : all_downloads) { -+ if (item->GetGuid() == download->GetGuid() || -+ item->GetTargetFilePath() != download->GetTargetFilePath()) -+ continue; -+ if (item->GetState() == content::DownloadItem::IN_PROGRESS) -+ return false; -+ } -+ return true; -+} -+ - void DownloadManagerDelegateQt::savePackageDownloadCreated(content::DownloadItem *item) - { - OnDownloadUpdated(item); -diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h -index df43211e..7563d5d3 100644 ---- a/src/core/download_manager_delegate_qt.h -+++ b/src/core/download_manager_delegate_qt.h -@@ -81,6 +81,8 @@ public: - const base::FilePath::StringType &default_extension, - bool can_save_as_complete, - const content::SavePackagePathPickedCallback &callback) override; -+ bool IsMostRecentDownloadItemAtFilePath(content::DownloadItem* download) override; -+ - - void cancelDownload(quint32 downloadId); - void pauseDownload(quint32 downloadId); --- -2.14.3 - diff --git a/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch b/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch deleted file mode 100644 index 78b3e55..0000000 --- a/qtwebengine-everywhere-src-5.10.1-security-5.9.5.patch +++ /dev/null @@ -1,1245 +0,0 @@ -From d58330a607981f2e12c65c4b72ecbc36c5c52801 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Michal Klocek -Date: Thu, 8 Mar 2018 11:26:33 +0100 -Subject: [PATCH] Backport security fixes from QtWebEngine 5.9.5 (minus FFmpeg - fix) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[Backport] CVE-2017-15429 - -Only open windows with js URLs if the entered window has access - -It's not enough to check that the current window has access, if other -security checks failed and the entered window shouldn't have access to -the current window. - -BUG=788453 -R=haraken@chromium.org,mkwst@chromium.org - -Change-Id: Iea10c52f20bdc49f00eba067cab69dab06f79f01 -Reviewed-on: https://chromium-review.googlesource.com/792934 -Commit-Queue: Jochen Eisinger -Reviewed-by: Mike West -Reviewed-by: Kentaro Hara -Reviewed-by: Yuki Shiino -Cr-Commit-Position: refs/heads/master@{#519683} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6069 - -check for bad buffers in Unpack8 - -Bug:799918 -Change-Id: I0502a487d67ce757bf818823cf0ad46b7703294c -Reviewed-on: https://skia-review.googlesource.com/92841 -Commit-Queue: Mike Reed -Reviewed-by: Florin Malita -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6071 - -detect too many points - -Bug:777318 -Change-Id: Idb52688b6ee4ae020004400da995620c1f548559 -Reviewed-on: https://skia-review.googlesource.com/73821 -Commit-Queue: Mike Reed -Reviewed-by: Herb Derby -Reviewed-by: Allan Sandfeld Jensen - -[Backport] Security Bug 770734 - -Fix a crash in TemplateURLParser. - -It was caused by dereferencing an invalid URL during parsing. - -Bug: 770734 -Change-Id: I4fedd3f310aaf7e1e1d2384aa64939d46b8b2a5a -Reviewed-on: https://chromium-review.googlesource.com/773902 -Commit-Queue: Vasilii Sukhanov -Reviewed-by: Peter Kasting -Cr-Commit-Position: refs/heads/master@{#517751} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] Security Bug 774833 - -Intl.DateTimeFormat: throw RangeError for non-finite input - -intl.js throws an exception when datetime-value to format is -Infinity or NaN, but there was a way to thwart the check. - -Moreover, intl.js and runtime-intl.cc have unnecessary conversions -of 'Number->Date->Number'. I removed the unnecessary conversion -and made 'Number' be passed to %InternalDateFormat. With this -streamlining, the work-around mentioned above does not work -anymore. - -Add a check in runtime_intl.cc for Infinity/NaN and throw a -RangeError. - -Add invalid-time test for invalid datetime-values passed to -Intl.DateTimeFormat.format(). - -Bug: chromium:774833 -Test: intl/date-format/invalid-time.js -Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng -Change-Id: Idc575e532a86ee110dc4bb945ae023d6516650ee -Reviewed-on: https://chromium-review.googlesource.com/724860 -Commit-Queue: Jungshik Shin -Reviewed-by: Adam Klein -Cr-Commit-Position: refs/heads/master@{#48765} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6073 - -Fix CopyTexImage behavior when cubemap workaround is involved. - -The bug is, we need to reset PIXEL_UNPACK_BUFFER as well as UNPACK params -in order to upload data to textures correctly. - -BUG=804118 -TEST=tests in the bug -R=piman@chromium.org -TBR=zmo@chromium.org -NOTRY=true - -(cherry picked from commit a89aa4642cefb79e312c95ca3c66bbaff5263a22) - -Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel -Change-Id: I743f03cdc98b2c6993449ca615b246eb42ef4dfa -Reviewed-on: https://chromium-review.googlesource.com/892282 -Commit-Queue: Zhenyao Mo -Reviewed-by: Antoine Labour -Reviewed-by: Kai Ninomiya -Cr-Original-Commit-Position: refs/heads/master@{#532749} -Reviewed-on: https://chromium-review.googlesource.com/895907 -Reviewed-by: Zhenyao Mo -Cr-Commit-Position: refs/branch-heads/3325@{#208} -Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6076 - -Percent-encode UTF8 characters in URL fragment identifiers. - -This brings us into line with Firefox, Safari, and the spec. - -Bug: 758523 -Reviewed-on: https://chromium-review.googlesource.com/668363 -Commit-Queue: Mike West -Reviewed-by: Jochen Eisinger -Reviewed-by: Andy Paicu -Cr-Commit-Position: refs/heads/master@{#507481} - -Encode ' ', '"', '<', '>', and '`' in URL fragments. - -Implements the changes to fragment processing described in -https://github.com/whatwg/url/pull/347, which adds a new "fragment -percent-encode set" which contains the C0 control percent-encode set, -along with: - -* 0x20 SPACE -* 0x22 (") -* 0x3C (<) -* 0x3E (>) -* 0x60 (`) - -This brings our implementation into line with Firefox. - -Bug: 758523 -Reviewed-on: https://chromium-review.googlesource.com/719004 -Commit-Queue: Mike West -Reviewed-by: Jochen Eisinger -Cr-Commit-Position: refs/heads/master@{#523383} - -Change-Id: I25de642017ccb69473626a327ad194b3431a11ed -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6079 - -Fix tabs sharing TEXTURE_2D_ARRAY/TEXTURE_3D data. - -In linux and android, we are seeing an issue where texture data from one -tab overwrites the texture data of another tab. This is happening for apps -which are using webgl2 texture of type TEXTURE_2D_ARRAY/TEXTURE_3D. -Due to a bug in virtual context save/restore code for above texture formats, -the texture data is not properly restored while switching tabs. Hence -texture data from one tab overwrites other. - -This CL has fix for that issue, an update for existing test expectations -and a new unit test for this bug. - -Bug: 788448 -Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel -Change-Id: Ie933984cdd2d1381f42eb4638f730c8245207a28 -Reviewed-on: https://chromium-review.googlesource.com/930327 -Reviewed-by: Zhenyao Mo -Commit-Queue: vikas soni -Cr-Original-Commit-Position: refs/heads/master@{#539111}(cherry picked from commit d128139d53e9268e87921e82d89b3f2053cb83fd) -Reviewed-on: https://chromium-review.googlesource.com/939878 -Cr-Commit-Position: refs/branch-heads/3325@{#610} -Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6081 - -Fix XSS in supervised user interstitial - -BUG=797525 - -Change-Id: Ib5cfa732b0f4de8645031c0166e4d67633a65c93 -Reviewed-on: https://chromium-review.googlesource.com/844075 -Reviewed-by: Bernhard Bauer -Commit-Queue: Rob Wu -Cr-Commit-Position: refs/heads/master@{#526158} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6082 - -Remove port 22 from the set of allowed FTP ports. - -The collision with SSH ports caused some possible concerns with being -able to enumerate internal hosts. Analysis shows that Internet hosts -supporting FTP over port 22 are a small fraction, and likely not -accessed over the web. - -Bug: 767354 -Change-Id: I8958b4cc818b34127fd739d2dea58f498fb073c0 -Reviewed-on: https://chromium-review.googlesource.com/860753 -Reviewed-by: Matt Menke -Commit-Queue: Christopher Thompson -Cr-Commit-Position: refs/heads/master@{#528461} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6064 - -[elements] Fix Object.entries/values with changing elements - -Drive-by-cleanup: -- Add InternalElementsAccessor to expose protected instance methods -to ElementsAccessor subclasses. -- Make some more ElementsAccessor methods protected that take the -raw entry as parameter. - -Bug: chromium:798644 -Change-Id: Iffd00f1953461e8dd22c123e62298410fb6e049c -Reviewed-on: https://chromium-review.googlesource.com/856816 -Commit-Queue: Camillo Bruni -Reviewed-by: Jakob Kummerow -Cr-Commit-Position: refs/heads/master@{#50480} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6062 - -use safemath::mull for buffer sizes - -Bug:780104 -Change-Id: Ic683abd9c7d15ebb01b6e5d40dbeb6e76f102eff -Reviewed-on: https://skia-review.googlesource.com/95760 -Reviewed-by: Brian Salomon -Commit-Queue: Mike Reed -(cherry picked from commit fe266c2bce2b8ac4ef953f16c8e1a7801da9c57d) -Reviewed-on: https://skia-review.googlesource.com/101780 -Reviewed-by: Allan Sandfeld Jensen - -[Backport] CVE-2018-6060 - -Keep AudioHandlers alive until they can be safely deleted. - -When an AudioNode is disposed, the handler is also disposed. But add -the handler to the orphan list so that the handler stays alive until -the context can safely delete it. If we don't do this, the handler -may get deleted while the audio thread is processing the handler (due -to, say, channel count changes and such). - -For an realtime context, save the handler if the context is not closed. -(Nothing will clean up the handler if the context is closed.) - -For an offline context, only need to do this when the context is -running because the context is guaranteed to be stopped if we're not -in the running state. Hence, there's no possibility of deleting the -handler while the graph is running. - -Bug: 780919 -Change-Id: Id8ba47f48504c5681121facebfc5acb85b05de87 -Reviewed-on: https://chromium-review.googlesource.com/868841 -Reviewed-by: Hongchan Choi -Commit-Queue: Raymond Toy -Cr-Original-Commit-Position: refs/heads/master@{#530892}(cherry picked from commit ebcf9595bf908b515ffcd31374b071697a69faed) -Reviewed-on: https://chromium-review.googlesource.com/893626 -Reviewed-by: Raymond Toy -Cr-Commit-Position: refs/branch-heads/3325@{#180} -Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] Security Bug 798410 - -Crash fix for th with role gridcell in a table with nontraditional css - -Do not assume we can use ToLayoutCell() in an object that can be created -for an ARIA cell and may not be associated with an actual table cell. - -Bug: 798410 -Change-Id: I3db7d09ca146469a4fb87ef04a03e9d4ba8525d3 -Reviewed-on: https://chromium-review.googlesource.com/906953 -Commit-Queue: Aaron Leventhal -Reviewed-by: Nektarios Paisios -Cr-Original-Commit-Position: refs/heads/master@{#535462}(cherry picked from commit b0d1618cc5e95f77c152022232257b61b61a952e) -Reviewed-on: https://chromium-review.googlesource.com/916527 -Reviewed-by: Aaron Leventhal -Cr-Commit-Position: refs/branch-heads/3325@{#447} -Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369} -Reviewed-by: Allan Sandfeld Jensen - -[Backport] Security Bug 789764 - -[parser] Fix func numbering inside for in. - -BUG=chromium:789764 - -Change-Id: I6a466660159721683c4979af32019d740094151b -Reviewed-on: https://chromium-review.googlesource.com/803217 -Reviewed-by: Ross McIlroy -Reviewed-by: Jochen Eisinger -Commit-Queue: Marja Hölttä -Cr-Commit-Position: refs/heads/master@{#49795} -Reviewed-by: Allan Sandfeld Jensen ---- - .../search_engines/template_url_parser.cc | 2 +- - .../supervised_user_block_interstitial.js | 8 +-- - .../gpu/command_buffer/service/context_state.cc | 34 +++++++++- - .../gpu/command_buffer/service/texture_manager.cc | 6 +- - chromium/net/base/port_util.cc | 3 +- - .../bindings/core/v8/custom/V8WindowCustom.cpp | 9 +++ - .../WebKit/Source/core/frame/LocalFrameView.cpp | 5 +- - .../Source/modules/accessibility/AXTableCell.cpp | 8 +++ - .../WebKit/Source/modules/webaudio/AudioNode.cpp | 41 ++++++++++-- - chromium/third_party/skia/include/core/SkTypes.h | 1 + - chromium/third_party/skia/src/core/SkMath.cpp | 16 +++++ - chromium/third_party/skia/src/core/SkPathRef.cpp | 22 +++++-- - chromium/third_party/skia/src/core/SkSafeMath.h | 19 ++++++ - .../third_party/skia/src/effects/SkPackBits.cpp | 5 +- - chromium/third_party/skia/src/effects/SkPackBits.h | 2 +- - .../third_party/skia/src/gpu/GrBufferAllocPool.cpp | 6 +- - chromium/url/url_canon_etc.cc | 61 ++++++++++++----- - chromium/v8/src/ast/ast-traversal-visitor.h | 1 + - chromium/v8/src/elements.cc | 76 ++++++++++++++++++---- - chromium/v8/src/elements.h | 17 ++--- - chromium/v8/src/js/intl.js | 8 +-- - chromium/v8/src/runtime/runtime-intl.cc | 25 ++++--- - 22 files changed, 293 insertions(+), 82 deletions(-) - -diff --git a/src/3rdparty/chromium/components/search_engines/template_url_parser.cc b/src/3rdparty/chromium/components/search_engines/template_url_parser.cc -index 64b1385e05..476d879b5f 100644 ---- a/src/3rdparty/chromium/components/search_engines/template_url_parser.cc -+++ b/src/3rdparty/chromium/components/search_engines/template_url_parser.cc -@@ -438,7 +438,7 @@ void TemplateURLParsingContext::ProcessURLParams() { - return; - - GURL url(is_suggest_url_ ? data_.suggestions_url : data_.url()); -- if (url.is_empty()) -+ if (!url.is_valid()) - return; - - // If there is a parameter filter, parse the existing URL and remove any -diff --git a/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js b/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js -index d6b9327584..bee21be919 100644 ---- a/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js -+++ b/src/3rdparty/chromium/components/supervised_user_error_page/resources/supervised_user_block_interstitial.js -@@ -67,8 +67,8 @@ function initialize() { - $('custodian-avatar-img').style.content = - makeImageSet(avatarURL1x, avatarURL2x); - } -- $('custodian-name').innerHTML = custodianName; -- $('custodian-email').innerHTML = loadTimeData.getString('custodianEmail'); -+ $('custodian-name').textContent = custodianName; -+ $('custodian-email').textContent = loadTimeData.getString('custodianEmail'); - var secondAvatarURL1x = loadTimeData.getString('secondAvatarURL1x'); - var secondAvatarURL2x = loadTimeData.getString('secondAvatarURL2x'); - var secondCustodianName = loadTimeData.getString('secondCustodianName'); -@@ -79,8 +79,8 @@ function initialize() { - $('second-custodian-avatar-img').style.content = - makeImageSet(secondAvatarURL1x, secondAvatarURL2x); - } -- $('second-custodian-name').innerHTML = secondCustodianName; -- $('second-custodian-email').innerHTML = loadTimeData.getString( -+ $('second-custodian-name').textContent = secondCustodianName; -+ $('second-custodian-email').textContent = loadTimeData.getString( - 'secondCustodianEmail'); - } - } -diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc b/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc -index 3c71d38b25..1b1d647c36 100644 ---- a/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc -+++ b/src/3rdparty/chromium/gpu/command_buffer/service/context_state.cc -@@ -29,6 +29,16 @@ GLuint Get2dServiceId(const TextureUnit& unit) { - ? unit.bound_texture_2d->service_id() : 0; - } - -+GLuint Get2dArrayServiceId(const TextureUnit& unit) { -+ return unit.bound_texture_2d_array.get() -+ ? unit.bound_texture_2d_array->service_id() -+ : 0; -+} -+ -+GLuint Get3dServiceId(const TextureUnit& unit) { -+ return unit.bound_texture_3d.get() ? unit.bound_texture_3d->service_id() : 0; -+} -+ - GLuint GetCubeServiceId(const TextureUnit& unit) { - return unit.bound_texture_cube_map.get() - ? unit.bound_texture_cube_map->service_id() : 0; -@@ -239,6 +249,8 @@ void ContextState::RestoreTextureUnitBindings( - DCHECK_LT(unit, texture_units.size()); - const TextureUnit& texture_unit = texture_units[unit]; - GLuint service_id_2d = Get2dServiceId(texture_unit); -+ GLuint service_id_2d_array = Get2dArrayServiceId(texture_unit); -+ GLuint service_id_3d = Get3dServiceId(texture_unit); - GLuint service_id_cube = GetCubeServiceId(texture_unit); - GLuint service_id_oes = GetOesServiceId(texture_unit); - GLuint service_id_arb = GetArbServiceId(texture_unit); -@@ -249,10 +261,22 @@ void ContextState::RestoreTextureUnitBindings( - feature_info_->feature_flags().oes_egl_image_external || - feature_info_->feature_flags().nv_egl_stream_consumer_external; - bool bind_texture_arb = feature_info_->feature_flags().arb_texture_rectangle; -+ // TEXTURE_2D_ARRAY and TEXTURE_3D are only applicable from ES3 version. -+ // So set it to FALSE by default. -+ bool bind_texture_2d_array = false; -+ bool bind_texture_3d = false; -+ // set the variables to true only if the application is ES3 or newer -+ if (feature_info_->IsES3Capable()) { -+ bind_texture_2d_array = true; -+ bind_texture_3d = true; -+ } - - if (prev_state) { - const TextureUnit& prev_unit = prev_state->texture_units[unit]; - bind_texture_2d = service_id_2d != Get2dServiceId(prev_unit); -+ bind_texture_2d_array = -+ service_id_2d_array != Get2dArrayServiceId(prev_unit); -+ bind_texture_3d = service_id_3d != Get3dServiceId(prev_unit); - bind_texture_cube = service_id_cube != GetCubeServiceId(prev_unit); - bind_texture_oes = - bind_texture_oes && service_id_oes != GetOesServiceId(prev_unit); -@@ -261,8 +285,8 @@ void ContextState::RestoreTextureUnitBindings( - } - - // Early-out if nothing has changed from the previous state. -- if (!bind_texture_2d && !bind_texture_cube -- && !bind_texture_oes && !bind_texture_arb) { -+ if (!bind_texture_2d && !bind_texture_2d_array && !bind_texture_3d && -+ !bind_texture_cube && !bind_texture_oes && !bind_texture_arb) { - return; - } - -@@ -279,6 +303,12 @@ void ContextState::RestoreTextureUnitBindings( - if (bind_texture_arb) { - glBindTexture(GL_TEXTURE_RECTANGLE_ARB, service_id_arb); - } -+ if (bind_texture_2d_array) { -+ glBindTexture(GL_TEXTURE_2D_ARRAY, service_id_2d_array); -+ } -+ if (bind_texture_3d) { -+ glBindTexture(GL_TEXTURE_3D, service_id_3d); -+ } - } - - void ContextState::RestoreSamplerBinding(GLuint unit, -diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc b/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc -index f56e04f411..cac58af031 100644 ---- a/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc -+++ b/src/3rdparty/chromium/gpu/command_buffer/service/texture_manager.cc -@@ -2634,9 +2634,6 @@ void TextureManager::DoCubeMapWorkaround( - TextureRef* texture_ref, - const char* function_name, - const DoTexImageArguments& args) { -- // This workaround code does not work with an unpack buffer bound. -- ScopedResetPixelUnpackBuffer scoped_reset_pbo(state); -- - std::vector undefined_faces; - Texture* texture = texture_ref->texture(); - if (texture_state->force_cube_complete || -@@ -2668,6 +2665,8 @@ void TextureManager::DoCubeMapWorkaround( - DoTexImageArguments new_args = args; - std::unique_ptr zero(new char[args.pixels_size]); - memset(zero.get(), 0, args.pixels_size); -+ // Need to clear PIXEL_UNPACK_BUFFER and UNPACK params for data uploading. -+ state->PushTextureDecompressionUnpackState(); - for (GLenum face : undefined_faces) { - new_args.target = face; - new_args.pixels = zero.get(); -@@ -2675,6 +2674,7 @@ void TextureManager::DoCubeMapWorkaround( - function_name, texture_ref, new_args); - texture->MarkLevelAsInternalWorkaround(face, args.level); - } -+ state->RestoreUnpackState(); - } - - void TextureManager::ValidateAndDoTexImage( -diff --git a/src/3rdparty/chromium/net/base/port_util.cc b/src/3rdparty/chromium/net/base/port_util.cc -index 543d9db943..83c9821398 100644 ---- a/src/3rdparty/chromium/net/base/port_util.cc -+++ b/src/3rdparty/chromium/net/base/port_util.cc -@@ -90,10 +90,9 @@ const int kRestrictedPorts[] = { - // KURL::port()) - }; - --// FTP overrides the following restricted ports. -+// FTP overrides the following restricted port. - const int kAllowedFtpPorts[] = { - 21, // ftp data -- 22, // ssh - }; - - base::LazyInstance>::Leaky g_explicitly_allowed_ports = -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp -index 90883c712f..9abef3a420 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp -@@ -262,6 +262,15 @@ void V8Window::openMethodCustom( - return; - } - -+ // If the bindings implementation is 100% correct, the current realm and the -+ // entered realm should be same origin-domain. However, to be on the safe -+ // side and add some defense in depth, we'll check against the entered realm -+ // as well here. -+ if (!BindingSecurity::ShouldAllowAccessTo(EnteredDOMWindow(info.GetIsolate()), -+ impl, exception_state)) { -+ return; -+ } -+ - TOSTRING_VOID(V8StringResource, - url_string, info[0]); - AtomicString frame_name; -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp -index 8ce1574d45..1c5b193eda 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/core/frame/LocalFrameView.cpp -@@ -1862,9 +1862,12 @@ void LocalFrameView::ProcessUrlFragment(const KURL& url, - !frame_->GetDocument()->IsSVGDocument()) - return; - -+ // Try the raw fragment for HTML documents, but skip it for `svgView()`: - String fragment_identifier = url.FragmentIdentifier(); -- if (ProcessUrlFragmentHelper(fragment_identifier, behavior)) -+ if (!frame_->GetDocument()->IsSVGDocument() && -+ ProcessUrlFragmentHelper(fragment_identifier, behavior)) { - return; -+ } - - // Try again after decoding the ref, based on the document's encoding. - if (frame_->GetDocument()->Encoding().IsValid()) { -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp -index bbe7147921..1b88d0bd4e 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp -@@ -156,6 +156,14 @@ AccessibilityRole AXTableCell::ScanToDecideHeaderRole() { - if (IsColumnHeaderCell()) - return kColumnHeaderRole; - -+ // This occurs in an edge case that mixes non-table CSS into a -+ // table, and , see bug 798410. -+ // The odd CSS causes the to not be a LayoutTableCell, -+ // and the ARIA role causes it to fall through to here, because -+ // it is not an ARIA/HTML column/row header. -+ if (!layout_object_ || !layout_object_->IsTableCell()) -+ return kCellRole; // . -+ - // Check the previous cell and the next cell on the same row. - LayoutTableCell* layout_cell = ToLayoutTableCell(layout_object_); - AccessibilityRole header_role = kCellRole; -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp -index 64cc1d575f..b764fb6145 100644 ---- a/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp -+++ b/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp -@@ -64,6 +64,15 @@ AudioHandler::AudioHandler(NodeType node_type, - } - #endif - InstanceCounters::IncrementCounter(InstanceCounters::kAudioHandlerCounter); -+ -+#if DEBUG_AUDIONODE_REFERENCES -+ fprintf( -+ stderr, -+ "[%16p]: %16p: %2d: AudioHandler::AudioHandler() %d [%d] total: %u\n", -+ Context(), this, GetNodeType(), connection_ref_count_, -+ node_count_[GetNodeType()], -+ InstanceCounters::CounterValue(InstanceCounters::kAudioHandlerCounter)); -+#endif - } - - AudioHandler::~AudioHandler() { -@@ -73,9 +82,13 @@ AudioHandler::~AudioHandler() { - InstanceCounters::DecrementCounter(InstanceCounters::kAudioHandlerCounter); - #if DEBUG_AUDIONODE_REFERENCES - --node_count_[GetNodeType()]; -- fprintf(stderr, "[%16p]: %16p: %2d: AudioHandler::~AudioHandler() %d [%d]\n", -- Context(), this, GetNodeType(), connection_ref_count_, -- node_count_[GetNodeType()]); -+ fprintf( -+ stderr, -+ "[%16p]: %16p: %2d: AudioHandler::~AudioHandler() %d [%d] remaining: " -+ "%u\n", -+ Context(), this, GetNodeType(), connection_ref_count_, -+ node_count_[GetNodeType()], -+ InstanceCounters::CounterValue(InstanceCounters::kAudioHandlerCounter)); - #endif - } - -@@ -542,9 +555,25 @@ void AudioNode::Dispose() { - #endif - BaseAudioContext::AutoLocker locker(context()); - Handler().Dispose(); -- if (context()->ContextState() == BaseAudioContext::kRunning) { -- context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( -- std::move(handler_)); -+ if (context()->HasRealtimeConstraint()) { -+ // Add the handler to the orphan list if the context is not -+ // closed. (Nothing will clean up the orphan list if the context -+ // is closed.) These will get cleaned up in the post render task -+ // if audio thread is running or when the context is colleced (in -+ // the worst case). -+ if (context()->ContextState() != BaseAudioContext::kClosed) { -+ context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( -+ std::move(handler_)); -+ } -+ } else { -+ // For an offline context, only need to save the handler when the -+ // context is running. The change in the context state is -+ // synchronous with the main thread (even though the offline -+ // thread is not synchronized to the main thread). -+ if (context()->ContextState() == BaseAudioContext::kRunning) { -+ context()->GetDeferredTaskHandler().AddRenderingOrphanHandler( -+ std::move(handler_)); -+ } - } - } - -diff --git a/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h b/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h -index 1dd672bea4..a3e295e285 100644 ---- a/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h -+++ b/src/3rdparty/chromium/third_party/skia/include/core/SkTypes.h -@@ -235,6 +235,7 @@ template D SkTo(S s) { - #define SK_MaxU32 0xFFFFFFFF - #define SK_MinU32 0 - #define SK_NaN32 ((int) (1U << 31)) -+#define SK_MaxSizeT SIZE_MAX - - /** Returns true if the value can be represented with signed 16bits - */ -diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp b/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp -index 6eff790c85..947c125b27 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/core/SkMath.cpp -@@ -10,6 +10,8 @@ - #include "SkFloatBits.h" - #include "SkFloatingPoint.h" - #include "SkScalar.h" -+#include "SkSafeMath.h" -+ - - #define sub_shift(zeros, x, n) \ - zeros -= n; \ -@@ -84,3 +86,17 @@ float SkScalarSinCos(float radians, float* cosValue) { - } - return sinValue; - } -+ -+/////////////////////////////////////////////////////////////////////////////////////////////////// -+ -+size_t SkSafeMath::Add(size_t x, size_t y) { -+ SkSafeMath tmp; -+ size_t sum = tmp.add(x, y); -+ return tmp.ok() ? sum : SK_MaxSizeT; -+} -+ -+size_t SkSafeMath::Mul(size_t x, size_t y) { -+ SkSafeMath tmp; -+ size_t prod = tmp.mul(x, y); -+ return tmp.ok() ? prod : SK_MaxSizeT; -+} -diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp b/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp -index 094e6717e6..33008ead35 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/core/SkPathRef.cpp -@@ -9,7 +9,7 @@ - #include "SkOnce.h" - #include "SkPath.h" - #include "SkPathRef.h" --#include -+#include "SkSafeMath.h" - - ////////////////////////////////////////////////////////////////////////////// - SkPathRef::Editor::Editor(sk_sp* pathRef, -@@ -195,22 +195,23 @@ static bool deduce_pts_conics(const uint8_t verbs[], int vCount, int* ptCountPtr - return false; - } - -+ SkSafeMath safe; - int ptCount = 0; - int conicCount = 0; - for (int i = 0; i < vCount; ++i) { - switch (verbs[i]) { - case SkPath::kMove_Verb: - case SkPath::kLine_Verb: -- ptCount += 1; -+ ptCount = safe.addInt(ptCount, 1); - break; - case SkPath::kConic_Verb: - conicCount += 1; - // fall-through - case SkPath::kQuad_Verb: -- ptCount += 2; -+ ptCount = safe.addInt(ptCount, 2); - break; - case SkPath::kCubic_Verb: -- ptCount += 3; -+ ptCount = safe.addInt(ptCount, 3); - break; - case SkPath::kClose_Verb: - break; -@@ -218,6 +219,9 @@ static bool deduce_pts_conics(const uint8_t verbs[], int vCount, int* ptCountPtr - return false; - } - } -+ if (!safe) { -+ return false; -+ } - *ptCountPtr = ptCount; - *conicCountPtr = conicCount; - return true; -@@ -554,12 +558,18 @@ SkPoint* SkPathRef::growForVerb(int /* SkPath::Verb*/ verb, SkScalar weight) { - dirtyAfterEdit = false; - pCnt = 0; - } -+ SkSafeMath safe; -+ int newPointCnt = safe.addInt(fPointCnt, pCnt); -+ int newVerbCnt = safe.addInt(fVerbCnt, 1); -+ if (!safe) { -+ SK_ABORT("cannot grow path"); -+ } - size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint); - this->makeSpace(space); - this->fVerbs[~fVerbCnt] = verb; - SkPoint* ret = fPoints + fPointCnt; -- fVerbCnt += 1; -- fPointCnt += pCnt; -+ fVerbCnt = newVerbCnt; -+ fPointCnt = newPointCnt; - fFreeSpace -= space; - fBoundsIsDirty = true; // this also invalidates fIsFinite - if (dirtyAfterEdit) { -diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h b/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h -index 91200fbb56..74089633ae 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h -+++ b/src/3rdparty/chromium/third_party/skia/src/core/SkSafeMath.h -@@ -28,6 +28,25 @@ public: - return result; - } - -+ /** -+ * Return a + b, unless this result is an overflow/underflow. In those cases, fOK will -+ * be set to false, and it is undefined what this returns. -+ */ -+ int addInt(int a, int b) { -+ if (b < 0 && a < std::numeric_limits::min() - b) { -+ fOK = false; -+ return a; -+ } else if (b > 0 && a > std::numeric_limits::max() - b) { -+ fOK = false; -+ return a; -+ } -+ return a + b; -+ } -+ -+ // These saturate to their results -+ static size_t Add(size_t x, size_t y); -+ static size_t Mul(size_t x, size_t y); -+ - private: - uint32_t mul32(uint32_t x, uint32_t y) { - uint64_t bx = x; -diff --git a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp -index 286d9d140c..d2dfed9de1 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.cpp -@@ -88,13 +88,13 @@ int SkPackBits::Unpack8(const uint8_t* SK_RESTRICT src, size_t srcSize, - unsigned n = *src++; - if (n <= 127) { // repeat count (n + 1) - n += 1; -- if (dst >(endDst - n)) { -+ if (dst > (endDst - n) || src >= stop) { - return 0; - } - memset(dst, *src++, n); - } else { // same count (n - 127) - n -= 127; -- if (dst > (endDst - n)) { -+ if (dst > (endDst - n) || src > (stop - n)) { - return 0; - } - memcpy(dst, src, n); -@@ -103,5 +103,6 @@ int SkPackBits::Unpack8(const uint8_t* SK_RESTRICT src, size_t srcSize, - dst += n; - } - SkASSERT(src <= stop); -+ SkASSERT(dst <= endDst); - return SkToInt(dst - origDst); - } -diff --git a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h -index 2dc7677afc..773b13e0c1 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h -+++ b/src/3rdparty/chromium/third_party/skia/src/effects/SkPackBits.h -@@ -36,7 +36,7 @@ public: - @param srcSize Number of bytes of src to unpack - @param dst Buffer (allocated by caller) to expand the src[] into. - @param dstSize Number of bytes in the output buffer. -- @return the number of bytes written into dst. -+ @return the number of bytes written into dst, or 0 if srcSize or dstSize are too small. - */ - static int Unpack8(const uint8_t src[], size_t srcSize, uint8_t dst[], - size_t dstSize); -diff --git a/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp b/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp -index 3096ae5eeb..050b5db164 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/gpu/GrBufferAllocPool.cpp -@@ -13,7 +13,7 @@ - #include "GrGpu.h" - #include "GrResourceProvider.h" - #include "GrTypes.h" -- -+#include "SkSafeMath.h" - #include "SkTraceEvent.h" - - #ifdef SK_DEBUG -@@ -393,7 +393,7 @@ void* GrVertexBufferAllocPool::makeSpace(size_t vertexSize, - SkASSERT(startVertex); - - size_t offset SK_INIT_TO_AVOID_WARNING; -- void* ptr = INHERITED::makeSpace(vertexSize * vertexCount, -+ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(vertexSize, vertexCount), - vertexSize, - buffer, - &offset); -@@ -447,7 +447,7 @@ void* GrIndexBufferAllocPool::makeSpace(int indexCount, - SkASSERT(startIndex); - - size_t offset SK_INIT_TO_AVOID_WARNING; -- void* ptr = INHERITED::makeSpace(indexCount * sizeof(uint16_t), -+ void* ptr = INHERITED::makeSpace(SkSafeMath::Mul(indexCount, sizeof(uint16_t)), - sizeof(uint16_t), - buffer, - &offset); -diff --git a/src/3rdparty/chromium/url/url_canon_etc.cc b/src/3rdparty/chromium/url/url_canon_etc.cc -index 31e9fb5cfa..bbc46270a1 100644 ---- a/src/3rdparty/chromium/url/url_canon_etc.cc -+++ b/src/3rdparty/chromium/url/url_canon_etc.cc -@@ -233,6 +233,43 @@ bool DoPort(const CHAR* spec, - return true; - } - -+// clang-format off -+// Percent-escape all "C0 controls" (0x00-0x1F) -+// https://infra.spec.whatwg.org/#c0-control along with the characters ' ' -+// (0x20), '"' (0x22), '<' (0x3C), '>' (0x3E), and '`' (0x60): -+const bool kShouldEscapeCharInRef[0x80] = { -+// Control characters (0x00-0x1F) -+ true, true, true, true, true, true, true, true, -+ true, true, true, true, true, true, true, true, -+ true, true, true, true, true, true, true, true, -+ true, true, true, true, true, true, true, true, -+// ' ' ! " # $ % & ' -+ true, false, true, false, false, false, false, false, -+// ( ) * + , - . / -+ false, false, false, false, false, false, false, false, -+// 0 1 2 3 4 5 6 7 -+ false, false, false, false, false, false, false, false, -+// 8 9 : ; < = > ? -+ false, false, false, false, true, false, true, false, -+// @ A B C D E F G -+ false, false, false, false, false, false, false, false, -+// H I J K L M N O -+ false, false, false, false, false, false, false, false, -+// P Q R S T U V W -+ false, false, false, false, false, false, false, false, -+// X Y Z [ \ ] ^ _ -+ false, false, false, false, false, false, false, false, -+// ` a b c d e f g -+ true, false, false, false, false, false, false, false, -+// h i j k l m n o -+ false, false, false, false, false, false, false, false, -+// p q r s t u v w -+ false, false, false, false, false, false, false, false, -+// x y z { | } ~ -+ false, false, false, false, false, false, false -+}; -+// clang-format on -+ - template - void DoCanonicalizeRef(const CHAR* spec, - const Component& ref, -@@ -255,22 +292,16 @@ void DoCanonicalizeRef(const CHAR* spec, - if (spec[i] == 0) { - // IE just strips NULLs, so we do too. - continue; -- } else if (static_cast(spec[i]) < 0x20) { -- // Unline IE seems to, we escape control characters. This will probably -- // make the reference fragment unusable on a web page, but people -- // shouldn't be using control characters in their anchor names. -- AppendEscapedChar(static_cast(spec[i]), output); -- } else if (static_cast(spec[i]) < 0x80) { -- // Normal ASCII characters are just appended. -- output->push_back(static_cast(spec[i])); -+ } -+ -+ UCHAR current_char = static_cast(spec[i]); -+ if (current_char < 0x80) { -+ if (kShouldEscapeCharInRef[current_char]) -+ AppendEscapedChar(static_cast(spec[i]), output); -+ else -+ output->push_back(static_cast(spec[i])); - } else { -- // Non-ASCII characters are appended unescaped, but only when they are -- // valid. Invalid Unicode characters are replaced with the "invalid -- // character" as IE seems to (ReadUTFChar puts the unicode replacement -- // character in the output on failure for us). -- unsigned code_point; -- ReadUTFChar(spec, &i, end, &code_point); -- AppendUTF8Value(code_point, output); -+ AppendUTF8EscapedChar(spec, &i, end, output); - } - } - -diff --git a/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h b/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h -index 5eee300cc3..7026268b77 100644 ---- a/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h -+++ b/src/3rdparty/chromium/v8/src/ast/ast-traversal-visitor.h -@@ -248,6 +248,7 @@ void AstTraversalVisitor::VisitForStatement(ForStatement* stmt) { - template - void AstTraversalVisitor::VisitForInStatement(ForInStatement* stmt) { - PROCESS_NODE(stmt); -+ RECURSE(Visit(stmt->each())); - RECURSE(Visit(stmt->enumerable())); - RECURSE(Visit(stmt->body())); - } -diff --git a/src/3rdparty/chromium/v8/src/elements.cc b/src/3rdparty/chromium/v8/src/elements.cc -index 716cc00b9a..bc89c77047 100644 ---- a/src/3rdparty/chromium/v8/src/elements.cc -+++ b/src/3rdparty/chromium/v8/src/elements.cc -@@ -518,6 +518,21 @@ static Maybe IndexOfValueSlowPath(Isolate* isolate, - return Just(-1); - } - -+// The InternalElementsAccessor is a helper class to expose otherwise protected -+// methods to its subclasses. Namely, we don't want to publicly expose methods -+// that take an entry (instead of an index) as an argument. -+class InternalElementsAccessor : public ElementsAccessor { -+ public: -+ explicit InternalElementsAccessor(const char* name) -+ : ElementsAccessor(name) {} -+ -+ virtual uint32_t GetEntryForIndex(Isolate* isolate, JSObject* holder, -+ FixedArrayBase* backing_store, -+ uint32_t index) = 0; -+ -+ virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; -+}; -+ - // Base class for element handler implementations. Contains the - // the common logic for objects with different ElementsKinds. - // Subclasses must specialize method for which the element -@@ -536,10 +551,10 @@ static Maybe IndexOfValueSlowPath(Isolate* isolate, - // CRTP to guarantee aggressive compile time optimizations (i.e. inlining and - // specialization of SomeElementsAccessor methods). - template --class ElementsAccessorBase : public ElementsAccessor { -+class ElementsAccessorBase : public InternalElementsAccessor { - public: - explicit ElementsAccessorBase(const char* name) -- : ElementsAccessor(name) { } -+ : InternalElementsAccessor(name) {} - - typedef ElementsTraitsParam ElementsTraits; - typedef typename ElementsTraitsParam::BackingStore BackingStore; -@@ -1040,35 +1055,67 @@ class ElementsAccessorBase : public ElementsAccessor { - Isolate* isolate, Handle object, - Handle values_or_entries, bool get_entries, int* nof_items, - PropertyFilter filter) { -- int count = 0; -+ DCHECK_EQ(*nof_items, 0); - KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly, - ALL_PROPERTIES); - Subclass::CollectElementIndicesImpl( - object, handle(object->elements(), isolate), &accumulator); - Handle keys = accumulator.GetKeys(); - -- for (int i = 0; i < keys->length(); ++i) { -+ int count = 0; -+ int i = 0; -+ Handle original_map(object->map(), isolate); -+ -+ for (; i < keys->length(); ++i) { - Handle key(keys->get(i), isolate); -- Handle value; - uint32_t index; - if (!key->ToUint32(&index)) continue; - -+ DCHECK_EQ(object->map(), *original_map); - uint32_t entry = Subclass::GetEntryForIndexImpl( - isolate, *object, object->elements(), index, filter); - if (entry == kMaxUInt32) continue; - - PropertyDetails details = Subclass::GetDetailsImpl(*object, entry); - -+ Handle value; - if (details.kind() == kData) { - value = Subclass::GetImpl(isolate, object->elements(), entry); - } else { -+ // This might modify the elements and/or change the elements kind. - LookupIterator it(isolate, object, index, LookupIterator::OWN); - ASSIGN_RETURN_ON_EXCEPTION_VALUE( - isolate, value, Object::GetProperty(&it), Nothing()); - } -- if (get_entries) { -- value = MakeEntryPair(isolate, index, value); -+ if (get_entries) value = MakeEntryPair(isolate, index, value); -+ values_or_entries->set(count++, *value); -+ if (object->map() != *original_map) break; -+ } -+ -+ // Slow path caused by changes in elements kind during iteration. -+ for (; i < keys->length(); i++) { -+ Handle key(keys->get(i), isolate); -+ uint32_t index; -+ if (!key->ToUint32(&index)) continue; -+ -+ if (filter & ONLY_ENUMERABLE) { -+ InternalElementsAccessor* accessor = -+ reinterpret_cast( -+ object->GetElementsAccessor()); -+ -+ uint32_t entry = accessor->GetEntryForIndex(isolate, *object, -+ object->elements(), index); -+ if (entry == kMaxUInt32) continue; -+ PropertyDetails details = accessor->GetDetails(*object, entry); -+ if (!details.IsEnumerable()) continue; - } -+ -+ Handle value; -+ LookupIterator it(isolate, object, index, LookupIterator::OWN); -+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, value, Object::GetProperty(&it), -+ Nothing()); -+ -+ if (get_entries) value = MakeEntryPair(isolate, index, value); - values_or_entries->set(count++, *value); - } - -@@ -1668,12 +1715,13 @@ class DictionaryElementsAccessor - return result; - } - } -- -+ Handle original_map(receiver->map(), isolate); - Handle dictionary( - SeededNumberDictionary::cast(receiver->elements()), isolate); - // Iterate through entire range, as accessing elements out of order is - // observable - for (uint32_t k = start_from; k < length; ++k) { -+ DCHECK_EQ(receiver->map(), *original_map); - int entry = dictionary->FindEntry(isolate, k); - if (entry == SeededNumberDictionary::kNotFound) { - if (search_for_hole) return Just(true); -@@ -1738,15 +1786,15 @@ class DictionaryElementsAccessor - uint32_t start_from, uint32_t length) { - DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver)); - -+ Handle original_map(receiver->map(), isolate); - Handle dictionary( - SeededNumberDictionary::cast(receiver->elements()), isolate); - // Iterate through entire range, as accessing elements out of order is - // observable. - for (uint32_t k = start_from; k < length; ++k) { -+ DCHECK_EQ(receiver->map(), *original_map); - int entry = dictionary->FindEntry(isolate, k); -- if (entry == SeededNumberDictionary::kNotFound) { -- continue; -- } -+ if (entry == SeededNumberDictionary::kNotFound) continue; - - PropertyDetails details = GetDetailsImpl(*dictionary, entry); - switch (details.kind()) { -@@ -3622,12 +3670,13 @@ class SloppyArgumentsElementsAccessor - Handle value, - uint32_t start_from, uint32_t length) { - DCHECK(JSObject::PrototypeHasNoElements(isolate, *object)); -- Handle original_map = handle(object->map(), isolate); -+ Handle original_map(object->map(), isolate); - Handle elements( - SloppyArgumentsElements::cast(object->elements()), isolate); - bool search_for_hole = value->IsUndefined(isolate); - - for (uint32_t k = start_from; k < length; ++k) { -+ DCHECK_EQ(object->map(), *original_map); - uint32_t entry = - GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES); - if (entry == kMaxUInt32) { -@@ -3663,11 +3712,12 @@ class SloppyArgumentsElementsAccessor - Handle value, - uint32_t start_from, uint32_t length) { - DCHECK(JSObject::PrototypeHasNoElements(isolate, *object)); -- Handle original_map = handle(object->map(), isolate); -+ Handle original_map(object->map(), isolate); - Handle elements( - SloppyArgumentsElements::cast(object->elements()), isolate); - - for (uint32_t k = start_from; k < length; ++k) { -+ DCHECK_EQ(object->map(), *original_map); - uint32_t entry = - GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES); - if (entry == kMaxUInt32) { -diff --git a/src/3rdparty/chromium/v8/src/elements.h b/src/3rdparty/chromium/v8/src/elements.h -index 9e64764bb0..350264daae 100644 ---- a/src/3rdparty/chromium/v8/src/elements.h -+++ b/src/3rdparty/chromium/v8/src/elements.h -@@ -52,7 +52,6 @@ class ElementsAccessor { - - virtual Handle Get(Handle holder, uint32_t entry) = 0; - -- virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; - virtual bool HasAccessors(JSObject* holder) = 0; - virtual uint32_t NumberOfElements(JSObject* holder) = 0; - -@@ -63,8 +62,6 @@ class ElementsAccessor { - // element that is non-deletable. - virtual void SetLength(Handle holder, uint32_t new_length) = 0; - -- // Deletes an element in an object. -- virtual void Delete(Handle holder, uint32_t entry) = 0; - - // If kCopyToEnd is specified as the copy_size to CopyElements, it copies all - // of elements from source after source_start to the destination array. -@@ -122,11 +119,6 @@ class ElementsAccessor { - - virtual void Set(Handle holder, uint32_t entry, Object* value) = 0; - -- virtual void Reconfigure(Handle object, -- Handle backing_store, uint32_t entry, -- Handle value, -- PropertyAttributes attributes) = 0; -- - virtual void Add(Handle object, uint32_t index, - Handle value, PropertyAttributes attributes, - uint32_t new_capacity) = 0; -@@ -208,6 +200,15 @@ class ElementsAccessor { - FixedArrayBase* backing_store, - uint32_t index) = 0; - -+ virtual PropertyDetails GetDetails(JSObject* holder, uint32_t entry) = 0; -+ virtual void Reconfigure(Handle object, -+ Handle backing_store, uint32_t entry, -+ Handle value, -+ PropertyAttributes attributes) = 0; -+ -+ // Deletes an element in an object. -+ virtual void Delete(Handle holder, uint32_t entry) = 0; -+ - // NOTE: this method violates the handlified function signature convention: - // raw pointer parameter |source_holder| in the function that allocates. - // This is done intentionally to avoid ArrayConcat() builtin performance -diff --git a/src/3rdparty/chromium/v8/src/js/intl.js b/src/3rdparty/chromium/v8/src/js/intl.js -index 1579337fc1..7fc137f5c7 100644 ---- a/src/3rdparty/chromium/v8/src/js/intl.js -+++ b/src/3rdparty/chromium/v8/src/js/intl.js -@@ -1682,9 +1682,7 @@ function formatDate(formatter, dateValue) { - dateMs = TO_NUMBER(dateValue); - } - -- if (!NUMBER_IS_FINITE(dateMs)) throw %make_range_error(kDateRange); -- -- return %InternalDateFormat(formatter, new GlobalDate(dateMs)); -+ return %InternalDateFormat(formatter, dateMs); - } - - DEFINE_METHOD( -@@ -1706,9 +1704,7 @@ DEFINE_METHOD( - dateMs = TO_NUMBER(dateValue); - } - -- if (!NUMBER_IS_FINITE(dateMs)) throw %make_range_error(kDateRange); -- -- return %InternalDateFormatToParts(this, new GlobalDate(dateMs)); -+ return %InternalDateFormatToParts(this, dateMs); - } - ); - -diff --git a/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc b/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc -index 4bd6bebdc7..875fd719ef 100644 ---- a/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc -+++ b/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc -@@ -7,7 +7,7 @@ - #endif // V8_INTL_SUPPORT - - #include "src/runtime/runtime-utils.h" -- -+#include - #include - - #include "src/api-natives.h" -@@ -247,17 +247,21 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormat) { - DCHECK_EQ(2, args.length()); - - CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0); -- CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1); -+ CONVERT_NUMBER_ARG_HANDLE_CHECKED(date, 1); - -- Handle value; -- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, Object::ToNumber(date)); -+ double date_value = date->Number(); -+ // Check for +-Infinity and Nan -+ if (!std::isfinite(date_value)) { -+ THROW_NEW_ERROR_RETURN_FAILURE( -+ isolate, NewRangeError(MessageTemplate::kInvalidTimeValue)); -+ } - - icu::SimpleDateFormat* date_format = - DateFormat::UnpackDateFormat(isolate, date_format_holder); - CHECK_NOT_NULL(date_format); - - icu::UnicodeString result; -- date_format->format(value->Number(), result); -+ date_format->format(date_value, result); - - RETURN_RESULT_OR_FAILURE( - isolate, isolate->factory()->NewStringFromTwoByte(Vector( -@@ -349,10 +353,13 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { - DCHECK_EQ(2, args.length()); - - CONVERT_ARG_HANDLE_CHECKED(JSObject, date_format_holder, 0); -- CONVERT_ARG_HANDLE_CHECKED(JSDate, date, 1); -+ CONVERT_NUMBER_ARG_HANDLE_CHECKED(date, 1); - -- Handle value; -- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, Object::ToNumber(date)); -+ double date_value = date->Number(); -+ if (!std::isfinite(date_value)) { -+ THROW_NEW_ERROR_RETURN_FAILURE( -+ isolate, NewRangeError(MessageTemplate::kInvalidTimeValue)); -+ } - - icu::SimpleDateFormat* date_format = - DateFormat::UnpackDateFormat(isolate, date_format_holder); -@@ -362,7 +369,7 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { - icu::FieldPositionIterator fp_iter; - icu::FieldPosition fp; - UErrorCode status = U_ZERO_ERROR; -- date_format->format(value->Number(), formatted, &fp_iter, status); -+ date_format->format(date_value, formatted, &fp_iter, status); - if (U_FAILURE(status)) return isolate->heap()->undefined_value(); - - Handle result = factory->NewJSArray(0); --- -2.14.3 - diff --git a/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch similarity index 63% rename from qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch rename to qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch index 00cbfc2..59da86e 100644 --- a/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch +++ b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch @@ -1,12 +1,17 @@ -diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp ---- qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp 2016-03-03 17:02:28.000000000 +0100 -+++ qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp 2016-03-18 03:08:24.385444415 +0100 -@@ -207,24 +207,7 @@ +diff -up qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp +--- qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat 2018-06-14 09:23:48.931195271 -0500 ++++ qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp 2018-06-14 09:27:26.248014325 -0500 +@@ -258,28 +258,12 @@ QString dictionariesPath() + + QString icuDataPath() + { +- static bool initialized = false; + static QString potentialResourcesPath = #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) - return getResourcesPath(frameworkBundle()); + getResourcesPath(frameworkBundle()); #else -- static bool initialized = false; - static QString potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + #endif - if (!initialized) { - initialized = true; - if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { @@ -22,7 +27,6 @@ diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp q - potentialResourcesPath = fallbackDir(); - } - } -- + return potentialResourcesPath; - #endif } diff --git a/sources b/sources index 61e3d5f..ddc17ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.10.1-clean.tar.xz) = b992aef0d2f9fe7d40b5378519113d5c41577b120830bee86eda211ffc97649022d1deacf82916007fb9fd1b6e18a855d4890c79752142165e66e2ea047486b8 +SHA512 (qtwebengine-everywhere-src-5.11.0-clean.tar.xz) = fb6a9a047e77478f6ea9bc9cdb4c7ea05520e9b2919a346d39e7eb09bd88747e35a97ef41bfa06aaed8eb9c3db9372c17dc4e24d1ed2e734f9bf6f58783c4616 From 168b7d76d4666c939868f4a0f08ad4920b083c16 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 20 Jun 2018 23:40:28 -0500 Subject: [PATCH 268/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5f66bf2..3071bac 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -581,6 +581,9 @@ done %changelog +* Wed Jun 20 2018 Rex Dieter - 5.11.0-2 +- rebuild (qt5) + * Thu Jun 14 2018 Rex Dieter - 5.11.0-1 - 5.11.0 - drop shadow build (to match other qt5 packages where it has been problematic) From dc623b18d261a6e6898db7143b7b0424aaba9218 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 22 Jun 2018 15:03:09 -0500 Subject: [PATCH 269/437] 5.11.1 --- .gitignore | 1 + 0002-Fix-build-with-GCC-8.1.0.patch | 84 ----------------------------- clean_qtwebengine.sh | 2 +- qt5-qtwebengine.spec | 15 +++--- sources | 2 +- 5 files changed, 10 insertions(+), 94 deletions(-) delete mode 100644 0002-Fix-build-with-GCC-8.1.0.patch diff --git a/.gitignore b/.gitignore index a4bcc76..500bed7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /qtwebengine-everywhere-src-5.10.0-clean.tar.xz /qtwebengine-everywhere-src-5.10.1-clean.tar.xz /qtwebengine-everywhere-src-5.11.0-clean.tar.xz +/qtwebengine-everywhere-src-5.11.1-clean.tar.xz diff --git a/0002-Fix-build-with-GCC-8.1.0.patch b/0002-Fix-build-with-GCC-8.1.0.patch deleted file mode 100644 index ee1bfe3..0000000 --- a/0002-Fix-build-with-GCC-8.1.0.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 96f354df27c2f3c7c1b221b676c7a1af6b3da375 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=BCri=20Valdmann?= -Date: Mon, 14 May 2018 10:15:50 +0200 -Subject: [PATCH 02/29] Fix build with GCC 8.1.0 - -Task-number: QTBUG-68203 -Change-Id: I780d884d5e20ef04e902d7b449da4aa3f97d8d0b -Reviewed-by: Allan Sandfeld Jensen ---- - .../mojo/public/cpp/bindings/associated_interface_ptr_info.h | 2 +- - .../mojo/public/cpp/bindings/associated_interface_request.h | 2 +- - chromium/mojo/public/cpp/bindings/interface_request.h | 2 +- - .../mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h | 2 ++ - chromium/mojo/public/cpp/system/handle.h | 2 +- - 5 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h -index 1f79662bd7..184ba6a9e8 100644 ---- a/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h -+++ b/chromium/mojo/public/cpp/bindings/associated_interface_ptr_info.h -@@ -45,7 +45,7 @@ class AssociatedInterfacePtrInfo { - - bool is_valid() const { return handle_.is_valid(); } - -- explicit operator bool() const { return handle_; } -+ explicit operator bool() const { return !!handle_; } - - ScopedInterfaceEndpointHandle PassHandle() { - return std::move(handle_); -diff --git a/chromium/mojo/public/cpp/bindings/associated_interface_request.h b/chromium/mojo/public/cpp/bindings/associated_interface_request.h -index 12d2f3ce1d..fcdc2b9321 100644 ---- a/chromium/mojo/public/cpp/bindings/associated_interface_request.h -+++ b/chromium/mojo/public/cpp/bindings/associated_interface_request.h -@@ -50,7 +50,7 @@ class AssociatedInterfaceRequest { - // handle. - bool is_pending() const { return handle_.is_valid(); } - -- explicit operator bool() const { return handle_; } -+ explicit operator bool() const { return !!handle_; } - - ScopedInterfaceEndpointHandle PassHandle() { return std::move(handle_); } - -diff --git a/chromium/mojo/public/cpp/bindings/interface_request.h b/chromium/mojo/public/cpp/bindings/interface_request.h -index 1007cb0b8c..da1f3244a3 100644 ---- a/chromium/mojo/public/cpp/bindings/interface_request.h -+++ b/chromium/mojo/public/cpp/bindings/interface_request.h -@@ -54,7 +54,7 @@ class InterfaceRequest { - // Indicates whether the request currently contains a valid message pipe. - bool is_pending() const { return handle_.is_valid(); } - -- explicit operator bool() const { return handle_; } -+ explicit operator bool() const { return !!handle_; } - - // Removes the message pipe from the request and returns it. - ScopedMessagePipeHandle PassMessagePipe() { return std::move(handle_); } -diff --git a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h -index 5d00e5019e..ef8a927ba6 100644 ---- a/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h -+++ b/chromium/mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h -@@ -45,6 +45,8 @@ class MOJO_CPP_BINDINGS_EXPORT ScopedInterfaceEndpointHandle { - - bool is_valid() const; - -+ explicit operator bool() const { return is_valid(); } -+ - // Returns true if the interface hasn't associated with a message pipe. - bool pending_association() const; - -diff --git a/chromium/mojo/public/cpp/system/handle.h b/chromium/mojo/public/cpp/system/handle.h -index 7c886e8825..c9f9e961db 100644 ---- a/chromium/mojo/public/cpp/system/handle.h -+++ b/chromium/mojo/public/cpp/system/handle.h -@@ -121,7 +121,7 @@ class ScopedHandleBase { - - bool is_valid() const { return handle_.is_valid(); } - -- explicit operator bool() const { return handle_; } -+ explicit operator bool() const { return !!handle_; } - - bool operator==(const ScopedHandleBase& other) const { - return handle_.value() == other.get().value(); --- -2.17.1 - diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index 3b3ae9a..e134704 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.11.0" + echo "e.g.: ./clean_qtwebengine.sh 5.11.1" exit 1 fi diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3071bac..367fb3c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,8 +50,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.11.0 -Release: 2%{?dist} +Version: 5.11.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -59,8 +59,8 @@ Release: 2%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.11/5.11.0/submodules/qtwebengine-everywhere-src-5.11.0.tar.xz -# ./clean_qtwebengine.sh 5.10.1 +# wget http://download.qt.io/official_releases/qt/5.11/5.11.1/submodules/qtwebengine-everywhere-src-5.11.1.tar.xz +# ./clean_qtwebengine.sh 5.11.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -119,7 +119,6 @@ Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch # to get the value we expect (and chromium checks for). Patch by spot. Patch23: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch ## Upstream patches: -Patch102: 0002-Fix-build-with-GCC-8.1.0.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -361,9 +360,6 @@ BuildArch: noarch %endif ## upstream patches -pushd src/3rdparty/chromium -%patch102 -p2 -b .0002 -popd ##FIXME/TODO rebase #patch4 -p1 -b .system-nspr-prtime @@ -581,6 +577,9 @@ done %changelog +* Fri Jun 22 2018 Rex Dieter - 5.11.1-1 +- 5.11.1 + * Wed Jun 20 2018 Rex Dieter - 5.11.0-2 - rebuild (qt5) diff --git a/sources b/sources index ddc17ce..ab6da9d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.11.0-clean.tar.xz) = fb6a9a047e77478f6ea9bc9cdb4c7ea05520e9b2919a346d39e7eb09bd88747e35a97ef41bfa06aaed8eb9c3db9372c17dc4e24d1ed2e734f9bf6f58783c4616 +SHA512 (qtwebengine-everywhere-src-5.11.1-clean.tar.xz) = 59e9ea806e81ca56c858b7f391fd9c27ea889090e3c6f6168ffea6bd13fd2f78f7301b1f4487a79dea2ea48066fa657cd53a1d8c584258e4738b9030b970aea4 From 80ee1c47cb9c4929f025910485b0ec6e0b8fd567 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Tue, 10 Jul 2018 21:59:17 +0100 Subject: [PATCH 270/437] Rebuild for ICU 62 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 367fb3c..7bdcdb0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -577,6 +577,9 @@ done %changelog +* Tue Jul 10 2018 Pete Walter - 5.11.1-2 +- Rebuild for ICU 62 + * Fri Jun 22 2018 Rex Dieter - 5.11.1-1 - 5.11.1 From c6e30937fe625ec68e68ef4d8aa62cc7c42819f1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 03:11:11 +0000 Subject: [PATCH 271/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7bdcdb0..044dddd 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -577,6 +577,9 @@ done %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 5.11.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Tue Jul 10 2018 Pete Walter - 5.11.1-2 - Rebuild for ICU 62 From 6802e02f24f4c5e4ed6b402f5bceedc2bc05c9e4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 15 Jul 2018 11:14:37 -0500 Subject: [PATCH 272/437] BR: /usr/bin/python --- qt5-qtwebengine.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 044dddd..f43c5d0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -185,7 +185,9 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter -BuildRequires: python2 +# recommended workaround from +# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package +BuildRequires: /usr/bin/python %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif @@ -577,6 +579,9 @@ done %changelog +* Sun Jul 15 2018 Rex Dieter - 5.11.1-4 +- BR: /usr/bin/python + * Sat Jul 14 2018 Fedora Release Engineering - 5.11.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From ce8cc64b90c5bef2d74d6e6b66e8abd8e15ffaff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= Date: Tue, 28 Aug 2018 11:36:19 +0200 Subject: [PATCH 273/437] Update dependency to minizip-compat(-devel) Related: rhbz#1609830, rhbz#1615381 --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f43c5d0..af09586 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -165,7 +165,7 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(minizip) +BuildRequires: minizip-compat-devel BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xcursor) @@ -579,6 +579,9 @@ done %changelog +* Tue Aug 28 2018 Patrik Novotný - 5.11.1-5 +- change requires to minizip-compat(-devel), rhbz#1609830, rhbz#1615381 + * Sun Jul 15 2018 Rex Dieter - 5.11.1-4 - BR: /usr/bin/python From 712075074b79c33bf5e3db9bafaf00f844b74850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 7 Sep 2018 18:55:18 +0200 Subject: [PATCH 274/437] conditionalize BR: minizip-devel --- qt5-qtwebengine.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index af09586..9ce0146 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -165,7 +165,11 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) +%if 0%{?fedora} > 29 BuildRequires: minizip-compat-devel +%else +BuildRequires: pkgconfig(minizip) +%endif BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xcursor) From d9430dad6c229e4370f21eb4aadb1ee19d6bf7ba Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 18 Sep 2018 11:27:14 -0500 Subject: [PATCH 275/437] cleaner (imo) minizip deps, unconditionally and explicitly use pkgconfig --- qt5-qtwebengine.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9ce0146..d6e214b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -165,10 +165,10 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) -%if 0%{?fedora} > 29 -BuildRequires: minizip-compat-devel -%else BuildRequires: pkgconfig(minizip) +# make sure we get the right minizip +%if 0%{?fedora} > 29 +BuildRequires: minizip-compat-devel %endif BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) @@ -583,6 +583,9 @@ done %changelog +* Tue Sep 18 2018 Rex Dieter - 5.11.1-6 +- cleaner (imo) minizip deps, unconditionally and explicitly use pkgconfig + * Tue Aug 28 2018 Patrik Novotný - 5.11.1-5 - change requires to minizip-compat(-devel), rhbz#1609830, rhbz#1615381 From a0b5b671a53e1e1822c9e184200cd8fd441ee147 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 18 Sep 2018 11:48:17 -0500 Subject: [PATCH 276/437] workaround minizip-compat-devel bogosity See also https://bugzilla.redhat.com/show_bug.cgi?id=1630448 --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d6e214b..7ceb02e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -165,10 +165,13 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(minizip) # make sure we get the right minizip +# this conditional should only be temporary, see also: +# https://bugzilla.redhat.com/show_bug.cgi?id=1630448 %if 0%{?fedora} > 29 BuildRequires: minizip-compat-devel +%else +BuildRequires: pkgconfig(minizip) %endif BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) @@ -584,7 +587,7 @@ done %changelog * Tue Sep 18 2018 Rex Dieter - 5.11.1-6 -- cleaner (imo) minizip deps, unconditionally and explicitly use pkgconfig +- cleaner (imo) minizip deps, workaround rhbz#1630448 * Tue Aug 28 2018 Patrik Novotný - 5.11.1-5 - change requires to minizip-compat(-devel), rhbz#1609830, rhbz#1615381 From 08fa96460e0ddb12779bb5967719b4608d7215fb Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 21 Sep 2018 18:10:36 +0200 Subject: [PATCH 277/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7ceb02e..5e4b92c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -586,6 +586,9 @@ done %changelog +* Fri Sep 21 2018 Jan Grulich - 5.11.1-7 +- rebuild (qt5) + * Tue Sep 18 2018 Rex Dieter - 5.11.1-6 - cleaner (imo) minizip deps, workaround rhbz#1630448 From b45d4b1dd49f5dc9cc19227ef0f78a3dc2dc18ca Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 24 Sep 2018 10:57:20 -0500 Subject: [PATCH 278/437] use bundled minizip on f30+ (#1632196) --- qt5-qtwebengine.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5e4b92c..996acae 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -165,13 +165,10 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) -# make sure we get the right minizip -# this conditional should only be temporary, see also: -# https://bugzilla.redhat.com/show_bug.cgi?id=1630448 -%if 0%{?fedora} > 29 -BuildRequires: minizip-compat-devel -%else +%if 0%{?fedora} && 0%{?fedora} < 30 BuildRequires: pkgconfig(minizip) +%else +Provides: bundled(minizip) = 1.2 %endif BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xi) @@ -586,6 +583,9 @@ done %changelog +* Mon Sep 24 2018 Rex Dieter - 5.11.1-8 +- use bundled minizip on f30+ (#1632196) + * Fri Sep 21 2018 Jan Grulich - 5.11.1-7 - rebuild (qt5) From b960d8aad8b11d3db2ad1c484f43c7581a40cb34 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 24 Sep 2018 11:03:02 -0500 Subject: [PATCH 279/437] Release++ sorry, should've been included in prior commit --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 996acae..22a3bdb 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.1 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html From 0d059fc707d33d0872f550e1b5d36f951b675636 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 25 Sep 2018 09:15:53 -0500 Subject: [PATCH 280/437] 5.11.2 --- .gitignore | 1 + qt5-qtwebengine.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 500bed7..3ab6180 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /qtwebengine-everywhere-src-5.10.1-clean.tar.xz /qtwebengine-everywhere-src-5.11.0-clean.tar.xz /qtwebengine-everywhere-src-5.11.1-clean.tar.xz +/qtwebengine-everywhere-src-5.11.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 22a3bdb..e736b01 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,8 +50,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.11.1 -Release: 8%{?dist} +Version: 5.11.2 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -583,6 +583,9 @@ done %changelog +* Mon Sep 24 2018 Rex Dieter - 5.11.2-1 +- 5.11.2 + * Mon Sep 24 2018 Rex Dieter - 5.11.1-8 - use bundled minizip on f30+ (#1632196) diff --git a/sources b/sources index ab6da9d..4eaa34f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.11.1-clean.tar.xz) = 59e9ea806e81ca56c858b7f391fd9c27ea889090e3c6f6168ffea6bd13fd2f78f7301b1f4487a79dea2ea48066fa657cd53a1d8c584258e4738b9030b970aea4 +SHA512 (qtwebengine-everywhere-src-5.11.2-clean.tar.xz) = f3ac337b34e56d7e0df15b1c239baac465492154fdd2cb72b56095c6a0d662100559cee51ec3e4b18027cf7a000e2cc6d4d4941708e6a3b568e629b2b3d51bcb From 580501a45c2c10af6f2a485af3b289076d081278 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 26 Sep 2018 14:46:20 -0500 Subject: [PATCH 281/437] avoid using %make_build for now --- qt5-qtwebengine.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e736b01..dcd8c34 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -430,7 +430,8 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} CONFIG+="%{debug_config}" \ QMAKE_EXTRA_ARGS+="-system-webengine-icu" . -%make_build +# avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja +make %{?_smp_mflags} %if 0%{?docs} %make_build docs @@ -583,6 +584,9 @@ done %changelog +* Wed Sep 26 2018 Rex Dieter - 5.11.2-2 +- avoid using %%make_build for now + * Mon Sep 24 2018 Rex Dieter - 5.11.2-1 - 5.11.2 From ed0dfbde8ae538300fdd8106802bdd7e2eb6d732 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 4 Dec 2018 13:24:20 -0600 Subject: [PATCH 282/437] 5.11.3 --- .gitignore | 1 + qt5-qtwebengine.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3ab6180..308d839 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /qtwebengine-everywhere-src-5.11.0-clean.tar.xz /qtwebengine-everywhere-src-5.11.1-clean.tar.xz /qtwebengine-everywhere-src-5.11.2-clean.tar.xz +/qtwebengine-everywhere-src-5.11.3-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index dcd8c34..a571c51 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -50,8 +50,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.11.2 -Release: 2%{?dist} +Version: 5.11.3 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -584,6 +584,9 @@ done %changelog +* Tue Dec 04 2018 Rex Dieter - 5.11.3-1 +- 5.11.3 + * Wed Sep 26 2018 Rex Dieter - 5.11.2-2 - avoid using %%make_build for now diff --git a/sources b/sources index 4eaa34f..965905d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.11.2-clean.tar.xz) = f3ac337b34e56d7e0df15b1c239baac465492154fdd2cb72b56095c6a0d662100559cee51ec3e4b18027cf7a000e2cc6d4d4941708e6a3b568e629b2b3d51bcb +SHA512 (qtwebengine-everywhere-src-5.11.3-clean.tar.xz) = 02b787df5a79eaa9c30a2ecfaee899291dd5033078c356313d580d86284a78d86aa13de1dd67968b9c1e214662adbb1623ea0afb7289f0eb3c0b99d8d2a53a2e From 522e420ac0706f130f9389ac7943403e334202f4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 9 Dec 2018 07:48:55 -0600 Subject: [PATCH 283/437] Fix/workaround FTBFS on aarch64 with newer glibc patch borrowed from chromium packaging --- qt5-qtwebengine.spec | 3 +++ ...gine-everywhere-src-5.11.3-aarch64-new-stat.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a571c51..12963c5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -118,6 +118,8 @@ Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch # alignment. This means int64_t is now 4 on i686 (instead of 8). Use __alignof__ # to get the value we expect (and chromium checks for). Patch by spot. Patch23: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch +# Fix/workaround FTBFS on aarch64 with newer glibc +Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch ## Upstream patches: # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches @@ -381,6 +383,7 @@ BuildArch: noarch %patch21 -p1 -b .gn-bootstrap-verbose #patch22 -p1 -b .icu59 %patch23 -p1 -b .gcc8 +%patch24 -p1 -b .aarch64-new-stat # fix // in #include in content/renderer/gpu to avoid debugedit failure sed -i -e 's!gpu//!gpu/!g' \ diff --git a/qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch b/qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch new file mode 100644 index 0000000..2b17be4 --- /dev/null +++ b/qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h +--- qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat 2018-11-19 12:55:45.000000000 -0600 ++++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h 2018-12-08 21:16:39.931896244 -0600 +@@ -5,6 +5,8 @@ + #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_ + #define SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_ + ++#define __ARCH_WANT_NEW_STAT ++ + #include + + #if !defined(__NR_io_setup) From 0b0d4873acafaf5041111adde817d5dfd1c80b24 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 11 Dec 2018 08:31:22 -0600 Subject: [PATCH 284/437] rebuild (Qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 12963c5..783e2a5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.3 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -587,6 +587,9 @@ done %changelog +* Tue Dec 11 2018 Rex Dieter - 5.11.3-2 +- rebuild (Qt5) + * Tue Dec 04 2018 Rex Dieter - 5.11.3-1 - 5.11.3 From 9a31f36f815cf02eafb92e06ef906ed7913a507f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 3 Jan 2019 13:02:20 -0600 Subject: [PATCH 285/437] -devtools subpkg, workaround multilib conflicts (#1663299) --- qt5-qtwebengine.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 783e2a5..ba69c09 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.3 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -329,11 +329,18 @@ Provides: bundled(fdlibm) = 5.3 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-devtools%{?_isa} = %{version}-%{release} Requires: qt5-qtbase-devel%{?_isa} Requires: qt5-qtdeclarative-devel%{?_isa} %description devel %{summary}. +%package devtools +Summary: WebEngine devtools_resources +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devtools +Support for remote debugging. + %package examples Summary: Example files for %{name} @@ -511,7 +518,10 @@ done %{_qt5_libdir}/qtwebengine/ %endif %{_qt5_plugindir}/designer/libqwebengineview.so -%{_qt5_datadir}/resources/ +%dir %{_qt5_datadir}/resources/ +%{_qt5_datadir}/resources/qtwebengine_resources_100p.pak +%{_qt5_datadir}/resources/qtwebengine_resources_200p.pak +%{_qt5_datadir}/resources/qtwebengine_resources.pak %dir %{_qtwebengine_dictionaries_dir} %dir %{_qt5_translationdir}/qtwebengine_locales %lang(am) %{_qt5_translationdir}/qtwebengine_locales/am.pak @@ -577,6 +587,9 @@ done %{_qt5_libdir}/pkgconfig/Qt5*.pc %{_qt5_archdatadir}/mkspecs/modules/*.pri +%files devtools +%{_qt5_datadir}/resources/qtwebengine_devtools_resources.pak + %files examples %{_qt5_examplesdir}/ @@ -587,6 +600,9 @@ done %changelog +* Thu Jan 03 2019 Rex Dieter - 5.11.3-3 +- -devtools subpkg, workaround multilib conflicts (#1663299) + * Tue Dec 11 2018 Rex Dieter - 5.11.3-2 - rebuild (Qt5) From 158656e6af384eaf8f624b1bea10ebac3adaabfc Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 3 Jan 2019 13:05:16 -0600 Subject: [PATCH 286/437] avoid multilib'ing -devtools ... for now --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ba69c09..4dc9995 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -329,7 +329,8 @@ Provides: bundled(fdlibm) = 5.3 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-devtools%{?_isa} = %{version}-%{release} +# not arch'd for now, see if can get away with avoiding multilib'ing -- rex +Requires: %{name}-devtools = %{version}-%{release} Requires: qt5-qtbase-devel%{?_isa} Requires: qt5-qtdeclarative-devel%{?_isa} %description devel From 25fd9ec4f76377997f086ce3bd0acb7aafb975a5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 10:46:43 +0000 Subject: [PATCH 287/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4dc9995..ac72844 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.3 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -601,6 +601,9 @@ done %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 5.11.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Jan 03 2019 Rex Dieter - 5.11.3-3 - -devtools subpkg, workaround multilib conflicts (#1663299) From 9ba4864fbb245d8aa5cc97547a1b35d6ff035eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 5 Feb 2019 15:03:56 +0100 Subject: [PATCH 288/437] rebuilt (libvpx) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ac72844..6232444 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -51,7 +51,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.11.3 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -601,6 +601,9 @@ done %changelog +* Tue Feb 05 2019 Björn Esser - 5.11.3-5 +- rebuilt (libvpx) + * Sat Feb 02 2019 Fedora Release Engineering - 5.11.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 6ef5248a05092a0b333504987a4988f1fcaec8d2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 13 Feb 2019 15:32:57 -0600 Subject: [PATCH 289/437] 5.12.1 --- .gitignore | 17 +- clean_ffmpeg.sh | 1 + qt5-qtwebengine.spec | 111 +- ...here-src-5.10.0-gn-bootstrap-verbose.patch | 12 - qtwebengine-everywhere-src-5.10.0-icu59.patch | 545 - ...gine-everywhere-src-5.10.0-skia-neon.patch | 390 - ...everywhere-src-5.10.0-system-icu-utf.patch | 463 - ...ywhere-src-5.10.0-system-nspr-prtime.patch | 80 - ...e-everywhere-src-5.10.1-gcc8-alignof.patch | 18 - ...engine-everywhere-src-5.10.1-no-sse2.patch | 30292 ---------------- ...here-src-5.12.0-gn-bootstrap-verbose.patch | 12 + ...engine-everywhere-src-5.12.1-python2.patch | 11 + ...ensource-src-5.12.1-fix-extractcflag.patch | 12 + ...pensource-src-5.9.0-fix-extractcflag.patch | 12 - ...nsource-src-5.9.0-webrtc-neon-detect.patch | 14 - ...ine-opensource-src-5.9.2-arm-fpu-fix.patch | 11 - sources | 2 +- 17 files changed, 78 insertions(+), 31925 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch delete mode 100644 qtwebengine-everywhere-src-5.10.0-icu59.patch delete mode 100644 qtwebengine-everywhere-src-5.10.0-skia-neon.patch delete mode 100644 qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch delete mode 100644 qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch delete mode 100644 qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch delete mode 100644 qtwebengine-everywhere-src-5.10.1-no-sse2.patch create mode 100644 qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch create mode 100644 qtwebengine-everywhere-src-5.12.1-python2.patch create mode 100644 qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch delete mode 100644 qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch diff --git a/.gitignore b/.gitignore index 308d839..9b1512e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,4 @@ -/qtwebengine-opensource-src-5.6.0-beta-clean.tar.xz -/qtwebengine-opensource-src-5.6.0-rc-clean.tar.xz -/qtwebengine-opensource-src-5.6.0-clean.tar.xz -/qtwebengine-opensource-src-5.6.1-clean.tar.xz -/qtwebengine-opensource-src-5.6.2-clean.tar.xz -/qtwebengine-opensource-src-5.6.3-ee719ad313e564d4e6f06d74b313ae179169466f-clean.tar.xz -/qtwebengine-opensource-src-5.7.0-clean.tar.xz -/qtwebengine-opensource-src-5.7.1-clean.tar.xz -/qtwebengine-opensource-src-5.8.0-clean.tar.xz -/qtwebengine-opensource-src-5.9.0-clean.tar.xz -/qtwebengine-opensource-src-5.9.1-clean.tar.xz -/qtwebengine-opensource-src-5.9.2-clean.tar.xz -/qtwebengine-opensource-src-5.9.3-clean.tar.xz -/qtwebengine-everywhere-src-5.10.0-clean.tar.xz -/qtwebengine-everywhere-src-5.10.1-clean.tar.xz -/qtwebengine-everywhere-src-5.11.0-clean.tar.xz /qtwebengine-everywhere-src-5.11.1-clean.tar.xz /qtwebengine-everywhere-src-5.11.2-clean.tar.xz /qtwebengine-everywhere-src-5.11.3-clean.tar.xz +/qtwebengine-everywhere-src-5.12.1-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 77f0b57..ab775a4 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -140,6 +140,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/mpegpicture.h \ libavcodec/mpegutils.h \ libavcodec/mpegvideo.h \ + libavcodec/mpegvideodata.h \ libavcodec/mpegvideodsp.h \ libavcodec/mpegvideoencdsp.h \ libavcodec/old_codec_ids.h \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6232444..1152ff3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -1,17 +1,13 @@ - %global qt_module qtwebengine %global _hardened_build 1 # define to build docs, need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available -# disable on Rawhide for now -%if 0%{?fedora} < 29 %global docs 1 -%endif -%if 0%{?fedora} > 27 -# need libvpx >= 1.7.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) +%if 0%{?fedora} > 29 +# need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 %endif # need libwebp >= 0.6.0 @@ -19,18 +15,18 @@ # NEON support on ARM (detected at runtime) - disable this if you are hitting # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 -%global arm_neon 1 +#global arm_neon 1 # the QMake CONFIG flags to force debugging information to be produced in # release builds, and for all parts of the code -#ifarch %{arm} -%if 1 +%ifarch %{arm} aarch64 # the ARM builder runs out of memory during linking with the full setting below, # so omit debugging information for the parts upstream deems it dispensable for # (webcore, v8base) -%global debug_config force_debug_info +%global debug_config %{nil} %else -%global debug_config webcore_debug v8base_debug force_debug_info +%global debug_config force_debug_info +# webcore_debug v8base_debug %endif #global prerelease rc @@ -50,8 +46,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.11.3 -Release: 5%{?dist} +Version: 5.12.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -77,47 +73,16 @@ Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch Patch1: qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch -Patch2: qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch +Patch2: qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch # disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch -# use the system NSPR prtime (based on Debian patch) -# We already depend on NSPR, so it is useless to copy these functions here. -# Debian uses this just fine, and I don't see relevant modifications either. -Patch4: qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch -# use the system ICU UTF functions -# We already depend on ICU, so it is useless to copy these functions here. -# I checked the history of that directory, and other than the renames I am -# undoing, there were no modifications at all. Must be applied after Patch4. -Patch5: qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch -# do not require SSE2 on i686 -# cumulative revert of Chromium reviews 187423002, 308003004, 511773002 (parts -# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, Chromium -# Gerrit review 570351 and V8 Gerrit review 575756, along with some custom fixes -# and improvements -# also build V8 shared and twice on i686 (once for x87, once for SSE2) -Patch6: qtwebengine-everywhere-src-5.10.1-no-sse2.patch -# fix missing ARM -mfpu setting -Patch9: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch +# python -> python2 +Patch7: qtwebengine-everywhere-src-5.12.1-python2.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch -# restore NEON runtime detection in Skia: revert upstream review 1952953004, -# restore the non-Android Linux NEON runtime detection code lost in upstream -# review 1890483002, also add VFPv4 runtime detection -Patch11: qtwebengine-everywhere-src-5.10.0-skia-neon.patch -# webrtc: enable the CPU feature detection for ARM Linux also for Chromium -Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch # Force verbose output from the GN bootstrap process -Patch21: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch -# Forward-port missing parts of build fix with system ICU >= 59 from 5.9: -# https://codereview.qt-project.org/#/c/196922/ -# see QTBUG-60886 and QTBUG-65090 -Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch -# Fix FTBFS with GCC 8 on i686: GCC8 has changed the alignof operator to return -# the minimal alignment required by the target ABI instead of the preferred -# alignment. This means int64_t is now 4 on i686 (instead of 8). Use __alignof__ -# to get the value we expect (and chromium checks for). Patch by spot. -Patch23: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch +Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch ## Upstream patches: @@ -141,6 +106,9 @@ BuildRequires: ninja-build BuildRequires: cmake BuildRequires: bison BuildRequires: flex +BuildRequires: gcc-c++ +# gn links statically (for now) +BuildRequires: libstdc++-static BuildRequires: git-core BuildRequires: gperf BuildRequires: libicu-devel @@ -157,6 +125,7 @@ BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(egl) +BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) %if 0%{?use_system_libwebp} @@ -165,6 +134,7 @@ BuildRequires: pkgconfig(libwebp) >= 0.6.0 BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) +BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(zlib) %if 0%{?fedora} && 0%{?fedora} < 30 @@ -191,9 +161,7 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter -# recommended workaround from -# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package -BuildRequires: /usr/bin/python +BuildRequires: python2-devel %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif @@ -270,7 +238,7 @@ Provides: bundled(modp_b64) Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) # see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version -Provides: bundled(protobuf) = 3.0.0-0.1.beta3 +#Provides: bundled(protobuf) = 3.0.0-0.1.beta3 Provides: bundled(qcms) = 4 Provides: bundled(sfntly) Provides: bundled(skia) @@ -329,10 +297,10 @@ Provides: bundled(fdlibm) = 5.3 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -# not arch'd for now, see if can get away with avoiding multilib'ing -- rex -Requires: %{name}-devtools = %{version}-%{release} Requires: qt5-qtbase-devel%{?_isa} Requires: qt5-qtdeclarative-devel%{?_isa} +# not arch'd for now, see if can get away with avoiding multilib'ing -- rex +Requires: %{name}-devtools = %{version}-%{release} %description devel %{summary}. @@ -377,25 +345,21 @@ BuildArch: noarch ## upstream patches -##FIXME/TODO rebase -#patch4 -p1 -b .system-nspr-prtime -#patch5 -p1 -b .system-icu-utf -#patch6 -p1 -b .no-sse2 -%ifarch %{ix86} -#global sse2 1 -%endif -%patch9 -p1 -b .arm-fpu-fix +%patch7 -p1 -b .python2 %patch10 -p1 -b .openmax-dl-neon -#patch11 -p1 -b .skia-neon -%patch12 -p1 -b .webrtc-neon-detect -%patch21 -p1 -b .gn-bootstrap-verbose -#patch22 -p1 -b .icu59 -%patch23 -p1 -b .gcc8 +## NEEDSWORK +#patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat +# the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references +# when building on older Qt releases +%if "%{_qt5_version}" < "5.12.0" +sed -i -e 's|QT_CONFIG(xkbcommon)|QT_CONFIG(xkbcommon_evdev)|g' src/core/web_event_factory.cpp +%endif + # fix // in #include in content/renderer/gpu to avoid debugedit failure -sed -i -e 's!gpu//!gpu/!g' \ - src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc +#sed -i -e 's!gpu//!gpu/!g' \ +# src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc # and another one in 2 files in WebRTC sed -i -e 's!audio_processing//!audio_processing/!g' \ src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \ @@ -424,7 +388,7 @@ sed -i -e 's/symbol_level=1/symbol_level=2/g' src/core/config/common.pri # generate qtwebengine-3rdparty.qdoc, it is missing from the tarball pushd src/3rdparty -python chromium/tools/licenses.py \ +%{__python2} chromium/tools/licenses.py \ --file-template ../../tools/about_credits.tmpl \ --entry-template ../../tools/about_credits_entry.tmpl \ credits >../webengine/doc/src/qtwebengine-3rdparty.qdoc @@ -433,12 +397,14 @@ popd # copy the Chromium license so it is installed with the appropriate name cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium + %build export STRIP=strip export NINJAFLAGS="%{__ninja_common_opts}" export NINJA_PATH=%{__ninja} -%{qmake_qt5} CONFIG+="%{debug_config}" \ +%{qmake_qt5} \ + CONFIG+="%{debug_config}" \ QMAKE_EXTRA_ARGS+="-system-webengine-icu" . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja @@ -601,6 +567,9 @@ done %changelog +* Wed Feb 13 2019 Rex Dieter - 5.12.1-1 +- 5.12.1 + * Tue Feb 05 2019 Björn Esser - 5.11.3-5 - rebuilt (libvpx) diff --git a/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch deleted file mode 100644 index cac2e56..0000000 --- a/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro ---- qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro 2017-12-25 18:51:46.953799125 +0100 -@@ -25,7 +25,7 @@ - gn_args = $$replace(gn_args, "use_incremental_linking=true ", "") - } - -- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path -+ gn_configure = $$system_quote($$gn_bootstrap) --verbose --shadow --gn-gen-args=$$gn_args $$ninja_path - !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") { - error("GN build error!") - } diff --git a/qtwebengine-everywhere-src-5.10.0-icu59.patch b/qtwebengine-everywhere-src-5.10.0-icu59.patch deleted file mode 100644 index 2b031f7..0000000 --- a/qtwebengine-everywhere-src-5.10.0-icu59.patch +++ /dev/null @@ -1,545 +0,0 @@ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/BUILD.gn 2017-12-26 00:08:24.179696335 +0100 -@@ -1134,6 +1134,10 @@ - ":debugging_flags", - ] - -+ if (!is_win) { -+ public_deps += [ "//third_party/icu:icuuc" ] -+ } -+ - # Needed for if using newer C++ library than sysroot, except if - # building inside the cros_sdk environment - use host_toolchain as a - # more robust check for this. -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-12-25 23:52:46.376221561 +0100 -@@ -44,7 +44,7 @@ - bidi_ = ubidi_openSized(static_cast(text.length()), 0, &error); - if (U_FAILURE(error)) - return false; -- ubidi_setPara(bidi_, text.data(), static_cast(text.length()), -+ ubidi_setPara(bidi_, reinterpret_cast(text.data()), static_cast(text.length()), - GetParagraphLevelForDirection(direction), NULL, &error); - return (U_SUCCESS(error) == TRUE); - } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/break_iterator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/break_iterator.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-12-25 23:52:46.376221561 +0100 -@@ -59,9 +59,9 @@ - return false; - } - if (break_type_ == RULE_BASED) { -- iter_ = ubrk_openRules(rules_.c_str(), -+ iter_ = ubrk_openRules(reinterpret_cast(rules_.c_str()), - static_cast(rules_.length()), -- string_.data(), -+ reinterpret_cast(string_.data()), - static_cast(string_.size()), - &parse_error, - &status); -@@ -72,7 +72,7 @@ - } else { - iter_ = ubrk_open(break_type, - NULL, -- string_.data(), -+ reinterpret_cast(string_.data()), - static_cast(string_.size()), - &status); - if (U_FAILURE(status)) { -@@ -128,7 +128,7 @@ - bool BreakIterator::SetText(const base::char16* text, const size_t length) { - UErrorCode status = U_ZERO_ERROR; - ubrk_setText(static_cast(iter_), -- text, length, &status); -+ reinterpret_cast(text), length, &status); - pos_ = 0; // implicit when ubrk_setText is done - prev_ = npos; - if (U_FAILURE(status)) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/case_conversion.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/case_conversion.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-12-25 23:52:46.376221561 +0100 -@@ -64,8 +64,8 @@ - // terminator, but will otherwise. So we don't need to save room for that. - // Don't use WriteInto, which assumes null terminators. - int32_t new_length = case_mapper( -- &dest[0], saturated_cast(dest.size()), -- string.data(), saturated_cast(string.size()), -+ reinterpret_cast(&dest[0]), saturated_cast(dest.size()), -+ reinterpret_cast(string.data()), saturated_cast(string.size()), - &error); - dest.resize(new_length); - } while (error == U_BUFFER_OVERFLOW_ERROR); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-12-25 23:52:46.376221561 +0100 -@@ -151,7 +151,7 @@ - if (!U_SUCCESS(status)) - return false; - -- return ConvertFromUTF16(converter, utf16.c_str(), -+ return ConvertFromUTF16(converter, reinterpret_cast(utf16.c_str()), - static_cast(utf16.length()), on_error, encoded); - } - -@@ -178,7 +178,7 @@ - - SetUpErrorHandlerForToUChars(on_error, converter, &status); - std::unique_ptr buffer(new char16[uchar_max_length]); -- int actual_size = ucnv_toUChars(converter, buffer.get(), -+ int actual_size = ucnv_toUChars(converter, reinterpret_cast(buffer.get()), - static_cast(uchar_max_length), encoded.data(), - static_cast(encoded.length()), &status); - ucnv_close(converter); -@@ -205,8 +205,8 @@ - string16 normalized_utf16; - std::unique_ptr buffer(new char16[max_length]); - int actual_length = unorm_normalize( -- utf16.c_str(), utf16.length(), UNORM_NFC, 0, -- buffer.get(), static_cast(max_length), &status); -+ reinterpret_cast(utf16.c_str()), utf16.length(), UNORM_NFC, 0, -+ reinterpret_cast(buffer.get()), static_cast(max_length), &status); - if (!U_SUCCESS(status)) - return false; - normalized_utf16.assign(buffer.get(), actual_length); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/rtl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/rtl.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/rtl.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/rtl.cc 2017-12-25 23:54:24.681803775 +0100 -@@ -212,7 +212,7 @@ - } - - TextDirection GetFirstStrongCharacterDirection(const string16& text) { -- const UChar* string = text.c_str(); -+ const UChar* string = reinterpret_cast(text.c_str()); - size_t length = text.length(); - size_t position = 0; - while (position < length) { -@@ -228,7 +228,7 @@ - } - - TextDirection GetLastStrongCharacterDirection(const string16& text) { -- const UChar* string = text.c_str(); -+ const UChar* string = reinterpret_cast(text.c_str()); - size_t position = text.length(); - while (position > 0) { - UChar32 character; -@@ -243,7 +243,7 @@ - } - - TextDirection GetStringDirection(const string16& text) { -- const UChar* string = text.c_str(); -+ const UChar* string = reinterpret_cast(text.c_str()); - size_t length = text.length(); - size_t position = 0; - -@@ -374,7 +374,7 @@ - #endif // !OS_WIN - - bool StringContainsStrongRTLChars(const string16& text) { -- const UChar* string = text.c_str(); -+ const UChar* string = reinterpret_cast(text.c_str()); - size_t length = text.length(); - size_t position = 0; - while (position < length) { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/string_search.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/string_search.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/string_search.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/string_search.cc 2017-12-25 23:54:45.809499066 +0100 -@@ -20,8 +20,8 @@ - const string16& dummy = find_this_; - - UErrorCode status = U_ZERO_ERROR; -- search_ = usearch_open(find_this_.data(), find_this_.size(), -- dummy.data(), dummy.size(), -+ search_ = usearch_open(reinterpret_cast(find_this_.data()), find_this_.size(), -+ reinterpret_cast(dummy.data()), dummy.size(), - uloc_getDefault(), - NULL, // breakiter - &status); -@@ -41,7 +41,7 @@ - bool FixedPatternStringSearchIgnoringCaseAndAccents::Search( - const string16& in_this, size_t* match_index, size_t* match_length) { - UErrorCode status = U_ZERO_ERROR; -- usearch_setText(search_, in_this.data(), in_this.size(), &status); -+ usearch_setText(search_, reinterpret_cast(in_this.data()), in_this.size(), &status); - - // Default to basic substring search if usearch fails. According to - // http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/unicodestring.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/unicodestring.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-12-26 01:22:00.605067404 +0100 -@@ -9,16 +9,12 @@ - #include "third_party/icu/source/common/unicode/unistr.h" - #include "third_party/icu/source/common/unicode/uvernum.h" - --#if U_ICU_VERSION_MAJOR_NUM >= 59 --#include "third_party/icu/source/common/unicode/char16ptr.h" --#endif -- - namespace base { - namespace i18n { - - inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) { - #if U_ICU_VERSION_MAJOR_NUM >= 59 -- return base::string16(icu::toUCharPtr(unistr.getBuffer()), -+ return base::string16(reinterpret_cast(unistr.getBuffer()), - static_cast(unistr.length())); - #else - return base::string16(unistr.getBuffer(), -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/idn_spoof_checker.cc 2017-12-26 00:16:45.791461970 +0100 -@@ -155,14 +155,14 @@ - bool is_tld_ascii) { - UErrorCode status = U_ZERO_ERROR; - int32_t result = -- uspoof_check(checker_, label.data(), -+ uspoof_check(checker_, (const UChar*)label.data(), - base::checked_cast(label.size()), NULL, &status); - // If uspoof_check fails (due to library failure), or if any of the checks - // fail, treat the IDN as unsafe. - if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS)) - return false; - -- icu::UnicodeString label_string(FALSE, label.data(), -+ icu::UnicodeString label_string(FALSE, (const UChar*)label.data(), - base::checked_cast(label.size())); - - // A punycode label with 'xn--' prefix is not subject to the URL -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/url_formatter.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/components/url_formatter/url_formatter.cc 2017-12-25 23:58:01.767672910 +0100 -@@ -374,7 +374,7 @@ - // code units, |status| will be U_BUFFER_OVERFLOW_ERROR and we'll try - // the conversion again, but with a sufficiently large buffer. - output_length = uidna_labelToUnicode( -- uidna, comp, static_cast(comp_len), &(*out)[original_length], -+ uidna, (const UChar*)comp, static_cast(comp_len), (UChar*)&(*out)[original_length], - output_length, &info, &status); - } while ((status == U_BUFFER_OVERFLOW_ERROR && info.errors == 0)); - -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/content/child/browser_font_resource_trusted.cc 2017-12-25 23:58:54.555911585 +0100 -@@ -77,7 +77,7 @@ - } else { - bidi_ = ubidi_open(); - UErrorCode uerror = U_ZERO_ERROR; -- ubidi_setPara(bidi_, text_.data(), text_.size(), run.rtl, NULL, &uerror); -+ ubidi_setPara(bidi_, reinterpret_cast(text_.data()), text_.size(), run.rtl, NULL, &uerror); - if (U_SUCCESS(uerror)) - num_runs_ = ubidi_countRuns(bidi_, &uerror); - } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp 2017-12-26 00:00:40.801379288 +0100 -@@ -58,7 +58,7 @@ - // For the NSS PKCS#12 library, must convert PRUnichars (shorts) to - // a buffer of octets. Must handle byte order correctly. - // TODO: Is there a Mozilla way to do this? In the string lib? --void unicodeToItem(const PRUnichar *uni, SECItem *item) -+void unicodeToItem(const base::char16 *uni, SECItem *item) - { - int len = 0; - while (uni[len++] != 0); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ppapi/proxy/pdf_resource.cc 2017-12-26 00:00:40.801379288 +0100 -@@ -58,10 +58,10 @@ - PP_PrivateFindResult** results, int* count) { - if (locale_.empty()) - locale_ = GetLocale(); -- const base::char16* string = -- reinterpret_cast(input_string); -- const base::char16* term = -- reinterpret_cast(input_term); -+ const UChar* string = -+ reinterpret_cast(input_string); -+ const UChar* term = -+ reinterpret_cast(input_term); - - UErrorCode status = U_ZERO_ERROR; - UStringSearch* searcher = usearch_open(term, -1, string, -1, locale_.c_str(), -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sample/chromium/subsetter_impl.cc 2017-12-26 00:02:54.958444442 +0100 -@@ -27,6 +27,7 @@ - #include - #include - -+#include "base/i18n/unicodestring.h" - #include "sfntly/table/bitmap/eblc_table.h" - #include "sfntly/table/bitmap/ebdt_table.h" - #include "sfntly/table/bitmap/index_sub_table.h" -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp 2017-12-26 00:21:22.768467342 +0100 -@@ -19,7 +19,7 @@ - String str = web_string; - if (!str.Is8Bit()) { - return base::FilePath::FromUTF16Unsafe( -- base::StringPiece16(str.Characters16(), str.length())); -+ base::StringPiece16((const base::char16*)str.Characters16(), str.length())); - } - - #if defined(OS_POSIX) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/URLConversion.cpp 2017-12-26 00:21:37.908248992 +0100 -@@ -23,7 +23,7 @@ - } - - // GURL can consume UTF-16 directly. -- return GURL(base::StringPiece16(str.Characters16(), str.length())); -+ return GURL(base::StringPiece16((const base::char16*)str.Characters16(), str.length())); - } - - } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/exported/WebString.cpp 2017-12-26 00:22:14.401722675 +0100 -@@ -59,7 +59,7 @@ - } - - void WebString::Assign(const WebUChar* data, size_t length) { -- Assign(StringImpl::Create8BitIfPossible(data, length).Get()); -+ Assign(StringImpl::Create8BitIfPossible((const UChar*)data, length).Get()); - } - - size_t WebString::length() const { -@@ -75,7 +75,7 @@ - } - - const WebUChar* WebString::Data16() const { -- return !private_.IsNull() && !Is8Bit() ? private_->Characters16() : 0; -+ return !private_.IsNull() && !Is8Bit() ? (const WebUChar*)private_->Characters16() : 0; - } - - std::string WebString::Utf8(UTF8ConversionMode mode) const { -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/LinkHash.cpp 2017-12-26 00:20:18.452394923 +0100 -@@ -51,7 +51,7 @@ - relative_utf8.length(), 0, buffer, &parsed); - } - return url::ResolveRelative(base_utf8.Data(), base_utf8.length(), -- base.GetParsed(), relative.Characters16(), -+ base.GetParsed(), (const base::char16*)relative.Characters16(), - relative.length(), 0, buffer, &parsed); - } - -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/KURL.cpp 2017-12-26 00:25:55.112547976 +0100 -@@ -104,7 +104,7 @@ - int input_length, - url::CanonOutput* output) override { - CString encoded = encoding_->Encode( -- String(input, input_length), WTF::kURLEncodedEntitiesForUnencodables); -+ String((const UChar*)input, input_length), WTF::kURLEncodedEntitiesForUnencodables); - output->Append(encoded.data(), static_cast(encoded.length())); - } - -@@ -341,7 +341,7 @@ - if (string_.Is8Bit()) - url::ExtractFileName(AsURLChar8Subtle(string_), path, &file); - else -- url::ExtractFileName(string_.Characters16(), path, &file); -+ url::ExtractFileName((const base::char16*)string_.Characters16(), path, &file); - - // Bug: https://bugs.webkit.org/show_bug.cgi?id=21015 this function returns - // a null string when the path is empty, which we duplicate here. -@@ -371,7 +371,7 @@ - DCHECK(!string_.IsNull()); - int port = string_.Is8Bit() - ? url::ParsePort(AsURLChar8Subtle(string_), parsed_.port) -- : url::ParsePort(string_.Characters16(), parsed_.port); -+ : url::ParsePort((const base::char16*)string_.Characters16(), parsed_.port); - DCHECK_NE(port, url::PORT_UNSPECIFIED); // Checked port.len <= 0 before. - - if (port == url::PORT_INVALID || -@@ -666,7 +666,7 @@ - return false; - return string_.Is8Bit() - ? url::IsStandard(AsURLChar8Subtle(string_), parsed_.scheme) -- : url::IsStandard(string_.Characters16(), parsed_.scheme); -+ : url::IsStandard((const base::char16*)string_.Characters16(), parsed_.scheme); - } - - bool EqualIgnoringFragmentIdentifier(const KURL& a, const KURL& b) { -@@ -719,7 +719,7 @@ - if (string_.Is8Bit()) - url::ExtractFileName(AsURLChar8Subtle(string_), parsed_.path, &filename); - else -- url::ExtractFileName(string_.Characters16(), parsed_.path, &filename); -+ url::ExtractFileName((const base::char16*)string_.Characters16(), parsed_.path, &filename); - return filename.begin; - } - -@@ -732,7 +732,7 @@ - if (url.Is8Bit()) - return url::FindAndCompareScheme(AsURLChar8Subtle(url), url.length(), - protocol, 0); -- return url::FindAndCompareScheme(url.Characters16(), url.length(), protocol, -+ return url::FindAndCompareScheme((const base::char16*)url.Characters16(), url.length(), protocol, - 0); - } - -@@ -765,7 +765,7 @@ - charset_converter, &output, &parsed_); - } else { - is_valid_ = url::ResolveRelative(base_utf8.Data(), base_utf8.length(), -- base.parsed_, relative.Characters16(), -+ base.parsed_, (const base::char16*)relative.Characters16(), - clampTo(relative.length()), - charset_converter, &output, &parsed_); - } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp 2017-12-26 00:27:48.865912016 +0100 -@@ -638,7 +638,7 @@ - url::CanonicalizeHost(utf8.Data(), url::Component(0, utf8.length()), - &canon_output, &out_host); - } else { -- *success = url::CanonicalizeHost(host.Characters16(), -+ *success = url::CanonicalizeHost(reinterpret_cast(host.Characters16()), - url::Component(0, host.length()), - &canon_output, &out_host); - } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/AtomicString.h 2017-12-26 00:02:31.246786418 +0100 -@@ -66,9 +66,10 @@ - AtomicString(const LChar* chars, unsigned length); - AtomicString(const UChar* chars, unsigned length); - AtomicString(const UChar* chars); -+#if U_ICU_VERSION_MAJOR_NUM < 59 - AtomicString(const char16_t* chars) - : AtomicString(reinterpret_cast(chars)) {} -- -+#endif - template - explicit AtomicString(const Vector& vector) - : AtomicString(vector.data(), vector.size()) {} -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/StringView.h 2017-12-26 00:02:44.550594548 +0100 -@@ -83,8 +83,10 @@ - characters16_(chars), - length_(length) {} - StringView(const UChar* chars); -+#if U_ICU_VERSION_MAJOR_NUM < 59 - StringView(const char16_t* chars) - : StringView(reinterpret_cast(chars)) {} -+#endif - - #if DCHECK_IS_ON() - ~StringView(); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/text/WTFString.h 2017-12-26 00:33:00.427431253 +0100 -@@ -36,6 +36,8 @@ - #include - #include - -+#include "third_party/icu/source/common/unicode/uvernum.h" -+ - #ifdef __OBJC__ - #include - #endif -@@ -82,8 +84,13 @@ - - // Construct a string with UTF-16 data, from a null-terminated source. - String(const UChar*); -+#if U_ICU_VERSION_MAJOR_NUM < 59 - String(const char16_t* chars) - : String(reinterpret_cast(chars)) {} -+#else -+ String(const uint16_t* chars) -+ : String(reinterpret_cast(chars)) {} -+#endif - - // Construct a string with latin1 data. - String(const LChar* characters, unsigned length); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/accelerators/accelerator.cc 2017-12-26 00:02:54.958444442 +0100 -@@ -225,7 +225,7 @@ - key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR)); - shortcut += key; - #elif defined(USE_AURA) || defined(OS_MACOSX) -- const uint16_t c = DomCodeToUsLayoutCharacter( -+ const base::char16 c = DomCodeToUsLayoutCharacter( - UsLayoutKeyboardCodeToDomCode(key_code_), false); - if (c != 0) - shortcut += -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/l10n_util.cc 2017-12-26 00:02:54.959444427 +0100 -@@ -581,7 +581,7 @@ - - int actual_size = uloc_getDisplayName( - locale_code.c_str(), display_locale.c_str(), -- base::WriteInto(&display_name, kBufferSize), kBufferSize - 1, &error); -+ (UChar*)base::WriteInto(&display_name, kBufferSize), kBufferSize - 1, &error); - DCHECK(U_SUCCESS(error)); - display_name.resize(actual_size); - } -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/time_format.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/time_format.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/l10n/time_format.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/l10n/time_format.cc 2017-12-26 00:02:54.959444427 +0100 -@@ -141,7 +141,7 @@ - DCHECK_GT(capacity, 1); - base::string16 result; - UErrorCode error = U_ZERO_ERROR; -- time_string.extract(static_cast(base::WriteInto(&result, capacity)), -+ time_string.extract(reinterpret_cast(base::WriteInto(&result, capacity)), - capacity, error); - DCHECK(U_SUCCESS(error)); - return result; -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/x/selection_utils.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/x/selection_utils.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/ui/base/x/selection_utils.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/ui/base/x/selection_utils.cc 2017-12-26 00:02:54.959444427 +0100 -@@ -207,8 +207,8 @@ - // If the data starts with 0xFEFF, i.e., Byte Order Mark, assume it is - // UTF-16, otherwise assume UTF-8. - if (size >= 2 && -- reinterpret_cast(data)[0] == 0xFEFF) { -- markup.assign(reinterpret_cast(data) + 1, -+ reinterpret_cast(data)[0] == 0xFEFF) { -+ markup.assign(reinterpret_cast(data) + 1, - (size / 2) - 1); - } else { - base::UTF8ToUTF16(reinterpret_cast(data), size, &markup); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/url/url_canon_icu.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/url/url_canon_icu.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/url/url_canon_icu.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/url/url_canon_icu.cc 2017-12-26 00:02:54.959444427 +0100 -@@ -133,7 +133,7 @@ - UErrorCode err = U_ZERO_ERROR; - char* dest = &output->data()[begin_offset]; - int required_capacity = ucnv_fromUChars(converter_, dest, dest_capacity, -- input, input_len, &err); -+ (const UChar*)input, input_len, &err); - if (err != U_BUFFER_OVERFLOW_ERROR) { - output->set_length(begin_offset + required_capacity); - return; -@@ -170,7 +170,7 @@ - while (true) { - UErrorCode err = U_ZERO_ERROR; - UIDNAInfo info = UIDNA_INFO_INITIALIZER; -- int output_length = uidna_nameToASCII(uidna, src, src_len, output->data(), -+ int output_length = uidna_nameToASCII(uidna, (const UChar*)src, src_len, (UChar*)output->data(), - output->capacity(), &info, &err); - if (U_SUCCESS(err) && info.errors == 0) { - output->set_length(output_length); -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-icu59/src/3rdparty/chromium/v8/src/runtime/runtime-intl.cc 2017-12-26 00:38:34.568625756 +0100 -@@ -43,6 +43,7 @@ - #include "unicode/ucurr.h" - #include "unicode/uloc.h" - #include "unicode/unistr.h" -+#include "unicode/ustring.h" - #include "unicode/unum.h" - #include "unicode/uvernum.h" - #include "unicode/uversion.h" diff --git a/qtwebengine-everywhere-src-5.10.0-skia-neon.patch b/qtwebengine-everywhere-src-5.10.0-skia-neon.patch deleted file mode 100644 index 9424e9f..0000000 --- a/qtwebengine-everywhere-src-5.10.0-skia-neon.patch +++ /dev/null @@ -1,390 +0,0 @@ -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/skia/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/skia/BUILD.gn 2017-12-25 18:31:12.288797893 +0100 -@@ -508,6 +508,24 @@ - } - - # Separated out so it can be compiled with different flags for SSE. -+if (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) { -+ source_set("skia_opts_neon") { -+ sources = skia_opts.neon_sources -+ # Root build config sets -mfpu=$arm_fpu, which we expect to be neon -+ # when running this. -+ if (!arm_use_neon) { -+ configs -= [ "//build/config/compiler:compiler_arm_fpu" ] -+ cflags = [ "-mfpu=neon" ] -+ } -+ visibility = [ ":skia_opts" ] -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ -+ ":skia_config", -+ ":skia_library_config", -+ "//build/config/compiler:no_chromium_code", -+ ] -+ } -+} - if (current_cpu == "arm64") { - source_set("skia_opts_crc32") { - sources = skia_opts.crc32_sources -@@ -644,14 +662,7 @@ - if (arm_version >= 7) { - sources = skia_opts.armv7_sources - if (arm_use_neon || arm_optionally_use_neon) { -- sources += skia_opts.neon_sources -- -- # Root build config sets -mfpu=$arm_fpu, which we expect to be neon -- # when running this. -- if (!arm_use_neon) { -- configs -= [ "//build/config/compiler:compiler_arm_fpu" ] -- cflags += [ "-mfpu=neon" ] -- } -+ deps += [ ":skia_opts_neon" ] - } - } else { - sources = skia_opts.none_sources -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/gn/opts.gni 2017-12-25 18:29:15.083480322 +0100 -@@ -23,6 +23,7 @@ - "$_src/opts/SkBitmapProcState_matrixProcs_neon.cpp", - "$_src/opts/SkBlitMask_opts_arm_neon.cpp", - "$_src/opts/SkBlitRow_opts_arm_neon.cpp", -+ "$_src/opts/SkOpts_neon.cpp", - ] - - arm64 = [ -@@ -33,6 +34,7 @@ - "$_src/opts/SkBlitMask_opts_arm_neon.cpp", - "$_src/opts/SkBlitRow_opts_arm.cpp", - "$_src/opts/SkBlitRow_opts_arm_neon.cpp", -+ "$_src/opts/SkOpts_neon.cpp", - ] - - crc32 = [ "$_src/opts/SkOpts_crc32.cpp" ] -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState.cpp 2017-12-25 18:29:22.449374588 +0100 -@@ -17,7 +17,7 @@ - #include "SkImageEncoder.h" - #include "SkResourceCache.h" - --#if defined(SK_ARM_HAS_NEON) -+#if !SK_ARM_NEON_IS_NONE - // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp - extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[]; - #endif -@@ -212,7 +212,7 @@ - index |= 4; - } - --#if !defined(SK_ARM_HAS_NEON) -+#if !SK_ARM_NEON_IS_ALWAYS - static const SampleProc32 gSkBitmapProcStateSample32[] = { - S32_opaque_D32_nofilter_DXDY, - S32_alpha_D32_nofilter_DXDY, -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkBitmapProcState_matrixProcs.cpp 2017-12-25 18:34:09.229257992 +0100 -@@ -46,16 +46,16 @@ - /////////////////////////////////////////////////////////////////////////////// - - // Compile neon code paths if needed --#if defined(SK_ARM_HAS_NEON) -+#if !SK_ARM_NEON_IS_NONE - - // These are defined in src/opts/SkBitmapProcState_matrixProcs_neon.cpp - extern const SkBitmapProcState::MatrixProc ClampX_ClampY_Procs_neon[]; - extern const SkBitmapProcState::MatrixProc RepeatX_RepeatY_Procs_neon[]; - --#endif // defined(SK_ARM_HAS_NEON) -+#endif // !SK_ARM_NEON_IS_NONE - - // Compile non-neon code path if needed --#if !defined(SK_ARM_HAS_NEON) -+#if !SK_ARM_NEON_IS_ALWAYS - #define MAKENAME(suffix) ClampX_ClampY ## suffix - #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) - #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp 2017-12-25 18:37:45.974144769 +0100 -@@ -74,6 +74,124 @@ - return features; - } - -+#elif defined(SK_CPU_ARM32) && \ -+ !defined(SK_BUILD_FOR_ANDROID) -+#include -+#include -+#include -+#include -+#include -+ -+ static uint32_t read_cpu_features() { -+ uint32_t features = 0; -+ -+ // If we fail any of the following, assume we don't have NEON/VFPv4 instructions -+ // This allows us to return immediately in case of error. -+ bool have_neon = false; -+ bool have_vfpv4 = false; -+ -+ // There is no user-accessible CPUID instruction on ARM that we can use. -+ // Instead, we must parse /proc/cpuinfo and look for the 'neon' feature. -+ // For example, here's a typical output (Nexus S running ICS 4.0.3): -+ /* -+ Processor : ARMv7 Processor rev 2 (v7l) -+ BogoMIPS : 994.65 -+ Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 -+ CPU implementer : 0x41 -+ CPU architecture: 7 -+ CPU variant : 0x2 -+ CPU part : 0xc08 -+ CPU revision : 2 -+ -+ Hardware : herring -+ Revision : 000b -+ Serial : 3833c77d6dc000ec -+ */ -+ char buffer[4096]; -+ -+ do { -+ // open /proc/cpuinfo -+ int fd = TEMP_FAILURE_RETRY(open("/proc/cpuinfo", O_RDONLY)); -+ if (fd < 0) { -+ SkDebugf("Could not open /proc/cpuinfo: %s\n", strerror(errno)); -+ break; -+ } -+ -+ // Read the file. To simplify our search, we're going to place two -+ // sentinel '\n' characters: one at the start of the buffer, and one at -+ // the end. This means we reserve the first and last buffer bytes. -+ buffer[0] = '\n'; -+ int size = TEMP_FAILURE_RETRY(read(fd, buffer+1, sizeof(buffer)-2)); -+ close(fd); -+ -+ if (size < 0) { // should not happen -+ SkDebugf("Could not read /proc/cpuinfo: %s\n", strerror(errno)); -+ break; -+ } -+ -+ SkDebugf("START /proc/cpuinfo:\n%.*s\nEND /proc/cpuinfo\n", -+ size, buffer+1); -+ -+ // Compute buffer limit, and place final sentinel -+ char* buffer_end = buffer + 1 + size; -+ buffer_end[0] = '\n'; -+ -+ // Now, find a line that starts with "Features", i.e. look for -+ // '\nFeatures ' in our buffer. -+ const char features[] = "\nFeatures\t"; -+ const size_t features_len = sizeof(features)-1; -+ -+ char* line = (char*) memmem(buffer, buffer_end - buffer, -+ features, features_len); -+ if (line == nullptr) { // Weird, no Features line, bad kernel? -+ SkDebugf("Could not find a line starting with 'Features'" -+ "in /proc/cpuinfo ?\n"); -+ break; -+ } -+ -+ line += features_len; // Skip the "\nFeatures\t" prefix -+ -+ // Find the end of the current line -+ char* line_end = (char*) memchr(line, '\n', buffer_end - line); -+ if (line_end == nullptr) -+ line_end = buffer_end; -+ -+ // Now find an instance of 'neon' in the flags list. We want to -+ // ensure it's only 'neon' and not something fancy like 'noneon' -+ // so check that it follows a space. -+ const char neon[] = " neon"; -+ const size_t neon_len = sizeof(neon)-1; -+ const char* flag = (const char*) memmem(line, line_end - line, -+ neon, neon_len); -+ // Ensure it is followed by a space or a newline. -+ if (flag != nullptr -+ && (flag[neon_len] == ' ' || flag[neon_len] == '\n')) { -+ // Fine, we support Arm NEON ! -+ have_neon = true; -+ } -+ -+ // Now find an instance of 'vfpv4' in the flags list. We want to -+ // ensure it's only 'vfpv4' and not something fancy like 'novfpv4' -+ // so check that it follows a space. -+ const char vfpv4[] = " vfpv4"; -+ const size_t vfpv4_len = sizeof(vfpv4)-1; -+ const char* vflag = (const char*) memmem(line, line_end - line, -+ vfpv4, vfpv4_len); -+ // Ensure it is followed by a space or a newline. -+ if (vflag != nullptr -+ && (vflag[vfpv4_len] == ' ' || vflag[vfpv4_len] == '\n')) { -+ // Fine, we support Arm VFPv4 ! -+ have_vfpv4 = true; -+ } -+ -+ } while (0); -+ -+ if (have_neon) { features |= SkCpu::NEON ; } -+ if (have_neon && have_vfpv4) { features |= SkCpu::NEON_FMA; } -+ if (have_vfpv4) { features |= SkCpu::VFP_FP16; } -+ return features; -+ } -+ - #elif defined(SK_CPU_ARM64) && __has_include() - #include - -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkOpts.cpp 2017-12-25 18:34:52.777632875 +0100 -@@ -95,6 +95,7 @@ - void Init_sse42(); - void Init_avx(); - void Init_crc32(); -+ void Init_neon(); - - static void init() { - #if !defined(SK_BUILD_NO_OPTS) -@@ -104,6 +105,9 @@ - if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); } - if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); } - -+ #elif defined(SK_CPU_ARM32) -+ if (SkCpu::Supports(SkCpu::NEON)) { Init_neon(); } -+ - #elif defined(SK_CPU_ARM64) - if (SkCpu::Supports(SkCpu::CRC32)) { Init_crc32(); } - -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/core/SkUtilsArm.h 2017-12-25 18:34:52.777632875 +0100 -@@ -8,12 +8,75 @@ - #ifndef SkUtilsArm_DEFINED - #define SkUtilsArm_DEFINED - --#include "SkTypes.h" -+#include "SkCpu.h" -+#include "SkUtils.h" - --#if defined(SK_ARM_HAS_NEON) -- #define SK_ARM_NEON_WRAP(x) (x ## _neon) -+// Define SK_ARM_NEON_MODE to one of the following values -+// corresponding respectively to: -+// - No ARM Neon support at all (not targetting ARMv7-A, or don't have NEON) -+// - Full ARM Neon support (i.e. assume the CPU always supports it) -+// - Optional ARM Neon support (i.e. probe CPU at runtime) -+// -+#define SK_ARM_NEON_MODE_NONE 0 -+#define SK_ARM_NEON_MODE_ALWAYS 1 -+#define SK_ARM_NEON_MODE_DYNAMIC 2 -+ -+#if defined(SK_ARM_HAS_OPTIONAL_NEON) -+# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC -+#elif defined(SK_ARM_HAS_NEON) -+# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS -+#else -+# define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE -+#endif -+ -+// Convenience test macros, always defined as 0 or 1 -+#define SK_ARM_NEON_IS_NONE (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_NONE) -+#define SK_ARM_NEON_IS_ALWAYS (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_ALWAYS) -+#define SK_ARM_NEON_IS_DYNAMIC (SK_ARM_NEON_MODE == SK_ARM_NEON_MODE_DYNAMIC) -+ -+// The sk_cpu_arm_has_neon() function returns true iff the target device -+// is ARMv7-A and supports Neon instructions. In DYNAMIC mode, this actually -+// probes the CPU at runtime (and caches the result). -+ -+static inline bool sk_cpu_arm_has_neon(void) { -+#if SK_ARM_NEON_IS_NONE -+ return false; - #else -- #define SK_ARM_NEON_WRAP(x) (x) -+ return SkCpu::Supports(SkCpu::NEON); -+#endif -+} -+ -+// Use SK_ARM_NEON_WRAP(symbol) to map 'symbol' to a NEON-specific symbol -+// when applicable. This will transform 'symbol' differently depending on -+// the current NEON configuration, i.e.: -+// -+// NONE -> 'symbol' -+// ALWAYS -> 'symbol_neon' -+// DYNAMIC -> 'symbol' or 'symbol_neon' depending on runtime check. -+// -+// The goal is to simplify user code, for example: -+// -+// return SK_ARM_NEON_WRAP(do_something)(params); -+// -+// Replaces the equivalent: -+// -+// #if SK_ARM_NEON_IS_NONE -+// return do_something(params); -+// #elif SK_ARM_NEON_IS_ALWAYS -+// return do_something_neon(params); -+// #elif SK_ARM_NEON_IS_DYNAMIC -+// if (sk_cpu_arm_has_neon()) -+// return do_something_neon(params); -+// else -+// return do_something(params); -+// #endif -+// -+#if SK_ARM_NEON_IS_NONE -+# define SK_ARM_NEON_WRAP(x) (x) -+#elif SK_ARM_NEON_IS_ALWAYS -+# define SK_ARM_NEON_WRAP(x) (x ## _neon) -+#elif SK_ARM_NEON_IS_DYNAMIC -+# define SK_ARM_NEON_WRAP(x) (sk_cpu_arm_has_neon() ? x ## _neon : x) - #endif - - #endif // SkUtilsArm_DEFINED -diff -Nur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-skia-neon/src/3rdparty/chromium/third_party/skia/src/opts/SkOpts_neon.cpp 2017-12-26 01:45:00.514114716 +0100 -@@ -0,0 +1,47 @@ -+/* -+ * Copyright 2015 Google Inc. -+ * -+ * Use of this source code is governed by a BSD-style license that can be -+ * found in the LICENSE file. -+ */ -+ -+#include "SkOpts.h" -+ -+#define SK_OPTS_NS sk_neon -+#include "SkBlitMask_opts.h" -+#include "SkBlitRow_opts.h" -+#include "SkBlurImageFilter_opts.h" -+#include "SkMorphologyImageFilter_opts.h" -+#include "SkSwizzler_opts.h" -+#include "SkXfermode_opts.h" -+ -+namespace SkOpts { -+ void Init_neon() { -+ create_xfermode = sk_neon::create_xfermode; -+ -+ box_blur_xx = sk_neon::box_blur_xx; -+ box_blur_xy = sk_neon::box_blur_xy; -+ box_blur_yx = sk_neon::box_blur_yx; -+ -+ dilate_x = sk_neon::dilate_x; -+ dilate_y = sk_neon::dilate_y; -+ erode_x = sk_neon::erode_x; -+ erode_y = sk_neon::erode_y; -+ -+ blit_mask_d32_a8 = sk_neon::blit_mask_d32_a8; -+ -+ blit_row_color32 = sk_neon::blit_row_color32; -+ blit_row_s32a_opaque = sk_neon::blit_row_s32a_opaque; -+ -+ RGBA_to_BGRA = sk_neon::RGBA_to_BGRA; -+ RGBA_to_rgbA = sk_neon::RGBA_to_rgbA; -+ RGBA_to_bgrA = sk_neon::RGBA_to_bgrA; -+ RGB_to_RGB1 = sk_neon::RGB_to_RGB1; -+ RGB_to_BGR1 = sk_neon::RGB_to_BGR1; -+ gray_to_RGB1 = sk_neon::gray_to_RGB1; -+ grayA_to_RGBA = sk_neon::grayA_to_RGBA; -+ grayA_to_rgbA = sk_neon::grayA_to_rgbA; -+ inverted_CMYK_to_RGB1 = sk_neon::inverted_CMYK_to_RGB1; -+ inverted_CMYK_to_BGR1 = sk_neon::inverted_CMYK_to_BGR1; -+ } -+} diff --git a/qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch b/qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch deleted file mode 100644 index e645de8..0000000 --- a/qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch +++ /dev/null @@ -1,463 +0,0 @@ -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:16:23.250517752 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:26:21.502411527 +0100 -@@ -859,8 +859,6 @@ - "third_party/dmg_fp/dmg_fp.h", - "third_party/dmg_fp/dtoa_wrapper.cc", - "third_party/dmg_fp/g_fmt.cc", -- "third_party/icu/icu_utf.cc", -- "third_party/icu/icu_utf.h", - "third_party/superfasthash/superfasthash.c", - "third_party/valgrind/memcheck.h", - "threading/platform_thread.h", -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/files/file_path.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/files/file_path.cc 2017-12-25 12:26:21.503411511 +0100 -@@ -18,7 +18,7 @@ - - #if defined(OS_MACOSX) - #include "base/mac/scoped_cftyperef.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #endif - - #if defined(OS_WIN) -@@ -1163,9 +1163,9 @@ - int* index) { - int codepoint = 0; - while (*index < length && codepoint == 0) { -- // CBU8_NEXT returns a value < 0 in error cases. For purposes of string -+ // U8_NEXT returns a value < 0 in error cases. For purposes of string - // comparison, we just use that value and flag it with DCHECK. -- CBU8_NEXT(string, *index, length, codepoint); -+ U8_NEXT(string, *index, length, codepoint); - DCHECK_GT(codepoint, 0); - if (codepoint > 0) { - // Check if there is a subtable for this upper byte. -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/json_parser.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/json_parser.cc 2017-12-25 12:29:56.210138445 +0100 -@@ -16,7 +16,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "base/values.h" - - namespace base { -@@ -482,14 +482,14 @@ - // string character and the terminating closing quote. - while (CanConsume(2)) { - int start_index = index_; -- pos_ = start_pos_ + index_; // CBU8_NEXT is postcrement. -- CBU8_NEXT(start_pos_, index_, length, next_char); -+ pos_ = start_pos_ + index_; // U8_NEXT is postcrement. -+ U8_NEXT(start_pos_, index_, length, next_char); - if (next_char < 0 || !IsValidCharacter(next_char)) { - if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { - ReportError(JSONReader::JSON_UNSUPPORTED_ENCODING, 1); - return false; - } -- CBU8_NEXT(start_pos_, start_index, length, next_char); -+ U8_NEXT(start_pos_, start_index, length, next_char); - string.Convert(); - string.AppendString(kUnicodeReplacementString, - arraysize(kUnicodeReplacementString) - 1); -@@ -497,7 +497,7 @@ - } - - if (next_char == '"') { -- --index_; // Rewind by one because of CBU8_NEXT. -+ --index_; // Rewind by one because of U8_NEXT. - *out = std::move(string); - return true; - } -@@ -633,10 +633,10 @@ - - // If this is a high surrogate, consume the next code unit to get the - // low surrogate. -- if (CBU16_IS_SURROGATE(code_unit16_high)) { -+ if (U16_IS_SURROGATE(code_unit16_high)) { - // Make sure this is the high surrogate. If not, it's an encoding - // error. -- if (!CBU16_IS_SURROGATE_LEAD(code_unit16_high)) -+ if (!U16_IS_SURROGATE_LEAD(code_unit16_high)) - return false; - - // Make sure that the token has more characters to consume the -@@ -653,20 +653,20 @@ - - NextNChars(3); - -- if (!CBU16_IS_TRAIL(code_unit16_low)) { -+ if (!U16_IS_TRAIL(code_unit16_low)) { - return false; - } - - uint32_t code_point = -- CBU16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); -+ U16_GET_SUPPLEMENTARY(code_unit16_high, code_unit16_low); - if (!IsValidCharacter(code_point)) - return false; - - offset = 0; -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_point); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_point); - } else { - // Not a surrogate. -- DCHECK(CBU16_IS_SINGLE(code_unit16_high)); -+ DCHECK(U16_IS_SINGLE(code_unit16_high)); - if (!IsValidCharacter(code_unit16_high)) { - if ((options_ & JSON_REPLACE_INVALID_CHARACTERS) == 0) { - return false; -@@ -675,7 +675,7 @@ - return true; - } - -- CBU8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); -+ U8_APPEND_UNSAFE(code_unit8, offset, code_unit16_high); - } - - dest_string->append(code_unit8, offset); -@@ -692,9 +692,9 @@ - } else { - char utf8_units[4] = { 0 }; - int offset = 0; -- CBU8_APPEND_UNSAFE(utf8_units, offset, point); -+ U8_APPEND_UNSAFE(utf8_units, offset, point); - dest->Convert(); -- // CBU8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be -+ // U8_APPEND_UNSAFE can overwrite up to 4 bytes, so utf8_units may not be - // zero terminated at this point. |offset| contains the correct length. - dest->AppendString(utf8_units, offset); - } -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/json/string_escape.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/json/string_escape.cc 2017-12-25 12:36:34.186118210 +0100 -@@ -14,7 +14,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -@@ -92,7 +92,7 @@ - for (int32_t i = 0; i < length; ++i) { - uint32_t code_point; - if (!ReadUnicodeCharacter(str.data(), length, &i, &code_point) || -- code_point == static_cast(CBU_SENTINEL) || -+ code_point == static_cast(U_SENTINEL) || - !IsValidCharacter(code_point)) { - code_point = kReplacementCodePoint; - did_replacement = true; -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/pattern.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/pattern.cc 2017-12-25 12:26:21.545410871 +0100 -@@ -4,13 +4,13 @@ - - #include "base/strings/pattern.h" - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - - namespace { - --static bool IsWildcard(base_icu::UChar32 character) { -+static bool IsWildcard(UChar32 character) { - return character == '*' || character == '?'; - } - -@@ -37,9 +37,9 @@ - // Check if the chars match, if so, increment the ptrs. - const CHAR* pattern_next = *pattern; - const CHAR* string_next = *string; -- base_icu::UChar32 pattern_char = next(&pattern_next, pattern_end); -+ UChar32 pattern_char = next(&pattern_next, pattern_end); - if (pattern_char == next(&string_next, string_end) && -- pattern_char != CBU_SENTINEL) { -+ pattern_char != U_SENTINEL) { - *pattern = pattern_next; - *string = string_next; - } else { -@@ -133,20 +133,20 @@ - } - - struct NextCharUTF8 { -- base_icu::UChar32 operator()(const char** p, const char* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char** p, const char* end) { -+ UChar32 c; - int offset = 0; -- CBU8_NEXT(*p, offset, end - *p, c); -+ U8_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } - }; - - struct NextCharUTF16 { -- base_icu::UChar32 operator()(const char16** p, const char16* end) { -- base_icu::UChar32 c; -+ UChar32 operator()(const char16** p, const char16* end) { -+ UChar32 c; - int offset = 0; -- CBU16_NEXT(*p, offset, end - *p, c); -+ U16_NEXT(*p, offset, end - *p, c); - *p += offset; - return c; - } -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_split.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_split.cc 2017-12-25 12:26:21.545410871 +0100 -@@ -8,7 +8,7 @@ - - #include "base/logging.h" - #include "base/strings/string_util.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/string_util.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/string_util.cc 2017-12-25 12:26:21.546410856 +0100 -@@ -25,7 +25,7 @@ - #include "base/memory/singleton.h" - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "build/build_config.h" - - namespace base { -@@ -372,19 +372,19 @@ - } - DCHECK_LE(byte_size, - static_cast(std::numeric_limits::max())); -- // Note: This cast is necessary because CBU8_NEXT uses int32_ts. -+ // Note: This cast is necessary because U8_NEXT uses int32_ts. - int32_t truncation_length = static_cast(byte_size); - int32_t char_index = truncation_length - 1; - const char* data = input.data(); - -- // Using CBU8, we will move backwards from the truncation point -+ // Using U8, we will move backwards from the truncation point - // to the beginning of the string looking for a valid UTF8 - // character. Once a full UTF8 character is found, we will - // truncate the string to the end of that character. - while (char_index >= 0) { - int32_t prev = char_index; -- base_icu::UChar32 code_point = 0; -- CBU8_NEXT(data, char_index, truncation_length, code_point); -+ UChar32 code_point = 0; -+ U8_NEXT(data, char_index, truncation_length, code_point); - if (!IsValidCharacter(code_point) || - !IsValidCodepoint(code_point)) { - char_index = prev - 1; -@@ -537,7 +537,7 @@ - - while (char_index < src_len) { - int32_t code_point; -- CBU8_NEXT(src, char_index, src_len, code_point); -+ U8_NEXT(src, char_index, src_len, code_point); - if (!IsValidCharacter(code_point)) - return false; - } -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/base/strings/utf_string_conversion_utils.cc 2017-12-25 12:26:21.546410856 +0100 -@@ -4,7 +4,7 @@ - - #include "base/strings/utf_string_conversion_utils.h" - --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace base { - -@@ -18,7 +18,7 @@ - // use a signed type for code_point. But this function returns false - // on error anyway, so code_point_out is unsigned. - int32_t code_point; -- CBU8_NEXT(src, *char_index, src_len, code_point); -+ U8_NEXT(src, *char_index, src_len, code_point); - *code_point_out = static_cast(code_point); - - // The ICU macro above moves to the next char, we want to point to the last -@@ -33,16 +33,16 @@ - int32_t src_len, - int32_t* char_index, - uint32_t* code_point) { -- if (CBU16_IS_SURROGATE(src[*char_index])) { -- if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) || -+ if (U16_IS_SURROGATE(src[*char_index])) { -+ if (!U16_IS_SURROGATE_LEAD(src[*char_index]) || - *char_index + 1 >= src_len || -- !CBU16_IS_TRAIL(src[*char_index + 1])) { -+ !U16_IS_TRAIL(src[*char_index + 1])) { - // Invalid surrogate pair. - return false; - } - - // Valid surrogate pair. -- *code_point = CBU16_GET_SUPPLEMENTARY(src[*char_index], -+ *code_point = U16_GET_SUPPLEMENTARY(src[*char_index], - src[*char_index + 1]); - (*char_index)++; - } else { -@@ -76,30 +76,30 @@ - } - - -- // CBU8_APPEND_UNSAFE can append up to 4 bytes. -+ // U8_APPEND_UNSAFE can append up to 4 bytes. - size_t char_offset = output->length(); - size_t original_char_offset = char_offset; -- output->resize(char_offset + CBU8_MAX_LENGTH); -+ output->resize(char_offset + U8_MAX_LENGTH); - -- CBU8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ U8_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); - -- // CBU8_APPEND_UNSAFE will advance our pointer past the inserted character, so -+ // U8_APPEND_UNSAFE will advance our pointer past the inserted character, so - // it will represent the new length of the string. - output->resize(char_offset); - return char_offset - original_char_offset; - } - - size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) { -- if (CBU16_LENGTH(code_point) == 1) { -+ if (U16_LENGTH(code_point) == 1) { - // Thie code point is in the Basic Multilingual Plane (BMP). - output->push_back(static_cast(code_point)); - return 1; - } - // Non-BMP characters use a double-character encoding. - size_t char_offset = output->length(); -- output->resize(char_offset + CBU16_MAX_LENGTH); -- CBU16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -- return CBU16_MAX_LENGTH; -+ output->resize(char_offset + U16_MAX_LENGTH); -+ U16_APPEND_UNSAFE(&(*output)[0], char_offset, code_point); -+ return U16_MAX_LENGTH; - } - - // Generalized Unicode converter ----------------------------------------------- -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/content/browser/devtools/devtools_io_context.cc 2017-12-25 12:37:08.791629561 +0100 -@@ -10,7 +10,7 @@ - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/task_scheduler/post_task.h" --#include "base/third_party/icu/icu_utf.h" -+#include - #include "base/threading/thread_restrictions.h" - #include "content/public/browser/browser_thread.h" - -@@ -92,7 +92,7 @@ - } else { - // Provided client has requested sufficient large block, make their - // life easier by not truncating in the middle of a UTF-8 character. -- if (size_got > 6 && !CBU8_IS_SINGLE(buffer[size_got - 1])) { -+ if (size_got > 6 && !U8_IS_SINGLE(buffer[size_got - 1])) { - base::TruncateUTF8ToByteSize(buffer, size_got, &buffer); - size_got = buffer.size(); - } else { -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/net/cert/internal/parse_name.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/net/cert/internal/parse_name.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/net/cert/internal/parse_name.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/net/cert/internal/parse_name.cc 2017-12-25 12:34:58.610528544 +0100 -@@ -9,7 +9,7 @@ - #include "base/strings/utf_string_conversion_utils.h" - #include "base/strings/utf_string_conversions.h" - #include "base/sys_byteorder.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - #if !defined(OS_NACL) - #include "net/base/net_string_util.h" -@@ -38,7 +38,7 @@ - - // BMPString only supports codepoints in the Basic Multilingual Plane; - // surrogates are not allowed. -- if (CBU_IS_SURROGATE(c)) -+ if (U_IS_SURROGATE(c)) - return false; - } - return base::UTF16ToUTF8(in_16bit.data(), in_16bit.size(), out); -@@ -58,7 +58,7 @@ - for (const uint32_t c : in_32bit) { - // UniversalString is UCS-4 in big-endian order. - uint32_t codepoint = base::NetToHost32(c); -- if (!CBU_IS_UNICODE_CHAR(codepoint)) -+ if (!U_IS_UNICODE_CHAR(codepoint)) - return false; - - base::WriteUnicodeCharacter(codepoint, out); -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:20:43.585562853 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:41:57.071558915 +0100 -@@ -526,7 +526,6 @@ - 'base/task_scheduler/task_traits.cc', - 'base/third_party/dmg_fp/dtoa_wrapper.cc', - 'base/third_party/dmg_fp/g_fmt.cc', -- 'base/third_party/icu/icu_utf.cc', - 'base/threading/post_task_and_reply_impl.cc', - 'base/threading/sequence_local_storage_map.cc', - 'base/threading/sequenced_task_runner_handle.cc', -@@ -679,7 +678,7 @@ - 'base/allocator/allocator_shim.cc', - 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', - ]) -- libs.extend(['-lrt', '-lnspr4']) -+ libs.extend(['-lrt', '-lnspr4', '-licuuc']) - static_libraries['libevent']['include_dirs'].extend([ - os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') - ]) -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:16:48.744131902 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:26:21.547410841 +0100 -@@ -278,6 +278,7 @@ - - libs = [ - "nspr4", -+ "icuuc", - ] - } - -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/base/ime/input_method_chromeos.cc 2017-12-25 12:40:50.356500963 +0100 -@@ -17,7 +17,6 @@ - #include "base/logging.h" - #include "base/strings/string_util.h" - #include "base/strings/utf_string_conversions.h" --#include "base/third_party/icu/icu_utf.h" - #include "chromeos/system/devicemode.h" - #include "ui/base/ime/chromeos/ime_keyboard.h" - #include "ui/base/ime/chromeos/input_method_manager.h" -diff -ur qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc ---- qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-icu-utf/src/3rdparty/chromium/ui/gfx/utf16_indexing.cc 2017-12-25 12:26:21.547410841 +0100 -@@ -5,13 +5,13 @@ - #include "ui/gfx/utf16_indexing.h" - - #include "base/logging.h" --#include "base/third_party/icu/icu_utf.h" -+#include - - namespace gfx { - - bool IsValidCodePointIndex(const base::string16& s, size_t index) { - return index == 0 || index == s.length() || -- !(CBU16_IS_TRAIL(s[index]) && CBU16_IS_LEAD(s[index - 1])); -+ !(U16_IS_TRAIL(s[index]) && U16_IS_LEAD(s[index - 1])); - } - - ptrdiff_t UTF16IndexToOffset(const base::string16& s, size_t base, size_t pos) { diff --git a/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch b/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch deleted file mode 100644 index ec4dce8..0000000 --- a/qtwebengine-everywhere-src-5.10.0-system-nspr-prtime.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/BUILD.gn 2017-12-25 12:16:23.250517752 +0100 -@@ -53,6 +53,9 @@ - "-Wno-char-subscripts", - ] - } -+ ldflags = [ -+ "-lnspr4", -+ ] - } - - config("base_implementation") { -@@ -858,8 +861,6 @@ - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", -- "third_party/nspr/prtime.cc", -- "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", - "third_party/valgrind/memcheck.h", - "threading/platform_thread.h", -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/pr_time_unittest.cc 2017-12-25 12:16:23.250517752 +0100 -@@ -7,7 +7,7 @@ - - #include "base/compiler_specific.h" - #include "base/macros.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "base/time/time.h" - #include "build/build_config.h" - #include "testing/gtest/include/gtest/gtest.h" -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/time.cc qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/base/time/time.cc 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/base/time/time.cc 2017-12-25 12:16:48.710132416 +0100 -@@ -14,7 +14,7 @@ - #include "base/logging.h" - #include "base/macros.h" - #include "base/strings/stringprintf.h" --#include "base/third_party/nspr/prtime.h" -+#include - #include "build/build_config.h" - - namespace base { -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/bootstrap/bootstrap.py 2017-12-25 12:20:43.585562853 +0100 -@@ -527,7 +527,6 @@ - 'base/third_party/dmg_fp/dtoa_wrapper.cc', - 'base/third_party/dmg_fp/g_fmt.cc', - 'base/third_party/icu/icu_utf.cc', -- 'base/third_party/nspr/prtime.cc', - 'base/threading/post_task_and_reply_impl.cc', - 'base/threading/sequence_local_storage_map.cc', - 'base/threading/sequenced_task_runner_handle.cc', -@@ -680,7 +679,7 @@ - 'base/allocator/allocator_shim.cc', - 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', - ]) -- libs.extend(['-lrt']) -+ libs.extend(['-lrt', '-lnspr4']) - static_libraries['libevent']['include_dirs'].extend([ - os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') - ]) -diff -ur qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/BUILD.gn qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn ---- qtwebengine-everywhere-src-5.10.0/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-11-28 14:06:53.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-system-nspr-prtime/src/3rdparty/chromium/tools/gn/BUILD.gn 2017-12-25 12:16:48.744131902 +0100 -@@ -275,6 +275,10 @@ - "//build/config:exe_and_shlib_deps", - "//build/win:default_exe_manifest", - ] -+ -+ libs = [ -+ "nspr4", -+ ] - } - - test("gn_unittests") { diff --git a/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch b/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch deleted file mode 100644 index ff007b7..0000000 --- a/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof 2018-05-15 14:58:46.448912634 -0400 -+++ qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400 -@@ -18,7 +18,13 @@ - #endif - - // Like the C++11 |alignof| operator. --#if __cplusplus >= 201103L -+#if defined(__GNUC__) && __GNUC__ >= 8 -+// GCC 8 has changed the alignof operator to return the minimal alignment -+// required by the target ABI, instead of the preferred alignment. -+// This means that on 32-bit x86, it will return 4 instead of 8. -+// Use __alignof__ instead to avoid this. -+#define MOJO_ALIGNOF(type) __alignof__(type) -+#elif __cplusplus >= 201103L - #define MOJO_ALIGNOF(type) alignof(type) - #elif defined(__GNUC__) - #define MOJO_ALIGNOF(type) __alignof__(type) diff --git a/qtwebengine-everywhere-src-5.10.1-no-sse2.patch b/qtwebengine-everywhere-src-5.10.1-no-sse2.patch deleted file mode 100644 index 084b795..0000000 --- a/qtwebengine-everywhere-src-5.10.1-no-sse2.patch +++ /dev/null @@ -1,30292 +0,0 @@ -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/customdialogs/customdialogs.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webengine/customdialogs/customdialogs.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/customdialogs/customdialogs.pro 2018-02-18 19:00:43.343577798 +0100 -@@ -1,5 +1,7 @@ - QT += webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - server.h - -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/minimal/minimal.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/minimal/minimal.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webengine/minimal/minimal.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/minimal/minimal.pro 2018-02-18 19:00:44.647558618 +0100 -@@ -2,6 +2,8 @@ - - QT += webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - SOURCES += main.cpp - - RESOURCES += qml.qrc -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/quicknanobrowser/quicknanobrowser.pro 2018-02-18 19:00:51.606456259 +0100 -@@ -20,5 +20,7 @@ - QT += widgets # QApplication is required to get native styling with QtQuickControls - } - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - target.path = $$[QT_INSTALL_EXAMPLES]/webengine/quicknanobrowser - INSTALLS += target -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webengine/recipebrowser/recipebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webengine/recipebrowser/recipebrowser.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webengine/recipebrowser/recipebrowser.pro 2018-02-18 19:00:52.096449052 +0100 -@@ -2,6 +2,8 @@ - - QT += quick qml quickcontrols2 webengine - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - cross_compile { - posix|qnx|linux: DEFINES += QTWEBENGINE_RECIPE_BROWSER_EMBEDDED - } -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/contentmanipulation/contentmanipulation.pro 2018-02-18 19:00:52.381444860 +0100 -@@ -1,5 +1,7 @@ - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS = mainwindow.h - SOURCES = main.cpp \ - mainwindow.cpp -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/cookiebrowser/cookiebrowser.pro 2018-02-18 19:00:52.432444110 +0100 -@@ -3,6 +3,8 @@ - TEMPLATE = app - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - SOURCES += \ - main.cpp\ - mainwindow.cpp -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/html2pdf/html2pdf.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/html2pdf/html2pdf.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/html2pdf/html2pdf.pro 2018-02-18 19:00:52.563442183 +0100 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - SOURCES += html2pdf.cpp - - target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/html2pdf -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/maps/maps.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/maps/maps.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/maps/maps.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/maps/maps.pro 2018-02-18 19:00:52.647440947 +0100 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - mainwindow.h - -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/markdowneditor/markdowneditor.pro 2018-02-18 19:00:52.710440020 +0100 -@@ -3,6 +3,8 @@ - QT += webenginewidgets webchannel - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - mainwindow.h \ - previewpage.h \ -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/minimal/minimal.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/minimal/minimal.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/minimal/minimal.pro 2018-02-18 19:00:52.766439197 +0100 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - SOURCES += main.cpp - - target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/minimal -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/simplebrowser/simplebrowser.pro 2018-02-18 19:00:52.844438049 +0100 -@@ -3,6 +3,8 @@ - QT += webenginewidgets - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - browser.h \ - browserwindow.h \ -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/spellchecker/spellchecker.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/spellchecker/spellchecker.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/spellchecker/spellchecker.pro 2018-02-18 19:00:52.899437241 +0100 -@@ -9,6 +9,8 @@ - error("Spellcheck example can not be built when using native OS dictionaries.") - } - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - webview.h - -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/stylesheetbrowser/stylesheetbrowser.pro 2018-02-18 19:00:52.963436299 +0100 -@@ -3,6 +3,8 @@ - QT += webenginewidgets - CONFIG += c++11 - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - mainwindow.h \ - stylesheetdialog.h -diff -Nur qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/videoplayer/videoplayer.pro qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro ---- qtwebengine-everywhere-src-5.10.1/examples/webenginewidgets/videoplayer/videoplayer.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/examples/webenginewidgets/videoplayer/videoplayer.pro 2018-02-18 19:00:53.022435432 +0100 -@@ -2,6 +2,8 @@ - - QT += webenginewidgets - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../../../src/core/release -+ - HEADERS += \ - mainwindow.h \ - fullscreenwindow.h \ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2018-02-18 19:00:53.089434446 +0100 -@@ -604,13 +604,6 @@ - } else if (current_cpu == "x86") { - cflags += [ "-m32" ] - ldflags += [ "-m32" ] -- if (!is_nacl) { -- cflags += [ -- "-msse2", -- "-mfpmath=sse", -- "-mmmx", -- ] -- } - } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { - cflags += [ "--target=arm-linux-gnueabihf" ] -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/config/v8_target_cpu.gni 2018-02-18 19:00:53.089434446 +0100 -@@ -59,3 +59,11 @@ - # It should never be explicitly set by the user. - v8_current_cpu = v8_target_cpu - } -+ -+if (v8_current_cpu == "x86") { -+ # If we are not building for the x86_sse2 toolchain, we actually want to build -+ # the "x87" backend instead. -+ if (current_toolchain != "//build/toolchain/linux:x86_sse2") { -+ v8_current_cpu = "x87" -+ } -+} -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni 2018-02-18 19:00:53.143433652 +0100 -@@ -266,6 +266,10 @@ - enable_linker_map = defined(invoker.enable_linker_map) && - invoker.enable_linker_map && generate_linker_map - -+ if (defined(invoker.shlib_subdir)) { -+ shlib_subdir = invoker.shlib_subdir -+ } -+ - # These library switches can apply to all tools below. - lib_switch = "-l" - lib_dir_switch = "-L" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn 2018-02-18 19:00:53.144433637 +0100 -@@ -110,6 +110,26 @@ - } - } - -+gcc_toolchain("x86_sse2") { -+ cc = "gcc" -+ cxx = "g++" -+ -+ readelf = "readelf" -+ nm = "nm" -+ ar = "ar" -+ ld = cxx -+ -+ extra_cflags = "-msse2 -mfpmath=sse" -+ extra_cxxflags = "-msse2 -mfpmath=sse" -+ shlib_subdir = "lib/sse2" -+ -+ toolchain_args = { -+ current_cpu = "x86" -+ current_os = "linux" -+ is_clang = false -+ } -+} -+ - clang_toolchain("clang_x64") { - # Output linker map files for binary size analysis. - enable_linker_map = true -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.cc 2018-02-18 19:00:53.144433637 +0100 -@@ -7,7 +7,7 @@ - #include - #include - #include --#if defined(ARCH_CPU_X86_FAMILY) -+#ifdef __SSE__ - #include - #endif - -@@ -810,7 +810,7 @@ - } - - ScopedSubnormalFloatDisabler::ScopedSubnormalFloatDisabler() { --#if defined(ARCH_CPU_X86_FAMILY) -+#ifdef __SSE__ - // Turn on "subnormals are zero" and "flush to zero" CSR flags. - orig_state_ = _mm_getcsr(); - _mm_setcsr(orig_state_ | 0x8040); -@@ -818,7 +818,7 @@ - } - - ScopedSubnormalFloatDisabler::~ScopedSubnormalFloatDisabler() { --#if defined(ARCH_CPU_X86_FAMILY) -+#ifdef __SSE__ - _mm_setcsr(orig_state_); - #endif - } -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/base/math_util.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/base/math_util.h 2018-02-18 19:00:53.177433152 +0100 -@@ -11,7 +11,6 @@ - #include - - #include "base/logging.h" --#include "build/build_config.h" - #include "cc/base/base_export.h" - #include "ui/gfx/geometry/box_f.h" - #include "ui/gfx/geometry/point3_f.h" -@@ -331,7 +330,7 @@ - ~ScopedSubnormalFloatDisabler(); - - private: --#if defined(ARCH_CPU_X86_FAMILY) -+#ifdef __SSE__ - unsigned int orig_state_; - #endif - DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/cc/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/cc/BUILD.gn 2018-02-18 19:00:53.177433152 +0100 -@@ -445,13 +445,6 @@ - "trees/tree_synchronizer.h", - ] - -- if (current_cpu == "x86" || current_cpu == "x64") { -- sources += [ -- "raster/texture_compressor_etc1_sse.cc", -- "raster/texture_compressor_etc1_sse.h", -- ] -- } -- - # TODO(khushalsagar): Remove once crbug.com/683263 is fixed. - configs = [ "//build/config/compiler:no_size_t_to_int_warning" ] - -@@ -463,6 +456,7 @@ - deps = [ - "//base", - "//base/third_party/dynamic_annotations", -+ "//cc:cc_opts", - "//cc/paint", - "//components/viz/common", - "//gpu", -@@ -493,6 +487,36 @@ - } - } - -+source_set("cc_opts") { -+ public_deps = [ -+ "//cc:cc_opts_sse", -+ ] -+} -+ -+source_set("cc_opts_sse") { -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps = [ -+ "//base", -+ ] -+ -+ defines = [ "CC_IMPLEMENTATION=1" ] -+ -+ if (!is_debug && (is_win || is_android)) { -+ configs -= [ "//build/config/compiler:optimize" ] -+ configs += [ "//build/config/compiler:optimize_max" ] -+ } -+ -+ sources = [ -+ "raster/texture_compressor.h", -+ "raster/texture_compressor_etc1.h", -+ "raster/texture_compressor_etc1_sse.cc", -+ "raster/texture_compressor_etc1_sse.h", -+ ] -+ -+ cflags = [ "-msse2" ] -+ } -+} -+ - cc_static_library("test_support") { - testonly = true - sources = [ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/content/renderer/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/content/renderer/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/content/renderer/BUILD.gn 2018-02-18 19:00:53.178433137 +0100 -@@ -514,6 +514,13 @@ - "//ui/surface", - "//v8", - ] -+ -+ if (current_cpu == "x86") { -+ deps += [ -+ "//v8(//build/toolchain/linux:x86_sse2)", -+ ] -+ } -+ - allow_circular_includes_from = [] - - if (use_aura && !use_qt) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/BUILD.gn 2018-02-18 19:00:53.242432196 +0100 -@@ -344,6 +344,12 @@ - defines += [ "DISABLE_USER_INPUT_MONITOR" ] - } - -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":media_sse", -+ ] -+ } -+ - if (is_linux || is_win) { - sources += [ - "keyboard_event_counter.cc", -@@ -366,6 +372,21 @@ - ] - } - -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("media_sse") { -+ sources = [ -+ "sinc_resampler_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } -+} -+ - if (is_android) { - java_cpp_enum("java_enums") { - sources = [ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/media.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/media.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/media.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/media.cc 2018-02-18 19:00:53.299431357 +0100 -@@ -10,6 +10,8 @@ - #include "base/metrics/field_trial.h" - #include "base/trace_event/trace_event.h" - #include "media/base/media_switches.h" -+#include "media/base/sinc_resampler.h" -+#include "media/base/vector_math.h" - #include "third_party/libyuv/include/libyuv.h" - - #if defined(OS_ANDROID) -@@ -30,6 +32,9 @@ - TRACE_EVENT_WARMUP_CATEGORY("audio"); - TRACE_EVENT_WARMUP_CATEGORY("media"); - -+ // Perform initialization of libraries which require runtime CPU detection. -+ vector_math::Initialize(); -+ SincResampler::InitializeCPUSpecificFeatures(); - libyuv::InitCpuFlags(); - - #if !defined(MEDIA_DISABLE_FFMPEG) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.cc 2018-02-18 19:00:53.299431357 +0100 -@@ -81,17 +81,12 @@ - #include - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - --#if defined(ARCH_CPU_X86_FAMILY) --#include --#define CONVOLVE_FUNC Convolve_SSE --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include --#define CONVOLVE_FUNC Convolve_NEON --#else --#define CONVOLVE_FUNC Convolve_C - #endif - - namespace media { -@@ -112,10 +107,41 @@ - return sinc_scale_factor; - } - -+#undef CONVOLVE_FUNC -+ - static int CalculateChunkSize(int block_size_, double io_ratio) { - return block_size_ / io_ratio; - } - -+// If we know the minimum architecture at compile time, avoid CPU detection. -+// Force NaCl code to use C routines since (at present) nothing there uses these -+// methods and plumbing the -msse built library is non-trivial. -+#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(__SSE__) -+#define CONVOLVE_FUNC Convolve_SSE -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// X86 CPU detection required. Functions will be set by -+// InitializeCPUSpecificFeatures(). -+#define CONVOLVE_FUNC g_convolve_proc_ -+ -+typedef float (*ConvolveProc)(const float*, const float*, const float*, double); -+static ConvolveProc g_convolve_proc_ = NULL; -+ -+void SincResampler::InitializeCPUSpecificFeatures() { -+ CHECK(!g_convolve_proc_); -+ g_convolve_proc_ = base::CPU().has_sse() ? Convolve_SSE : Convolve_C; -+} -+#endif -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define CONVOLVE_FUNC Convolve_NEON -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#else -+// Unknown architecture. -+#define CONVOLVE_FUNC Convolve_C -+void SincResampler::InitializeCPUSpecificFeatures() {} -+#endif -+ - SincResampler::SincResampler(double io_sample_rate_ratio, - int request_frames, - const ReadCB& read_cb) -@@ -328,46 +354,7 @@ - kernel_interpolation_factor * sum2); - } - --#if defined(ARCH_CPU_X86_FAMILY) --float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -- const float* k2, -- double kernel_interpolation_factor) { -- __m128 m_input; -- __m128 m_sums1 = _mm_setzero_ps(); -- __m128 m_sums2 = _mm_setzero_ps(); -- -- // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -- // these loops hurt performance in local testing. -- if (reinterpret_cast(input_ptr) & 0x0F) { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_loadu_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } else { -- for (int i = 0; i < kKernelSize; i += 4) { -- m_input = _mm_load_ps(input_ptr + i); -- m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -- m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -- } -- } -- -- // Linearly interpolate the two "convolutions". -- m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -- static_cast(1.0 - kernel_interpolation_factor))); -- m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -- static_cast(kernel_interpolation_factor))); -- m_sums1 = _mm_add_ps(m_sums1, m_sums2); -- -- // Sum components together. -- float result; -- m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -- _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -- m_sums2, m_sums2, 1))); -- -- return result; --} --#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - float SincResampler::Convolve_NEON(const float* input_ptr, const float* k1, - const float* k2, - double kernel_interpolation_factor) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler.h 2018-02-18 19:00:53.300431343 +0100 -@@ -36,6 +36,10 @@ - kKernelStorageSize = kKernelSize * (kKernelOffsetCount + 1), - }; - -+ // Selects runtime specific CPU features like SSE. Must be called before -+ // using SincResampler. -+ static void InitializeCPUSpecificFeatures(); -+ - // Callback type for providing more data into the resampler. Expects |frames| - // of data to be rendered into |destination|; zero padded if not enough frames - // are available to satisfy the request. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_perftest.cc 2018-02-18 19:00:53.300431343 +0100 -@@ -4,6 +4,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/time/time.h" - #include "build/build_config.h" - #include "media/base/sinc_resampler.h" -@@ -61,6 +62,9 @@ - &resampler, SincResampler::Convolve_C, true, "unoptimized_aligned"); - - #if defined(CONVOLVE_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - RunConvolveBenchmark( - &resampler, SincResampler::CONVOLVE_FUNC, true, "optimized_aligned"); - RunConvolveBenchmark( -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_sse.cc 2018-02-18 19:00:53.300431343 +0100 -@@ -0,0 +1,50 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/sinc_resampler.h" -+ -+#include -+ -+namespace media { -+ -+float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1, -+ const float* k2, -+ double kernel_interpolation_factor) { -+ __m128 m_input; -+ __m128 m_sums1 = _mm_setzero_ps(); -+ __m128 m_sums2 = _mm_setzero_ps(); -+ -+ // Based on |input_ptr| alignment, we need to use loadu or load. Unrolling -+ // these loops hurt performance in local testing. -+ if (reinterpret_cast(input_ptr) & 0x0F) { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_loadu_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } else { -+ for (int i = 0; i < kKernelSize; i += 4) { -+ m_input = _mm_load_ps(input_ptr + i); -+ m_sums1 = _mm_add_ps(m_sums1, _mm_mul_ps(m_input, _mm_load_ps(k1 + i))); -+ m_sums2 = _mm_add_ps(m_sums2, _mm_mul_ps(m_input, _mm_load_ps(k2 + i))); -+ } -+ } -+ -+ // Linearly interpolate the two "convolutions". -+ m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1( -+ static_cast(1.0 - kernel_interpolation_factor))); -+ m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1( -+ static_cast(kernel_interpolation_factor))); -+ m_sums1 = _mm_add_ps(m_sums1, m_sums2); -+ -+ // Sum components together. -+ float result; -+ m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1); -+ _mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps( -+ m_sums2, m_sums2, 1))); -+ -+ return result; -+} -+ -+} // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/sinc_resampler_unittest.cc 2018-02-18 19:00:53.301431328 +0100 -@@ -10,6 +10,7 @@ - - #include "base/bind.h" - #include "base/bind_helpers.h" -+#include "base/cpu.h" - #include "base/macros.h" - #include "base/strings/string_number_conversions.h" - #include "base/time/time.h" -@@ -166,6 +167,10 @@ - static const double kKernelInterpolationFactor = 0.5; - - TEST(SincResamplerTest, Convolve) { -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif -+ - // Initialize a dummy resampler. - MockSource mock_source; - SincResampler resampler( -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.cc 2018-02-18 19:00:53.301431328 +0100 -@@ -7,12 +7,17 @@ - - #include - -+#include "base/cpu.h" - #include "base/logging.h" - #include "build/build_config.h" - -+namespace media { -+namespace vector_math { -+ -+// If we know the minimum architecture at compile time, avoid CPU detection. - // NaCl does not allow intrinsics. - #if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --#include -+#if defined(__SSE__) - // Don't use custom SSE versions where the auto-vectorized C version performs - // better, which is anywhere clang is used. - // TODO(pcc): Linux currently uses ThinLTO which has broken auto-vectorization -@@ -25,20 +30,52 @@ - #define FMUL_FUNC FMUL_C - #endif - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+void Initialize() {} -+#else -+// X86 CPU detection required. Functions will be set by Initialize(). -+#if !defined(__clang__) -+#define FMAC_FUNC g_fmac_proc_ -+#define FMUL_FUNC g_fmul_proc_ -+#else -+#define FMAC_FUNC FMAC_C -+#define FMUL_FUNC FMUL_C -+#endif -+#define EWMAAndMaxPower_FUNC g_ewma_power_proc_ -+ -+#if !defined(__clang__) -+typedef void (*MathProc)(const float src[], float scale, int len, float dest[]); -+static MathProc g_fmac_proc_ = NULL; -+static MathProc g_fmul_proc_ = NULL; -+#endif -+typedef std::pair (*EWMAAndMaxPowerProc)( -+ float initial_value, const float src[], int len, float smoothing_factor); -+static EWMAAndMaxPowerProc g_ewma_power_proc_ = NULL; -+ -+void Initialize() { -+ CHECK(!g_fmac_proc_); -+ CHECK(!g_fmul_proc_); -+ CHECK(!g_ewma_power_proc_); -+ const bool kUseSSE = base::CPU().has_sse(); -+#if !defined(__clang__) -+ g_fmac_proc_ = kUseSSE ? FMAC_SSE : FMAC_C; -+ g_fmul_proc_ = kUseSSE ? FMUL_SSE : FMUL_C; -+#endif -+ g_ewma_power_proc_ = kUseSSE ? EWMAAndMaxPower_SSE : EWMAAndMaxPower_C; -+} -+#endif - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #include - #define FMAC_FUNC FMAC_NEON - #define FMUL_FUNC FMUL_NEON - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+void Initialize() {} - #else - #define FMAC_FUNC FMAC_C - #define FMUL_FUNC FMUL_C - #define EWMAAndMaxPower_FUNC EWMAAndMaxPower_C -+void Initialize() {} - #endif - --namespace media { --namespace vector_math { -- - void FMAC(const float src[], float scale, int len, float dest[]) { - // Ensure |src| and |dest| are 16-byte aligned. - DCHECK_EQ(0u, reinterpret_cast(src) & (kRequiredAlignment - 1)); -@@ -91,111 +128,6 @@ - return result; - } - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) --void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) -- _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] = src[i] * scale; --} -- --void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -- const int rem = len % 4; -- const int last_index = len - rem; -- __m128 m_scale = _mm_set_ps1(scale); -- for (int i = 0; i < last_index; i += 4) { -- _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -- _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -- } -- -- // Handle any remaining values that wouldn't fit in an SSE pass. -- for (int i = last_index; i < len; ++i) -- dest[i] += src[i] * scale; --} -- --// Convenience macro to extract float 0 through 3 from the vector |a|. This is --// needed because compilers other than clang don't support access via --// operator[](). --#define EXTRACT_FLOAT(a, i) \ -- (i == 0 ? \ -- _mm_cvtss_f32(a) : \ -- _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -- --std::pair EWMAAndMaxPower_SSE( -- float initial_value, const float src[], int len, float smoothing_factor) { -- // When the recurrence is unrolled, we see that we can split it into 4 -- // separate lanes of evaluation: -- // -- // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -- // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -- // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- // -- // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -- // -- // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -- // each of the 4 lanes, and then combine them to give y[n]. -- -- const int rem = len % 4; -- const int last_index = len - rem; -- -- const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -- const float weight_prev = 1.0f - smoothing_factor; -- const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -- const __m128 weight_prev_squared_x4 = -- _mm_mul_ps(weight_prev_x4, weight_prev_x4); -- const __m128 weight_prev_4th_x4 = -- _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -- -- // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -- // 0, respectively. -- __m128 max_x4 = _mm_setzero_ps(); -- __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -- int i; -- for (i = 0; i < last_index; i += 4) { -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -- const __m128 sample_x4 = _mm_load_ps(src + i); -- const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -- max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -- // Note: The compiler optimizes this to a single multiply-and-accumulate -- // instruction: -- ewma_x4 = _mm_add_ps(ewma_x4, -- _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -- } -- -- // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -- float ewma = EXTRACT_FLOAT(ewma_x4, 3); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 2); -- ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 1); -- ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -- ewma += EXTRACT_FLOAT(ewma_x4, 0); -- -- // Fold the maximums together to get the overall maximum. -- max_x4 = _mm_max_ps(max_x4, -- _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -- max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -- -- std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -- -- // Handle remaining values at the end of |src|. -- for (; i < len; ++i) { -- result.first *= weight_prev; -- const float sample = src[i]; -- const float sample_squared = sample * sample; -- result.first += sample_squared * smoothing_factor; -- result.second = std::max(result.second, sample_squared); -- } -- -- return result; --} --#endif -- - #if defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - void FMAC_NEON(const float src[], float scale, int len, float dest[]) { - const int rem = len % 4; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math.h 2018-02-18 19:00:53.301431328 +0100 -@@ -15,6 +15,11 @@ - // Required alignment for inputs and outputs to all vector math functions - enum { kRequiredAlignment = 16 }; - -+// Selects runtime specific optimizations such as SSE. Must be called prior to -+// calling FMAC() or FMUL(). Called during media library initialization; most -+// users should never have to call this. -+MEDIA_EXPORT void Initialize(); -+ - // Multiply each element of |src| (up to |len|) by |scale| and add to |dest|. - // |src| and |dest| must be aligned by kRequiredAlignment. - MEDIA_EXPORT void FMAC(const float src[], float scale, int len, float dest[]); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_perftest.cc 2018-02-18 19:00:53.302431313 +0100 -@@ -5,6 +5,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/time/time.h" - #include "build/build_config.h" -@@ -82,15 +83,11 @@ - DISALLOW_COPY_AND_ASSIGN(VectorMathPerfTest); - }; - --// Define platform dependent function names for SIMD optimized methods. -+// Define platform independent function name for FMAC* perf tests. - #if defined(ARCH_CPU_X86_FAMILY) - #define FMAC_FUNC FMAC_SSE --#define FMUL_FUNC FMUL_SSE --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) - #define FMAC_FUNC FMAC_NEON --#define FMUL_FUNC FMUL_NEON --#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON - #endif - - // Benchmark for each optimized vector_math::FMAC() method. -@@ -99,6 +96,9 @@ - RunBenchmark( - vector_math::FMAC_C, true, "vector_math_fmac", "unoptimized"); - #if defined(FMAC_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMAC_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -112,12 +112,24 @@ - #endif - } - -+#undef FMAC_FUNC -+ -+// Define platform independent function name for FMULBenchmark* tests. -+#if defined(ARCH_CPU_X86_FAMILY) -+#define FMUL_FUNC FMUL_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define FMUL_FUNC FMUL_NEON -+#endif -+ - // Benchmark for each optimized vector_math::FMUL() method. - TEST_F(VectorMathPerfTest, FMUL) { - // Benchmark FMUL_C(). - RunBenchmark( - vector_math::FMUL_C, true, "vector_math_fmul", "unoptimized"); - #if defined(FMUL_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark FMUL_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -131,6 +143,14 @@ - #endif - } - -+#undef FMUL_FUNC -+ -+#if defined(ARCH_CPU_X86_FAMILY) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_SSE -+#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -+#define EWMAAndMaxPower_FUNC EWMAAndMaxPower_NEON -+#endif -+ - // Benchmark for each optimized vector_math::EWMAAndMaxPower() method. - TEST_F(VectorMathPerfTest, EWMAAndMaxPower) { - // Benchmark EWMAAndMaxPower_C(). -@@ -139,6 +159,9 @@ - "vector_math_ewma_and_max_power", - "unoptimized"); - #if defined(EWMAAndMaxPower_FUNC) -+#if defined(ARCH_CPU_X86_FAMILY) -+ ASSERT_TRUE(base::CPU().has_sse()); -+#endif - // Benchmark EWMAAndMaxPower_FUNC() with unaligned size. - ASSERT_NE((kVectorSize - 1) % (vector_math::kRequiredAlignment / - sizeof(float)), 0U); -@@ -156,4 +179,6 @@ - #endif - } - -+#undef EWMAAndMaxPower_FUNC -+ - } // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_sse.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_sse.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_sse.cc 2018-02-18 19:00:53.302431313 +0100 -@@ -0,0 +1,118 @@ -+// Copyright 2013 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "media/base/vector_math_testing.h" -+ -+#include -+ -+#include // NOLINT -+ -+namespace media { -+namespace vector_math { -+ -+void FMUL_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) -+ _mm_store_ps(dest + i, _mm_mul_ps(_mm_load_ps(src + i), m_scale)); -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] = src[i] * scale; -+} -+ -+void FMAC_SSE(const float src[], float scale, int len, float dest[]) { -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ __m128 m_scale = _mm_set_ps1(scale); -+ for (int i = 0; i < last_index; i += 4) { -+ _mm_store_ps(dest + i, _mm_add_ps(_mm_load_ps(dest + i), -+ _mm_mul_ps(_mm_load_ps(src + i), m_scale))); -+ } -+ -+ // Handle any remaining values that wouldn't fit in an SSE pass. -+ for (int i = last_index; i < len; ++i) -+ dest[i] += src[i] * scale; -+} -+ -+// Convenience macro to extract float 0 through 3 from the vector |a|. This is -+// needed because compilers other than clang don't support access via -+// operator[](). -+#define EXTRACT_FLOAT(a, i) \ -+ (i == 0 ? \ -+ _mm_cvtss_f32(a) : \ -+ _mm_cvtss_f32(_mm_shuffle_ps(a, a, i))) -+ -+std::pair EWMAAndMaxPower_SSE( -+ float initial_value, const float src[], int len, float smoothing_factor) { -+ // When the recurrence is unrolled, we see that we can split it into 4 -+ // separate lanes of evaluation: -+ // -+ // y[n] = a(S[n]^2) + (1-a)(y[n-1]) -+ // = a(S[n]^2) + (1-a)^1(aS[n-1]^2) + (1-a)^2(aS[n-2]^2) + ... -+ // = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ // -+ // where z[n] = a(S[n]^2) + (1-a)^4(z[n-4]) + (1-a)^8(z[n-8]) + ... -+ // -+ // Thus, the strategy here is to compute z[n], z[n-1], z[n-2], and z[n-3] in -+ // each of the 4 lanes, and then combine them to give y[n]. -+ -+ const int rem = len % 4; -+ const int last_index = len - rem; -+ -+ const __m128 smoothing_factor_x4 = _mm_set_ps1(smoothing_factor); -+ const float weight_prev = 1.0f - smoothing_factor; -+ const __m128 weight_prev_x4 = _mm_set_ps1(weight_prev); -+ const __m128 weight_prev_squared_x4 = -+ _mm_mul_ps(weight_prev_x4, weight_prev_x4); -+ const __m128 weight_prev_4th_x4 = -+ _mm_mul_ps(weight_prev_squared_x4, weight_prev_squared_x4); -+ -+ // Compute z[n], z[n-1], z[n-2], and z[n-3] in parallel in lanes 3, 2, 1 and -+ // 0, respectively. -+ __m128 max_x4 = _mm_setzero_ps(); -+ __m128 ewma_x4 = _mm_setr_ps(0.0f, 0.0f, 0.0f, initial_value); -+ int i; -+ for (i = 0; i < last_index; i += 4) { -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_4th_x4); -+ const __m128 sample_x4 = _mm_load_ps(src + i); -+ const __m128 sample_squared_x4 = _mm_mul_ps(sample_x4, sample_x4); -+ max_x4 = _mm_max_ps(max_x4, sample_squared_x4); -+ // Note: The compiler optimizes this to a single multiply-and-accumulate -+ // instruction: -+ ewma_x4 = _mm_add_ps(ewma_x4, -+ _mm_mul_ps(sample_squared_x4, smoothing_factor_x4)); -+ } -+ -+ // y[n] = z[n] + (1-a)^1(z[n-1]) + (1-a)^2(z[n-2]) + (1-a)^3(z[n-3]) -+ float ewma = EXTRACT_FLOAT(ewma_x4, 3); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 2); -+ ewma_x4 = _mm_mul_ps(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 1); -+ ewma_x4 = _mm_mul_ss(ewma_x4, weight_prev_x4); -+ ewma += EXTRACT_FLOAT(ewma_x4, 0); -+ -+ // Fold the maximums together to get the overall maximum. -+ max_x4 = _mm_max_ps(max_x4, -+ _mm_shuffle_ps(max_x4, max_x4, _MM_SHUFFLE(3, 3, 1, 1))); -+ max_x4 = _mm_max_ss(max_x4, _mm_shuffle_ps(max_x4, max_x4, 2)); -+ -+ std::pair result(ewma, EXTRACT_FLOAT(max_x4, 0)); -+ -+ // Handle remaining values at the end of |src|. -+ for (; i < len; ++i) { -+ result.first *= weight_prev; -+ const float sample = src[i]; -+ const float sample_squared = sample * sample; -+ result.first += sample_squared * smoothing_factor; -+ result.second = std::max(result.second, sample_squared); -+ } -+ -+ return result; -+} -+ -+} // namespace vector_math -+} // namespace media -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_testing.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_testing.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_testing.h 2018-02-18 19:00:53.302431313 +0100 -@@ -19,7 +19,7 @@ - MEDIA_EXPORT std::pair EWMAAndMaxPower_C( - float initial_value, const float src[], int len, float smoothing_factor); - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_NACL) -+#if defined(ARCH_CPU_X86_FAMILY) - MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len, - float dest[]); - MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len, -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/base/vector_math_unittest.cc 2018-02-18 19:00:53.302431313 +0100 -@@ -9,6 +9,7 @@ - #include - - #include "base/macros.h" -+#include "base/cpu.h" - #include "base/memory/aligned_memory.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/stringize_macros.h" -@@ -78,6 +79,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMAC_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMAC_SSE( -@@ -119,6 +121,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("FMUL_SSE"); - FillTestVectors(kInputFillValue, kOutputFillValue); - vector_math::FMUL_SSE( -@@ -227,6 +230,7 @@ - - #if defined(ARCH_CPU_X86_FAMILY) - { -+ ASSERT_TRUE(base::CPU().has_sse()); - SCOPED_TRACE("EWMAAndMaxPower_SSE"); - const std::pair& result = vector_math::EWMAAndMaxPower_SSE( - initial_value_, data_.get(), data_len_, smoothing_factor_); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/BUILD.gn 2018-02-18 19:00:53.303431298 +0100 -@@ -534,6 +534,26 @@ - "//base", - "//ui/gfx/geometry", - ] -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ deps += [ -+ ":shared_memory_support_sse", -+ ] -+ } -+} -+ -+if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("shared_memory_support_sse") { -+ sources = [ -+ "base/vector_math_sse.cc", -+ ] -+ configs += [ -+ "//media:media_config", -+ "//media:media_implementation", -+ ] -+ if (!is_win) { -+ cflags = [ "-msse" ] -+ } -+ } - } - - # TODO(watk): Refactor tests that could be made to run on Android. See -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/filters/wsola_internals.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/media/filters/wsola_internals.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/media/filters/wsola_internals.cc 2018-02-18 19:00:53.372430283 +0100 -@@ -15,7 +15,7 @@ - #include "base/logging.h" - #include "media/base/audio_bus.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE__) - #define USE_SIMD 1 - #include - #elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/BUILD.gn 2018-02-18 19:00:53.444429225 +0100 -@@ -257,17 +257,6 @@ - "ext/platform_canvas.h", - ] - } -- if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { -- sources += [ -- "ext/convolver_SSE2.cc", -- "ext/convolver_SSE2.h", -- ] -- } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) { -- sources += [ -- "ext/convolver_mips_dspr2.cc", -- "ext/convolver_mips_dspr2.h", -- ] -- } - - if (!is_fuchsia) { - sources -= [ -@@ -522,6 +511,31 @@ - } - } - if (current_cpu == "x86" || current_cpu == "x64") { -+ source_set("skia_opts_sse2") { -+ sources = skia_opts.sse2_sources + -+ [ -+ # Chrome-specific. -+ "ext/convolver_SSE2.cc", -+ "ext/convolver_SSE2.h", -+ ] -+ sources -= [ -+ # Detection code must not be built with -msse2 -+ "//third_party/skia/src/opts/opts_check_x86.cpp", -+ ] -+ if (!is_win || is_clang) { -+ cflags = [ "-msse2" ] -+ } -+ if (is_win) { -+ defines = [ "SK_CPU_SSE_LEVEL=20" ] -+ } -+ visibility = [ ":skia_opts" ] -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ -+ ":skia_config", -+ ":skia_library_config", -+ "//build/config/compiler:no_chromium_code", -+ ] -+ } - source_set("skia_opts_sse3") { - sources = skia_opts.ssse3_sources - if (!is_win || is_clang) { -@@ -626,10 +640,13 @@ - ] - - if (current_cpu == "x86" || current_cpu == "x64") { -- sources = skia_opts.sse2_sources -+ sources = [ -+ "//third_party/skia/src/opts/opts_check_x86.cpp", -+ ] - deps += [ - ":skia_opts_avx", - ":skia_opts_hsw", -+ ":skia_opts_sse2", - ":skia_opts_sse3", - ":skia_opts_sse41", - ":skia_opts_sse42", -@@ -664,6 +681,13 @@ - - if (mips_dsp_rev >= 1) { - sources = skia_opts.mips_dsp_sources -+ if (mips_dsp_rev >= 2) { -+ sources += [ -+ # Chrome-specific. -+ "ext/convolver_mips_dspr2.cc", -+ "ext/convolver_mips_dspr2.h", -+ ] -+ } - } else { - sources = skia_opts.none_sources - } -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.cc 2018-02-18 19:00:53.510428253 +0100 -@@ -362,10 +362,13 @@ - - void SetupSIMD(ConvolveProcs *procs) { - #ifdef SIMD_SSE2 -- procs->extra_horizontal_reads = 3; -- procs->convolve_vertically = &ConvolveVertically_SSE2; -- procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -- procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ base::CPU cpu; -+ if (cpu.has_sse2()) { -+ procs->extra_horizontal_reads = 3; -+ procs->convolve_vertically = &ConvolveVertically_SSE2; -+ procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2; -+ procs->convolve_horizontally = &ConvolveHorizontally_SSE2; -+ } - #elif defined SIMD_MIPS_DSPR2 - procs->extra_horizontal_reads = 3; - procs->convolve_vertically = &ConvolveVertically_mips_dspr2; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/skia/ext/convolver.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/skia/ext/convolver.h 2018-02-18 19:00:53.511428239 +0100 -@@ -11,6 +11,7 @@ - #include - - #include "build/build_config.h" -+#include "base/cpu.h" - #include "third_party/skia/include/core/SkSize.h" - #include "third_party/skia/include/core/SkTypes.h" - -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/BUILD.gn 2018-02-18 19:00:53.511428239 +0100 -@@ -192,6 +192,26 @@ - public_deps = [ - ":angle_common", - ] -+ -+ if (current_cpu == "x86") { -+ deps = [ -+ ":angle_image_util_x86_sse2", -+ ] -+ } -+} -+ -+source_set("angle_image_util_x86_sse2") { -+ configs -= angle_undefine_configs -+ configs += [ ":internal_config" ] -+ -+ deps = [ -+ ":angle_common", -+ ] -+ -+ sources = [ -+ "src/image_util/loadimage_SSE2.cpp", -+ ] -+ cflags = [ "-msse2", "-mfpmath=sse" ] - } - - config("angle_gpu_info_util_config") { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/mathutil.h 2018-02-18 19:00:53.566427430 +0100 -@@ -124,9 +124,42 @@ - } - } - --inline bool supportsSSE2() -+#if defined(ANGLE_USE_SSE) && !defined(__x86_64__) && !defined(__SSE2__) && !defined(_MSC_VER) -+ -+// From the base/cpu.cc in Chromium, to avoid depending on Chromium headers -+ -+#if defined(__pic__) && defined(__i386__) -+ -+static inline void __cpuid(int cpu_info[4], int info_type) { -+ __asm__ volatile ( -+ "mov %%ebx, %%edi\n" -+ "cpuid\n" -+ "xchg %%edi, %%ebx\n" -+ : "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) -+ : "a"(info_type) -+ ); -+} -+ -+#else -+ -+static inline void __cpuid(int cpu_info[4], int info_type) { -+ __asm__ volatile ( -+ "cpuid\n" -+ : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3]) -+ : "a"(info_type) -+ ); -+} -+ -+#endif -+ -+#endif -+ -+static inline bool supportsSSE2() - { - #if defined(ANGLE_USE_SSE) -+#if defined(__x86_64__) || defined(__SSE2__) -+ return true; -+#else - static bool checked = false; - static bool supports = false; - -@@ -135,7 +168,6 @@ - return supports; - } - --#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) - { - int info[4]; - __cpuid(info, 0); -@@ -147,9 +179,9 @@ - supports = (info[3] >> 26) & 1; - } - } --#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) - checked = true; - return supports; -+#endif // defined(x86_64) || defined(__SSE2__) - #else // defined(ANGLE_USE_SSE) - return false; - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/common/platform.h 2018-02-18 19:00:53.566427430 +0100 -@@ -87,7 +87,9 @@ - #include - #define ANGLE_USE_SSE - #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -+#if defined(__x86_64__) || defined(__SSE2__) - #include -+#endif - #define ANGLE_USE_SSE - #endif - -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.cpp 2018-02-18 19:00:53.567427415 +0100 -@@ -12,9 +12,17 @@ - #include "common/platform.h" - #include "image_util/imageformats.h" - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - namespace angle - { - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+namespace SSE2 { -+#endif -+ - void LoadA8ToRGBA8(size_t width, - size_t height, - size_t depth, -@@ -28,6 +36,11 @@ - #if defined(ANGLE_USE_SSE) - if (gl::supportsSSE2()) - { -+#if !defined(__x86_64__) && !defined(__SSE2__) -+ angle::SSE2::LoadA8ToRGBA8(width, height, depth, input, inputRowPitch, -+ inputDepthPitch, output, outputRowPitch, -+ outputDepthPitch); -+#else - __m128i zeroWide = _mm_setzero_si128(); - - for (size_t z = 0; z < depth; z++) -@@ -68,6 +81,7 @@ - } - } - } -+#endif - - return; - } -@@ -89,6 +103,8 @@ - } - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void LoadA8ToBGRA8(size_t width, - size_t height, - size_t depth, -@@ -584,6 +600,8 @@ - } - } - -+#endif -+ - void LoadRGBA8ToBGRA8(size_t width, - size_t height, - size_t depth, -@@ -597,6 +615,11 @@ - #if defined(ANGLE_USE_SSE) - if (gl::supportsSSE2()) - { -+#if !defined(__x86_64__) && !defined(__SSE2__) -+ angle::SSE2::LoadRGBA8ToBGRA8(width, height, depth, input, -+ inputRowPitch, inputDepthPitch, output, -+ outputRowPitch, outputDepthPitch); -+#else - __m128i brMask = _mm_set1_epi32(0x00ff00ff); - - for (size_t z = 0; z < depth; z++) -@@ -641,6 +664,7 @@ - } - } - } -+#endif - - return; - } -@@ -663,6 +687,8 @@ - } - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void LoadRGBA8ToBGRA4(size_t width, - size_t height, - size_t depth, -@@ -1320,4 +1346,10 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+} // namespace SSE2 -+#endif -+ - } // namespace angle -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage.h 2018-02-18 19:00:53.567427415 +0100 -@@ -651,6 +651,32 @@ - size_t outputRowPitch, - size_t outputDepthPitch); - -+#if defined(__i386__) -+namespace SSE2 { -+ -+void LoadA8ToRGBA8(size_t width, -+ size_t height, -+ size_t depth, -+ const uint8_t *input, -+ size_t inputRowPitch, -+ size_t inputDepthPitch, -+ uint8_t *output, -+ size_t outputRowPitch, -+ size_t outputDepthPitch); -+ -+void LoadRGBA8ToBGRA8(size_t width, -+ size_t height, -+ size_t depth, -+ const uint8_t *input, -+ size_t inputRowPitch, -+ size_t inputDepthPitch, -+ uint8_t *output, -+ size_t outputRowPitch, -+ size_t outputDepthPitch); -+ -+} -+#endif // defined(__i386__) -+ - } // namespace angle - - #include "loadimage.inl" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/angle/src/image_util/loadimage_SSE2.cpp 2018-02-18 19:00:53.567427415 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "loadimage.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/qcms/BUILD.gn 2018-02-18 19:00:53.568427401 +0100 -@@ -34,8 +34,8 @@ - defines = [] - - if (current_cpu == "x86" || current_cpu == "x64") { -- defines += [ "SSE2_ENABLE" ] -- sources += [ "src/transform-sse2.c" ] -+ defines += [ "SSE2_ENABLE" ] # runtime detection -+ deps = [ ":qcms_sse2" ] - } - - if (use_libfuzzer) { -@@ -99,3 +99,15 @@ - public_configs = [ ":qcms_config" ] - } - } -+ -+source_set("qcms_sse2") { -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ public_configs = [ ":qcms_config" ] -+ -+ if (current_cpu == "x86" || current_cpu == "x64") { -+ defines = [ "SSE2_ENABLE" ] -+ sources = [ "src/transform-sse2.c" ] -+ cflags = [ "-msse2" ] -+ } -+} -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp 2018-02-18 19:00:53.599426945 +0100 -@@ -35,7 +35,7 @@ - #include "platform/wtf/MathExtras.h" - #include "platform/wtf/PtrUtil.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - #include - #endif - -@@ -1290,7 +1290,7 @@ - size_t current_frame, - float value, - unsigned write_index) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - auto number_of_values = current_state.number_of_values; - #endif - auto fill_to_frame = current_state.fill_to_frame; -@@ -1303,7 +1303,7 @@ - double delta_time = time2 - time1; - float k = delta_time > 0 ? 1 / delta_time : 0; - const float value_delta = value2 - value1; --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if (fill_to_frame > write_index) { - // Minimize in-loop operations. Calculate starting value and increment. - // Next step: value += inc. -@@ -1431,7 +1431,7 @@ - size_t current_frame, - float value, - unsigned write_index) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - auto number_of_values = current_state.number_of_values; - #endif - auto fill_to_frame = current_state.fill_to_frame; -@@ -1482,7 +1482,7 @@ - for (; write_index < fill_to_frame; ++write_index) - values[write_index] = target; - } else { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if (fill_to_frame > write_index) { - // Resolve recursion by expanding constants to achieve a 4-step - // loop unrolling. -@@ -1616,7 +1616,7 @@ - // Oversampled curve data can be provided if sharp discontinuities are - // desired. - unsigned k = 0; --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if (fill_to_frame > write_index) { - const __m128 v_curve_virtual_index = _mm_set_ps1(curve_virtual_index); - const __m128 v_curve_points_per_frame = _mm_set_ps1(curve_points_per_frame); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.cpp 2018-02-18 19:00:53.600426930 +0100 -@@ -26,6 +26,9 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/DirectConvolver.h" - - #include "build/build_config.h" -@@ -35,21 +38,48 @@ - #include - #endif - --#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_MACOSX) -+#if ((defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64)) \ -+ && !defined(OS_MACOSX) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - namespace blink { - - using namespace VectorMath; - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - DirectConvolver::DirectConvolver(size_t input_block_size) -- : input_block_size_(input_block_size), buffer_(input_block_size * 2) {} -+ : input_block_size_(input_block_size), buffer_(input_block_size * 2) { -+#ifdef ARCH_CPU_X86 -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif -+} -+ -+#endif - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void DirectConvolver::m_ProcessSSE2(AudioFloatArray* convolution_kernel, -+ const float* source_p, -+ float* dest_p, -+ size_t frames_to_process) { -+#else - void DirectConvolver::Process(AudioFloatArray* convolution_kernel, - const float* source_p, - float* dest_p, - size_t frames_to_process) { -+#endif -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_ProcessSSE2(convolution_kernel, source_p, dest_p, frames_to_process); -+ return; -+ } -+#endif - DCHECK_EQ(frames_to_process, input_block_size_); - if (frames_to_process != input_block_size_) - return; -@@ -83,7 +113,7 @@ - #endif // ARCH_CPU_X86 - #else - size_t i = 0; --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - // Convolution using SSE2. Currently only do this if both |kernelSize| and - // |framesToProcess| are multiples of 4. If not, use the straightforward loop - // below. -@@ -397,7 +427,7 @@ - } - dest_p[i++] = sum; - } --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - } - #endif - #endif // OS_MACOSX -@@ -406,8 +436,12 @@ - memcpy(buffer_.Data(), input_p, sizeof(float) * frames_to_process); - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void DirectConvolver::Reset() { - buffer_.Zero(); - } - -+#endif -+ - } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolver.h 2018-02-18 19:00:53.600426930 +0100 -@@ -29,6 +29,7 @@ - #ifndef DirectConvolver_h - #define DirectConvolver_h - -+#include "build/build_config.h" - #include "platform/PlatformExport.h" - #include "platform/audio/AudioArray.h" - #include "platform/wtf/Allocator.h" -@@ -54,6 +55,14 @@ - size_t input_block_size_; - - AudioFloatArray buffer_; -+ -+#ifdef ARCH_CPU_X86 -+ bool m_haveSSE2; -+ void m_ProcessSSE2(AudioFloatArray* convolution_kernel, -+ const float* source_p, -+ float* dest_p, -+ size_t frames_to_process); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/DirectConvolverSSE2.cpp 2018-02-18 19:00:53.600426930 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "DirectConvolver.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.cpp 2018-02-18 19:00:53.601426915 +0100 -@@ -26,16 +26,23 @@ - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/SincResampler.h" - - #include "build/build_config.h" - #include "platform/audio/AudioBus.h" - #include "platform/wtf/MathExtras.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - // Input buffer layout, dividing the total buffer into regions (r0 - r5): - // - // |----------------|-----------------------------------------|----------------| -@@ -67,6 +74,8 @@ - - namespace blink { - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - SincResampler::SincResampler(double scale_factor, - unsigned kernel_size, - unsigned number_of_kernel_offsets) -@@ -82,6 +91,10 @@ - source_frames_available_(0), - source_provider_(nullptr), - is_buffer_primed_(false) { -+#ifdef ARCH_CPU_X86 -+ base::CPU cpu; -+ m_haveSSE2 = cpu.has_sse2(); -+#endif - InitializeKernel(); - } - -@@ -205,9 +218,23 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+void SincResampler::m_ProcessSSE2(AudioSourceProvider* source_provider, -+ float* destination, -+ size_t frames_to_process) { -+#else - void SincResampler::Process(AudioSourceProvider* source_provider, - float* destination, - size_t frames_to_process) { -+#endif -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (m_haveSSE2) { -+ m_ProcessSSE2(source_provider, destination, frames_to_process); -+ return; -+ } -+#endif - bool is_good = source_provider && block_size_ > kernel_size_ && - input_buffer_.size() >= block_size_ + kernel_size_ && - !(kernel_size_ % 2); -@@ -276,7 +303,7 @@ - { - float input; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - // If the sourceP address is not 16-byte aligned, the first several - // frames (at most three) should be processed seperately. - while ((reinterpret_cast(input_p) & 0x0F) && n) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResampler.h 2018-02-18 19:00:53.601426915 +0100 -@@ -29,6 +29,7 @@ - #ifndef SincResampler_h - #define SincResampler_h - -+#include "build/build_config.h" - #include "platform/PlatformExport.h" - #include "platform/audio/AudioArray.h" - #include "platform/audio/AudioSourceProvider.h" -@@ -96,6 +97,14 @@ - - // The buffer is primed once at the very beginning of processing. - bool is_buffer_primed_; -+ -+#ifdef ARCH_CPU_X86 -+ private: -+ bool m_haveSSE2; -+ void m_ProcessSSE2(AudioSourceProvider*, -+ float* destination, -+ size_t frames_to_process); -+#endif - }; - - } // namespace blink -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/SincResamplerSSE2.cpp 2018-02-18 19:00:53.601426915 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "SincResampler.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.cpp 2018-02-18 19:00:53.602426901 +0100 -@@ -23,6 +23,9 @@ - * DAMAGE. - */ - -+// include this first to get it before the CPU() function-like macro -+#include "base/cpu.h" -+ - #include "platform/audio/VectorMath.h" - - #include -@@ -35,10 +38,14 @@ - #include - #endif - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - #include - #endif - -+#if defined(BUILD_ONLY_THE_SSE2_PARTS) && !defined(__SSE2__) -+#error SSE2 parts must be built with -msse2 -+#endif -+ - #if WTF_CPU_ARM_NEON - #include - #endif -@@ -170,15 +177,30 @@ - } - #else - -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+namespace SSE2 { -+#endif -+ -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+static base::CPU cpu; -+#endif -+ - void Vsma(const float* source_p, - int source_stride, - const float* scale, - float* dest_p, - int dest_stride, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vsma(source_p, source_stride, scale, dest_p, -+ dest_stride, frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if ((source_stride == 1) && (dest_stride == 1)) { - float k = *scale; - -@@ -274,9 +296,16 @@ - float* dest_p, - int dest_stride, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vsmul(source_p, source_stride, scale, dest_p, -+ dest_stride, frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if ((source_stride == 1) && (dest_stride == 1)) { - float k = *scale; - -@@ -365,7 +394,7 @@ - source_p += source_stride; - dest_p += dest_stride; - } --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - } - #endif - } -@@ -377,9 +406,17 @@ - float* dest_p, - int dest_stride, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vadd(source1p, source_stride1, source2p, -+ source_stride2, dest_p, dest_stride, -+ frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if ((source_stride1 == 1) && (source_stride2 == 1) && (dest_stride == 1)) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -506,7 +543,7 @@ - source2p += source_stride2; - dest_p += dest_stride; - } --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - } - #endif - } -@@ -518,9 +555,17 @@ - float* dest_p, - int dest_stride, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vmul(source1p, source_stride1, source2p, -+ source_stride2, dest_p, dest_stride, -+ frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if ((source_stride1 == 1) && (source_stride2 == 1) && (dest_stride == 1)) { - // If the source1P address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -619,8 +664,15 @@ - float* real_dest_p, - float* imag_dest_p, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Zvmul(real1p, imag1p, real2p, imag2p, real_dest_p, -+ imag_dest_p, frames_to_process); -+ return; -+ } -+#endif - unsigned i = 0; --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - // Only use the SSE optimization in the very common case that all addresses - // are 16-byte aligned. Otherwise, fall through to the scalar code below. - if (!(reinterpret_cast(real1p) & 0x0F) && -@@ -676,10 +728,17 @@ - int source_stride, - float* sum_p, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vsvesq(source_p, source_stride, sum_p, -+ frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - float sum = 0; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if (source_stride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -745,10 +804,17 @@ - int source_stride, - float* max_p, - size_t frames_to_process) { -+#if defined(ARCH_CPU_X86) && !defined(__SSE2__) -+ if (cpu.has_sse2()) { -+ blink::VectorMath::SSE2::Vmaxmgv(source_p, source_stride, max_p, -+ frames_to_process); -+ return; -+ } -+#endif - int n = frames_to_process; - float max = 0; - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - if (source_stride == 1) { - // If the sourceP address is not 16-byte aligned, the first several frames - // (at most three) should be processed separately. -@@ -837,6 +903,8 @@ - *max_p = max; - } - -+#ifndef BUILD_ONLY_THE_SSE2_PARTS -+ - void Vclip(const float* source_p, - int source_stride, - const float* low_threshold_p, -@@ -894,6 +962,12 @@ - } - } - -+#endif -+ -+#ifdef BUILD_ONLY_THE_SSE2_PARTS -+} // namespace SSE2 -+#endif -+ - #endif // defined(OS_MACOSX) - - } // namespace VectorMath -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMath.h 2018-02-18 19:00:53.602426901 +0100 -@@ -27,6 +27,7 @@ - #define VectorMath_h - - #include -+#include "build/build_config.h" - #include "platform/PlatformExport.h" - #include "platform/wtf/build_config.h" - -@@ -97,6 +98,62 @@ - int dest_stride, - size_t frames_to_process); - -+#ifdef ARCH_CPU_X86 -+namespace SSE2 { -+// Vector scalar multiply and then add. -+PLATFORM_EXPORT void Vsma(const float* source_p, -+ int source_stride, -+ const float* scale, -+ float* dest_p, -+ int dest_stride, -+ size_t frames_to_process); -+ -+PLATFORM_EXPORT void Vsmul(const float* source_p, -+ int source_stride, -+ const float* scale, -+ float* dest_p, -+ int dest_stride, -+ size_t frames_to_process); -+PLATFORM_EXPORT void Vadd(const float* source1p, -+ int source_stride1, -+ const float* source2p, -+ int source_stride2, -+ float* dest_p, -+ int dest_stride, -+ size_t frames_to_process); -+ -+// Finds the maximum magnitude of a float vector. -+PLATFORM_EXPORT void Vmaxmgv(const float* source_p, -+ int source_stride, -+ float* max_p, -+ size_t frames_to_process); -+ -+// Sums the squares of a float vector's elements. -+PLATFORM_EXPORT void Vsvesq(const float* source_p, -+ int source_stride, -+ float* sum_p, -+ size_t frames_to_process); -+ -+// For an element-by-element multiply of two float vectors. -+PLATFORM_EXPORT void Vmul(const float* source1p, -+ int source_stride1, -+ const float* source2p, -+ int source_stride2, -+ float* dest_p, -+ int dest_stride, -+ size_t frames_to_process); -+ -+// Multiplies two complex vectors. -+PLATFORM_EXPORT void Zvmul(const float* real1p, -+ const float* imag1p, -+ const float* real2p, -+ const float* imag2p, -+ float* real_dest_p, -+ float* imag_dest_p, -+ size_t frames_to_process); -+} -+#endif -+ - } // namespace VectorMath - } // namespace blink - -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/audio/VectorMathSSE2.cpp 2018-02-18 19:00:53.602426901 +0100 -@@ -0,0 +1,2 @@ -+#define BUILD_ONLY_THE_SSE2_PARTS -+#include "VectorMath.cpp" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/BUILD.gn 2018-02-18 19:00:53.603426886 +0100 -@@ -1695,6 +1695,10 @@ - deps += [ ":blink_x86_sse" ] - } - -+ if (current_cpu == "x86") { -+ deps += [ ":blink_x86_sse2" ] -+ } -+ - if (use_webaudio_ffmpeg) { - include_dirs += [ "//third_party/ffmpeg" ] - deps += [ "//third_party/ffmpeg" ] -@@ -2142,6 +2146,23 @@ - } - } - -+if (current_cpu == "x86") { -+ source_set("blink_x86_sse2") { -+ sources = [ -+ "audio/DirectConvolverSSE2.cpp", -+ "audio/SincResamplerSSE2.cpp", -+ "audio/VectorMathSSE2.cpp", -+ ] -+ cflags = [ "-msse2", "-mfpmath=sse" ] -+ configs += [ -+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. -+ "//build/config/compiler:no_size_t_to_int_warning", -+ "//third_party/WebKit/Source:config", -+ "//third_party/WebKit/Source:non_test_config", -+ ] -+ } -+} -+ - # This source set is used for fuzzers that need an environment similar to unit - # tests. - source_set("blink_fuzzer_test_support") { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/cpu/x86/WebGLImageConversionSSE.h 2018-02-18 19:00:53.603426886 +0100 -@@ -7,7 +7,7 @@ - - #include "build/build_config.h" - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - #include - - namespace blink { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp 2018-02-18 19:00:53.604426871 +0100 -@@ -444,7 +444,7 @@ - const uint32_t* source32 = reinterpret_cast_ptr(source); - uint32_t* destination32 = reinterpret_cast_ptr(destination); - --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::UnpackOneRowOfBGRA8LittleToRGBA8(source32, destination32, - pixels_per_row); - #endif -@@ -472,7 +472,7 @@ - const uint16_t* source, - uint8_t* destination, - unsigned pixels_per_row) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::UnpackOneRowOfRGBA5551LittleToRGBA8(source, destination, - pixels_per_row); - #endif -@@ -502,7 +502,7 @@ - const uint16_t* source, - uint8_t* destination, - unsigned pixels_per_row) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::UnpackOneRowOfRGBA4444LittleToRGBA8(source, destination, - pixels_per_row); - #endif -@@ -718,7 +718,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixels_per_row) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::PackOneRowOfRGBA8LittleToR8(source, destination, pixels_per_row); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -775,7 +775,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixels_per_row) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::PackOneRowOfRGBA8LittleToRA8(source, destination, pixels_per_row); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -@@ -887,7 +887,7 @@ - uint8_t>(const uint8_t* source, - uint8_t* destination, - unsigned pixels_per_row) { --#if defined(ARCH_CPU_X86_FAMILY) -+#if (defined(ARCH_CPU_X86) && defined(__SSE2__)) || defined(ARCH_CPU_X86_64) - SIMD::PackOneRowOfRGBA8LittleToRGBA8(source, destination, pixels_per_row); - #endif - #if HAVE(MIPS_MSA_INTRINSICS) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/common_audio/real_fourier.cc 2018-02-18 19:00:53.605426856 +0100 -@@ -14,6 +14,7 @@ - #include "webrtc/common_audio/real_fourier_openmax.h" - #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" - #include "webrtc/rtc_base/checks.h" -+#include "webrtc/system_wrappers/include/cpu_features_wrapper.h" - - namespace webrtc { - -@@ -23,7 +24,15 @@ - - std::unique_ptr RealFourier::Create(int fft_order) { - #if defined(RTC_USE_OPENMAX_DL) -+#if defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__) -+ // x86 CPU detection required. -+ if (WebRtc_GetCPUInfo(kSSE2)) -+ return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+ else -+ return std::unique_ptr(new RealFourierOoura(fft_order)); -+#else - return std::unique_ptr(new RealFourierOpenmax(fft_order)); -+#endif - #else - return std::unique_ptr(new RealFourierOoura(fft_order)); - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc 2018-02-18 19:00:53.644426283 +0100 -@@ -14,7 +14,7 @@ - #include - #endif - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -59,7 +59,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Computes and stores the frequency response of the filter. - void UpdateFrequencyResponse_SSE2( - rtc::ArrayView H, -@@ -111,7 +111,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Computes and stores the echo return loss estimate of the filter, which is the - // sum of the partition frequency responses. - void UpdateErlEstimator_SSE2( -@@ -204,7 +204,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Adapts the filter partitions. (SSE2 variant) - void AdaptPartitions_SSE2(const RenderBuffer& render_buffer, - const FftData& G, -@@ -345,7 +345,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Produces the filter output (SSE2 variant). - void ApplyFilter_SSE2(const RenderBuffer& render_buffer, - rtc::ArrayView H, -@@ -445,7 +445,7 @@ - FftData* S) const { - RTC_DCHECK(S); - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: - aec3::ApplyFilter_SSE2(render_buffer, H_, S); - break; -@@ -464,7 +464,7 @@ - const FftData& G) { - // Adapt the filter. - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: - aec3::AdaptPartitions_SSE2(render_buffer, G, H_); - break; -@@ -483,7 +483,7 @@ - - // Update the frequency response and echo return loss for the filter. - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: - aec3::UpdateFrequencyResponse_SSE2(H_, &H2_); - aec3::UpdateErlEstimator_SSE2(H2_, &erl_); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.h 2018-02-18 19:00:53.644426283 +0100 -@@ -34,7 +34,7 @@ - rtc::ArrayView H, - std::vector>* H2); - #endif --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - void UpdateFrequencyResponse_SSE2( - rtc::ArrayView H, - std::vector>* H2); -@@ -50,7 +50,7 @@ - const std::vector>& H2, - std::array* erl); - #endif --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - void UpdateErlEstimator_SSE2( - const std::vector>& H2, - std::array* erl); -@@ -65,7 +65,7 @@ - const FftData& G, - rtc::ArrayView H); - #endif --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - void AdaptPartitions_SSE2(const RenderBuffer& render_buffer, - const FftData& G, - rtc::ArrayView H); -@@ -80,7 +80,7 @@ - rtc::ArrayView H, - FftData* S); - #endif --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - void ApplyFilter_SSE2(const RenderBuffer& render_buffer, - rtc::ArrayView H, - FftData* S); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc 2018-02-18 19:00:53.644426283 +0100 -@@ -15,7 +15,7 @@ - #include - #include - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include "webrtc/modules/audio_processing/aec3/aec3_fft.h" -@@ -147,7 +147,7 @@ - - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Verifies that the optimized methods for filter adaptation are bitexact to - // their reference counterparts. - TEST(AdaptiveFirFilter, FilterAdaptationSse2Optimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/aec3_common.cc 2018-02-18 19:00:53.645426268 +0100 -@@ -16,10 +16,8 @@ - namespace webrtc { - - Aec3Optimization DetectOptimization() { --#if defined(WEBRTC_ARCH_X86_FAMILY) -- if (WebRtc_GetCPUInfo(kSSE2) != 0) { -- return Aec3Optimization::kSse2; -- } -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) -+ return Aec3Optimization::kSse2; - #endif - - #if defined(WEBRTC_HAS_NEON) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.cc 2018-02-18 19:00:53.645426268 +0100 -@@ -11,7 +11,7 @@ - #include "webrtc/modules/audio_processing/aec3/comfort_noise_generator.h" - - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -38,7 +38,7 @@ - - namespace aec3 { - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - - void EstimateComfortNoise_SSE2(const std::array& N2, - uint32_t* seed, -@@ -204,7 +204,7 @@ - N2_initial_ ? *N2_initial_ : N2_; - - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: - aec3::EstimateComfortNoise_SSE2(N2, &seed_, lower_band_noise, - upper_band_noise); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator.h 2018-02-18 19:00:53.645426268 +0100 -@@ -21,7 +21,7 @@ - - namespace webrtc { - namespace aec3 { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - - void EstimateComfortNoise_SSE2(const std::array& N2, - uint32_t* seed, -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/comfort_noise_generator_unittest.cc 2018-02-18 19:00:53.646426253 +0100 -@@ -50,7 +50,7 @@ - - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Verifies that the optimized methods are bitexact to their reference - // counterparts. - TEST(ComfortNoiseGenerator, TestOptimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data.h 2018-02-18 19:00:53.646426253 +0100 -@@ -12,7 +12,7 @@ - #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_FFT_DATA_H_ - - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -43,7 +43,7 @@ - std::array* power_spectrum) const { - RTC_DCHECK(power_spectrum); - switch (optimization) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: { - constexpr int kNumFourBinBands = kFftLengthBy2 / 4; - constexpr int kLimit = kNumFourBinBands * 4; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/fft_data_unittest.cc 2018-02-18 19:00:53.646426253 +0100 -@@ -16,7 +16,7 @@ - - namespace webrtc { - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Verifies that the optimized methods are bitexact to their reference - // counterparts. - TEST(FftData, TestOptimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.cc 2018-02-18 19:00:53.647426239 +0100 -@@ -13,7 +13,7 @@ - #include - #endif - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -133,7 +133,7 @@ - - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - - void MatchedFilterCore_SSE2(size_t x_start_index, - float x2_sum_threshold, -@@ -331,7 +331,7 @@ - render_buffer.buffer.size(); - - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: - aec3::MatchedFilterCore_SSE2(x_start_index, x2_sum_threshold, - render_buffer.buffer, y, filters_[n], -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter.h 2018-02-18 19:00:53.647426239 +0100 -@@ -36,7 +36,7 @@ - - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - - // Filter core for the matched filter that is optimized for SSE2. - void MatchedFilterCore_SSE2(size_t x_start_index, -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/matched_filter_unittest.cc 2018-02-18 19:00:53.647426239 +0100 -@@ -11,7 +11,7 @@ - #include "webrtc/modules/audio_processing/aec3/matched_filter.h" - - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -80,7 +80,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - // Verifies that the optimized methods for SSE2 are bitexact to their reference - // counterparts. - TEST(MatchedFilter, TestSse2Optimizations) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/suppression_gain.cc 2018-02-18 19:00:53.648426224 +0100 -@@ -11,7 +11,7 @@ - #include "webrtc/modules/audio_processing/aec3/suppression_gain.h" - - #include "webrtc/typedefs.h" --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math.h 2018-02-18 19:00:53.648426224 +0100 -@@ -15,7 +15,7 @@ - #if defined(WEBRTC_HAS_NEON) - #include - #endif --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - #include - #endif - #include -@@ -39,7 +39,7 @@ - // Elementwise square root. - void Sqrt(rtc::ArrayView x) { - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: { - const int x_size = static_cast(x.size()); - const int vector_limit = x_size >> 2; -@@ -113,7 +113,7 @@ - RTC_DCHECK_EQ(z.size(), x.size()); - RTC_DCHECK_EQ(z.size(), y.size()); - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: { - const int x_size = static_cast(x.size()); - const int vector_limit = x_size >> 2; -@@ -159,7 +159,7 @@ - void Accumulate(rtc::ArrayView x, rtc::ArrayView z) { - RTC_DCHECK_EQ(z.size(), x.size()); - switch (optimization_) { --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - case Aec3Optimization::kSse2: { - const int x_size = static_cast(x.size()); - const int vector_limit = x_size >> 2; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/vector_math_unittest.cc 2018-02-18 19:00:53.648426224 +0100 -@@ -77,7 +77,7 @@ - } - #endif - --#if defined(WEBRTC_ARCH_X86_FAMILY) -+#if defined(WEBRTC_ARCH_X86_64) || (defined(WEBRTC_ARCH_X86) && defined(__SSE2__)) - - TEST(VectorMath, Sqrt) { - if (WebRtc_GetCPUInfo(kSSE2) != 0) { -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/BUILD.gn 2018-02-18 19:00:53.649426209 +0100 -@@ -116,9 +116,9 @@ - v8_experimental_extra_library_files = - [ "//test/cctest/test-experimental-extra.js" ] - -- v8_enable_gdbjit = -- ((v8_current_cpu == "x86" || v8_current_cpu == "x64") && -- (is_linux || is_mac)) || (v8_current_cpu == "ppc64" && is_linux) -+ v8_enable_gdbjit = ((v8_current_cpu == "x86" || v8_current_cpu == "x64" || -+ v8_current_cpu == "x87") && (is_linux || is_mac)) || -+ (v8_current_cpu == "ppc64" && is_linux) - - # Temporary flag to allow embedders to update their microtasks scopes - # while rolling in a new version of V8. -@@ -161,7 +161,7 @@ - - include_dirs = [ "." ] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_SHARED" ] - } - } -@@ -175,14 +175,14 @@ - # This config should be applied to code using the libplatform. - config("libplatform_config") { - include_dirs = [ "include" ] -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_PLATFORM_SHARED" ] - } - } - - # This config should be applied to code using the libbase. - config("libbase_config") { -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_BASE_SHARED" ] - } - libs = [] -@@ -199,7 +199,7 @@ - # This config should only be applied to code using V8 and not any V8 code - # itself. - config("external_config") { -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "USING_V8_SHARED" ] - } - include_dirs = [ -@@ -434,6 +434,9 @@ - cflags += [ "/arch:SSE2" ] - } - } -+ if (v8_current_cpu == "x87") { -+ defines += [ "V8_TARGET_ARCH_X87" ] -+ } - if (v8_current_cpu == "x64") { - defines += [ "V8_TARGET_ARCH_X64" ] - if (is_win) { -@@ -443,6 +446,9 @@ - ldflags += [ "/STACK:2097152" ] - } - } -+ if (v8_current_cpu == "x87") { -+ defines += [ "V8_TARGET_ARCH_X87" ] -+ } - if (is_android && v8_android_log_stdout) { - defines += [ "V8_ANDROID_LOG_STDOUT" ] - } -@@ -1040,6 +1046,11 @@ - ### gcmole(arch:s390) ### - "src/builtins/s390/builtins-s390.cc", - ] -+ } else if (v8_current_cpu == "x87") { -+ sources += [ -+ ### gcmole(arch:x87) ### -+ "src/builtins/x87/builtins-x87.cc", -+ ] - } - - if (!v8_enable_i18n_support) { -@@ -2309,6 +2320,37 @@ - "src/s390/simulator-s390.cc", - "src/s390/simulator-s390.h", - ] -+ } else if (v8_current_cpu == "x87") { -+ sources += [ ### gcmole(arch:x87) ### -+ "src/compiler/x87/code-generator-x87.cc", -+ "src/compiler/x87/instruction-codes-x87.h", -+ "src/compiler/x87/instruction-scheduler-x87.cc", -+ "src/compiler/x87/instruction-selector-x87.cc", -+ "src/debug/x87/debug-x87.cc", -+ "src/full-codegen/x87/full-codegen-x87.cc", -+ "src/ic/x87/access-compiler-x87.cc", -+ "src/ic/x87/handler-compiler-x87.cc", -+ "src/ic/x87/ic-x87.cc", -+ "src/regexp/x87/regexp-macro-assembler-x87.cc", -+ "src/regexp/x87/regexp-macro-assembler-x87.h", -+ "src/x87/assembler-x87-inl.h", -+ "src/x87/assembler-x87.cc", -+ "src/x87/assembler-x87.h", -+ "src/x87/code-stubs-x87.cc", -+ "src/x87/code-stubs-x87.h", -+ "src/x87/codegen-x87.cc", -+ "src/x87/codegen-x87.h", -+ "src/x87/cpu-x87.cc", -+ "src/x87/deoptimizer-x87.cc", -+ "src/x87/disasm-x87.cc", -+ "src/x87/frames-x87.cc", -+ "src/x87/frames-x87.h", -+ "src/x87/interface-descriptors-x87.cc", -+ "src/x87/macro-assembler-x87.cc", -+ "src/x87/macro-assembler-x87.h", -+ "src/x87/simulator-x87.cc", -+ "src/x87/simulator-x87.h", -+ ] - } - - configs = [ ":internal_config" ] -@@ -2420,7 +2462,7 @@ - - defines = [] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_BASE_SHARED" ] - } - -@@ -2530,7 +2572,7 @@ - - configs = [ ":internal_config_base" ] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_PLATFORM_SHARED" ] - } - -@@ -2676,7 +2718,37 @@ - ] - } - --if (is_component_build) { -+if (v8_build_shared) { -+ shared_library("v8") { -+ sources = [ -+ "src/v8dll-main.cc", -+ ] -+ -+ public_deps = [ -+ ":v8_base", -+ ":v8_maybe_snapshot", -+ ] -+ -+ configs += [ ":internal_config" ] -+ -+ public_configs = [ ":external_config" ] -+ } -+ -+ group("v8_for_testing") { -+ testonly = true -+ -+ public_deps = [ -+ ":v8_base", -+ ":v8_maybe_snapshot", -+ ] -+ -+ if (v8_use_snapshot) { -+ public_deps += [ ":v8_builtins_generators" ] -+ } -+ -+ public_configs = [ ":external_config" ] -+ } -+} else if (is_component_build) { - v8_component("v8") { - sources = [ - "src/v8dll-main.cc", -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gni/v8.gni qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gni/v8.gni 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gni/v8.gni 2018-02-18 19:00:53.705425385 +0100 -@@ -42,6 +42,9 @@ - # add a dependency on the ICU library. - v8_enable_i18n_support = true - -+ # Whether to build V8 as a shared library -+ v8_build_shared = false -+ - # Use static libraries instead of source_sets. - v8_static_library = false - } -@@ -56,6 +59,11 @@ - v8_enable_backtrace = is_debug && !v8_optimized_debug - } - -+if (v8_current_cpu == "x86" || v8_current_cpu == "x87") { -+ # build V8 shared on x86 so we can swap x87 vs. SSE2 builds -+ v8_build_shared = true -+} -+ - # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute - # paths for all configs in templates as they are shared in different - # subdirectories. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/standalone.gypi qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/standalone.gypi 2018-02-18 19:00:53.777424326 +0100 -@@ -262,14 +262,14 @@ - # goma doesn't support PDB yet. - 'fastbuild%': 1, - }], -- ['((v8_target_arch=="ia32" or v8_target_arch=="x64") and \ -+ ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x87") and \ - (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")', { - 'v8_enable_gdbjit%': 1, - }, { - 'v8_enable_gdbjit%': 0, - }], - ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \ -- v8_target_arch!="x32"', { -+ (v8_target_arch!="x87" and v8_target_arch!="x32")', { - 'clang%': 1, - }, { - 'clang%': 0, -@@ -1207,7 +1207,7 @@ - '-L<(android_libcpp_libs)/arm64-v8a', - ], - }], -- ['target_arch=="ia32"', { -+ ['target_arch=="ia32" or target_arch=="x87"', { - # The x86 toolchain currently has problems with stack-protector. - 'cflags!': [ - '-fstack-protector', -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/gypfiles/toolchain.gypi 2018-02-18 19:00:53.778424312 +0100 -@@ -144,7 +144,7 @@ - 'host_cxx_is_biarch%': 0, - }, - }], -- ['target_arch=="ia32" or target_arch=="x64" or \ -+ ['target_arch=="ia32" or target_arch=="x64" or target_arch=="x87" or \ - target_arch=="ppc" or target_arch=="ppc64" or target_arch=="s390" or \ - target_arch=="s390x" or clang==1', { - 'variables': { -@@ -342,6 +342,12 @@ - 'V8_TARGET_ARCH_IA32', - ], - }], # v8_target_arch=="ia32" -+ ['v8_target_arch=="x87"', { -+ 'defines': [ -+ 'V8_TARGET_ARCH_X87', -+ ], -+ 'cflags': ['-march=i586'], -+ }], # v8_target_arch=="x87" - ['v8_target_arch=="mips" or v8_target_arch=="mipsel" \ - or v8_target_arch=="mips64" or v8_target_arch=="mips64el"', { - 'target_conditions': [ -@@ -1000,8 +1006,9 @@ - ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ - or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ - (v8_target_arch=="arm" or v8_target_arch=="ia32" or \ -- v8_target_arch=="mips" or v8_target_arch=="mipsel" or \ -- v8_target_arch=="ppc" or v8_target_arch=="s390")', { -+ v8_target_arch=="x87" or v8_target_arch=="mips" or \ -+ v8_target_arch=="mipsel" or v8_target_arch=="ppc" or \ -+ v8_target_arch=="s390")', { - 'target_conditions': [ - ['_toolset=="host"', { - 'conditions': [ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/Makefile qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/Makefile ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/Makefile 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/Makefile 2018-02-18 19:00:53.778424312 +0100 -@@ -255,13 +255,14 @@ - - # Architectures and modes to be compiled. Consider these to be internal - # variables, don't override them (use the targets instead). --ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el ppc ppc64 s390 s390x --ARCHES32 = ia32 arm mips mipsel ppc s390 -+ARCHES = ia32 x64 arm arm64 mips mipsel mips64 mips64el x87 ppc ppc64 s390 \ -+ s390x -+ARCHES32 = ia32 arm mips mipsel x87 ppc s390 - DEFAULT_ARCHES = ia32 x64 arm - MODES = release debug optdebug - DEFAULT_MODES = release debug - ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ -- android_mipsel -+ android_mipsel android_x87 - - # List of files that trigger Makefile regeneration: - GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler.cc 2018-02-18 19:00:53.779424297 +0100 -@@ -85,6 +85,8 @@ - #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" // NOLINT - #elif V8_TARGET_ARCH_S390 - #include "src/regexp/s390/regexp-macro-assembler-s390.h" // NOLINT -+#elif V8_TARGET_ARCH_X87 -+#include "src/regexp/x87/regexp-macro-assembler-x87.h" // NOLINT - #else // Unknown architecture. - #error "Unknown architecture." - #endif // Target architecture. -@@ -1318,6 +1320,8 @@ - function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); - #elif V8_TARGET_ARCH_S390 - function = FUNCTION_ADDR(RegExpMacroAssemblerS390::CheckStackGuardState); -+#elif V8_TARGET_ARCH_X87 -+ function = FUNCTION_ADDR(RegExpMacroAssemblerX87::CheckStackGuardState); - #else - UNREACHABLE(); - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/assembler-inl.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/assembler-inl.h 2018-02-18 19:00:53.864423047 +0100 -@@ -23,6 +23,8 @@ - #include "src/mips64/assembler-mips64-inl.h" - #elif V8_TARGET_ARCH_S390 - #include "src/s390/assembler-s390-inl.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/assembler-x87-inl.h" - #else - #error Unknown architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/base/build_config.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/base/build_config.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/base/build_config.h 2018-02-18 19:00:53.864423047 +0100 -@@ -76,9 +76,9 @@ - // Target architecture detection. This may be set externally. If not, detect - // in the same way as the host architecture, that is, target the native - // environment as presented by the compiler. --#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \ -- !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64 && \ -- !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390 -+#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_X87 && \ -+ !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && \ -+ !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390 - #if defined(_M_X64) || defined(__x86_64__) - #define V8_TARGET_ARCH_X64 1 - #elif defined(_M_IX86) || defined(__i386__) -@@ -129,6 +129,8 @@ - #else - #define V8_TARGET_ARCH_32_BIT 1 - #endif -+#elif V8_TARGET_ARCH_X87 -+#define V8_TARGET_ARCH_32_BIT 1 - #else - #error Unknown target architecture pointer size - #endif -@@ -179,6 +181,8 @@ - #else - #define V8_TARGET_LITTLE_ENDIAN 1 - #endif -+#elif V8_TARGET_ARCH_X87 -+#define V8_TARGET_LITTLE_ENDIAN 1 - #elif __BIG_ENDIAN__ // FOR PPCGR on AIX - #define V8_TARGET_BIG_ENDIAN 1 - #elif V8_TARGET_ARCH_PPC_LE -@@ -195,7 +199,8 @@ - #error Unknown target architecture endianness - #endif - --#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) -+#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64) || \ -+ defined(V8_TARGET_ARCH_X87) - #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 1 - #else - #define V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK 0 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/builtins-x87.cc 2018-02-18 19:00:53.934422017 +0100 -@@ -0,0 +1,3008 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/code-factory.h" -+#include "src/codegen.h" -+#include "src/deoptimizer.h" -+#include "src/full-codegen/full-codegen.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm) -+ -+void Builtins::Generate_Adaptor(MacroAssembler* masm, Address address, -+ ExitFrameType exit_frame_type) { -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments excluding receiver -+ // -- edi : target -+ // -- edx : new.target -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // -- ... -+ // -- esp[4 * argc] : first argument -+ // -- esp[4 * (argc +1)] : receiver -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // Make sure we operate in the context of the called function (for example -+ // ConstructStubs implemented in C++ will be run in the context of the caller -+ // instead of the callee, due to the way that [[Construct]] is defined for -+ // ordinary functions). -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ // JumpToExternalReference expects eax to contain the number of arguments -+ // including the receiver and the extra arguments. -+ const int num_extra_args = 3; -+ __ add(eax, Immediate(num_extra_args + 1)); -+ -+ // Insert extra arguments. -+ __ PopReturnAddressTo(ecx); -+ __ SmiTag(eax); -+ __ Push(eax); -+ __ SmiUntag(eax); -+ __ Push(edi); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ -+ __ JumpToExternalReference(ExternalReference(address, masm->isolate()), -+ exit_frame_type == BUILTIN_EXIT); -+} -+ -+static void GenerateTailCallToReturnedCode(MacroAssembler* masm, -+ Runtime::FunctionId function_id) { -+ // ----------- S t a t e ------------- -+ // -- eax : argument count (preserved for callee) -+ // -- edx : new target (preserved for callee) -+ // -- edi : target function (preserved for callee) -+ // ----------------------------------- -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // Push the number of arguments to the callee. -+ __ SmiTag(eax); -+ __ push(eax); -+ // Push a copy of the target function and the new target. -+ __ push(edi); -+ __ push(edx); -+ // Function is also the parameter to the runtime call. -+ __ push(edi); -+ -+ __ CallRuntime(function_id, 1); -+ __ mov(ebx, eax); -+ -+ // Restore target function and new target. -+ __ pop(edx); -+ __ pop(edi); -+ __ pop(eax); -+ __ SmiUntag(eax); -+ } -+ -+ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); -+ __ jmp(ebx); -+} -+ -+static void GenerateTailCallToSharedCode(MacroAssembler* masm) { -+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); -+ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); -+ __ jmp(ebx); -+} -+ -+namespace { -+ -+void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax: number of arguments -+ // -- edi: constructor function -+ // -- edx: new target -+ // -- esi: context -+ // ----------------------------------- -+ -+ // Enter a construct frame. -+ { -+ FrameScope scope(masm, StackFrame::CONSTRUCT); -+ -+ // Preserve the incoming parameters on the stack. -+ __ SmiTag(eax); -+ __ push(esi); -+ __ push(eax); -+ __ SmiUntag(eax); -+ -+ // The receiver for the builtin/api call. -+ __ PushRoot(Heap::kTheHoleValueRootIndex); -+ -+ // Set up pointer to last argument. -+ __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); -+ -+ // Copy arguments and receiver to the expression stack. -+ Label loop, entry; -+ __ mov(ecx, eax); -+ // ----------- S t a t e ------------- -+ // -- eax: number of arguments (untagged) -+ // -- edi: constructor function -+ // -- edx: new target -+ // -- ebx: pointer to last argument -+ // -- ecx: counter -+ // -- sp[0*kPointerSize]: the hole (receiver) -+ // -- sp[1*kPointerSize]: number of arguments (tagged) -+ // -- sp[2*kPointerSize]: context -+ // ----------------------------------- -+ __ jmp(&entry); -+ __ bind(&loop); -+ __ push(Operand(ebx, ecx, times_4, 0)); -+ __ bind(&entry); -+ __ dec(ecx); -+ __ j(greater_equal, &loop); -+ -+ // Call the function. -+ // eax: number of arguments (untagged) -+ // edi: constructor function -+ // edx: new target -+ ParameterCount actual(eax); -+ __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, -+ CheckDebugStepCallWrapper()); -+ -+ // Restore context from the frame. -+ __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); -+ // Restore smi-tagged arguments count from the frame. -+ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kLengthOffset)); -+ // Leave construct frame. -+ } -+ -+ // Remove caller arguments from the stack and return. -+ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); -+ __ pop(ecx); -+ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver -+ __ push(ecx); -+ __ ret(0); -+} -+ -+// The construct stub for ES5 constructor functions and ES6 class constructors. -+void Generate_JSConstructStubGeneric(MacroAssembler* masm, -+ bool restrict_constructor_return) { -+ // ----------- S t a t e ------------- -+ // -- eax: number of arguments (untagged) -+ // -- edi: constructor function -+ // -- edx: new target -+ // -- esi: context -+ // -- sp[...]: constructor arguments -+ // ----------------------------------- -+ -+ // Enter a construct frame. -+ { -+ FrameScope scope(masm, StackFrame::CONSTRUCT); -+ Label post_instantiation_deopt_entry, not_create_implicit_receiver; -+ -+ // Preserve the incoming parameters on the stack. -+ __ mov(ecx, eax); -+ __ SmiTag(ecx); -+ __ Push(esi); -+ __ Push(ecx); -+ __ Push(edi); -+ __ Push(edx); -+ -+ // ----------- S t a t e ------------- -+ // -- sp[0*kPointerSize]: new target -+ // -- edi and sp[1*kPointerSize]: constructor function -+ // -- sp[2*kPointerSize]: argument count -+ // -- sp[3*kPointerSize]: context -+ // ----------------------------------- -+ -+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ test(FieldOperand(ebx, SharedFunctionInfo::kCompilerHintsOffset), -+ Immediate(SharedFunctionInfo::kDerivedConstructorMask)); -+ __ j(not_zero, ¬_create_implicit_receiver); -+ -+ // If not derived class constructor: Allocate the new receiver object. -+ __ IncrementCounter(masm->isolate()->counters()->constructed_objects(), 1); -+ __ Call(masm->isolate()->builtins()->FastNewObject(), -+ RelocInfo::CODE_TARGET); -+ __ jmp(&post_instantiation_deopt_entry, Label::kNear); -+ -+ // Else: use TheHoleValue as receiver for constructor call -+ __ bind(¬_create_implicit_receiver); -+ __ LoadRoot(eax, Heap::kTheHoleValueRootIndex); -+ -+ // ----------- S t a t e ------------- -+ // -- eax: implicit receiver -+ // -- Slot 3 / sp[0*kPointerSize]: new target -+ // -- Slot 2 / sp[1*kPointerSize]: constructor function -+ // -- Slot 1 / sp[2*kPointerSize]: number of arguments (tagged) -+ // -- Slot 0 / sp[3*kPointerSize]: context -+ // ----------------------------------- -+ // Deoptimizer enters here. -+ masm->isolate()->heap()->SetConstructStubCreateDeoptPCOffset( -+ masm->pc_offset()); -+ __ bind(&post_instantiation_deopt_entry); -+ -+ // Restore new target. -+ __ Pop(edx); -+ -+ // Push the allocated receiver to the stack. We need two copies -+ // because we may have to return the original one and the calling -+ // conventions dictate that the called function pops the receiver. -+ __ Push(eax); -+ __ Push(eax); -+ -+ // ----------- S t a t e ------------- -+ // -- edx: new target -+ // -- sp[0*kPointerSize]: implicit receiver -+ // -- sp[1*kPointerSize]: implicit receiver -+ // -- sp[2*kPointerSize]: constructor function -+ // -- sp[3*kPointerSize]: number of arguments (tagged) -+ // -- sp[4*kPointerSize]: context -+ // ----------------------------------- -+ -+ // Restore constructor function and argument count. -+ __ mov(edi, Operand(ebp, ConstructFrameConstants::kConstructorOffset)); -+ __ mov(eax, Operand(ebp, ConstructFrameConstants::kLengthOffset)); -+ __ SmiUntag(eax); -+ -+ // Set up pointer to last argument. -+ __ lea(ebx, Operand(ebp, StandardFrameConstants::kCallerSPOffset)); -+ -+ // Copy arguments and receiver to the expression stack. -+ Label loop, entry; -+ __ mov(ecx, eax); -+ // ----------- S t a t e ------------- -+ // -- eax: number of arguments (untagged) -+ // -- edx: new target -+ // -- ebx: pointer to last argument -+ // -- ecx: counter (tagged) -+ // -- sp[0*kPointerSize]: implicit receiver -+ // -- sp[1*kPointerSize]: implicit receiver -+ // -- edi and sp[2*kPointerSize]: constructor function -+ // -- sp[3*kPointerSize]: number of arguments (tagged) -+ // -- sp[4*kPointerSize]: context -+ // ----------------------------------- -+ __ jmp(&entry, Label::kNear); -+ __ bind(&loop); -+ __ Push(Operand(ebx, ecx, times_pointer_size, 0)); -+ __ bind(&entry); -+ __ dec(ecx); -+ __ j(greater_equal, &loop); -+ -+ // Call the function. -+ ParameterCount actual(eax); -+ __ InvokeFunction(edi, edx, actual, CALL_FUNCTION, -+ CheckDebugStepCallWrapper()); -+ -+ // ----------- S t a t e ------------- -+ // -- eax: constructor result -+ // -- sp[0*kPointerSize]: implicit receiver -+ // -- sp[1*kPointerSize]: constructor function -+ // -- sp[2*kPointerSize]: number of arguments -+ // -- sp[3*kPointerSize]: context -+ // ----------------------------------- -+ -+ // Store offset of return address for deoptimizer. -+ masm->isolate()->heap()->SetConstructStubInvokeDeoptPCOffset( -+ masm->pc_offset()); -+ -+ // Restore context from the frame. -+ __ mov(esi, Operand(ebp, ConstructFrameConstants::kContextOffset)); -+ -+ // If the result is an object (in the ECMA sense), we should get rid -+ // of the receiver and use the result; see ECMA-262 section 13.2.2-7 -+ // on page 74. -+ Label use_receiver, do_throw, other_result, leave_frame; -+ -+ // If the result is undefined, we jump out to using the implicit receiver. -+ __ JumpIfRoot(eax, Heap::kUndefinedValueRootIndex, &use_receiver, -+ Label::kNear); -+ -+ // Otherwise we do a smi check and fall through to check if the return value -+ // is a valid receiver. -+ -+ // If the result is a smi, it is *not* an object in the ECMA sense. -+ __ JumpIfSmi(eax, &other_result, Label::kNear); -+ -+ // If the type of the result (stored in its map) is less than -+ // FIRST_JS_RECEIVER_TYPE, it is not an object in the ECMA sense. -+ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(above_equal, &leave_frame, Label::kNear); -+ -+ // The result is now neither undefined nor an object. -+ __ bind(&other_result); -+ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kConstructorOffset)); -+ __ mov(ebx, FieldOperand(ebx, JSFunction::kSharedFunctionInfoOffset)); -+ __ test(FieldOperand(ebx, SharedFunctionInfo::kCompilerHintsOffset), -+ Immediate(SharedFunctionInfo::kClassConstructorMask)); -+ -+ if (restrict_constructor_return) { -+ // Throw if constructor function is a class constructor -+ __ j(Condition::zero, &use_receiver, Label::kNear); -+ } else { -+ __ j(not_zero, &use_receiver, Label::kNear); -+ __ CallRuntime( -+ Runtime::kIncrementUseCounterConstructorReturnNonUndefinedPrimitive); -+ __ jmp(&use_receiver, Label::kNear); -+ } -+ -+ __ bind(&do_throw); -+ __ CallRuntime(Runtime::kThrowConstructorReturnedNonObject); -+ -+ // Throw away the result of the constructor invocation and use the -+ // on-stack receiver as the result. -+ __ bind(&use_receiver); -+ __ mov(eax, Operand(esp, 0 * kPointerSize)); -+ __ JumpIfRoot(eax, Heap::kTheHoleValueRootIndex, &do_throw); -+ -+ __ bind(&leave_frame); -+ // Restore smi-tagged arguments count from the frame. -+ __ mov(ebx, Operand(ebp, ConstructFrameConstants::kLengthOffset)); -+ // Leave construct frame. -+ } -+ // Remove caller arguments from the stack and return. -+ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); -+ __ pop(ecx); -+ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver -+ __ push(ecx); -+ __ ret(0); -+} -+} // namespace -+ -+void Builtins::Generate_JSConstructStubGenericRestrictedReturn( -+ MacroAssembler* masm) { -+ return Generate_JSConstructStubGeneric(masm, true); -+} -+void Builtins::Generate_JSConstructStubGenericUnrestrictedReturn( -+ MacroAssembler* masm) { -+ return Generate_JSConstructStubGeneric(masm, false); -+} -+void Builtins::Generate_JSConstructStubApi(MacroAssembler* masm) { -+ Generate_JSBuiltinsConstructStubHelper(masm); -+} -+void Builtins::Generate_JSBuiltinsConstructStub(MacroAssembler* masm) { -+ Generate_JSBuiltinsConstructStubHelper(masm); -+} -+ -+void Builtins::Generate_ConstructedNonConstructable(MacroAssembler* masm) { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ push(edi); -+ __ CallRuntime(Runtime::kThrowConstructedNonConstructable); -+} -+ -+enum IsTagged { kEaxIsSmiTagged, kEaxIsUntaggedInt }; -+ -+// Clobbers ecx, edx, edi; preserves all other registers. -+static void Generate_CheckStackOverflow(MacroAssembler* masm, -+ IsTagged eax_is_tagged) { -+ // eax : the number of items to be pushed to the stack -+ // -+ // Check the stack for overflow. We are not trying to catch -+ // interruptions (e.g. debug break and preemption) here, so the "real stack -+ // limit" is checked. -+ Label okay; -+ ExternalReference real_stack_limit = -+ ExternalReference::address_of_real_stack_limit(masm->isolate()); -+ __ mov(edi, Operand::StaticVariable(real_stack_limit)); -+ // Make ecx the space we have left. The stack might already be overflowed -+ // here which will cause ecx to become negative. -+ __ mov(ecx, esp); -+ __ sub(ecx, edi); -+ // Make edx the space we need for the array when it is unrolled onto the -+ // stack. -+ __ mov(edx, eax); -+ int smi_tag = eax_is_tagged == kEaxIsSmiTagged ? kSmiTagSize : 0; -+ __ shl(edx, kPointerSizeLog2 - smi_tag); -+ // Check if the arguments will overflow the stack. -+ __ cmp(ecx, edx); -+ __ j(greater, &okay); // Signed comparison. -+ -+ // Out of stack space. -+ __ CallRuntime(Runtime::kThrowStackOverflow); -+ -+ __ bind(&okay); -+} -+ -+static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, -+ bool is_construct) { -+ ProfileEntryHookStub::MaybeCallEntryHook(masm); -+ -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Setup the context (we need to use the caller context from the isolate). -+ ExternalReference context_address(IsolateAddressId::kContextAddress, -+ masm->isolate()); -+ __ mov(esi, Operand::StaticVariable(context_address)); -+ -+ // Load the previous frame pointer (ebx) to access C arguments -+ __ mov(ebx, Operand(ebp, 0)); -+ -+ // Push the function and the receiver onto the stack. -+ __ push(Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); -+ __ push(Operand(ebx, EntryFrameConstants::kReceiverArgOffset)); -+ -+ // Load the number of arguments and setup pointer to the arguments. -+ __ mov(eax, Operand(ebx, EntryFrameConstants::kArgcOffset)); -+ __ mov(ebx, Operand(ebx, EntryFrameConstants::kArgvOffset)); -+ -+ // Check if we have enough stack space to push all arguments. -+ // Expects argument count in eax. Clobbers ecx, edx, edi. -+ Generate_CheckStackOverflow(masm, kEaxIsUntaggedInt); -+ -+ // Copy arguments to the stack in a loop. -+ Label loop, entry; -+ __ Move(ecx, Immediate(0)); -+ __ jmp(&entry, Label::kNear); -+ __ bind(&loop); -+ __ mov(edx, Operand(ebx, ecx, times_4, 0)); // push parameter from argv -+ __ push(Operand(edx, 0)); // dereference handle -+ __ inc(ecx); -+ __ bind(&entry); -+ __ cmp(ecx, eax); -+ __ j(not_equal, &loop); -+ -+ // Load the previous frame pointer (ebx) to access C arguments -+ __ mov(ebx, Operand(ebp, 0)); -+ -+ // Get the new.target and function from the frame. -+ __ mov(edx, Operand(ebx, EntryFrameConstants::kNewTargetArgOffset)); -+ __ mov(edi, Operand(ebx, EntryFrameConstants::kFunctionArgOffset)); -+ -+ // Invoke the code. -+ Handle builtin = is_construct -+ ? masm->isolate()->builtins()->Construct() -+ : masm->isolate()->builtins()->Call(); -+ __ Call(builtin, RelocInfo::CODE_TARGET); -+ -+ // Exit the internal frame. Notice that this also removes the empty. -+ // context and the function left on the stack by the code -+ // invocation. -+ } -+ __ ret(kPointerSize); // Remove receiver. -+} -+ -+void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { -+ Generate_JSEntryTrampolineHelper(masm, false); -+} -+ -+void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { -+ Generate_JSEntryTrampolineHelper(masm, true); -+} -+ -+// static -+void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the value to pass to the generator -+ // -- ebx : the JSGeneratorObject to resume -+ // -- edx : the resume mode (tagged) -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ AssertGeneratorObject(ebx); -+ -+ // Store input value into generator object. -+ __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); -+ __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, -+ kDontSaveFPRegs); -+ -+ // Store resume mode into generator object. -+ __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); -+ -+ // Load suspended function and context. -+ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ // Flood function if we are stepping. -+ Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; -+ Label stepping_prepared; -+ ExternalReference debug_hook = -+ ExternalReference::debug_hook_on_function_call_address(masm->isolate()); -+ __ cmpb(Operand::StaticVariable(debug_hook), Immediate(0)); -+ __ j(not_equal, &prepare_step_in_if_stepping); -+ -+ // Flood function if we need to continue stepping in the suspended generator. -+ ExternalReference debug_suspended_generator = -+ ExternalReference::debug_suspended_generator_address(masm->isolate()); -+ __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); -+ __ j(equal, &prepare_step_in_suspended_generator); -+ __ bind(&stepping_prepared); -+ -+ // Pop return address. -+ __ PopReturnAddressTo(eax); -+ -+ // Push receiver. -+ __ Push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); -+ -+ // ----------- S t a t e ------------- -+ // -- eax : return address -+ // -- ebx : the JSGeneratorObject to resume -+ // -- edx : the resume mode (tagged) -+ // -- edi : generator function -+ // -- esi : generator context -+ // -- esp[0] : generator receiver -+ // ----------------------------------- -+ -+ // Push holes for arguments to generator function. Since the parser forced -+ // context allocation for any variables in generators, the actual argument -+ // values have already been copied into the context and these dummy values -+ // will never be used. -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, -+ FieldOperand(ecx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ { -+ Label done_loop, loop; -+ __ bind(&loop); -+ __ sub(ecx, Immediate(1)); -+ __ j(carry, &done_loop, Label::kNear); -+ __ PushRoot(Heap::kTheHoleValueRootIndex); -+ __ jmp(&loop); -+ __ bind(&done_loop); -+ } -+ -+ // Underlying function needs to have bytecode available. -+ if (FLAG_debug_code) { -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kFunctionDataOffset)); -+ __ CmpObjectType(ecx, BYTECODE_ARRAY_TYPE, ecx); -+ __ Assert(equal, kMissingBytecodeArray); -+ } -+ -+ // Resume (Ignition/TurboFan) generator object. -+ { -+ __ PushReturnAddressFrom(eax); -+ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(eax, -+ FieldOperand(eax, SharedFunctionInfo::kFormalParameterCountOffset)); -+ // We abuse new.target both to indicate that this is a resume call and to -+ // pass in the generator object. In ordinary calls, new.target is always -+ // undefined because generator functions are non-constructable. -+ __ mov(edx, ebx); -+ __ jmp(FieldOperand(edi, JSFunction::kCodeEntryOffset)); -+ } -+ -+ __ bind(&prepare_step_in_if_stepping); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(ebx); -+ __ Push(edx); -+ __ Push(edi); -+ __ CallRuntime(Runtime::kDebugOnFunctionCall); -+ __ Pop(edx); -+ __ Pop(ebx); -+ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); -+ } -+ __ jmp(&stepping_prepared); -+ -+ __ bind(&prepare_step_in_suspended_generator); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(ebx); -+ __ Push(edx); -+ __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); -+ __ Pop(edx); -+ __ Pop(ebx); -+ __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); -+ } -+ __ jmp(&stepping_prepared); -+} -+ -+static void ReplaceClosureEntryWithOptimizedCode( -+ MacroAssembler* masm, Register optimized_code_entry, Register closure, -+ Register scratch1, Register scratch2, Register scratch3) { -+ Register native_context = scratch1; -+ -+ // Store the optimized code in the closure. -+ __ lea(optimized_code_entry, -+ FieldOperand(optimized_code_entry, Code::kHeaderSize)); -+ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), -+ optimized_code_entry); -+ __ RecordWriteCodeEntryField(closure, optimized_code_entry, scratch2); -+ -+ // Link the closure into the optimized function list. -+ __ mov(native_context, NativeContextOperand()); -+ __ mov(scratch3, -+ ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST)); -+ __ mov(FieldOperand(closure, JSFunction::kNextFunctionLinkOffset), scratch3); -+ __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, scratch3, -+ scratch2, kDontSaveFPRegs, EMIT_REMEMBERED_SET, -+ OMIT_SMI_CHECK); -+ const int function_list_offset = -+ Context::SlotOffset(Context::OPTIMIZED_FUNCTIONS_LIST); -+ __ mov(ContextOperand(native_context, Context::OPTIMIZED_FUNCTIONS_LIST), -+ closure); -+ // Save closure before the write barrier. -+ __ mov(scratch3, closure); -+ __ RecordWriteContextSlot(native_context, function_list_offset, closure, -+ scratch2, kDontSaveFPRegs); -+ __ mov(closure, scratch3); -+} -+ -+static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1, -+ Register scratch2) { -+ Register args_count = scratch1; -+ Register return_pc = scratch2; -+ -+ // Get the arguments + reciever count. -+ __ mov(args_count, -+ Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); -+ __ mov(args_count, -+ FieldOperand(args_count, BytecodeArray::kParameterSizeOffset)); -+ -+ // Leave the frame (also dropping the register file). -+ __ leave(); -+ -+ // Drop receiver + arguments. -+ __ pop(return_pc); -+ __ add(esp, args_count); -+ __ push(return_pc); -+} -+ -+// Tail-call |function_id| if |smi_entry| == |marker| -+static void TailCallRuntimeIfMarkerEquals(MacroAssembler* masm, -+ Register smi_entry, -+ OptimizationMarker marker, -+ Runtime::FunctionId function_id) { -+ Label no_match; -+ __ cmp(smi_entry, Immediate(Smi::FromEnum(marker))); -+ __ j(not_equal, &no_match, Label::kNear); -+ GenerateTailCallToReturnedCode(masm, function_id); -+ __ bind(&no_match); -+} -+ -+static void MaybeTailCallOptimizedCodeSlot(MacroAssembler* masm, -+ Register feedback_vector, -+ Register scratch) { -+ // ----------- S t a t e ------------- -+ // -- eax : argument count (preserved for callee if needed, and caller) -+ // -- edx : new target (preserved for callee if needed, and caller) -+ // -- edi : target function (preserved for callee if needed, and caller) -+ // -- feedback vector (preserved for caller if needed) -+ // ----------------------------------- -+ DCHECK(!AreAliased(feedback_vector, eax, edx, edi, scratch)); -+ -+ Label optimized_code_slot_is_cell, fallthrough; -+ -+ Register closure = edi; -+ Register optimized_code_entry = scratch; -+ -+ const int kOptimizedCodeCellOffset = -+ FeedbackVector::kOptimizedCodeIndex * kPointerSize + -+ FeedbackVector::kHeaderSize; -+ __ mov(optimized_code_entry, -+ FieldOperand(feedback_vector, kOptimizedCodeCellOffset)); -+ -+ // Check if the code entry is a Smi. If yes, we interpret it as an -+ // optimisation marker. Otherwise, interpret is as a weak cell to a code -+ // object. -+ __ JumpIfNotSmi(optimized_code_entry, &optimized_code_slot_is_cell); -+ -+ { -+ // Optimized code slot is an optimization marker. -+ -+ // Fall through if no optimization trigger. -+ __ cmp(optimized_code_entry, -+ Immediate(Smi::FromEnum(OptimizationMarker::kNone))); -+ __ j(equal, &fallthrough); -+ -+ TailCallRuntimeIfMarkerEquals(masm, optimized_code_entry, -+ OptimizationMarker::kCompileOptimized, -+ Runtime::kCompileOptimized_NotConcurrent); -+ TailCallRuntimeIfMarkerEquals( -+ masm, optimized_code_entry, -+ OptimizationMarker::kCompileOptimizedConcurrent, -+ Runtime::kCompileOptimized_Concurrent); -+ -+ { -+ // Otherwise, the marker is InOptimizationQueue. -+ if (FLAG_debug_code) { -+ __ cmp( -+ optimized_code_entry, -+ Immediate(Smi::FromEnum(OptimizationMarker::kInOptimizationQueue))); -+ __ Assert(equal, kExpectedOptimizationSentinel); -+ } -+ -+ // Checking whether the queued function is ready for install is optional, -+ // since we come across interrupts and stack checks elsewhere. However, -+ // not checking may delay installing ready functions, and always checking -+ // would be quite expensive. A good compromise is to first check against -+ // stack limit as a cue for an interrupt signal. -+ ExternalReference stack_limit = -+ ExternalReference::address_of_stack_limit(masm->isolate()); -+ __ cmp(esp, Operand::StaticVariable(stack_limit)); -+ __ j(above_equal, &fallthrough); -+ GenerateTailCallToReturnedCode(masm, Runtime::kTryInstallOptimizedCode); -+ } -+ } -+ -+ { -+ // Optimized code slot is a WeakCell. -+ __ bind(&optimized_code_slot_is_cell); -+ -+ __ mov(optimized_code_entry, -+ FieldOperand(optimized_code_entry, WeakCell::kValueOffset)); -+ __ JumpIfSmi(optimized_code_entry, &fallthrough); -+ -+ // Check if the optimized code is marked for deopt. If it is, bailout to a -+ // given label. -+ Label found_deoptimized_code; -+ __ test(FieldOperand(optimized_code_entry, Code::kKindSpecificFlags1Offset), -+ Immediate(1 << Code::kMarkedForDeoptimizationBit)); -+ __ j(not_zero, &found_deoptimized_code); -+ -+ // Optimized code is good, get it into the closure and link the closure into -+ // the optimized functions list, then tail call the optimized code. -+ __ push(eax); -+ __ push(edx); -+ // The feedback vector is no longer used, so re-use it as a scratch -+ // register. -+ ReplaceClosureEntryWithOptimizedCode(masm, optimized_code_entry, closure, -+ edx, eax, feedback_vector); -+ __ pop(edx); -+ __ pop(eax); -+ __ jmp(optimized_code_entry); -+ -+ // Optimized code slot contains deoptimized code, evict it and re-enter the -+ // closure's code. -+ __ bind(&found_deoptimized_code); -+ GenerateTailCallToReturnedCode(masm, Runtime::kEvictOptimizedCodeSlot); -+ } -+ -+ // Fall-through if the optimized code cell is clear and there is no -+ // optimization marker. -+ __ bind(&fallthrough); -+} -+ -+// Generate code for entering a JS function with the interpreter. -+// On entry to the function the receiver and arguments have been pushed on the -+// stack left to right. The actual argument count matches the formal parameter -+// count expected by the function. -+// -+// The live registers are: -+// o edi: the JS function object being called -+// o edx: the new target -+// o esi: our context -+// o ebp: the caller's frame pointer -+// o esp: stack pointer (pointing to return address) -+// -+// The function builds an interpreter frame. See InterpreterFrameConstants in -+// frames.h for its layout. -+void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { -+ ProfileEntryHookStub::MaybeCallEntryHook(masm); -+ -+ Register closure = edi; -+ Register feedback_vector = ebx; -+ -+ // Load the feedback vector from the closure. -+ __ mov(feedback_vector, -+ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); -+ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); -+ // Read off the optimized code slot in the feedback vector, and if there -+ // is optimized code or an optimization marker, call that instead. -+ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); -+ -+ // Open a frame scope to indicate that there is a frame on the stack. The -+ // MANUAL indicates that the scope shouldn't actually generate code to set -+ // up the frame (that is done below). -+ FrameScope frame_scope(masm, StackFrame::MANUAL); -+ __ push(ebp); // Caller's frame pointer. -+ __ mov(ebp, esp); -+ __ push(esi); // Callee's context. -+ __ push(edi); // Callee's JS function. -+ __ push(edx); // Callee's new target. -+ -+ // Get the bytecode array from the function object (or from the DebugInfo if -+ // it is present) and load it into kInterpreterBytecodeArrayRegister. -+ Label maybe_load_debug_bytecode_array, bytecode_array_loaded; -+ __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(kInterpreterBytecodeArrayRegister, -+ FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); -+ __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), -+ &maybe_load_debug_bytecode_array); -+ __ bind(&bytecode_array_loaded); -+ -+ // Check whether we should continue to use the interpreter. -+ // TODO(rmcilroy) Remove self healing once liveedit only has to deal with -+ // Ignition bytecode. -+ Label switch_to_different_code_kind; -+ __ Move(ecx, masm->CodeObject()); // Self-reference to this code. -+ __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); -+ __ j(not_equal, &switch_to_different_code_kind); -+ -+ // Increment invocation count for the function. -+ __ add(FieldOperand(feedback_vector, -+ FeedbackVector::kInvocationCountIndex * kPointerSize + -+ FeedbackVector::kHeaderSize), -+ Immediate(Smi::FromInt(1))); -+ -+ // Check function data field is actually a BytecodeArray object. -+ if (FLAG_debug_code) { -+ __ AssertNotSmi(kInterpreterBytecodeArrayRegister); -+ __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, -+ eax); -+ __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); -+ } -+ -+ // Reset code age. -+ __ mov_b(FieldOperand(kInterpreterBytecodeArrayRegister, -+ BytecodeArray::kBytecodeAgeOffset), -+ Immediate(BytecodeArray::kNoAgeBytecodeAge)); -+ -+ // Push bytecode array. -+ __ push(kInterpreterBytecodeArrayRegister); -+ // Push Smi tagged initial bytecode array offset. -+ __ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag))); -+ -+ // Allocate the local and temporary register file on the stack. -+ { -+ // Load frame size from the BytecodeArray object. -+ __ mov(ebx, FieldOperand(kInterpreterBytecodeArrayRegister, -+ BytecodeArray::kFrameSizeOffset)); -+ -+ // Do a stack check to ensure we don't go over the limit. -+ Label ok; -+ __ mov(ecx, esp); -+ __ sub(ecx, ebx); -+ ExternalReference stack_limit = -+ ExternalReference::address_of_real_stack_limit(masm->isolate()); -+ __ cmp(ecx, Operand::StaticVariable(stack_limit)); -+ __ j(above_equal, &ok); -+ __ CallRuntime(Runtime::kThrowStackOverflow); -+ __ bind(&ok); -+ -+ // If ok, push undefined as the initial value for all register file entries. -+ Label loop_header; -+ Label loop_check; -+ __ mov(eax, Immediate(masm->isolate()->factory()->undefined_value())); -+ __ jmp(&loop_check); -+ __ bind(&loop_header); -+ // TODO(rmcilroy): Consider doing more than one push per loop iteration. -+ __ push(eax); -+ // Continue loop if not done. -+ __ bind(&loop_check); -+ __ sub(ebx, Immediate(kPointerSize)); -+ __ j(greater_equal, &loop_header); -+ } -+ -+ // Load accumulator, bytecode offset and dispatch table into registers. -+ __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); -+ __ mov(kInterpreterBytecodeOffsetRegister, -+ Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); -+ __ mov(kInterpreterDispatchTableRegister, -+ Immediate(ExternalReference::interpreter_dispatch_table_address( -+ masm->isolate()))); -+ -+ // Dispatch to the first bytecode handler for the function. -+ __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, -+ kInterpreterBytecodeOffsetRegister, times_1, 0)); -+ __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, -+ times_pointer_size, 0)); -+ __ call(ebx); -+ masm->isolate()->heap()->SetInterpreterEntryReturnPCOffset(masm->pc_offset()); -+ -+ // The return value is in eax. -+ LeaveInterpreterFrame(masm, ebx, ecx); -+ __ ret(0); -+ -+ // Load debug copy of the bytecode array if it exists. -+ // kInterpreterBytecodeArrayRegister is already loaded with -+ // SharedFunctionInfo::kFunctionDataOffset. -+ __ bind(&maybe_load_debug_bytecode_array); -+ __ push(ebx); // feedback_vector == ebx, so save it. -+ __ mov(ecx, FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset)); -+ __ mov(ebx, FieldOperand(ecx, DebugInfo::kFlagsOffset)); -+ __ SmiUntag(ebx); -+ __ test(ebx, Immediate(DebugInfo::kHasBreakInfo)); -+ __ pop(ebx); -+ __ j(zero, &bytecode_array_loaded); -+ __ mov(kInterpreterBytecodeArrayRegister, -+ FieldOperand(ecx, DebugInfo::kDebugBytecodeArrayOffset)); -+ __ jmp(&bytecode_array_loaded); -+ -+ // If the shared code is no longer this entry trampoline, then the underlying -+ // function has been switched to a different kind of code and we heal the -+ // closure by switching the code entry field over to the new code as well. -+ __ bind(&switch_to_different_code_kind); -+ __ pop(edx); // Callee's new target. -+ __ pop(edi); // Callee's JS function. -+ __ pop(esi); // Callee's context. -+ __ leave(); // Leave the frame so we can tail call. -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); -+ __ RecordWriteCodeEntryField(edi, ecx, ebx); -+ __ jmp(ecx); -+} -+ -+static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, -+ Register scratch1, Register scratch2, -+ Label* stack_overflow, -+ bool include_receiver = false) { -+ // Check the stack for overflow. We are not trying to catch -+ // interruptions (e.g. debug break and preemption) here, so the "real stack -+ // limit" is checked. -+ ExternalReference real_stack_limit = -+ ExternalReference::address_of_real_stack_limit(masm->isolate()); -+ __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); -+ // Make scratch2 the space we have left. The stack might already be overflowed -+ // here which will cause scratch2 to become negative. -+ __ mov(scratch2, esp); -+ __ sub(scratch2, scratch1); -+ // Make scratch1 the space we need for the array when it is unrolled onto the -+ // stack. -+ __ mov(scratch1, num_args); -+ if (include_receiver) { -+ __ add(scratch1, Immediate(1)); -+ } -+ __ shl(scratch1, kPointerSizeLog2); -+ // Check if the arguments will overflow the stack. -+ __ cmp(scratch2, scratch1); -+ __ j(less_equal, stack_overflow); // Signed comparison. -+} -+ -+static void Generate_InterpreterPushArgs(MacroAssembler* masm, -+ Register array_limit, -+ Register start_address) { -+ // ----------- S t a t e ------------- -+ // -- start_address : Pointer to the last argument in the args array. -+ // -- array_limit : Pointer to one before the first argument in the -+ // args array. -+ // ----------------------------------- -+ Label loop_header, loop_check; -+ __ jmp(&loop_check); -+ __ bind(&loop_header); -+ __ Push(Operand(start_address, 0)); -+ __ sub(start_address, Immediate(kPointerSize)); -+ __ bind(&loop_check); -+ __ cmp(start_address, array_limit); -+ __ j(greater, &loop_header, Label::kNear); -+} -+ -+// static -+void Builtins::Generate_InterpreterPushArgsThenCallImpl( -+ MacroAssembler* masm, ConvertReceiverMode receiver_mode, -+ InterpreterPushArgsMode mode) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- ebx : the address of the first argument to be pushed. Subsequent -+ // arguments should be consecutive above this, in the same order as -+ // they are to be pushed onto the stack. -+ // -- edi : the target to call (can be any Object). -+ // ----------------------------------- -+ Label stack_overflow; -+ // Compute the expected number of arguments. -+ __ mov(ecx, eax); -+ __ add(ecx, Immediate(1)); // Add one for receiver. -+ -+ // Add a stack check before pushing the arguments. We need an extra register -+ // to perform a stack check. So push it onto the stack temporarily. This -+ // might cause stack overflow, but it will be detected by the check. -+ __ Push(edi); -+ Generate_StackOverflowCheck(masm, ecx, edx, edi, &stack_overflow); -+ __ Pop(edi); -+ -+ // Pop return address to allow tail-call after pushing arguments. -+ __ Pop(edx); -+ -+ // Push "undefined" as the receiver arg if we need to. -+ if (receiver_mode == ConvertReceiverMode::kNullOrUndefined) { -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ __ sub(ecx, Immediate(1)); // Subtract one for receiver. -+ } -+ -+ // Find the address of the last argument. -+ __ shl(ecx, kPointerSizeLog2); -+ __ neg(ecx); -+ __ add(ecx, ebx); -+ Generate_InterpreterPushArgs(masm, ecx, ebx); -+ -+ if (mode == InterpreterPushArgsMode::kWithFinalSpread) { -+ __ Pop(ebx); // Pass the spread in a register -+ __ sub(eax, Immediate(1)); // Subtract one for spread -+ } -+ -+ // Call the target. -+ __ Push(edx); // Re-push return address. -+ -+ if (mode == InterpreterPushArgsMode::kJSFunction) { -+ __ Jump( -+ masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny), -+ RelocInfo::CODE_TARGET); -+ } else if (mode == InterpreterPushArgsMode::kWithFinalSpread) { -+ __ Jump(masm->isolate()->builtins()->CallWithSpread(), -+ RelocInfo::CODE_TARGET); -+ } else { -+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny), -+ RelocInfo::CODE_TARGET); -+ } -+ -+ __ bind(&stack_overflow); -+ { -+ // Pop the temporary registers, so that return address is on top of stack. -+ __ Pop(edi); -+ -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ -+ // This should be unreachable. -+ __ int3(); -+ } -+} -+ -+namespace { -+ -+// This function modified start_addr, and only reads the contents of num_args -+// register. scratch1 and scratch2 are used as temporary registers. Their -+// original values are restored after the use. -+void Generate_InterpreterPushZeroAndArgsAndReturnAddress( -+ MacroAssembler* masm, Register num_args, Register start_addr, -+ Register scratch1, Register scratch2, int num_slots_above_ret_addr, -+ Label* stack_overflow) { -+ // We have to move return address and the temporary registers above it -+ // before we can copy arguments onto the stack. To achieve this: -+ // Step 1: Increment the stack pointer by num_args + 1 (for receiver). -+ // Step 2: Move the return address and values above it to the top of stack. -+ // Step 3: Copy the arguments into the correct locations. -+ // current stack =====> required stack layout -+ // | | | scratch1 | (2) <-- esp(1) -+ // | | | .... | (2) -+ // | | | scratch-n | (2) -+ // | | | return addr | (2) -+ // | | | arg N | (3) -+ // | scratch1 | <-- esp | .... | -+ // | .... | | arg 1 | -+ // | scratch-n | | arg 0 | -+ // | return addr | | receiver slot | -+ -+ // Check for stack overflow before we increment the stack pointer. -+ Generate_StackOverflowCheck(masm, num_args, scratch1, scratch2, -+ stack_overflow, true); -+ -+// Step 1 - Update the stack pointer. scratch1 already contains the required -+// increment to the stack. i.e. num_args + 1 stack slots. This is computed in -+// the Generate_StackOverflowCheck. -+ -+#ifdef _MSC_VER -+ // TODO(mythria): Move it to macro assembler. -+ // In windows, we cannot increment the stack size by more than one page -+ // (mimimum page size is 4KB) without accessing at least one byte on the -+ // page. Check this: -+ // https://msdn.microsoft.com/en-us/library/aa227153(v=vs.60).aspx. -+ const int page_size = 4 * 1024; -+ Label check_offset, update_stack_pointer; -+ __ bind(&check_offset); -+ __ cmp(scratch1, page_size); -+ __ j(less, &update_stack_pointer); -+ __ sub(esp, Immediate(page_size)); -+ // Just to touch the page, before we increment further. -+ __ mov(Operand(esp, 0), Immediate(0)); -+ __ sub(scratch1, Immediate(page_size)); -+ __ jmp(&check_offset); -+ __ bind(&update_stack_pointer); -+#endif -+ -+ __ sub(esp, scratch1); -+ -+ // Step 2 move return_address and slots above it to the correct locations. -+ // Move from top to bottom, otherwise we may overwrite when num_args = 0 or 1, -+ // basically when the source and destination overlap. We at least need one -+ // extra slot for receiver, so no extra checks are required to avoid copy. -+ for (int i = 0; i < num_slots_above_ret_addr + 1; i++) { -+ __ mov(scratch1, -+ Operand(esp, num_args, times_pointer_size, (i + 1) * kPointerSize)); -+ __ mov(Operand(esp, i * kPointerSize), scratch1); -+ } -+ -+ // Step 3 copy arguments to correct locations. -+ // Slot meant for receiver contains return address. Reset it so that -+ // we will not incorrectly interpret return address as an object. -+ __ mov(Operand(esp, num_args, times_pointer_size, -+ (num_slots_above_ret_addr + 1) * kPointerSize), -+ Immediate(0)); -+ __ mov(scratch1, num_args); -+ -+ Label loop_header, loop_check; -+ __ jmp(&loop_check); -+ __ bind(&loop_header); -+ __ mov(scratch2, Operand(start_addr, 0)); -+ __ mov(Operand(esp, scratch1, times_pointer_size, -+ num_slots_above_ret_addr * kPointerSize), -+ scratch2); -+ __ sub(start_addr, Immediate(kPointerSize)); -+ __ sub(scratch1, Immediate(1)); -+ __ bind(&loop_check); -+ __ cmp(scratch1, Immediate(0)); -+ __ j(greater, &loop_header, Label::kNear); -+} -+ -+} // end anonymous namespace -+ -+// static -+void Builtins::Generate_InterpreterPushArgsThenConstructImpl( -+ MacroAssembler* masm, InterpreterPushArgsMode mode) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the new target -+ // -- edi : the constructor -+ // -- ebx : allocation site feedback (if available or undefined) -+ // -- ecx : the address of the first argument to be pushed. Subsequent -+ // arguments should be consecutive above this, in the same order as -+ // they are to be pushed onto the stack. -+ // ----------------------------------- -+ Label stack_overflow; -+ // We need two scratch registers. Push edi and edx onto stack. -+ __ Push(edi); -+ __ Push(edx); -+ -+ // Push arguments and move return address to the top of stack. -+ // The eax register is readonly. The ecx register will be modified. The edx -+ // and edi registers will be modified but restored to their original values. -+ Generate_InterpreterPushZeroAndArgsAndReturnAddress(masm, eax, ecx, edx, edi, -+ 2, &stack_overflow); -+ -+ // Restore edi and edx -+ __ Pop(edx); -+ __ Pop(edi); -+ -+ if (mode == InterpreterPushArgsMode::kWithFinalSpread) { -+ __ PopReturnAddressTo(ecx); -+ __ Pop(ebx); // Pass the spread in a register -+ __ PushReturnAddressFrom(ecx); -+ __ sub(eax, Immediate(1)); // Subtract one for spread -+ } else { -+ __ AssertUndefinedOrAllocationSite(ebx); -+ } -+ -+ if (mode == InterpreterPushArgsMode::kJSFunction) { -+ // Tail call to the function-specific construct stub (still in the caller -+ // context at this point). -+ __ AssertFunction(edi); -+ -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+ } else if (mode == InterpreterPushArgsMode::kWithFinalSpread) { -+ // Call the constructor with unmodified eax, edi, edx values. -+ __ Jump(masm->isolate()->builtins()->ConstructWithSpread(), -+ RelocInfo::CODE_TARGET); -+ } else { -+ DCHECK_EQ(InterpreterPushArgsMode::kOther, mode); -+ // Call the constructor with unmodified eax, edi, edx values. -+ __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); -+ } -+ -+ __ bind(&stack_overflow); -+ { -+ // Pop the temporary registers, so that return address is on top of stack. -+ __ Pop(edx); -+ __ Pop(edi); -+ -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ -+ // This should be unreachable. -+ __ int3(); -+ } -+} -+ -+// static -+void Builtins::Generate_InterpreterPushArgsThenConstructArray( -+ MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the target to call checked to be Array function. -+ // -- ebx : the allocation site feedback -+ // -- ecx : the address of the first argument to be pushed. Subsequent -+ // arguments should be consecutive above this, in the same order as -+ // they are to be pushed onto the stack. -+ // ----------------------------------- -+ Label stack_overflow; -+ // We need two scratch registers. Register edi is available, push edx onto -+ // stack. -+ __ Push(edx); -+ -+ // Push arguments and move return address to the top of stack. -+ // The eax register is readonly. The ecx register will be modified. The edx -+ // and edi registers will be modified but restored to their original values. -+ Generate_InterpreterPushZeroAndArgsAndReturnAddress(masm, eax, ecx, edx, edi, -+ 1, &stack_overflow); -+ -+ // Restore edx. -+ __ Pop(edx); -+ -+ // Array constructor expects constructor in edi. It is same as edx here. -+ __ Move(edi, edx); -+ -+ ArrayConstructorStub stub(masm->isolate()); -+ __ TailCallStub(&stub); -+ -+ __ bind(&stack_overflow); -+ { -+ // Pop the temporary registers, so that return address is on top of stack. -+ __ Pop(edx); -+ -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ -+ // This should be unreachable. -+ __ int3(); -+ } -+} -+ -+static void Generate_InterpreterEnterBytecode(MacroAssembler* masm) { -+ // Set the return address to the correct point in the interpreter entry -+ // trampoline. -+ Smi* interpreter_entry_return_pc_offset( -+ masm->isolate()->heap()->interpreter_entry_return_pc_offset()); -+ DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero); -+ __ Move(ebx, masm->isolate()->builtins()->InterpreterEntryTrampoline()); -+ __ add(ebx, Immediate(interpreter_entry_return_pc_offset->value() + -+ Code::kHeaderSize - kHeapObjectTag)); -+ __ push(ebx); -+ -+ // Initialize the dispatch table register. -+ __ mov(kInterpreterDispatchTableRegister, -+ Immediate(ExternalReference::interpreter_dispatch_table_address( -+ masm->isolate()))); -+ -+ // Get the bytecode array pointer from the frame. -+ __ mov(kInterpreterBytecodeArrayRegister, -+ Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); -+ -+ if (FLAG_debug_code) { -+ // Check function data field is actually a BytecodeArray object. -+ __ AssertNotSmi(kInterpreterBytecodeArrayRegister); -+ __ CmpObjectType(kInterpreterBytecodeArrayRegister, BYTECODE_ARRAY_TYPE, -+ ebx); -+ __ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); -+ } -+ -+ // Get the target bytecode offset from the frame. -+ __ mov(kInterpreterBytecodeOffsetRegister, -+ Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); -+ __ SmiUntag(kInterpreterBytecodeOffsetRegister); -+ -+ // Dispatch to the target bytecode. -+ __ movzx_b(ebx, Operand(kInterpreterBytecodeArrayRegister, -+ kInterpreterBytecodeOffsetRegister, times_1, 0)); -+ __ mov(ebx, Operand(kInterpreterDispatchTableRegister, ebx, -+ times_pointer_size, 0)); -+ __ jmp(ebx); -+} -+ -+void Builtins::Generate_InterpreterEnterBytecodeAdvance(MacroAssembler* masm) { -+ // Advance the current bytecode offset stored within the given interpreter -+ // stack frame. This simulates what all bytecode handlers do upon completion -+ // of the underlying operation. -+ __ mov(ebx, Operand(ebp, InterpreterFrameConstants::kBytecodeArrayFromFp)); -+ __ mov(edx, Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp)); -+ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(kInterpreterAccumulatorRegister); -+ __ Push(ebx); // First argument is the bytecode array. -+ __ Push(edx); // Second argument is the bytecode offset. -+ __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); -+ __ Move(edx, eax); // Result is the new bytecode offset. -+ __ Pop(kInterpreterAccumulatorRegister); -+ } -+ __ mov(Operand(ebp, InterpreterFrameConstants::kBytecodeOffsetFromFp), edx); -+ -+ Generate_InterpreterEnterBytecode(masm); -+} -+ -+void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { -+ Generate_InterpreterEnterBytecode(masm); -+} -+ -+void Builtins::Generate_CheckOptimizationMarker(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- rax : argument count (preserved for callee) -+ // -- rdx : new target (preserved for callee) -+ // -- rdi : target function (preserved for callee) -+ // ----------------------------------- -+ Register closure = edi; -+ -+ // Get the feedback vector. -+ Register feedback_vector = ebx; -+ __ mov(feedback_vector, -+ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); -+ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); -+ -+ // The feedback vector must be defined. -+ if (FLAG_debug_code) { -+ __ CompareRoot(feedback_vector, Heap::kUndefinedValueRootIndex); -+ __ Assert(not_equal, BailoutReason::kExpectedFeedbackVector); -+ } -+ -+ // Is there an optimization marker or optimized code in the feedback vector? -+ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); -+ -+ // Otherwise, tail call the SFI code. -+ GenerateTailCallToSharedCode(masm); -+} -+ -+void Builtins::Generate_CompileLazy(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argument count (preserved for callee) -+ // -- edx : new target (preserved for callee) -+ // -- edi : target function (preserved for callee) -+ // ----------------------------------- -+ // First lookup code, maybe we don't need to compile! -+ Label gotta_call_runtime; -+ -+ Register closure = edi; -+ Register feedback_vector = ebx; -+ -+ // Do we have a valid feedback vector? -+ __ mov(feedback_vector, -+ FieldOperand(closure, JSFunction::kFeedbackVectorOffset)); -+ __ mov(feedback_vector, FieldOperand(feedback_vector, Cell::kValueOffset)); -+ __ JumpIfRoot(feedback_vector, Heap::kUndefinedValueRootIndex, -+ &gotta_call_runtime); -+ -+ // Is there an optimization marker or optimized code in the feedback vector? -+ MaybeTailCallOptimizedCodeSlot(masm, feedback_vector, ecx); -+ -+ // We found no optimized code. -+ Register entry = ecx; -+ __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); -+ -+ // If SFI points to anything other than CompileLazy, install that. -+ __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); -+ __ Move(ebx, masm->CodeObject()); -+ __ cmp(entry, ebx); -+ __ j(equal, &gotta_call_runtime); -+ -+ // Install the SFI's code entry. -+ __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); -+ __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); -+ __ RecordWriteCodeEntryField(closure, entry, ebx); -+ __ jmp(entry); -+ -+ __ bind(&gotta_call_runtime); -+ GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); -+} -+ -+void Builtins::Generate_InstantiateAsmJs(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argument count (preserved for callee) -+ // -- edx : new target (preserved for callee) -+ // -- edi : target function (preserved for callee) -+ // ----------------------------------- -+ Label failed; -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // Preserve argument count for later compare. -+ __ mov(ecx, eax); -+ // Push the number of arguments to the callee. -+ __ SmiTag(eax); -+ __ push(eax); -+ // Push a copy of the target function and the new target. -+ __ push(edi); -+ __ push(edx); -+ -+ // The function. -+ __ push(edi); -+ // Copy arguments from caller (stdlib, foreign, heap). -+ Label args_done; -+ for (int j = 0; j < 4; ++j) { -+ Label over; -+ if (j < 3) { -+ __ cmp(ecx, Immediate(j)); -+ __ j(not_equal, &over, Label::kNear); -+ } -+ for (int i = j - 1; i >= 0; --i) { -+ __ Push(Operand( -+ ebp, StandardFrameConstants::kCallerSPOffset + i * kPointerSize)); -+ } -+ for (int i = 0; i < 3 - j; ++i) { -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ } -+ if (j < 3) { -+ __ jmp(&args_done, Label::kNear); -+ __ bind(&over); -+ } -+ } -+ __ bind(&args_done); -+ -+ // Call runtime, on success unwind frame, and parent frame. -+ __ CallRuntime(Runtime::kInstantiateAsmJs, 4); -+ // A smi 0 is returned on failure, an object on success. -+ __ JumpIfSmi(eax, &failed, Label::kNear); -+ -+ __ Drop(2); -+ __ Pop(ecx); -+ __ SmiUntag(ecx); -+ scope.GenerateLeaveFrame(); -+ -+ __ PopReturnAddressTo(ebx); -+ __ inc(ecx); -+ __ lea(esp, Operand(esp, ecx, times_pointer_size, 0)); -+ __ PushReturnAddressFrom(ebx); -+ __ ret(0); -+ -+ __ bind(&failed); -+ // Restore target function and new target. -+ __ pop(edx); -+ __ pop(edi); -+ __ pop(eax); -+ __ SmiUntag(eax); -+ } -+ // On failure, tail call back to regular js. -+ GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); -+} -+ -+static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { -+ // For now, we are relying on the fact that make_code_young doesn't do any -+ // garbage collection which allows us to save/restore the registers without -+ // worrying about which of them contain pointers. We also don't build an -+ // internal frame to make the code faster, since we shouldn't have to do stack -+ // crawls in MakeCodeYoung. This seems a bit fragile. -+ -+ // Re-execute the code that was patched back to the young age when -+ // the stub returns. -+ __ sub(Operand(esp, 0), Immediate(5)); -+ __ pushad(); -+ __ mov(eax, Operand(esp, 8 * kPointerSize)); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ PrepareCallCFunction(2, ebx); -+ __ mov(Operand(esp, 1 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(masm->isolate()))); -+ __ mov(Operand(esp, 0), eax); -+ __ CallCFunction( -+ ExternalReference::get_make_code_young_function(masm->isolate()), 2); -+ } -+ __ popad(); -+ __ ret(0); -+} -+ -+#define DEFINE_CODE_AGE_BUILTIN_GENERATOR(C) \ -+ void Builtins::Generate_Make##C##CodeYoungAgain(MacroAssembler* masm) { \ -+ GenerateMakeCodeYoungAgainCommon(masm); \ -+ } -+CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) -+#undef DEFINE_CODE_AGE_BUILTIN_GENERATOR -+ -+void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) { -+ // For now, as in GenerateMakeCodeYoungAgainCommon, we are relying on the fact -+ // that make_code_young doesn't do any garbage collection which allows us to -+ // save/restore the registers without worrying about which of them contain -+ // pointers. -+ __ pushad(); -+ __ mov(eax, Operand(esp, 8 * kPointerSize)); -+ __ sub(eax, Immediate(Assembler::kCallInstructionLength)); -+ { // NOLINT -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ PrepareCallCFunction(2, ebx); -+ __ mov(Operand(esp, 1 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(masm->isolate()))); -+ __ mov(Operand(esp, 0), eax); -+ __ CallCFunction( -+ ExternalReference::get_mark_code_as_executed_function(masm->isolate()), -+ 2); -+ } -+ __ popad(); -+ -+ // Perform prologue operations usually performed by the young code stub. -+ __ pop(eax); // Pop return address into scratch register. -+ __ push(ebp); // Caller's frame pointer. -+ __ mov(ebp, esp); -+ __ push(esi); // Callee's context. -+ __ push(edi); // Callee's JS Function. -+ __ push(eax); // Push return address after frame prologue. -+ -+ // Jump to point after the code-age stub. -+ __ ret(0); -+} -+ -+void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { -+ GenerateMakeCodeYoungAgainCommon(masm); -+} -+ -+void Builtins::Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm) { -+ Generate_MarkCodeAsExecutedOnce(masm); -+} -+ -+void Builtins::Generate_NotifyBuiltinContinuation(MacroAssembler* masm) { -+ // Enter an internal frame. -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // Preserve possible return result from lazy deopt. -+ __ push(eax); -+ __ CallRuntime(Runtime::kNotifyStubFailure, false); -+ __ pop(eax); -+ // Tear down internal frame. -+ } -+ -+ __ pop(MemOperand(esp, 0)); // Ignore state offset -+ __ ret(0); // Return to ContinueToBuiltin stub still on stack. -+} -+ -+namespace { -+void Generate_ContinueToBuiltinHelper(MacroAssembler* masm, -+ bool java_script_builtin, -+ bool with_result) { -+ const RegisterConfiguration* config(RegisterConfiguration::Turbofan()); -+ int allocatable_register_count = config->num_allocatable_general_registers(); -+ if (with_result) { -+ // Overwrite the hole inserted by the deoptimizer with the return value from -+ // the LAZY deopt point. -+ __ mov(Operand(esp, -+ config->num_allocatable_general_registers() * kPointerSize + -+ BuiltinContinuationFrameConstants::kFixedFrameSize), -+ eax); -+ } -+ for (int i = allocatable_register_count - 1; i >= 0; --i) { -+ int code = config->GetAllocatableGeneralCode(i); -+ __ pop(Register::from_code(code)); -+ if (java_script_builtin && code == kJavaScriptCallArgCountRegister.code()) { -+ __ SmiUntag(Register::from_code(code)); -+ } -+ } -+ __ mov( -+ ebp, -+ Operand(esp, BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp)); -+ const int offsetToPC = -+ BuiltinContinuationFrameConstants::kFixedFrameSizeFromFp - kPointerSize; -+ __ pop(Operand(esp, offsetToPC)); -+ __ Drop(offsetToPC / kPointerSize); -+ __ add(Operand(esp, 0), Immediate(Code::kHeaderSize - kHeapObjectTag)); -+ __ ret(0); -+} -+} // namespace -+ -+void Builtins::Generate_ContinueToCodeStubBuiltin(MacroAssembler* masm) { -+ Generate_ContinueToBuiltinHelper(masm, false, false); -+} -+ -+void Builtins::Generate_ContinueToCodeStubBuiltinWithResult( -+ MacroAssembler* masm) { -+ Generate_ContinueToBuiltinHelper(masm, false, true); -+} -+ -+void Builtins::Generate_ContinueToJavaScriptBuiltin(MacroAssembler* masm) { -+ Generate_ContinueToBuiltinHelper(masm, true, false); -+} -+ -+void Builtins::Generate_ContinueToJavaScriptBuiltinWithResult( -+ MacroAssembler* masm) { -+ Generate_ContinueToBuiltinHelper(masm, true, true); -+} -+ -+static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, -+ Deoptimizer::BailoutType type) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Pass deoptimization type to the runtime system. -+ __ push(Immediate(Smi::FromInt(static_cast(type)))); -+ __ CallRuntime(Runtime::kNotifyDeoptimized); -+ -+ // Tear down internal frame. -+ } -+ -+ // Get the full codegen state from the stack and untag it. -+ __ mov(ecx, Operand(esp, 1 * kPointerSize)); -+ __ SmiUntag(ecx); -+ -+ // Switch on the state. -+ Label not_no_registers, not_tos_eax; -+ __ cmp(ecx, static_cast(Deoptimizer::BailoutState::NO_REGISTERS)); -+ __ j(not_equal, ¬_no_registers, Label::kNear); -+ __ ret(1 * kPointerSize); // Remove state. -+ -+ __ bind(¬_no_registers); -+ DCHECK_EQ(kInterpreterAccumulatorRegister.code(), eax.code()); -+ __ mov(eax, Operand(esp, 2 * kPointerSize)); -+ __ cmp(ecx, static_cast(Deoptimizer::BailoutState::TOS_REGISTER)); -+ __ j(not_equal, ¬_tos_eax, Label::kNear); -+ __ ret(2 * kPointerSize); // Remove state, eax. -+ -+ __ bind(¬_tos_eax); -+ __ Abort(kNoCasesLeft); -+} -+ -+void Builtins::Generate_NotifyDeoptimized(MacroAssembler* masm) { -+ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); -+} -+ -+void Builtins::Generate_NotifySoftDeoptimized(MacroAssembler* masm) { -+ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::SOFT); -+} -+ -+void Builtins::Generate_NotifyLazyDeoptimized(MacroAssembler* masm) { -+ Generate_NotifyDeoptimizedHelper(masm, Deoptimizer::LAZY); -+} -+ -+// static -+void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- esp[0] : return address -+ // -- esp[4] : argArray -+ // -- esp[8] : thisArg -+ // -- esp[12] : receiver -+ // ----------------------------------- -+ -+ // 1. Load receiver into edi, argArray into ebx (if present), remove all -+ // arguments from the stack (including the receiver), and push thisArg (if -+ // present) instead. -+ { -+ Label no_arg_array, no_this_arg; -+ __ LoadRoot(edx, Heap::kUndefinedValueRootIndex); -+ __ mov(ebx, edx); -+ __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ __ test(eax, eax); -+ __ j(zero, &no_this_arg, Label::kNear); -+ { -+ __ mov(edx, Operand(esp, eax, times_pointer_size, 0)); -+ __ cmp(eax, Immediate(1)); -+ __ j(equal, &no_arg_array, Label::kNear); -+ __ mov(ebx, Operand(esp, eax, times_pointer_size, -kPointerSize)); -+ __ bind(&no_arg_array); -+ } -+ __ bind(&no_this_arg); -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ } -+ -+ // ----------- S t a t e ------------- -+ // -- ebx : argArray -+ // -- edi : receiver -+ // -- esp[0] : return address -+ // -- esp[4] : thisArg -+ // ----------------------------------- -+ -+ // 2. We don't need to check explicitly for callable receiver here, -+ // since that's the first thing the Call/CallWithArrayLike builtins -+ // will do. -+ -+ // 3. Tail call with no arguments if argArray is null or undefined. -+ Label no_arguments; -+ __ JumpIfRoot(ebx, Heap::kNullValueRootIndex, &no_arguments, Label::kNear); -+ __ JumpIfRoot(ebx, Heap::kUndefinedValueRootIndex, &no_arguments, -+ Label::kNear); -+ -+ // 4a. Apply the receiver to the given argArray. -+ __ Jump(masm->isolate()->builtins()->CallWithArrayLike(), -+ RelocInfo::CODE_TARGET); -+ -+ // 4b. The argArray is either null or undefined, so we tail call without any -+ // arguments to the receiver. -+ __ bind(&no_arguments); -+ { -+ __ Set(eax, 0); -+ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); -+ } -+} -+ -+// static -+void Builtins::Generate_FunctionPrototypeCall(MacroAssembler* masm) { -+ // Stack Layout: -+ // esp[0] : Return address -+ // esp[8] : Argument n -+ // esp[16] : Argument n-1 -+ // ... -+ // esp[8 * n] : Argument 1 -+ // esp[8 * (n + 1)] : Receiver (callable to call) -+ // -+ // eax contains the number of arguments, n, not counting the receiver. -+ // -+ // 1. Make sure we have at least one argument. -+ { -+ Label done; -+ __ test(eax, eax); -+ __ j(not_zero, &done, Label::kNear); -+ __ PopReturnAddressTo(ebx); -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ __ PushReturnAddressFrom(ebx); -+ __ inc(eax); -+ __ bind(&done); -+ } -+ -+ // 2. Get the callable to call (passed as receiver) from the stack. -+ __ mov(edi, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ -+ // 3. Shift arguments and return address one slot down on the stack -+ // (overwriting the original receiver). Adjust argument count to make -+ // the original first argument the new receiver. -+ { -+ Label loop; -+ __ mov(ecx, eax); -+ __ bind(&loop); -+ __ mov(ebx, Operand(esp, ecx, times_pointer_size, 0)); -+ __ mov(Operand(esp, ecx, times_pointer_size, kPointerSize), ebx); -+ __ dec(ecx); -+ __ j(not_sign, &loop); // While non-negative (to copy return address). -+ __ pop(ebx); // Discard copy of return address. -+ __ dec(eax); // One fewer argument (first argument is new receiver). -+ } -+ -+ // 4. Call the callable. -+ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); -+} -+ -+void Builtins::Generate_ReflectApply(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- esp[0] : return address -+ // -- esp[4] : argumentsList -+ // -- esp[8] : thisArgument -+ // -- esp[12] : target -+ // -- esp[16] : receiver -+ // ----------------------------------- -+ -+ // 1. Load target into edi (if present), argumentsList into ebx (if present), -+ // remove all arguments from the stack (including the receiver), and push -+ // thisArgument (if present) instead. -+ { -+ Label done; -+ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); -+ __ mov(edx, edi); -+ __ mov(ebx, edi); -+ __ cmp(eax, Immediate(1)); -+ __ j(below, &done, Label::kNear); -+ __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); -+ __ j(equal, &done, Label::kNear); -+ __ mov(edx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); -+ __ cmp(eax, Immediate(3)); -+ __ j(below, &done, Label::kNear); -+ __ mov(ebx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); -+ __ bind(&done); -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ } -+ -+ // ----------- S t a t e ------------- -+ // -- ebx : argumentsList -+ // -- edi : target -+ // -- esp[0] : return address -+ // -- esp[4] : thisArgument -+ // ----------------------------------- -+ -+ // 2. We don't need to check explicitly for callable target here, -+ // since that's the first thing the Call/CallWithArrayLike builtins -+ // will do. -+ -+ // 3. Apply the target to the given argumentsList. -+ __ Jump(masm->isolate()->builtins()->CallWithArrayLike(), -+ RelocInfo::CODE_TARGET); -+} -+ -+void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- esp[0] : return address -+ // -- esp[4] : new.target (optional) -+ // -- esp[8] : argumentsList -+ // -- esp[12] : target -+ // -- esp[16] : receiver -+ // ----------------------------------- -+ -+ // 1. Load target into edi (if present), argumentsList into ebx (if present), -+ // new.target into edx (if present, otherwise use target), remove all -+ // arguments from the stack (including the receiver), and push thisArgument -+ // (if present) instead. -+ { -+ Label done; -+ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); -+ __ mov(edx, edi); -+ __ mov(ebx, edi); -+ __ cmp(eax, Immediate(1)); -+ __ j(below, &done, Label::kNear); -+ __ mov(edi, Operand(esp, eax, times_pointer_size, -0 * kPointerSize)); -+ __ mov(edx, edi); -+ __ j(equal, &done, Label::kNear); -+ __ mov(ebx, Operand(esp, eax, times_pointer_size, -1 * kPointerSize)); -+ __ cmp(eax, Immediate(3)); -+ __ j(below, &done, Label::kNear); -+ __ mov(edx, Operand(esp, eax, times_pointer_size, -2 * kPointerSize)); -+ __ bind(&done); -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ __ PushReturnAddressFrom(ecx); -+ } -+ -+ // ----------- S t a t e ------------- -+ // -- ebx : argumentsList -+ // -- edx : new.target -+ // -- edi : target -+ // -- esp[0] : return address -+ // -- esp[4] : receiver (undefined) -+ // ----------------------------------- -+ -+ // 2. We don't need to check explicitly for constructor target here, -+ // since that's the first thing the Construct/ConstructWithArrayLike -+ // builtins will do. -+ -+ // 3. We don't need to check explicitly for constructor new.target here, -+ // since that's the second thing the Construct/ConstructWithArrayLike -+ // builtins will do. -+ -+ // 4. Construct the target with the given new.target and argumentsList. -+ __ Jump(masm->isolate()->builtins()->ConstructWithArrayLike(), -+ RelocInfo::CODE_TARGET); -+} -+ -+void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // ----------------------------------- -+ Label generic_array_code; -+ -+ // Get the InternalArray function. -+ __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, edi); -+ -+ if (FLAG_debug_code) { -+ // Initial map for the builtin InternalArray function should be a map. -+ __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); -+ // Will both indicate a NULL and a Smi. -+ __ test(ebx, Immediate(kSmiTagMask)); -+ __ Assert(not_zero, kUnexpectedInitialMapForInternalArrayFunction); -+ __ CmpObjectType(ebx, MAP_TYPE, ecx); -+ __ Assert(equal, kUnexpectedInitialMapForInternalArrayFunction); -+ } -+ -+ // Run the native code for the InternalArray function called as a normal -+ // function. -+ // tail call a stub -+ InternalArrayConstructorStub stub(masm->isolate()); -+ __ TailCallStub(&stub); -+} -+ -+void Builtins::Generate_ArrayCode(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // ----------------------------------- -+ Label generic_array_code; -+ -+ // Get the Array function. -+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, edi); -+ __ mov(edx, edi); -+ -+ if (FLAG_debug_code) { -+ // Initial map for the builtin Array function should be a map. -+ __ mov(ebx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); -+ // Will both indicate a NULL and a Smi. -+ __ test(ebx, Immediate(kSmiTagMask)); -+ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); -+ __ CmpObjectType(ebx, MAP_TYPE, ecx); -+ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); -+ } -+ -+ // Run the native code for the Array function called as a normal function. -+ // tail call a stub -+ __ mov(ebx, masm->isolate()->factory()->undefined_value()); -+ ArrayConstructorStub stub(masm->isolate()); -+ __ TailCallStub(&stub); -+} -+ -+// static -+void Builtins::Generate_NumberConstructor(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments -+ // -- edi : constructor function -+ // -- esi : context -+ // -- esp[0] : return address -+ // -- esp[(argc - n) * 4] : arg[n] (zero-based) -+ // -- esp[(argc + 1) * 4] : receiver -+ // ----------------------------------- -+ -+ // 1. Load the first argument into ebx. -+ Label no_arguments; -+ { -+ __ test(eax, eax); -+ __ j(zero, &no_arguments, Label::kNear); -+ __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); -+ } -+ -+ // 2a. Convert the first argument to a number. -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ SmiTag(eax); -+ __ EnterBuiltinFrame(esi, edi, eax); -+ __ mov(eax, ebx); -+ __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); -+ __ LeaveBuiltinFrame(esi, edi, ebx); // Argc popped to ebx. -+ __ SmiUntag(ebx); -+ } -+ -+ { -+ // Drop all arguments including the receiver. -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); -+ __ PushReturnAddressFrom(ecx); -+ __ Ret(); -+ } -+ -+ // 2b. No arguments, return +0 (already in eax). -+ __ bind(&no_arguments); -+ __ ret(1 * kPointerSize); -+} -+ -+// static -+void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments -+ // -- edi : constructor function -+ // -- edx : new target -+ // -- esi : context -+ // -- esp[0] : return address -+ // -- esp[(argc - n) * 4] : arg[n] (zero-based) -+ // -- esp[(argc + 1) * 4] : receiver -+ // ----------------------------------- -+ -+ // 1. Make sure we operate in the context of the called function. -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ // Store argc in r8. -+ __ mov(ecx, eax); -+ __ SmiTag(ecx); -+ -+ // 2. Load the first argument into ebx. -+ { -+ Label no_arguments, done; -+ __ test(eax, eax); -+ __ j(zero, &no_arguments, Label::kNear); -+ __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); -+ __ jmp(&done, Label::kNear); -+ __ bind(&no_arguments); -+ __ Move(ebx, Smi::kZero); -+ __ bind(&done); -+ } -+ -+ // 3. Make sure ebx is a number. -+ { -+ Label done_convert; -+ __ JumpIfSmi(ebx, &done_convert); -+ __ CompareRoot(FieldOperand(ebx, HeapObject::kMapOffset), -+ Heap::kHeapNumberMapRootIndex); -+ __ j(equal, &done_convert); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ EnterBuiltinFrame(esi, edi, ecx); -+ __ Push(edx); -+ __ Move(eax, ebx); -+ __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); -+ __ Move(ebx, eax); -+ __ Pop(edx); -+ __ LeaveBuiltinFrame(esi, edi, ecx); -+ } -+ __ bind(&done_convert); -+ } -+ -+ // 4. Check if new target and constructor differ. -+ Label drop_frame_and_ret, done_alloc, new_object; -+ __ cmp(edx, edi); -+ __ j(not_equal, &new_object); -+ -+ // 5. Allocate a JSValue wrapper for the number. -+ __ AllocateJSValue(eax, edi, ebx, esi, &done_alloc); -+ __ jmp(&drop_frame_and_ret); -+ -+ __ bind(&done_alloc); -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); // Restore esi. -+ -+ // 6. Fallback to the runtime to create new object. -+ __ bind(&new_object); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ EnterBuiltinFrame(esi, edi, ecx); -+ __ Push(ebx); // the first argument -+ __ Call(masm->isolate()->builtins()->FastNewObject(), -+ RelocInfo::CODE_TARGET); -+ __ Pop(FieldOperand(eax, JSValue::kValueOffset)); -+ __ LeaveBuiltinFrame(esi, edi, ecx); -+ } -+ -+ __ bind(&drop_frame_and_ret); -+ { -+ // Drop all arguments including the receiver. -+ __ PopReturnAddressTo(esi); -+ __ SmiUntag(ecx); -+ __ lea(esp, Operand(esp, ecx, times_pointer_size, kPointerSize)); -+ __ PushReturnAddressFrom(esi); -+ __ Ret(); -+ } -+} -+ -+// static -+void Builtins::Generate_StringConstructor(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments -+ // -- edi : constructor function -+ // -- esi : context -+ // -- esp[0] : return address -+ // -- esp[(argc - n) * 4] : arg[n] (zero-based) -+ // -- esp[(argc + 1) * 4] : receiver -+ // ----------------------------------- -+ -+ // 1. Load the first argument into eax. -+ Label no_arguments; -+ { -+ __ mov(ebx, eax); // Store argc in ebx. -+ __ test(eax, eax); -+ __ j(zero, &no_arguments, Label::kNear); -+ __ mov(eax, Operand(esp, eax, times_pointer_size, 0)); -+ } -+ -+ // 2a. At least one argument, return eax if it's a string, otherwise -+ // dispatch to appropriate conversion. -+ Label drop_frame_and_ret, to_string, symbol_descriptive_string; -+ { -+ __ JumpIfSmi(eax, &to_string, Label::kNear); -+ STATIC_ASSERT(FIRST_NONSTRING_TYPE == SYMBOL_TYPE); -+ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); -+ __ j(above, &to_string, Label::kNear); -+ __ j(equal, &symbol_descriptive_string, Label::kNear); -+ __ jmp(&drop_frame_and_ret, Label::kNear); -+ } -+ -+ // 2b. No arguments, return the empty string (and pop the receiver). -+ __ bind(&no_arguments); -+ { -+ __ LoadRoot(eax, Heap::kempty_stringRootIndex); -+ __ ret(1 * kPointerSize); -+ } -+ -+ // 3a. Convert eax to a string. -+ __ bind(&to_string); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ SmiTag(ebx); -+ __ EnterBuiltinFrame(esi, edi, ebx); -+ __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); -+ __ LeaveBuiltinFrame(esi, edi, ebx); -+ __ SmiUntag(ebx); -+ } -+ __ jmp(&drop_frame_and_ret, Label::kNear); -+ -+ // 3b. Convert symbol in eax to a string. -+ __ bind(&symbol_descriptive_string); -+ { -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); -+ __ Push(eax); -+ __ PushReturnAddressFrom(ecx); -+ __ TailCallRuntime(Runtime::kSymbolDescriptiveString); -+ } -+ -+ __ bind(&drop_frame_and_ret); -+ { -+ // Drop all arguments including the receiver. -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); -+ __ PushReturnAddressFrom(ecx); -+ __ Ret(); -+ } -+} -+ -+// static -+void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : number of arguments -+ // -- edi : constructor function -+ // -- edx : new target -+ // -- esi : context -+ // -- esp[0] : return address -+ // -- esp[(argc - n) * 4] : arg[n] (zero-based) -+ // -- esp[(argc + 1) * 4] : receiver -+ // ----------------------------------- -+ -+ // 1. Make sure we operate in the context of the called function. -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ __ mov(ebx, eax); -+ -+ // 2. Load the first argument into eax. -+ { -+ Label no_arguments, done; -+ __ test(ebx, ebx); -+ __ j(zero, &no_arguments, Label::kNear); -+ __ mov(eax, Operand(esp, ebx, times_pointer_size, 0)); -+ __ jmp(&done, Label::kNear); -+ __ bind(&no_arguments); -+ __ LoadRoot(eax, Heap::kempty_stringRootIndex); -+ __ bind(&done); -+ } -+ -+ // 3. Make sure eax is a string. -+ { -+ Label convert, done_convert; -+ __ JumpIfSmi(eax, &convert, Label::kNear); -+ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ecx); -+ __ j(below, &done_convert); -+ __ bind(&convert); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ SmiTag(ebx); -+ __ EnterBuiltinFrame(esi, edi, ebx); -+ __ Push(edx); -+ __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); -+ __ Pop(edx); -+ __ LeaveBuiltinFrame(esi, edi, ebx); -+ __ SmiUntag(ebx); -+ } -+ __ bind(&done_convert); -+ } -+ -+ // 4. Check if new target and constructor differ. -+ Label drop_frame_and_ret, done_alloc, new_object; -+ __ cmp(edx, edi); -+ __ j(not_equal, &new_object); -+ -+ // 5. Allocate a JSValue wrapper for the string. -+ // AllocateJSValue can't handle src == dst register. Reuse esi and restore it -+ // as needed after the call. -+ __ mov(esi, eax); -+ __ AllocateJSValue(eax, edi, esi, ecx, &done_alloc); -+ __ jmp(&drop_frame_and_ret); -+ -+ __ bind(&done_alloc); -+ { -+ // Restore eax to the first argument and esi to the context. -+ __ mov(eax, esi); -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ } -+ -+ // 6. Fallback to the runtime to create new object. -+ __ bind(&new_object); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ SmiTag(ebx); -+ __ EnterBuiltinFrame(esi, edi, ebx); -+ __ Push(eax); // the first argument -+ __ Call(masm->isolate()->builtins()->FastNewObject(), -+ RelocInfo::CODE_TARGET); -+ __ Pop(FieldOperand(eax, JSValue::kValueOffset)); -+ __ LeaveBuiltinFrame(esi, edi, ebx); -+ __ SmiUntag(ebx); -+ } -+ -+ __ bind(&drop_frame_and_ret); -+ { -+ // Drop all arguments including the receiver. -+ __ PopReturnAddressTo(ecx); -+ __ lea(esp, Operand(esp, ebx, times_pointer_size, kPointerSize)); -+ __ PushReturnAddressFrom(ecx); -+ __ Ret(); -+ } -+} -+ -+static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { -+ __ push(ebp); -+ __ mov(ebp, esp); -+ -+ // Store the arguments adaptor context sentinel. -+ __ push(Immediate(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); -+ -+ // Push the function on the stack. -+ __ push(edi); -+ -+ // Preserve the number of arguments on the stack. Must preserve eax, -+ // ebx and ecx because these registers are used when copying the -+ // arguments and the receiver. -+ STATIC_ASSERT(kSmiTagSize == 1); -+ __ lea(edi, Operand(eax, eax, times_1, kSmiTag)); -+ __ push(edi); -+} -+ -+static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { -+ // Retrieve the number of arguments from the stack. -+ __ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ -+ // Leave the frame. -+ __ leave(); -+ -+ // Remove caller arguments from the stack. -+ STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); -+ __ pop(ecx); -+ __ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver -+ __ push(ecx); -+} -+ -+// static -+void Builtins::Generate_CallOrConstructVarargs(MacroAssembler* masm, -+ Handle code) { -+ // ----------- S t a t e ------------- -+ // -- edi : target -+ // -- eax : number of parameters on the stack (not including the receiver) -+ // -- ebx : arguments list (a FixedArray) -+ // -- ecx : len (number of elements to from args) -+ // -- edx : new.target (checked to be constructor or undefined) -+ // -- esp[0] : return address. -+ // ----------------------------------- -+ __ AssertFixedArray(ebx); -+ -+ // Save edx/edi/eax to stX0/stX1/stX2. -+ __ push(edx); -+ __ push(edi); -+ __ push(eax); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 4)); -+ __ fld_s(MemOperand(esp, 8)); -+ __ lea(esp, Operand(esp, 3 * kFloatSize)); -+ -+ // Check for stack overflow. -+ { -+ // Check the stack for overflow. We are not trying to catch interruptions -+ // (i.e. debug break and preemption) here, so check the "real stack limit". -+ Label done; -+ ExternalReference real_stack_limit = -+ ExternalReference::address_of_real_stack_limit(masm->isolate()); -+ __ mov(edx, Operand::StaticVariable(real_stack_limit)); -+ // Make edx the space we have left. The stack might already be overflowed -+ // here which will cause edx to become negative. -+ __ neg(edx); -+ __ add(edx, esp); -+ __ sar(edx, kPointerSizeLog2); -+ // Check if the arguments will overflow the stack. -+ __ cmp(edx, ecx); -+ __ j(greater, &done, Label::kNear); // Signed comparison. -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ __ bind(&done); -+ } -+ -+ // Push additional arguments onto the stack. -+ { -+ __ PopReturnAddressTo(edx); -+ __ Move(eax, Immediate(0)); -+ Label done, push, loop; -+ __ bind(&loop); -+ __ cmp(eax, ecx); -+ __ j(equal, &done, Label::kNear); -+ // Turn the hole into undefined as we go. -+ __ mov(edi, -+ FieldOperand(ebx, eax, times_pointer_size, FixedArray::kHeaderSize)); -+ __ CompareRoot(edi, Heap::kTheHoleValueRootIndex); -+ __ j(not_equal, &push, Label::kNear); -+ __ LoadRoot(edi, Heap::kUndefinedValueRootIndex); -+ __ bind(&push); -+ __ Push(edi); -+ __ inc(eax); -+ __ jmp(&loop); -+ __ bind(&done); -+ __ PushReturnAddressFrom(edx); -+ } -+ -+ // Restore edx/edi/eax from stX0/stX1/stX2. -+ __ lea(esp, Operand(esp, -3 * kFloatSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fstp_s(MemOperand(esp, 4)); -+ __ fstp_s(MemOperand(esp, 8)); -+ __ pop(edx); -+ __ pop(edi); -+ __ pop(eax); -+ -+ // Compute the actual parameter count. -+ __ add(eax, ecx); -+ -+ // Tail-call to the actual Call or Construct builtin. -+ __ Jump(code, RelocInfo::CODE_TARGET); -+} -+ -+// static -+void Builtins::Generate_CallOrConstructForwardVarargs(MacroAssembler* masm, -+ Handle code) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the target to call (can be any Object) -+ // -- edx : the new target (for [[Construct]] calls) -+ // -- ecx : start index (to support rest parameters) -+ // ----------------------------------- -+ -+ // Preserve new.target (in case of [[Construct]]). -+ __ push(edx); -+ __ fld_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ -+ // Check if we have an arguments adaptor frame below the function frame. -+ Label arguments_adaptor, arguments_done; -+ __ mov(ebx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ cmp(Operand(ebx, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(equal, &arguments_adaptor, Label::kNear); -+ { -+ __ mov(edx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(edx, FieldOperand(edx, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(edx, -+ FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ __ mov(ebx, ebp); -+ } -+ __ jmp(&arguments_done, Label::kNear); -+ __ bind(&arguments_adaptor); -+ { -+ // Just load the length from the ArgumentsAdaptorFrame. -+ __ mov(edx, Operand(ebx, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ SmiUntag(edx); -+ } -+ __ bind(&arguments_done); -+ -+ Label stack_done; -+ __ sub(edx, ecx); -+ __ j(less_equal, &stack_done); -+ { -+ // Check for stack overflow. -+ { -+ // Check the stack for overflow. We are not trying to catch interruptions -+ // (i.e. debug break and preemption) here, so check the "real stack -+ // limit". -+ Label done; -+ __ LoadRoot(ecx, Heap::kRealStackLimitRootIndex); -+ // Make ecx the space we have left. The stack might already be -+ // overflowed here which will cause ecx to become negative. -+ __ neg(ecx); -+ __ add(ecx, esp); -+ __ sar(ecx, kPointerSizeLog2); -+ // Check if the arguments will overflow the stack. -+ __ cmp(ecx, edx); -+ __ j(greater, &done, Label::kNear); // Signed comparison. -+ __ TailCallRuntime(Runtime::kThrowStackOverflow); -+ __ bind(&done); -+ } -+ -+ // Forward the arguments from the caller frame. -+ { -+ Label loop; -+ __ add(eax, edx); -+ __ PopReturnAddressTo(ecx); -+ __ bind(&loop); -+ { -+ __ Push(Operand(ebx, edx, times_pointer_size, 1 * kPointerSize)); -+ __ dec(edx); -+ __ j(not_zero, &loop); -+ } -+ __ PushReturnAddressFrom(ecx); -+ } -+ } -+ __ bind(&stack_done); -+ -+ // Restore new.target (in case of [[Construct]]). -+ __ lea(esp, Operand(esp, -kFloatSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ pop(edx); -+ -+ // Tail-call to the {code} handler. -+ __ Jump(code, RelocInfo::CODE_TARGET); -+} -+ -+// static -+void Builtins::Generate_CallFunction(MacroAssembler* masm, -+ ConvertReceiverMode mode) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the function to call (checked to be a JSFunction) -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) -+ // Check that the function is not a "classConstructor". -+ Label class_constructor; -+ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ test(FieldOperand(edx, SharedFunctionInfo::kCompilerHintsOffset), -+ Immediate(SharedFunctionInfo::kClassConstructorMask)); -+ __ j(not_zero, &class_constructor); -+ -+ // Enter the context of the function; ToObject has to run in the function -+ // context, and we also need to take the global proxy from the function -+ // context in case of conversion. -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ // We need to convert the receiver for non-native sloppy mode functions. -+ Label done_convert; -+ __ test(FieldOperand(edx, SharedFunctionInfo::kCompilerHintsOffset), -+ Immediate(SharedFunctionInfo::IsNativeBit::kMask | -+ SharedFunctionInfo::IsStrictBit::kMask)); -+ __ j(not_zero, &done_convert); -+ { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the shared function info. -+ // -- edi : the function to call (checked to be a JSFunction) -+ // -- esi : the function context. -+ // ----------------------------------- -+ -+ if (mode == ConvertReceiverMode::kNullOrUndefined) { -+ // Patch receiver to global proxy. -+ __ LoadGlobalProxy(ecx); -+ } else { -+ Label convert_to_object, convert_receiver; -+ __ mov(ecx, Operand(esp, eax, times_pointer_size, kPointerSize)); -+ __ JumpIfSmi(ecx, &convert_to_object, Label::kNear); -+ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); -+ __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ebx); -+ __ j(above_equal, &done_convert); -+ if (mode != ConvertReceiverMode::kNotNullOrUndefined) { -+ Label convert_global_proxy; -+ __ JumpIfRoot(ecx, Heap::kUndefinedValueRootIndex, -+ &convert_global_proxy, Label::kNear); -+ __ JumpIfNotRoot(ecx, Heap::kNullValueRootIndex, &convert_to_object, -+ Label::kNear); -+ __ bind(&convert_global_proxy); -+ { -+ // Patch receiver to global proxy. -+ __ LoadGlobalProxy(ecx); -+ } -+ __ jmp(&convert_receiver); -+ } -+ __ bind(&convert_to_object); -+ { -+ // Convert receiver using ToObject. -+ // TODO(bmeurer): Inline the allocation here to avoid building the frame -+ // in the fast case? (fall back to AllocateInNewSpace?) -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ SmiTag(eax); -+ __ Push(eax); -+ __ Push(edi); -+ __ mov(eax, ecx); -+ __ Push(esi); -+ __ Call(masm->isolate()->builtins()->ToObject(), -+ RelocInfo::CODE_TARGET); -+ __ Pop(esi); -+ __ mov(ecx, eax); -+ __ Pop(edi); -+ __ Pop(eax); -+ __ SmiUntag(eax); -+ } -+ __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ bind(&convert_receiver); -+ } -+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ecx); -+ } -+ __ bind(&done_convert); -+ -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the shared function info. -+ // -- edi : the function to call (checked to be a JSFunction) -+ // -- esi : the function context. -+ // ----------------------------------- -+ -+ __ mov(ebx, -+ FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ ParameterCount actual(eax); -+ ParameterCount expected(ebx); -+ __ InvokeFunctionCode(edi, no_reg, expected, actual, JUMP_FUNCTION, -+ CheckDebugStepCallWrapper()); -+ // The function is a "classConstructor", need to raise an exception. -+ __ bind(&class_constructor); -+ { -+ FrameScope frame(masm, StackFrame::INTERNAL); -+ __ push(edi); -+ __ CallRuntime(Runtime::kThrowConstructorNonCallableError); -+ } -+} -+ -+namespace { -+ -+void Generate_PushBoundArguments(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : new.target (only in case of [[Construct]]) -+ // -- edi : target (checked to be a JSBoundFunction) -+ // ----------------------------------- -+ -+ // Load [[BoundArguments]] into ecx and length of that into ebx. -+ Label no_bound_arguments; -+ __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); -+ __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); -+ __ SmiUntag(ebx); -+ __ test(ebx, ebx); -+ __ j(zero, &no_bound_arguments); -+ { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : new.target (only in case of [[Construct]]) -+ // -- edi : target (checked to be a JSBoundFunction) -+ // -- ecx : the [[BoundArguments]] (implemented as FixedArray) -+ // -- ebx : the number of [[BoundArguments]] -+ // ----------------------------------- -+ -+ // Reserve stack space for the [[BoundArguments]]. -+ { -+ Label done; -+ __ lea(ecx, Operand(ebx, times_pointer_size, 0)); -+ __ sub(esp, ecx); -+ // Check the stack for overflow. We are not trying to catch interruptions -+ // (i.e. debug break and preemption) here, so check the "real stack -+ // limit". -+ __ CompareRoot(esp, ecx, Heap::kRealStackLimitRootIndex); -+ __ j(greater, &done, Label::kNear); // Signed comparison. -+ // Restore the stack pointer. -+ __ lea(esp, Operand(esp, ebx, times_pointer_size, 0)); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ EnterFrame(StackFrame::INTERNAL); -+ __ CallRuntime(Runtime::kThrowStackOverflow); -+ } -+ __ bind(&done); -+ } -+ -+ // Adjust effective number of arguments to include return address. -+ __ inc(eax); -+ -+ // Relocate arguments and return address down the stack. -+ { -+ Label loop; -+ __ Set(ecx, 0); -+ __ lea(ebx, Operand(esp, ebx, times_pointer_size, 0)); -+ __ bind(&loop); -+ __ fld_s(Operand(ebx, ecx, times_pointer_size, 0)); -+ __ fstp_s(Operand(esp, ecx, times_pointer_size, 0)); -+ __ inc(ecx); -+ __ cmp(ecx, eax); -+ __ j(less, &loop); -+ } -+ -+ // Copy [[BoundArguments]] to the stack (below the arguments). -+ { -+ Label loop; -+ __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundArgumentsOffset)); -+ __ mov(ebx, FieldOperand(ecx, FixedArray::kLengthOffset)); -+ __ SmiUntag(ebx); -+ __ bind(&loop); -+ __ dec(ebx); -+ __ fld_s( -+ FieldOperand(ecx, ebx, times_pointer_size, FixedArray::kHeaderSize)); -+ __ fstp_s(Operand(esp, eax, times_pointer_size, 0)); -+ __ lea(eax, Operand(eax, 1)); -+ __ j(greater, &loop); -+ } -+ -+ // Adjust effective number of arguments (eax contains the number of -+ // arguments from the call plus return address plus the number of -+ // [[BoundArguments]]), so we need to subtract one for the return address. -+ __ dec(eax); -+ } -+ __ bind(&no_bound_arguments); -+} -+ -+} // namespace -+ -+// static -+void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the function to call (checked to be a JSBoundFunction) -+ // ----------------------------------- -+ __ AssertBoundFunction(edi); -+ -+ // Patch the receiver to [[BoundThis]]. -+ __ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); -+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); -+ -+ // Push the [[BoundArguments]] onto the stack. -+ Generate_PushBoundArguments(masm); -+ -+ // Call the [[BoundTargetFunction]] via the Call builtin. -+ __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); -+ __ mov(ecx, Operand::StaticVariable(ExternalReference( -+ Builtins::kCall_ReceiverIsAny, masm->isolate()))); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+} -+ -+// static -+void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the target to call (can be any Object). -+ // ----------------------------------- -+ -+ Label non_callable, non_function, non_smi; -+ __ JumpIfSmi(edi, &non_callable); -+ __ bind(&non_smi); -+ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); -+ __ j(equal, masm->isolate()->builtins()->CallFunction(mode), -+ RelocInfo::CODE_TARGET); -+ __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); -+ __ j(equal, masm->isolate()->builtins()->CallBoundFunction(), -+ RelocInfo::CODE_TARGET); -+ -+ // Check if target is a proxy and call CallProxy external builtin -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsCallable)); -+ __ j(zero, &non_callable); -+ -+ // Call CallProxy external builtin -+ __ CmpInstanceType(ecx, JS_PROXY_TYPE); -+ __ j(not_equal, &non_function); -+ -+ __ mov(ecx, Operand::StaticVariable( -+ ExternalReference(Builtins::kCallProxy, masm->isolate()))); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+ -+ // 2. Call to something else, which might have a [[Call]] internal method (if -+ // not we raise an exception). -+ __ bind(&non_function); -+ // Overwrite the original receiver with the (original) target. -+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); -+ // Let the "call_as_function_delegate" take care of the rest. -+ __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, edi); -+ __ Jump(masm->isolate()->builtins()->CallFunction( -+ ConvertReceiverMode::kNotNullOrUndefined), -+ RelocInfo::CODE_TARGET); -+ -+ // 3. Call to something that is not callable. -+ __ bind(&non_callable); -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(edi); -+ __ CallRuntime(Runtime::kThrowCalledNonCallable); -+ } -+} -+ -+// static -+void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the new target (checked to be a constructor) -+ // -- edi : the constructor to call (checked to be a JSFunction) -+ // ----------------------------------- -+ __ AssertFunction(edi); -+ -+ // Calling convention for function specific ConstructStubs require -+ // ebx to contain either an AllocationSite or undefined. -+ __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); -+ -+ // Tail call to the function-specific construct stub (still in the caller -+ // context at this point). -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+} -+ -+// static -+void Builtins::Generate_ConstructBoundFunction(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the new target (checked to be a constructor) -+ // -- edi : the constructor to call (checked to be a JSBoundFunction) -+ // ----------------------------------- -+ __ AssertBoundFunction(edi); -+ -+ // Push the [[BoundArguments]] onto the stack. -+ Generate_PushBoundArguments(masm); -+ -+ // Patch new.target to [[BoundTargetFunction]] if new.target equals target. -+ { -+ Label done; -+ __ cmp(edi, edx); -+ __ j(not_equal, &done, Label::kNear); -+ __ mov(edx, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); -+ __ bind(&done); -+ } -+ -+ // Construct the [[BoundTargetFunction]] via the Construct builtin. -+ __ mov(edi, FieldOperand(edi, JSBoundFunction::kBoundTargetFunctionOffset)); -+ __ mov(ecx, Operand::StaticVariable( -+ ExternalReference(Builtins::kConstruct, masm->isolate()))); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+} -+ -+// static -+void Builtins::Generate_ConstructProxy(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edi : the constructor to call (checked to be a JSProxy) -+ // -- edx : the new target (either the same as the constructor or -+ // the JSFunction on which new was invoked initially) -+ // ----------------------------------- -+ -+ // Call into the Runtime for Proxy [[Construct]]. -+ __ PopReturnAddressTo(ecx); -+ __ Push(edi); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ // Include the pushed new_target, constructor and the receiver. -+ __ add(eax, Immediate(3)); -+ // Tail-call to the runtime. -+ __ JumpToExternalReference( -+ ExternalReference(Runtime::kJSProxyConstruct, masm->isolate())); -+} -+ -+// static -+void Builtins::Generate_Construct(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : the number of arguments (not including the receiver) -+ // -- edx : the new target (either the same as the constructor or -+ // the JSFunction on which new was invoked initially) -+ // -- edi : the constructor to call (can be any Object) -+ // ----------------------------------- -+ -+ // Check if target is a Smi. -+ Label non_constructor; -+ __ JumpIfSmi(edi, &non_constructor, Label::kNear); -+ -+ // Dispatch based on instance type. -+ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); -+ __ j(equal, masm->isolate()->builtins()->ConstructFunction(), -+ RelocInfo::CODE_TARGET); -+ -+ // Check if target has a [[Construct]] internal method. -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsConstructor)); -+ __ j(zero, &non_constructor, Label::kNear); -+ -+ // Only dispatch to bound functions after checking whether they are -+ // constructors. -+ __ CmpInstanceType(ecx, JS_BOUND_FUNCTION_TYPE); -+ __ j(equal, masm->isolate()->builtins()->ConstructBoundFunction(), -+ RelocInfo::CODE_TARGET); -+ -+ // Only dispatch to proxies after checking whether they are constructors. -+ __ CmpInstanceType(ecx, JS_PROXY_TYPE); -+ __ j(equal, masm->isolate()->builtins()->ConstructProxy(), -+ RelocInfo::CODE_TARGET); -+ -+ // Called Construct on an exotic Object with a [[Construct]] internal method. -+ { -+ // Overwrite the original receiver with the (original) target. -+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); -+ // Let the "call_as_constructor_delegate" take care of the rest. -+ __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, edi); -+ __ Jump(masm->isolate()->builtins()->CallFunction(), -+ RelocInfo::CODE_TARGET); -+ } -+ -+ // Called Construct on an Object that doesn't have a [[Construct]] internal -+ // method. -+ __ bind(&non_constructor); -+ __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), -+ RelocInfo::CODE_TARGET); -+} -+ -+// static -+void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edx : requested object size (untagged) -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ SmiTag(edx); -+ __ PopReturnAddressTo(ecx); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ __ Move(esi, Smi::kZero); -+ __ TailCallRuntime(Runtime::kAllocateInNewSpace); -+} -+ -+// static -+void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edx : requested object size (untagged) -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ SmiTag(edx); -+ __ PopReturnAddressTo(ecx); -+ __ Push(edx); -+ __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); -+ __ PushReturnAddressFrom(ecx); -+ __ Move(esi, Smi::kZero); -+ __ TailCallRuntime(Runtime::kAllocateInTargetSpace); -+} -+ -+// static -+void Builtins::Generate_Abort(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edx : message_id as Smi -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ PopReturnAddressTo(ecx); -+ __ Push(edx); -+ __ PushReturnAddressFrom(ecx); -+ __ Move(esi, Smi::kZero); -+ __ TailCallRuntime(Runtime::kAbort); -+} -+ -+void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : actual number of arguments -+ // -- ebx : expected number of arguments -+ // -- edx : new target (passed through to callee) -+ // -- edi : function (passed through to callee) -+ // ----------------------------------- -+ -+ Label invoke, dont_adapt_arguments, stack_overflow; -+ __ IncrementCounter(masm->isolate()->counters()->arguments_adaptors(), 1); -+ -+ Label enough, too_few; -+ __ cmp(eax, ebx); -+ __ j(less, &too_few); -+ __ cmp(ebx, SharedFunctionInfo::kDontAdaptArgumentsSentinel); -+ __ j(equal, &dont_adapt_arguments); -+ -+ { // Enough parameters: Actual >= expected. -+ __ bind(&enough); -+ EnterArgumentsAdaptorFrame(masm); -+ // edi is used as a scratch register. It should be restored from the frame -+ // when needed. -+ Generate_StackOverflowCheck(masm, ebx, ecx, edi, &stack_overflow); -+ -+ // Copy receiver and all expected arguments. -+ const int offset = StandardFrameConstants::kCallerSPOffset; -+ __ lea(edi, Operand(ebp, eax, times_4, offset)); -+ __ mov(eax, -1); // account for receiver -+ -+ Label copy; -+ __ bind(©); -+ __ inc(eax); -+ __ push(Operand(edi, 0)); -+ __ sub(edi, Immediate(kPointerSize)); -+ __ cmp(eax, ebx); -+ __ j(less, ©); -+ // eax now contains the expected number of arguments. -+ __ jmp(&invoke); -+ } -+ -+ { // Too few parameters: Actual < expected. -+ __ bind(&too_few); -+ EnterArgumentsAdaptorFrame(masm); -+ // edi is used as a scratch register. It should be restored from the frame -+ // when needed. -+ Generate_StackOverflowCheck(masm, ebx, ecx, edi, &stack_overflow); -+ -+ // Remember expected arguments in ecx. -+ __ mov(ecx, ebx); -+ -+ // Copy receiver and all actual arguments. -+ const int offset = StandardFrameConstants::kCallerSPOffset; -+ __ lea(edi, Operand(ebp, eax, times_4, offset)); -+ // ebx = expected - actual. -+ __ sub(ebx, eax); -+ // eax = -actual - 1 -+ __ neg(eax); -+ __ sub(eax, Immediate(1)); -+ -+ Label copy; -+ __ bind(©); -+ __ inc(eax); -+ __ push(Operand(edi, 0)); -+ __ sub(edi, Immediate(kPointerSize)); -+ __ test(eax, eax); -+ __ j(not_zero, ©); -+ -+ // Fill remaining expected arguments with undefined values. -+ Label fill; -+ __ bind(&fill); -+ __ inc(eax); -+ __ push(Immediate(masm->isolate()->factory()->undefined_value())); -+ __ cmp(eax, ebx); -+ __ j(less, &fill); -+ -+ // Restore expected arguments. -+ __ mov(eax, ecx); -+ } -+ -+ // Call the entry point. -+ __ bind(&invoke); -+ // Restore function pointer. -+ __ mov(edi, Operand(ebp, ArgumentsAdaptorFrameConstants::kFunctionOffset)); -+ // eax : expected number of arguments -+ // edx : new target (passed through to callee) -+ // edi : function (passed through to callee) -+ __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); -+ __ call(ecx); -+ -+ // Store offset of return address for deoptimizer. -+ masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset()); -+ -+ // Leave frame and return. -+ LeaveArgumentsAdaptorFrame(masm); -+ __ ret(0); -+ -+ // ------------------------------------------- -+ // Dont adapt arguments. -+ // ------------------------------------------- -+ __ bind(&dont_adapt_arguments); -+ __ mov(ecx, FieldOperand(edi, JSFunction::kCodeEntryOffset)); -+ __ jmp(ecx); -+ -+ __ bind(&stack_overflow); -+ { -+ FrameScope frame(masm, StackFrame::MANUAL); -+ __ CallRuntime(Runtime::kThrowStackOverflow); -+ __ int3(); -+ } -+} -+ -+static void Generate_OnStackReplacementHelper(MacroAssembler* masm, -+ bool has_handler_frame) { -+ // Lookup the function in the JavaScript frame. -+ if (has_handler_frame) { -+ __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ __ mov(eax, Operand(eax, JavaScriptFrameConstants::kFunctionOffset)); -+ } else { -+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ } -+ -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // Pass function as argument. -+ __ push(eax); -+ __ CallRuntime(Runtime::kCompileForOnStackReplacement); -+ } -+ -+ Label skip; -+ // If the code object is null, just return to the caller. -+ __ cmp(eax, Immediate(0)); -+ __ j(not_equal, &skip, Label::kNear); -+ __ ret(0); -+ -+ __ bind(&skip); -+ -+ // Drop any potential handler frame that is be sitting on top of the actual -+ // JavaScript frame. This is the case then OSR is triggered from bytecode. -+ if (has_handler_frame) { -+ __ leave(); -+ } -+ -+ // Load deoptimization data from the code object. -+ __ mov(ebx, Operand(eax, Code::kDeoptimizationDataOffset - kHeapObjectTag)); -+ -+ // Load the OSR entrypoint offset from the deoptimization data. -+ __ mov(ebx, Operand(ebx, FixedArray::OffsetOfElementAt( -+ DeoptimizationInputData::kOsrPcOffsetIndex) - -+ kHeapObjectTag)); -+ __ SmiUntag(ebx); -+ -+ // Compute the target address = code_obj + header_size + osr_offset -+ __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); -+ -+ // Overwrite the return address on the stack. -+ __ mov(Operand(esp, 0), eax); -+ -+ // And "return" to the OSR entry point of the function. -+ __ ret(0); -+} -+ -+void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) { -+ Generate_OnStackReplacementHelper(masm, false); -+} -+ -+void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { -+ Generate_OnStackReplacementHelper(masm, true); -+} -+ -+void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Save all parameter registers (see wasm-linkage.cc). They might be -+ // overwritten in the runtime call below. We don't have any callee-saved -+ // registers in wasm, so no need to store anything else. -+ constexpr Register gp_regs[]{eax, ebx, ecx, edx, esi}; -+ -+ for (auto reg : gp_regs) { -+ __ Push(reg); -+ } -+ -+ // Initialize esi register with kZero, CEntryStub will use it to set the -+ // current context on the isolate. -+ __ Move(esi, Smi::kZero); -+ __ CallRuntime(Runtime::kWasmCompileLazy); -+ // Store returned instruction start in edi. -+ __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); -+ -+ // Restore registers. -+ for (int i = arraysize(gp_regs) - 1; i >= 0; --i) { -+ __ Pop(gp_regs[i]); -+ } -+ } -+ // Now jump to the instructions of the returned code object. -+ __ jmp(edi); -+} -+ -+#undef __ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/builtins/x87/OWNERS 2018-02-18 19:00:53.934422017 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/codegen.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/codegen.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/codegen.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/codegen.h 2018-02-18 19:00:53.934422017 +0100 -@@ -59,6 +59,8 @@ - #include "src/mips64/codegen-mips64.h" // NOLINT - #elif V8_TARGET_ARCH_S390 - #include "src/s390/codegen-s390.h" // NOLINT -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/codegen-x87.h" // NOLINT - #else - #error Unsupported target architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/code-stubs.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/code-stubs.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/code-stubs.h 2018-02-18 19:00:53.935422002 +0100 -@@ -514,6 +514,8 @@ - #include "src/mips64/code-stubs-mips64.h" - #elif V8_TARGET_ARCH_S390 - #include "src/s390/code-stubs-s390.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/code-stubs-x87.h" - #else - #error Unsupported target architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc 2018-02-18 19:00:53.935422002 +0100 -@@ -50,6 +50,12 @@ - rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit() - #endif - -+#elif V8_TARGET_ARCH_X87 -+// =========================================================================== -+// == x87 ==================================================================== -+// =========================================================================== -+#define CALLEE_SAVE_REGISTERS esi.bit() | edi.bit() | ebx.bit() -+ - #elif V8_TARGET_ARCH_ARM - // =========================================================================== - // == arm ==================================================================== -@@ -155,7 +161,7 @@ - msig->parameter_count()); - // Check the types of the signature. - // Currently no floating point parameters or returns are allowed because -- // on ia32, the FP top of stack is involved. -+ // on x87 and ia32, the FP top of stack is involved. - for (size_t i = 0; i < msig->return_count(); i++) { - MachineRepresentation rep = msig->GetReturn(i).representation(); - CHECK_NE(MachineRepresentation::kFloat32, rep); -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/instruction-codes.h 2018-02-18 19:00:54.010420900 +0100 -@@ -23,6 +23,8 @@ - #include "src/compiler/ppc/instruction-codes-ppc.h" - #elif V8_TARGET_ARCH_S390 - #include "src/compiler/s390/instruction-codes-s390.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/compiler/x87/instruction-codes-x87.h" - #else - #define TARGET_ARCH_OPCODE_LIST(V) - #define TARGET_ADDRESSING_MODE_LIST(V) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/wasm-linkage.cc 2018-02-18 19:00:54.011420885 +0100 -@@ -69,6 +69,14 @@ - #define FP_PARAM_REGISTERS xmm1, xmm2, xmm3, xmm4, xmm5, xmm6 - #define FP_RETURN_REGISTERS xmm1, xmm2 - -+#elif V8_TARGET_ARCH_X87 -+// =========================================================================== -+// == x87 ==================================================================== -+// =========================================================================== -+#define GP_PARAM_REGISTERS eax, edx, ecx, ebx, esi -+#define GP_RETURN_REGISTERS eax, edx -+#define FP_RETURN_REGISTERS stX_0 -+ - #elif V8_TARGET_ARCH_ARM - // =========================================================================== - // == arm ==================================================================== -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/code-generator-x87.cc 2018-02-18 19:00:54.012420870 +0100 -@@ -0,0 +1,2878 @@ -+// Copyright 2013 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "src/compiler/code-generator.h" -+ -+#include "src/compilation-info.h" -+#include "src/compiler/code-generator-impl.h" -+#include "src/compiler/gap-resolver.h" -+#include "src/compiler/node-matchers.h" -+#include "src/compiler/osr.h" -+#include "src/frames.h" -+#include "src/x87/assembler-x87.h" -+#include "src/x87/frames-x87.h" -+#include "src/x87/macro-assembler-x87.h" -+ -+namespace v8 { -+namespace internal { -+namespace compiler { -+ -+#define __ tasm()-> -+ -+ -+// Adds X87 specific methods for decoding operands. -+class X87OperandConverter : public InstructionOperandConverter { -+ public: -+ X87OperandConverter(CodeGenerator* gen, Instruction* instr) -+ : InstructionOperandConverter(gen, instr) {} -+ -+ Operand InputOperand(size_t index, int extra = 0) { -+ return ToOperand(instr_->InputAt(index), extra); -+ } -+ -+ Immediate InputImmediate(size_t index) { -+ return ToImmediate(instr_->InputAt(index)); -+ } -+ -+ Operand OutputOperand() { return ToOperand(instr_->Output()); } -+ -+ Operand ToOperand(InstructionOperand* op, int extra = 0) { -+ if (op->IsRegister()) { -+ DCHECK(extra == 0); -+ return Operand(ToRegister(op)); -+ } -+ DCHECK(op->IsStackSlot() || op->IsFPStackSlot()); -+ return SlotToOperand(AllocatedOperand::cast(op)->index(), extra); -+ } -+ -+ Operand SlotToOperand(int slot, int extra = 0) { -+ FrameOffset offset = frame_access_state()->GetFrameOffset(slot); -+ return Operand(offset.from_stack_pointer() ? esp : ebp, -+ offset.offset() + extra); -+ } -+ -+ Operand HighOperand(InstructionOperand* op) { -+ DCHECK(op->IsFPStackSlot()); -+ return ToOperand(op, kPointerSize); -+ } -+ -+ Immediate ToImmediate(InstructionOperand* operand) { -+ Constant constant = ToConstant(operand); -+ if (constant.type() == Constant::kInt32 && -+ RelocInfo::IsWasmReference(constant.rmode())) { -+ return Immediate(reinterpret_cast
(constant.ToInt32()), -+ constant.rmode()); -+ } -+ switch (constant.type()) { -+ case Constant::kInt32: -+ return Immediate(constant.ToInt32()); -+ case Constant::kFloat32: -+ return Immediate::EmbeddedNumber(constant.ToFloat32()); -+ case Constant::kFloat64: -+ return Immediate::EmbeddedNumber(constant.ToFloat64().value()); -+ case Constant::kExternalReference: -+ return Immediate(constant.ToExternalReference()); -+ case Constant::kHeapObject: -+ return Immediate(constant.ToHeapObject()); -+ case Constant::kInt64: -+ break; -+ case Constant::kRpoNumber: -+ return Immediate::CodeRelativeOffset(ToLabel(operand)); -+ } -+ UNREACHABLE(); -+ } -+ -+ static size_t NextOffset(size_t* offset) { -+ size_t i = *offset; -+ (*offset)++; -+ return i; -+ } -+ -+ static ScaleFactor ScaleFor(AddressingMode one, AddressingMode mode) { -+ STATIC_ASSERT(0 == static_cast(times_1)); -+ STATIC_ASSERT(1 == static_cast(times_2)); -+ STATIC_ASSERT(2 == static_cast(times_4)); -+ STATIC_ASSERT(3 == static_cast(times_8)); -+ int scale = static_cast(mode - one); -+ DCHECK(scale >= 0 && scale < 4); -+ return static_cast(scale); -+ } -+ -+ Operand MemoryOperand(size_t* offset) { -+ AddressingMode mode = AddressingModeField::decode(instr_->opcode()); -+ switch (mode) { -+ case kMode_MR: { -+ Register base = InputRegister(NextOffset(offset)); -+ int32_t disp = 0; -+ return Operand(base, disp); -+ } -+ case kMode_MRI: { -+ Register base = InputRegister(NextOffset(offset)); -+ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); -+ return Operand(base, ctant.ToInt32(), ctant.rmode()); -+ } -+ case kMode_MR1: -+ case kMode_MR2: -+ case kMode_MR4: -+ case kMode_MR8: { -+ Register base = InputRegister(NextOffset(offset)); -+ Register index = InputRegister(NextOffset(offset)); -+ ScaleFactor scale = ScaleFor(kMode_MR1, mode); -+ int32_t disp = 0; -+ return Operand(base, index, scale, disp); -+ } -+ case kMode_MR1I: -+ case kMode_MR2I: -+ case kMode_MR4I: -+ case kMode_MR8I: { -+ Register base = InputRegister(NextOffset(offset)); -+ Register index = InputRegister(NextOffset(offset)); -+ ScaleFactor scale = ScaleFor(kMode_MR1I, mode); -+ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); -+ return Operand(base, index, scale, ctant.ToInt32(), ctant.rmode()); -+ } -+ case kMode_M1: -+ case kMode_M2: -+ case kMode_M4: -+ case kMode_M8: { -+ Register index = InputRegister(NextOffset(offset)); -+ ScaleFactor scale = ScaleFor(kMode_M1, mode); -+ int32_t disp = 0; -+ return Operand(index, scale, disp); -+ } -+ case kMode_M1I: -+ case kMode_M2I: -+ case kMode_M4I: -+ case kMode_M8I: { -+ Register index = InputRegister(NextOffset(offset)); -+ ScaleFactor scale = ScaleFor(kMode_M1I, mode); -+ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); -+ return Operand(index, scale, ctant.ToInt32(), ctant.rmode()); -+ } -+ case kMode_MI: { -+ Constant ctant = ToConstant(instr_->InputAt(NextOffset(offset))); -+ return Operand(ctant.ToInt32(), ctant.rmode()); -+ } -+ case kMode_None: -+ UNREACHABLE(); -+ } -+ UNREACHABLE(); -+ } -+ -+ Operand MemoryOperand(size_t first_input = 0) { -+ return MemoryOperand(&first_input); -+ } -+}; -+ -+ -+namespace { -+ -+bool HasImmediateInput(Instruction* instr, size_t index) { -+ return instr->InputAt(index)->IsImmediate(); -+} -+ -+ -+class OutOfLineLoadInteger final : public OutOfLineCode { -+ public: -+ OutOfLineLoadInteger(CodeGenerator* gen, Register result) -+ : OutOfLineCode(gen), result_(result) {} -+ -+ void Generate() final { __ xor_(result_, result_); } -+ -+ private: -+ Register const result_; -+}; -+ -+class OutOfLineLoadFloat32NaN final : public OutOfLineCode { -+ public: -+ OutOfLineLoadFloat32NaN(CodeGenerator* gen, X87Register result) -+ : OutOfLineCode(gen), result_(result) {} -+ -+ void Generate() final { -+ DCHECK(result_.code() == 0); -+ USE(result_); -+ __ fstp(0); -+ __ push(Immediate(0xffc00000)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ } -+ -+ private: -+ X87Register const result_; -+}; -+ -+class OutOfLineLoadFloat64NaN final : public OutOfLineCode { -+ public: -+ OutOfLineLoadFloat64NaN(CodeGenerator* gen, X87Register result) -+ : OutOfLineCode(gen), result_(result) {} -+ -+ void Generate() final { -+ DCHECK(result_.code() == 0); -+ USE(result_); -+ __ fstp(0); -+ __ push(Immediate(0xfff80000)); -+ __ push(Immediate(0x00000000)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ } -+ -+ private: -+ X87Register const result_; -+}; -+ -+class OutOfLineTruncateDoubleToI final : public OutOfLineCode { -+ public: -+ OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result, -+ X87Register input) -+ : OutOfLineCode(gen), -+ result_(result), -+ input_(input), -+ zone_(gen->zone()) {} -+ -+ void Generate() final { -+ UNIMPLEMENTED(); -+ USE(result_); -+ USE(input_); -+ } -+ -+ private: -+ Register const result_; -+ X87Register const input_; -+ Zone* zone_; -+}; -+ -+ -+class OutOfLineRecordWrite final : public OutOfLineCode { -+ public: -+ OutOfLineRecordWrite(CodeGenerator* gen, Register object, Operand operand, -+ Register value, Register scratch0, Register scratch1, -+ RecordWriteMode mode) -+ : OutOfLineCode(gen), -+ object_(object), -+ operand_(operand), -+ value_(value), -+ scratch0_(scratch0), -+ scratch1_(scratch1), -+ mode_(mode), -+ zone_(gen->zone()) {} -+ -+ void Generate() final { -+ if (mode_ > RecordWriteMode::kValueIsPointer) { -+ __ JumpIfSmi(value_, exit()); -+ } -+ __ CheckPageFlag(value_, scratch0_, -+ MemoryChunk::kPointersToHereAreInterestingMask, zero, -+ exit()); -+ RememberedSetAction const remembered_set_action = -+ mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET -+ : OMIT_REMEMBERED_SET; -+ SaveFPRegsMode const save_fp_mode = -+ frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; -+ __ lea(scratch1_, operand_); -+ __ CallStubDelayed( -+ new (zone_) RecordWriteStub(nullptr, object_, scratch0_, scratch1_, -+ remembered_set_action, save_fp_mode)); -+ } -+ -+ private: -+ Register const object_; -+ Operand const operand_; -+ Register const value_; -+ Register const scratch0_; -+ Register const scratch1_; -+ RecordWriteMode const mode_; -+ Zone* zone_; -+}; -+ -+} // namespace -+ -+#define ASSEMBLE_CHECKED_LOAD_FLOAT(asm_instr, OutOfLineLoadNaN) \ -+ do { \ -+ auto result = i.OutputDoubleRegister(); \ -+ auto offset = i.InputRegister(0); \ -+ DCHECK(result.code() == 0); \ -+ if (instr->InputAt(1)->IsRegister()) { \ -+ __ cmp(offset, i.InputRegister(1)); \ -+ } else { \ -+ __ cmp(offset, i.InputImmediate(1)); \ -+ } \ -+ OutOfLineCode* ool = new (zone()) OutOfLineLoadNaN(this, result); \ -+ __ j(above_equal, ool->entry()); \ -+ __ fstp(0); \ -+ __ asm_instr(i.MemoryOperand(2)); \ -+ __ bind(ool->exit()); \ -+ } while (false) -+ -+#define ASSEMBLE_CHECKED_LOAD_INTEGER(asm_instr) \ -+ do { \ -+ auto result = i.OutputRegister(); \ -+ auto offset = i.InputRegister(0); \ -+ if (instr->InputAt(1)->IsRegister()) { \ -+ __ cmp(offset, i.InputRegister(1)); \ -+ } else { \ -+ __ cmp(offset, i.InputImmediate(1)); \ -+ } \ -+ OutOfLineCode* ool = new (zone()) OutOfLineLoadInteger(this, result); \ -+ __ j(above_equal, ool->entry()); \ -+ __ asm_instr(result, i.MemoryOperand(2)); \ -+ __ bind(ool->exit()); \ -+ } while (false) -+ -+ -+#define ASSEMBLE_CHECKED_STORE_FLOAT(asm_instr) \ -+ do { \ -+ auto offset = i.InputRegister(0); \ -+ if (instr->InputAt(1)->IsRegister()) { \ -+ __ cmp(offset, i.InputRegister(1)); \ -+ } else { \ -+ __ cmp(offset, i.InputImmediate(1)); \ -+ } \ -+ Label done; \ -+ DCHECK(i.InputDoubleRegister(2).code() == 0); \ -+ __ j(above_equal, &done, Label::kNear); \ -+ __ asm_instr(i.MemoryOperand(3)); \ -+ __ bind(&done); \ -+ } while (false) -+ -+ -+#define ASSEMBLE_CHECKED_STORE_INTEGER(asm_instr) \ -+ do { \ -+ auto offset = i.InputRegister(0); \ -+ if (instr->InputAt(1)->IsRegister()) { \ -+ __ cmp(offset, i.InputRegister(1)); \ -+ } else { \ -+ __ cmp(offset, i.InputImmediate(1)); \ -+ } \ -+ Label done; \ -+ __ j(above_equal, &done, Label::kNear); \ -+ if (instr->InputAt(2)->IsRegister()) { \ -+ __ asm_instr(i.MemoryOperand(3), i.InputRegister(2)); \ -+ } else { \ -+ __ asm_instr(i.MemoryOperand(3), i.InputImmediate(2)); \ -+ } \ -+ __ bind(&done); \ -+ } while (false) -+ -+#define ASSEMBLE_COMPARE(asm_instr) \ -+ do { \ -+ if (AddressingModeField::decode(instr->opcode()) != kMode_None) { \ -+ size_t index = 0; \ -+ Operand left = i.MemoryOperand(&index); \ -+ if (HasImmediateInput(instr, index)) { \ -+ __ asm_instr(left, i.InputImmediate(index)); \ -+ } else { \ -+ __ asm_instr(left, i.InputRegister(index)); \ -+ } \ -+ } else { \ -+ if (HasImmediateInput(instr, 1)) { \ -+ if (instr->InputAt(0)->IsRegister()) { \ -+ __ asm_instr(i.InputRegister(0), i.InputImmediate(1)); \ -+ } else { \ -+ __ asm_instr(i.InputOperand(0), i.InputImmediate(1)); \ -+ } \ -+ } else { \ -+ if (instr->InputAt(1)->IsRegister()) { \ -+ __ asm_instr(i.InputRegister(0), i.InputRegister(1)); \ -+ } else { \ -+ __ asm_instr(i.InputRegister(0), i.InputOperand(1)); \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ -+#define ASSEMBLE_IEEE754_BINOP(name) \ -+ do { \ -+ /* Saves the esp into ebx */ \ -+ __ push(ebx); \ -+ __ mov(ebx, esp); \ -+ /* Pass one double as argument on the stack. */ \ -+ __ PrepareCallCFunction(4, eax); \ -+ __ fstp(0); \ -+ /* Load first operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4 + kDoubleSize)); \ -+ /* Put first operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 0 * kDoubleSize)); \ -+ /* Load second operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4)); \ -+ /* Put second operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 1 * kDoubleSize)); \ -+ __ CallCFunction( \ -+ ExternalReference::ieee754_##name##_function(__ isolate()), 4); \ -+ /* Restore the ebx */ \ -+ __ pop(ebx); \ -+ /* Return value is in st(0) on x87. */ \ -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); \ -+ } while (false) -+ -+#define ASSEMBLE_IEEE754_UNOP(name) \ -+ do { \ -+ /* Saves the esp into ebx */ \ -+ __ push(ebx); \ -+ __ mov(ebx, esp); \ -+ /* Pass one double as argument on the stack. */ \ -+ __ PrepareCallCFunction(2, eax); \ -+ __ fstp(0); \ -+ /* Load operand from original stack */ \ -+ __ fld_d(MemOperand(ebx, 4)); \ -+ /* Put operand into stack for function call */ \ -+ __ fstp_d(Operand(esp, 0)); \ -+ __ CallCFunction( \ -+ ExternalReference::ieee754_##name##_function(__ isolate()), 2); \ -+ /* Restore the ebx */ \ -+ __ pop(ebx); \ -+ /* Return value is in st(0) on x87. */ \ -+ __ lea(esp, Operand(esp, kDoubleSize)); \ -+ } while (false) -+ -+#define ASSEMBLE_ATOMIC_BINOP(bin_inst, mov_inst, cmpxchg_inst) \ -+ do { \ -+ Label binop; \ -+ __ bind(&binop); \ -+ __ mov_inst(eax, i.MemoryOperand(1)); \ -+ __ Move(i.TempRegister(0), eax); \ -+ __ bin_inst(i.TempRegister(0), i.InputRegister(0)); \ -+ __ lock(); \ -+ __ cmpxchg_inst(i.MemoryOperand(1), i.TempRegister(0)); \ -+ __ j(not_equal, &binop); \ -+ } while (false) -+ -+void CodeGenerator::AssembleDeconstructFrame() { -+ __ mov(esp, ebp); -+ __ pop(ebp); -+} -+ -+void CodeGenerator::AssemblePrepareTailCall() { -+ if (frame_access_state()->has_frame()) { -+ __ mov(ebp, MemOperand(ebp, 0)); -+ } -+ frame_access_state()->SetFrameAccessToSP(); -+} -+ -+void CodeGenerator::AssemblePopArgumentsAdaptorFrame(Register args_reg, -+ Register, Register, -+ Register) { -+ // There are not enough temp registers left on ia32 for a call instruction -+ // so we pick some scratch registers and save/restore them manually here. -+ int scratch_count = 3; -+ Register scratch1 = ebx; -+ Register scratch2 = ecx; -+ Register scratch3 = edx; -+ DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); -+ Label done; -+ -+ // Check if current frame is an arguments adaptor frame. -+ __ cmp(Operand(ebp, StandardFrameConstants::kContextOffset), -+ Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); -+ __ j(not_equal, &done, Label::kNear); -+ -+ __ push(scratch1); -+ __ push(scratch2); -+ __ push(scratch3); -+ -+ // Load arguments count from current arguments adaptor frame (note, it -+ // does not include receiver). -+ Register caller_args_count_reg = scratch1; -+ __ mov(caller_args_count_reg, -+ Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset)); -+ __ SmiUntag(caller_args_count_reg); -+ -+ ParameterCount callee_args_count(args_reg); -+ __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, -+ scratch3, ReturnAddressState::kOnStack, scratch_count); -+ __ pop(scratch3); -+ __ pop(scratch2); -+ __ pop(scratch1); -+ -+ __ bind(&done); -+} -+ -+namespace { -+ -+void AdjustStackPointerForTailCall(TurboAssembler* tasm, -+ FrameAccessState* state, -+ int new_slot_above_sp, -+ bool allow_shrinkage = true) { -+ int current_sp_offset = state->GetSPToFPSlotCount() + -+ StandardFrameConstants::kFixedSlotCountAboveFp; -+ int stack_slot_delta = new_slot_above_sp - current_sp_offset; -+ if (stack_slot_delta > 0) { -+ tasm->sub(esp, Immediate(stack_slot_delta * kPointerSize)); -+ state->IncreaseSPDelta(stack_slot_delta); -+ } else if (allow_shrinkage && stack_slot_delta < 0) { -+ tasm->add(esp, Immediate(-stack_slot_delta * kPointerSize)); -+ state->IncreaseSPDelta(stack_slot_delta); -+ } -+} -+ -+} // namespace -+ -+void CodeGenerator::AssembleTailCallBeforeGap(Instruction* instr, -+ int first_unused_stack_slot) { -+ CodeGenerator::PushTypeFlags flags(kImmediatePush | kScalarPush); -+ ZoneVector pushes(zone()); -+ GetPushCompatibleMoves(instr, flags, &pushes); -+ -+ if (!pushes.empty() && -+ (LocationOperand::cast(pushes.back()->destination()).index() + 1 == -+ first_unused_stack_slot)) { -+ X87OperandConverter g(this, instr); -+ for (auto move : pushes) { -+ LocationOperand destination_location( -+ LocationOperand::cast(move->destination())); -+ InstructionOperand source(move->source()); -+ AdjustStackPointerForTailCall(tasm(), frame_access_state(), -+ destination_location.index()); -+ if (source.IsStackSlot()) { -+ LocationOperand source_location(LocationOperand::cast(source)); -+ __ push(g.SlotToOperand(source_location.index())); -+ } else if (source.IsRegister()) { -+ LocationOperand source_location(LocationOperand::cast(source)); -+ __ push(source_location.GetRegister()); -+ } else if (source.IsImmediate()) { -+ __ push(Immediate(ImmediateOperand::cast(source).inline_value())); -+ } else { -+ // Pushes of non-scalar data types is not supported. -+ UNIMPLEMENTED(); -+ } -+ frame_access_state()->IncreaseSPDelta(1); -+ move->Eliminate(); -+ } -+ } -+ AdjustStackPointerForTailCall(tasm(), frame_access_state(), -+ first_unused_stack_slot, false); -+} -+ -+void CodeGenerator::AssembleTailCallAfterGap(Instruction* instr, -+ int first_unused_stack_slot) { -+ AdjustStackPointerForTailCall(tasm(), frame_access_state(), -+ first_unused_stack_slot); -+} -+ -+// Assembles an instruction after register allocation, producing machine code. -+CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( -+ Instruction* instr) { -+ X87OperandConverter i(this, instr); -+ InstructionCode opcode = instr->opcode(); -+ ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); -+ -+ switch (arch_opcode) { -+ case kArchCallCodeObject: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ EnsureSpaceForLazyDeopt(); -+ if (HasImmediateInput(instr, 0)) { -+ Handle code = i.InputCode(0); -+ __ call(code, RelocInfo::CODE_TARGET); -+ } else { -+ Register reg = i.InputRegister(0); -+ __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); -+ __ call(reg); -+ } -+ RecordCallPosition(instr); -+ bool double_result = -+ instr->HasOutput() && instr->Output()->IsFPRegister(); -+ if (double_result) { -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ __ fstp_d(Operand(esp, 0)); -+ } -+ __ fninit(); -+ if (double_result) { -+ __ fld_d(Operand(esp, 0)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ } else { -+ __ fld1(); -+ } -+ frame_access_state()->ClearSPDelta(); -+ break; -+ } -+ case kArchTailCallCodeObjectFromJSFunction: -+ case kArchTailCallCodeObject: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ if (arch_opcode == kArchTailCallCodeObjectFromJSFunction) { -+ AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, -+ no_reg, no_reg, no_reg); -+ } -+ if (HasImmediateInput(instr, 0)) { -+ Handle code = i.InputCode(0); -+ __ jmp(code, RelocInfo::CODE_TARGET); -+ } else { -+ Register reg = i.InputRegister(0); -+ __ add(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); -+ __ jmp(reg); -+ } -+ frame_access_state()->ClearSPDelta(); -+ frame_access_state()->SetFrameAccessToDefault(); -+ break; -+ } -+ case kArchTailCallAddress: { -+ CHECK(!HasImmediateInput(instr, 0)); -+ Register reg = i.InputRegister(0); -+ __ jmp(reg); -+ frame_access_state()->ClearSPDelta(); -+ frame_access_state()->SetFrameAccessToDefault(); -+ break; -+ } -+ case kArchCallJSFunction: { -+ EnsureSpaceForLazyDeopt(); -+ Register func = i.InputRegister(0); -+ if (FLAG_debug_code) { -+ // Check the function's context matches the context argument. -+ __ cmp(esi, FieldOperand(func, JSFunction::kContextOffset)); -+ __ Assert(equal, kWrongFunctionContext); -+ } -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ call(FieldOperand(func, JSFunction::kCodeEntryOffset)); -+ RecordCallPosition(instr); -+ bool double_result = -+ instr->HasOutput() && instr->Output()->IsFPRegister(); -+ if (double_result) { -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ __ fstp_d(Operand(esp, 0)); -+ } -+ __ fninit(); -+ if (double_result) { -+ __ fld_d(Operand(esp, 0)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ } else { -+ __ fld1(); -+ } -+ frame_access_state()->ClearSPDelta(); -+ break; -+ } -+ case kArchTailCallJSFunctionFromJSFunction: { -+ Register func = i.InputRegister(0); -+ if (FLAG_debug_code) { -+ // Check the function's context matches the context argument. -+ __ cmp(esi, FieldOperand(func, JSFunction::kContextOffset)); -+ __ Assert(equal, kWrongFunctionContext); -+ } -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, no_reg, -+ no_reg, no_reg); -+ __ jmp(FieldOperand(func, JSFunction::kCodeEntryOffset)); -+ frame_access_state()->ClearSPDelta(); -+ frame_access_state()->SetFrameAccessToDefault(); -+ break; -+ } -+ case kArchPrepareCallCFunction: { -+ // Frame alignment requires using FP-relative frame addressing. -+ frame_access_state()->SetFrameAccessToFP(); -+ int const num_parameters = MiscField::decode(instr->opcode()); -+ __ PrepareCallCFunction(num_parameters, i.TempRegister(0)); -+ break; -+ } -+ case kArchPrepareTailCall: -+ AssemblePrepareTailCall(); -+ break; -+ case kArchCallCFunction: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ int const num_parameters = MiscField::decode(instr->opcode()); -+ if (HasImmediateInput(instr, 0)) { -+ ExternalReference ref = i.InputExternalReference(0); -+ __ CallCFunction(ref, num_parameters); -+ } else { -+ Register func = i.InputRegister(0); -+ __ CallCFunction(func, num_parameters); -+ } -+ bool double_result = -+ instr->HasOutput() && instr->Output()->IsFPRegister(); -+ if (double_result) { -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ __ fstp_d(Operand(esp, 0)); -+ } -+ __ fninit(); -+ if (double_result) { -+ __ fld_d(Operand(esp, 0)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ } else { -+ __ fld1(); -+ } -+ frame_access_state()->SetFrameAccessToDefault(); -+ frame_access_state()->ClearSPDelta(); -+ break; -+ } -+ case kArchJmp: -+ AssembleArchJump(i.InputRpo(0)); -+ break; -+ case kArchLookupSwitch: -+ AssembleArchLookupSwitch(instr); -+ break; -+ case kArchTableSwitch: -+ AssembleArchTableSwitch(instr); -+ break; -+ case kArchComment: { -+ Address comment_string = i.InputExternalReference(0).address(); -+ __ RecordComment(reinterpret_cast(comment_string)); -+ break; -+ } -+ case kArchDebugBreak: -+ __ int3(); -+ break; -+ case kArchNop: -+ case kArchThrowTerminator: -+ // don't emit code for nops. -+ break; -+ case kArchDeoptimize: { -+ int deopt_state_id = -+ BuildTranslation(instr, -1, 0, OutputFrameStateCombine::Ignore()); -+ int double_register_param_count = 0; -+ int x87_layout = 0; -+ for (size_t i = 0; i < instr->InputCount(); i++) { -+ if (instr->InputAt(i)->IsFPRegister()) { -+ double_register_param_count++; -+ } -+ } -+ // Currently we use only one X87 register. If double_register_param_count -+ // is bigger than 1, it means duplicated double register is added to input -+ // of this instruction. -+ if (double_register_param_count > 0) { -+ x87_layout = (0 << 3) | 1; -+ } -+ // The layout of x87 register stack is loaded on the top of FPU register -+ // stack for deoptimization. -+ __ push(Immediate(x87_layout)); -+ __ fild_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kPointerSize)); -+ -+ CodeGenResult result = -+ AssembleDeoptimizerCall(deopt_state_id, current_source_position_); -+ if (result != kSuccess) return result; -+ break; -+ } -+ case kArchRet: -+ AssembleReturn(instr->InputAt(0)); -+ break; -+ case kArchFramePointer: -+ __ mov(i.OutputRegister(), ebp); -+ break; -+ case kArchStackPointer: -+ __ mov(i.OutputRegister(), esp); -+ break; -+ case kArchParentFramePointer: -+ if (frame_access_state()->has_frame()) { -+ __ mov(i.OutputRegister(), Operand(ebp, 0)); -+ } else { -+ __ mov(i.OutputRegister(), ebp); -+ } -+ break; -+ case kArchTruncateDoubleToI: { -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fld_d(i.InputOperand(0)); -+ } -+ __ TruncateX87TOSToI(zone(), i.OutputRegister()); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fstp(0); -+ } -+ break; -+ } -+ case kArchStoreWithWriteBarrier: { -+ RecordWriteMode mode = -+ static_cast(MiscField::decode(instr->opcode())); -+ Register object = i.InputRegister(0); -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ Register value = i.InputRegister(index); -+ Register scratch0 = i.TempRegister(0); -+ Register scratch1 = i.TempRegister(1); -+ auto ool = new (zone()) OutOfLineRecordWrite(this, object, operand, value, -+ scratch0, scratch1, mode); -+ __ mov(operand, value); -+ __ CheckPageFlag(object, scratch0, -+ MemoryChunk::kPointersFromHereAreInterestingMask, -+ not_zero, ool->entry()); -+ __ bind(ool->exit()); -+ break; -+ } -+ case kArchStackSlot: { -+ FrameOffset offset = -+ frame_access_state()->GetFrameOffset(i.InputInt32(0)); -+ Register base; -+ if (offset.from_stack_pointer()) { -+ base = esp; -+ } else { -+ base = ebp; -+ } -+ __ lea(i.OutputRegister(), Operand(base, offset.offset())); -+ break; -+ } -+ case kIeee754Float64Acos: -+ ASSEMBLE_IEEE754_UNOP(acos); -+ break; -+ case kIeee754Float64Acosh: -+ ASSEMBLE_IEEE754_UNOP(acosh); -+ break; -+ case kIeee754Float64Asin: -+ ASSEMBLE_IEEE754_UNOP(asin); -+ break; -+ case kIeee754Float64Asinh: -+ ASSEMBLE_IEEE754_UNOP(asinh); -+ break; -+ case kIeee754Float64Atan: -+ ASSEMBLE_IEEE754_UNOP(atan); -+ break; -+ case kIeee754Float64Atanh: -+ ASSEMBLE_IEEE754_UNOP(atanh); -+ break; -+ case kIeee754Float64Atan2: -+ ASSEMBLE_IEEE754_BINOP(atan2); -+ break; -+ case kIeee754Float64Cbrt: -+ ASSEMBLE_IEEE754_UNOP(cbrt); -+ break; -+ case kIeee754Float64Cos: -+ __ X87SetFPUCW(0x027F); -+ ASSEMBLE_IEEE754_UNOP(cos); -+ __ X87SetFPUCW(0x037F); -+ break; -+ case kIeee754Float64Cosh: -+ ASSEMBLE_IEEE754_UNOP(cosh); -+ break; -+ case kIeee754Float64Expm1: -+ __ X87SetFPUCW(0x027F); -+ ASSEMBLE_IEEE754_UNOP(expm1); -+ __ X87SetFPUCW(0x037F); -+ break; -+ case kIeee754Float64Exp: -+ ASSEMBLE_IEEE754_UNOP(exp); -+ break; -+ case kIeee754Float64Log: -+ ASSEMBLE_IEEE754_UNOP(log); -+ break; -+ case kIeee754Float64Log1p: -+ ASSEMBLE_IEEE754_UNOP(log1p); -+ break; -+ case kIeee754Float64Log2: -+ ASSEMBLE_IEEE754_UNOP(log2); -+ break; -+ case kIeee754Float64Log10: -+ ASSEMBLE_IEEE754_UNOP(log10); -+ break; -+ case kIeee754Float64Pow: { -+ // Keep the x87 FPU stack empty before calling stub code -+ __ fstp(0); -+ // Call the MathStub and put return value in stX_0 -+ __ CallStubDelayed(new (zone()) -+ MathPowStub(nullptr, MathPowStub::DOUBLE)); -+ /* Return value is in st(0) on x87. */ -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ break; -+ } -+ case kIeee754Float64Sin: -+ __ X87SetFPUCW(0x027F); -+ ASSEMBLE_IEEE754_UNOP(sin); -+ __ X87SetFPUCW(0x037F); -+ break; -+ case kIeee754Float64Sinh: -+ ASSEMBLE_IEEE754_UNOP(sinh); -+ break; -+ case kIeee754Float64Tan: -+ __ X87SetFPUCW(0x027F); -+ ASSEMBLE_IEEE754_UNOP(tan); -+ __ X87SetFPUCW(0x037F); -+ break; -+ case kIeee754Float64Tanh: -+ ASSEMBLE_IEEE754_UNOP(tanh); -+ break; -+ case kX87Add: -+ if (HasImmediateInput(instr, 1)) { -+ __ add(i.InputOperand(0), i.InputImmediate(1)); -+ } else { -+ __ add(i.InputRegister(0), i.InputOperand(1)); -+ } -+ break; -+ case kX87And: -+ if (HasImmediateInput(instr, 1)) { -+ __ and_(i.InputOperand(0), i.InputImmediate(1)); -+ } else { -+ __ and_(i.InputRegister(0), i.InputOperand(1)); -+ } -+ break; -+ case kX87Cmp: -+ ASSEMBLE_COMPARE(cmp); -+ break; -+ case kX87Cmp16: -+ ASSEMBLE_COMPARE(cmpw); -+ break; -+ case kX87Cmp8: -+ ASSEMBLE_COMPARE(cmpb); -+ break; -+ case kX87Test: -+ ASSEMBLE_COMPARE(test); -+ break; -+ case kX87Test16: -+ ASSEMBLE_COMPARE(test_w); -+ break; -+ case kX87Test8: -+ ASSEMBLE_COMPARE(test_b); -+ break; -+ case kX87Imul: -+ if (HasImmediateInput(instr, 1)) { -+ __ imul(i.OutputRegister(), i.InputOperand(0), i.InputInt32(1)); -+ } else { -+ __ imul(i.OutputRegister(), i.InputOperand(1)); -+ } -+ break; -+ case kX87ImulHigh: -+ __ imul(i.InputRegister(1)); -+ break; -+ case kX87UmulHigh: -+ __ mul(i.InputRegister(1)); -+ break; -+ case kX87Idiv: -+ __ cdq(); -+ __ idiv(i.InputOperand(1)); -+ break; -+ case kX87Udiv: -+ __ Move(edx, Immediate(0)); -+ __ div(i.InputOperand(1)); -+ break; -+ case kX87Not: -+ __ not_(i.OutputOperand()); -+ break; -+ case kX87Neg: -+ __ neg(i.OutputOperand()); -+ break; -+ case kX87Or: -+ if (HasImmediateInput(instr, 1)) { -+ __ or_(i.InputOperand(0), i.InputImmediate(1)); -+ } else { -+ __ or_(i.InputRegister(0), i.InputOperand(1)); -+ } -+ break; -+ case kX87Xor: -+ if (HasImmediateInput(instr, 1)) { -+ __ xor_(i.InputOperand(0), i.InputImmediate(1)); -+ } else { -+ __ xor_(i.InputRegister(0), i.InputOperand(1)); -+ } -+ break; -+ case kX87Sub: -+ if (HasImmediateInput(instr, 1)) { -+ __ sub(i.InputOperand(0), i.InputImmediate(1)); -+ } else { -+ __ sub(i.InputRegister(0), i.InputOperand(1)); -+ } -+ break; -+ case kX87Shl: -+ if (HasImmediateInput(instr, 1)) { -+ __ shl(i.OutputOperand(), i.InputInt5(1)); -+ } else { -+ __ shl_cl(i.OutputOperand()); -+ } -+ break; -+ case kX87Shr: -+ if (HasImmediateInput(instr, 1)) { -+ __ shr(i.OutputOperand(), i.InputInt5(1)); -+ } else { -+ __ shr_cl(i.OutputOperand()); -+ } -+ break; -+ case kX87Sar: -+ if (HasImmediateInput(instr, 1)) { -+ __ sar(i.OutputOperand(), i.InputInt5(1)); -+ } else { -+ __ sar_cl(i.OutputOperand()); -+ } -+ break; -+ case kX87AddPair: { -+ // i.OutputRegister(0) == i.InputRegister(0) ... left low word. -+ // i.InputRegister(1) ... left high word. -+ // i.InputRegister(2) ... right low word. -+ // i.InputRegister(3) ... right high word. -+ bool use_temp = false; -+ if (i.OutputRegister(0).code() == i.InputRegister(1).code() || -+ i.OutputRegister(0).code() == i.InputRegister(3).code()) { -+ // We cannot write to the output register directly, because it would -+ // overwrite an input for adc. We have to use the temp register. -+ use_temp = true; -+ __ Move(i.TempRegister(0), i.InputRegister(0)); -+ __ add(i.TempRegister(0), i.InputRegister(2)); -+ } else { -+ __ add(i.OutputRegister(0), i.InputRegister(2)); -+ } -+ if (i.OutputRegister(1).code() != i.InputRegister(1).code()) { -+ __ Move(i.OutputRegister(1), i.InputRegister(1)); -+ } -+ __ adc(i.OutputRegister(1), Operand(i.InputRegister(3))); -+ if (use_temp) { -+ __ Move(i.OutputRegister(0), i.TempRegister(0)); -+ } -+ break; -+ } -+ case kX87SubPair: { -+ // i.OutputRegister(0) == i.InputRegister(0) ... left low word. -+ // i.InputRegister(1) ... left high word. -+ // i.InputRegister(2) ... right low word. -+ // i.InputRegister(3) ... right high word. -+ bool use_temp = false; -+ if (i.OutputRegister(0).code() == i.InputRegister(1).code() || -+ i.OutputRegister(0).code() == i.InputRegister(3).code()) { -+ // We cannot write to the output register directly, because it would -+ // overwrite an input for adc. We have to use the temp register. -+ use_temp = true; -+ __ Move(i.TempRegister(0), i.InputRegister(0)); -+ __ sub(i.TempRegister(0), i.InputRegister(2)); -+ } else { -+ __ sub(i.OutputRegister(0), i.InputRegister(2)); -+ } -+ if (i.OutputRegister(1).code() != i.InputRegister(1).code()) { -+ __ Move(i.OutputRegister(1), i.InputRegister(1)); -+ } -+ __ sbb(i.OutputRegister(1), Operand(i.InputRegister(3))); -+ if (use_temp) { -+ __ Move(i.OutputRegister(0), i.TempRegister(0)); -+ } -+ break; -+ } -+ case kX87MulPair: { -+ __ imul(i.OutputRegister(1), i.InputOperand(0)); -+ __ mov(i.TempRegister(0), i.InputOperand(1)); -+ __ imul(i.TempRegister(0), i.InputOperand(2)); -+ __ add(i.OutputRegister(1), i.TempRegister(0)); -+ __ mov(i.OutputRegister(0), i.InputOperand(0)); -+ // Multiplies the low words and stores them in eax and edx. -+ __ mul(i.InputRegister(2)); -+ __ add(i.OutputRegister(1), i.TempRegister(0)); -+ -+ break; -+ } -+ case kX87ShlPair: -+ if (HasImmediateInput(instr, 2)) { -+ __ ShlPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); -+ } else { -+ // Shift has been loaded into CL by the register allocator. -+ __ ShlPair_cl(i.InputRegister(1), i.InputRegister(0)); -+ } -+ break; -+ case kX87ShrPair: -+ if (HasImmediateInput(instr, 2)) { -+ __ ShrPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); -+ } else { -+ // Shift has been loaded into CL by the register allocator. -+ __ ShrPair_cl(i.InputRegister(1), i.InputRegister(0)); -+ } -+ break; -+ case kX87SarPair: -+ if (HasImmediateInput(instr, 2)) { -+ __ SarPair(i.InputRegister(1), i.InputRegister(0), i.InputInt6(2)); -+ } else { -+ // Shift has been loaded into CL by the register allocator. -+ __ SarPair_cl(i.InputRegister(1), i.InputRegister(0)); -+ } -+ break; -+ case kX87Ror: -+ if (HasImmediateInput(instr, 1)) { -+ __ ror(i.OutputOperand(), i.InputInt5(1)); -+ } else { -+ __ ror_cl(i.OutputOperand()); -+ } -+ break; -+ case kX87Lzcnt: -+ __ Lzcnt(i.OutputRegister(), i.InputOperand(0)); -+ break; -+ case kX87Popcnt: -+ __ Popcnt(i.OutputRegister(), i.InputOperand(0)); -+ break; -+ case kX87LoadFloat64Constant: { -+ InstructionOperand* source = instr->InputAt(0); -+ InstructionOperand* destination = instr->Output(); -+ DCHECK(source->IsConstant()); -+ X87OperandConverter g(this, nullptr); -+ Constant src_constant = g.ToConstant(source); -+ -+ DCHECK_EQ(Constant::kFloat64, src_constant.type()); -+ uint64_t src = src_constant.ToFloat64().AsUint64(); -+ uint32_t lower = static_cast(src); -+ uint32_t upper = static_cast(src >> 32); -+ if (destination->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ mov(MemOperand(esp, 0), Immediate(lower)); -+ __ mov(MemOperand(esp, kInt32Size), Immediate(upper)); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ UNREACHABLE(); -+ } -+ break; -+ } -+ case kX87Float32Cmp: { -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ FCmp(); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ break; -+ } -+ case kX87Float32Add: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ faddp(); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float32Sub: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fsubp(); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float32Mul: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fmulp(); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float32Div: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fdivp(); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ -+ case kX87Float32Sqrt: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fsqrt(); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ break; -+ } -+ case kX87Float32Abs: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fabs(); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ break; -+ } -+ case kX87Float32Neg: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fchs(); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ break; -+ } -+ case kX87Float32Round: { -+ RoundingMode mode = -+ static_cast(MiscField::decode(instr->opcode())); -+ // Set the correct round mode in x87 control register -+ __ X87SetRC((mode << 10)); -+ -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ InstructionOperand* input = instr->InputAt(0); -+ USE(input); -+ DCHECK(input->IsFPStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(i.InputOperand(0)); -+ } -+ __ frndint(); -+ __ X87SetRC(0x0000); -+ break; -+ } -+ case kX87Float64Add: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ faddp(); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float64Sub: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fsub_d(MemOperand(esp, 0)); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float64Mul: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fmul_d(MemOperand(esp, 0)); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float64Div: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fdiv_d(MemOperand(esp, 0)); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ // Restore the default value of control word. -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float64Mod: { -+ FrameScope frame_scope(tasm(), StackFrame::MANUAL); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ mov(eax, esp); -+ __ PrepareCallCFunction(4, eax); -+ __ fstp(0); -+ __ fld_d(MemOperand(eax, 0)); -+ __ fstp_d(Operand(esp, 1 * kDoubleSize)); -+ __ fld_d(MemOperand(eax, kDoubleSize)); -+ __ fstp_d(Operand(esp, 0)); -+ __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), -+ 4); -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ break; -+ } -+ case kX87Float32Max: { -+ Label compare_swap, done_compare; -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld(1); -+ __ fld(1); -+ __ FCmp(); -+ -+ auto ool = -+ new (zone()) OutOfLineLoadFloat32NaN(this, i.OutputDoubleRegister()); -+ __ j(parity_even, ool->entry()); -+ __ j(below, &done_compare, Label::kNear); -+ __ j(above, &compare_swap, Label::kNear); -+ __ push(eax); -+ __ lea(esp, Operand(esp, -kFloatSize)); -+ __ fld(1); -+ __ fstp_s(Operand(esp, 0)); -+ __ mov(eax, MemOperand(esp, 0)); -+ __ and_(eax, Immediate(0x80000000)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ __ pop(eax); -+ __ j(zero, &done_compare, Label::kNear); -+ -+ __ bind(&compare_swap); -+ __ bind(ool->exit()); -+ __ fxch(1); -+ -+ __ bind(&done_compare); -+ __ fstp(0); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ break; -+ } -+ case kX87Float64Max: { -+ Label compare_swap, done_compare; -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fld(1); -+ __ fld(1); -+ __ FCmp(); -+ -+ auto ool = -+ new (zone()) OutOfLineLoadFloat64NaN(this, i.OutputDoubleRegister()); -+ __ j(parity_even, ool->entry()); -+ __ j(below, &done_compare, Label::kNear); -+ __ j(above, &compare_swap, Label::kNear); -+ __ push(eax); -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ __ fld(1); -+ __ fstp_d(Operand(esp, 0)); -+ __ mov(eax, MemOperand(esp, 4)); -+ __ and_(eax, Immediate(0x80000000)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ __ pop(eax); -+ __ j(zero, &done_compare, Label::kNear); -+ -+ __ bind(&compare_swap); -+ __ bind(ool->exit()); -+ __ fxch(1); -+ -+ __ bind(&done_compare); -+ __ fstp(0); -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ break; -+ } -+ case kX87Float32Min: { -+ Label compare_swap, done_compare; -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, kFloatSize)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ fld(1); -+ __ fld(1); -+ __ FCmp(); -+ -+ auto ool = -+ new (zone()) OutOfLineLoadFloat32NaN(this, i.OutputDoubleRegister()); -+ __ j(parity_even, ool->entry()); -+ __ j(above, &done_compare, Label::kNear); -+ __ j(below, &compare_swap, Label::kNear); -+ __ push(eax); -+ __ lea(esp, Operand(esp, -kFloatSize)); -+ __ fld(0); -+ __ fstp_s(Operand(esp, 0)); -+ __ mov(eax, MemOperand(esp, 0)); -+ __ and_(eax, Immediate(0x80000000)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ __ pop(eax); -+ __ j(zero, &done_compare, Label::kNear); -+ -+ __ bind(&compare_swap); -+ __ bind(ool->exit()); -+ __ fxch(1); -+ -+ __ bind(&done_compare); -+ __ fstp(0); -+ __ lea(esp, Operand(esp, 2 * kFloatSize)); -+ break; -+ } -+ case kX87Float64Min: { -+ Label compare_swap, done_compare; -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fld(1); -+ __ fld(1); -+ __ FCmp(); -+ -+ auto ool = -+ new (zone()) OutOfLineLoadFloat64NaN(this, i.OutputDoubleRegister()); -+ __ j(parity_even, ool->entry()); -+ __ j(above, &done_compare, Label::kNear); -+ __ j(below, &compare_swap, Label::kNear); -+ __ push(eax); -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ __ fld(0); -+ __ fstp_d(Operand(esp, 0)); -+ __ mov(eax, MemOperand(esp, 4)); -+ __ and_(eax, Immediate(0x80000000)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ __ pop(eax); -+ __ j(zero, &done_compare, Label::kNear); -+ -+ __ bind(&compare_swap); -+ __ bind(ool->exit()); -+ __ fxch(1); -+ -+ __ bind(&done_compare); -+ __ fstp(0); -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ break; -+ } -+ case kX87Float64Abs: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fabs(); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ break; -+ } -+ case kX87Float64Neg: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fchs(); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ break; -+ } -+ case kX87Int32ToFloat32: { -+ InstructionOperand* input = instr->InputAt(0); -+ DCHECK(input->IsRegister() || input->IsStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ if (input->IsRegister()) { -+ Register input_reg = i.InputRegister(0); -+ __ push(input_reg); -+ __ fild_s(Operand(esp, 0)); -+ __ pop(input_reg); -+ } else { -+ __ fild_s(i.InputOperand(0)); -+ } -+ break; -+ } -+ case kX87Uint32ToFloat32: { -+ InstructionOperand* input = instr->InputAt(0); -+ DCHECK(input->IsRegister() || input->IsStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ Label msb_set_src; -+ Label jmp_return; -+ // Put input integer into eax(tmporarilly) -+ __ push(eax); -+ if (input->IsRegister()) -+ __ mov(eax, i.InputRegister(0)); -+ else -+ __ mov(eax, i.InputOperand(0)); -+ -+ __ test(eax, eax); -+ __ j(sign, &msb_set_src, Label::kNear); -+ __ push(eax); -+ __ fild_s(Operand(esp, 0)); -+ __ pop(eax); -+ -+ __ jmp(&jmp_return, Label::kNear); -+ __ bind(&msb_set_src); -+ // Need another temp reg -+ __ push(ebx); -+ __ mov(ebx, eax); -+ __ shr(eax, 1); -+ // Recover the least significant bit to avoid rounding errors. -+ __ and_(ebx, Immediate(1)); -+ __ or_(eax, ebx); -+ __ push(eax); -+ __ fild_s(Operand(esp, 0)); -+ __ pop(eax); -+ __ fld(0); -+ __ faddp(); -+ // Restore the ebx -+ __ pop(ebx); -+ __ bind(&jmp_return); -+ // Restore the eax -+ __ pop(eax); -+ break; -+ } -+ case kX87Int32ToFloat64: { -+ InstructionOperand* input = instr->InputAt(0); -+ DCHECK(input->IsRegister() || input->IsStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ if (input->IsRegister()) { -+ Register input_reg = i.InputRegister(0); -+ __ push(input_reg); -+ __ fild_s(Operand(esp, 0)); -+ __ pop(input_reg); -+ } else { -+ __ fild_s(i.InputOperand(0)); -+ } -+ break; -+ } -+ case kX87Float32ToFloat64: { -+ InstructionOperand* input = instr->InputAt(0); -+ if (input->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ DCHECK(input->IsFPStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(i.InputOperand(0)); -+ } -+ break; -+ } -+ case kX87Uint32ToFloat64: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ LoadUint32NoSSE2(i.InputRegister(0)); -+ break; -+ } -+ case kX87Float32ToInt32: { -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fld_s(i.InputOperand(0)); -+ } -+ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fstp(0); -+ } -+ break; -+ } -+ case kX87Float32ToUint32: { -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fld_s(i.InputOperand(0)); -+ } -+ Label success; -+ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); -+ __ test(i.OutputRegister(0), i.OutputRegister(0)); -+ __ j(positive, &success); -+ // Need to reserve the input float32 data. -+ __ fld(0); -+ __ push(Immediate(INT32_MIN)); -+ __ fild_s(Operand(esp, 0)); -+ __ lea(esp, Operand(esp, kPointerSize)); -+ __ faddp(); -+ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); -+ __ or_(i.OutputRegister(0), Immediate(0x80000000)); -+ // Only keep input float32 data in x87 stack when return. -+ __ fstp(0); -+ __ bind(&success); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fstp(0); -+ } -+ break; -+ } -+ case kX87Float64ToInt32: { -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fld_d(i.InputOperand(0)); -+ } -+ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fstp(0); -+ } -+ break; -+ } -+ case kX87Float64ToFloat32: { -+ InstructionOperand* input = instr->InputAt(0); -+ if (input->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ DCHECK(input->IsFPStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(i.InputOperand(0)); -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fstp_s(MemOperand(esp, 0)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } -+ break; -+ } -+ case kX87Float64ToUint32: { -+ __ push_imm32(-2147483648); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fld_d(i.InputOperand(0)); -+ } -+ __ fild_s(Operand(esp, 0)); -+ __ fld(1); -+ __ faddp(); -+ __ TruncateX87TOSToI(zone(), i.OutputRegister(0)); -+ __ add(esp, Immediate(kInt32Size)); -+ __ add(i.OutputRegister(), Immediate(0x80000000)); -+ __ fstp(0); -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ __ fstp(0); -+ } -+ break; -+ } -+ case kX87Float64ExtractHighWord32: { -+ if (instr->InputAt(0)->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fst_d(MemOperand(esp, 0)); -+ __ mov(i.OutputRegister(), MemOperand(esp, kDoubleSize / 2)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ InstructionOperand* input = instr->InputAt(0); -+ USE(input); -+ DCHECK(input->IsFPStackSlot()); -+ __ mov(i.OutputRegister(), i.InputOperand(0, kDoubleSize / 2)); -+ } -+ break; -+ } -+ case kX87Float64ExtractLowWord32: { -+ if (instr->InputAt(0)->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fst_d(MemOperand(esp, 0)); -+ __ mov(i.OutputRegister(), MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ InstructionOperand* input = instr->InputAt(0); -+ USE(input); -+ DCHECK(input->IsFPStackSlot()); -+ __ mov(i.OutputRegister(), i.InputOperand(0)); -+ } -+ break; -+ } -+ case kX87Float64InsertHighWord32: { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fstp_d(MemOperand(esp, 0)); -+ __ mov(MemOperand(esp, kDoubleSize / 2), i.InputRegister(1)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ break; -+ } -+ case kX87Float64InsertLowWord32: { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fstp_d(MemOperand(esp, 0)); -+ __ mov(MemOperand(esp, 0), i.InputRegister(1)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ break; -+ } -+ case kX87Float64Sqrt: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ X87SetFPUCW(0x027F); -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ fsqrt(); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ __ X87SetFPUCW(0x037F); -+ break; -+ } -+ case kX87Float64Round: { -+ RoundingMode mode = -+ static_cast(MiscField::decode(instr->opcode())); -+ // Set the correct round mode in x87 control register -+ __ X87SetRC((mode << 10)); -+ -+ if (!instr->InputAt(0)->IsFPRegister()) { -+ InstructionOperand* input = instr->InputAt(0); -+ USE(input); -+ DCHECK(input->IsFPStackSlot()); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(i.InputOperand(0)); -+ } -+ __ frndint(); -+ __ X87SetRC(0x0000); -+ break; -+ } -+ case kX87Float64Cmp: { -+ __ fld_d(MemOperand(esp, kDoubleSize)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ FCmp(); -+ __ lea(esp, Operand(esp, 2 * kDoubleSize)); -+ break; -+ } -+ case kX87Float64SilenceNaN: { -+ Label end, return_qnan; -+ __ fstp(0); -+ __ push(ebx); -+ // Load Half word of HoleNan(SNaN) into ebx -+ __ mov(ebx, MemOperand(esp, 2 * kInt32Size)); -+ __ cmp(ebx, Immediate(kHoleNanUpper32)); -+ // Check input is HoleNaN(SNaN)? -+ __ j(equal, &return_qnan, Label::kNear); -+ // If input isn't HoleNaN(SNaN), just load it and return -+ __ fld_d(MemOperand(esp, 1 * kInt32Size)); -+ __ jmp(&end); -+ __ bind(&return_qnan); -+ // If input is HoleNaN(SNaN), Return QNaN -+ __ push(Immediate(0xffffffff)); -+ __ push(Immediate(0xfff7ffff)); -+ __ fld_d(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kDoubleSize)); -+ __ bind(&end); -+ __ pop(ebx); -+ // Clear stack. -+ __ lea(esp, Operand(esp, 1 * kDoubleSize)); -+ break; -+ } -+ case kX87Movsxbl: -+ __ movsx_b(i.OutputRegister(), i.MemoryOperand()); -+ break; -+ case kX87Movzxbl: -+ __ movzx_b(i.OutputRegister(), i.MemoryOperand()); -+ break; -+ case kX87Movb: { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ if (HasImmediateInput(instr, index)) { -+ __ mov_b(operand, i.InputInt8(index)); -+ } else { -+ __ mov_b(operand, i.InputRegister(index)); -+ } -+ break; -+ } -+ case kX87Movsxwl: -+ __ movsx_w(i.OutputRegister(), i.MemoryOperand()); -+ break; -+ case kX87Movzxwl: -+ __ movzx_w(i.OutputRegister(), i.MemoryOperand()); -+ break; -+ case kX87Movw: { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ if (HasImmediateInput(instr, index)) { -+ __ mov_w(operand, i.InputInt16(index)); -+ } else { -+ __ mov_w(operand, i.InputRegister(index)); -+ } -+ break; -+ } -+ case kX87Movl: -+ if (instr->HasOutput()) { -+ __ mov(i.OutputRegister(), i.MemoryOperand()); -+ } else { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ if (HasImmediateInput(instr, index)) { -+ __ mov(operand, i.InputImmediate(index)); -+ } else { -+ __ mov(operand, i.InputRegister(index)); -+ } -+ } -+ break; -+ case kX87Movsd: { -+ if (instr->HasOutput()) { -+ X87Register output = i.OutputDoubleRegister(); -+ USE(output); -+ DCHECK(output.code() == 0); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_d(i.MemoryOperand()); -+ } else { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ __ fst_d(operand); -+ } -+ break; -+ } -+ case kX87Movss: { -+ if (instr->HasOutput()) { -+ X87Register output = i.OutputDoubleRegister(); -+ USE(output); -+ DCHECK(output.code() == 0); -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ __ fld_s(i.MemoryOperand()); -+ } else { -+ size_t index = 0; -+ Operand operand = i.MemoryOperand(&index); -+ __ fst_s(operand); -+ } -+ break; -+ } -+ case kX87BitcastFI: { -+ __ mov(i.OutputRegister(), MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ break; -+ } -+ case kX87BitcastIF: { -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ __ fstp(0); -+ if (instr->InputAt(0)->IsRegister()) { -+ __ lea(esp, Operand(esp, -kFloatSize)); -+ __ mov(MemOperand(esp, 0), i.InputRegister(0)); -+ __ fld_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kFloatSize)); -+ } else { -+ __ fld_s(i.InputOperand(0)); -+ } -+ break; -+ } -+ case kX87Lea: { -+ AddressingMode mode = AddressingModeField::decode(instr->opcode()); -+ // Shorten "leal" to "addl", "subl" or "shll" if the register allocation -+ // and addressing mode just happens to work out. The "addl"/"subl" forms -+ // in these cases are faster based on measurements. -+ if (mode == kMode_MI) { -+ __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); -+ } else if (i.InputRegister(0).is(i.OutputRegister())) { -+ if (mode == kMode_MRI) { -+ int32_t constant_summand = i.InputInt32(1); -+ if (constant_summand > 0) { -+ __ add(i.OutputRegister(), Immediate(constant_summand)); -+ } else if (constant_summand < 0) { -+ __ sub(i.OutputRegister(), Immediate(-constant_summand)); -+ } -+ } else if (mode == kMode_MR1) { -+ if (i.InputRegister(1).is(i.OutputRegister())) { -+ __ shl(i.OutputRegister(), 1); -+ } else { -+ __ add(i.OutputRegister(), i.InputRegister(1)); -+ } -+ } else if (mode == kMode_M2) { -+ __ shl(i.OutputRegister(), 1); -+ } else if (mode == kMode_M4) { -+ __ shl(i.OutputRegister(), 2); -+ } else if (mode == kMode_M8) { -+ __ shl(i.OutputRegister(), 3); -+ } else { -+ __ lea(i.OutputRegister(), i.MemoryOperand()); -+ } -+ } else if (mode == kMode_MR1 && -+ i.InputRegister(1).is(i.OutputRegister())) { -+ __ add(i.OutputRegister(), i.InputRegister(0)); -+ } else { -+ __ lea(i.OutputRegister(), i.MemoryOperand()); -+ } -+ break; -+ } -+ case kX87Push: -+ if (instr->InputAt(0)->IsFPRegister()) { -+ auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); -+ if (allocated.representation() == MachineRepresentation::kFloat32) { -+ __ sub(esp, Immediate(kFloatSize)); -+ __ fst_s(Operand(esp, 0)); -+ frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize); -+ } else { -+ DCHECK(allocated.representation() == MachineRepresentation::kFloat64); -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fst_d(Operand(esp, 0)); -+ frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); -+ } -+ } else if (instr->InputAt(0)->IsFPStackSlot()) { -+ auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); -+ if (allocated.representation() == MachineRepresentation::kFloat32) { -+ __ sub(esp, Immediate(kFloatSize)); -+ __ fld_s(i.InputOperand(0)); -+ __ fstp_s(MemOperand(esp, 0)); -+ frame_access_state()->IncreaseSPDelta(kFloatSize / kPointerSize); -+ } else { -+ DCHECK(allocated.representation() == MachineRepresentation::kFloat64); -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ fld_d(i.InputOperand(0)); -+ __ fstp_d(MemOperand(esp, 0)); -+ frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); -+ } -+ } else if (HasImmediateInput(instr, 0)) { -+ __ push(i.InputImmediate(0)); -+ frame_access_state()->IncreaseSPDelta(1); -+ } else { -+ __ push(i.InputOperand(0)); -+ frame_access_state()->IncreaseSPDelta(1); -+ } -+ break; -+ case kX87Poke: { -+ int const slot = MiscField::decode(instr->opcode()); -+ if (HasImmediateInput(instr, 0)) { -+ __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); -+ } else { -+ __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); -+ } -+ break; -+ } -+ case kX87PushFloat32: -+ __ lea(esp, Operand(esp, -kFloatSize)); -+ if (instr->InputAt(0)->IsFPStackSlot()) { -+ __ fld_s(i.InputOperand(0)); -+ __ fstp_s(MemOperand(esp, 0)); -+ } else if (instr->InputAt(0)->IsFPRegister()) { -+ __ fst_s(MemOperand(esp, 0)); -+ } else { -+ UNREACHABLE(); -+ } -+ break; -+ case kX87PushFloat64: -+ __ lea(esp, Operand(esp, -kDoubleSize)); -+ if (instr->InputAt(0)->IsFPStackSlot()) { -+ __ fld_d(i.InputOperand(0)); -+ __ fstp_d(MemOperand(esp, 0)); -+ } else if (instr->InputAt(0)->IsFPRegister()) { -+ __ fst_d(MemOperand(esp, 0)); -+ } else { -+ UNREACHABLE(); -+ } -+ break; -+ case kCheckedLoadInt8: -+ ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); -+ break; -+ case kCheckedLoadUint8: -+ ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); -+ break; -+ case kCheckedLoadInt16: -+ ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); -+ break; -+ case kCheckedLoadUint16: -+ ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_w); -+ break; -+ case kCheckedLoadWord32: -+ ASSEMBLE_CHECKED_LOAD_INTEGER(mov); -+ break; -+ case kCheckedLoadFloat32: -+ ASSEMBLE_CHECKED_LOAD_FLOAT(fld_s, OutOfLineLoadFloat32NaN); -+ break; -+ case kCheckedLoadFloat64: -+ ASSEMBLE_CHECKED_LOAD_FLOAT(fld_d, OutOfLineLoadFloat64NaN); -+ break; -+ case kCheckedStoreWord8: -+ ASSEMBLE_CHECKED_STORE_INTEGER(mov_b); -+ break; -+ case kCheckedStoreWord16: -+ ASSEMBLE_CHECKED_STORE_INTEGER(mov_w); -+ break; -+ case kCheckedStoreWord32: -+ ASSEMBLE_CHECKED_STORE_INTEGER(mov); -+ break; -+ case kCheckedStoreFloat32: -+ ASSEMBLE_CHECKED_STORE_FLOAT(fst_s); -+ break; -+ case kCheckedStoreFloat64: -+ ASSEMBLE_CHECKED_STORE_FLOAT(fst_d); -+ break; -+ case kX87StackCheck: { -+ ExternalReference const stack_limit = -+ ExternalReference::address_of_stack_limit(isolate()); -+ __ cmp(esp, Operand::StaticVariable(stack_limit)); -+ break; -+ } -+ case kCheckedLoadWord64: -+ case kCheckedStoreWord64: -+ UNREACHABLE(); // currently unsupported checked int64 load/store. -+ break; -+ case kAtomicExchangeInt8: { -+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); -+ __ movsx_b(i.InputRegister(0), i.InputRegister(0)); -+ break; -+ } -+ case kAtomicExchangeUint8: { -+ __ xchg_b(i.InputRegister(0), i.MemoryOperand(1)); -+ __ movzx_b(i.InputRegister(0), i.InputRegister(0)); -+ break; -+ } -+ case kAtomicExchangeInt16: { -+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); -+ __ movsx_w(i.InputRegister(0), i.InputRegister(0)); -+ break; -+ } -+ case kAtomicExchangeUint16: { -+ __ xchg_w(i.InputRegister(0), i.MemoryOperand(1)); -+ __ movzx_w(i.InputRegister(0), i.InputRegister(0)); -+ break; -+ } -+ case kAtomicExchangeWord32: { -+ __ xchg(i.InputRegister(0), i.MemoryOperand(1)); -+ break; -+ } -+ case kAtomicCompareExchangeInt8: { -+ __ lock(); -+ __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); -+ __ movsx_b(eax, eax); -+ break; -+ } -+ case kAtomicCompareExchangeUint8: { -+ __ lock(); -+ __ cmpxchg_b(i.MemoryOperand(2), i.InputRegister(1)); -+ __ movzx_b(eax, eax); -+ break; -+ } -+ case kAtomicCompareExchangeInt16: { -+ __ lock(); -+ __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); -+ __ movsx_w(eax, eax); -+ break; -+ } -+ case kAtomicCompareExchangeUint16: { -+ __ lock(); -+ __ cmpxchg_w(i.MemoryOperand(2), i.InputRegister(1)); -+ __ movzx_w(eax, eax); -+ break; -+ } -+ case kAtomicCompareExchangeWord32: { -+ __ lock(); -+ __ cmpxchg(i.MemoryOperand(2), i.InputRegister(1)); -+ break; -+ } -+#define ATOMIC_BINOP_CASE(op, inst) \ -+ case kAtomic##op##Int8: { \ -+ ASSEMBLE_ATOMIC_BINOP(inst, mov_b, cmpxchg_b); \ -+ __ movsx_b(eax, eax); \ -+ break; \ -+ } \ -+ case kAtomic##op##Uint8: { \ -+ ASSEMBLE_ATOMIC_BINOP(inst, mov_b, cmpxchg_b); \ -+ __ movzx_b(eax, eax); \ -+ break; \ -+ } \ -+ case kAtomic##op##Int16: { \ -+ ASSEMBLE_ATOMIC_BINOP(inst, mov_w, cmpxchg_w); \ -+ __ movsx_w(eax, eax); \ -+ break; \ -+ } \ -+ case kAtomic##op##Uint16: { \ -+ ASSEMBLE_ATOMIC_BINOP(inst, mov_w, cmpxchg_w); \ -+ __ movzx_w(eax, eax); \ -+ break; \ -+ } \ -+ case kAtomic##op##Word32: { \ -+ ASSEMBLE_ATOMIC_BINOP(inst, mov, cmpxchg); \ -+ break; \ -+ } -+ ATOMIC_BINOP_CASE(Add, add) -+ ATOMIC_BINOP_CASE(Sub, sub) -+ ATOMIC_BINOP_CASE(And, and_) -+ ATOMIC_BINOP_CASE(Or, or_) -+ ATOMIC_BINOP_CASE(Xor, xor_) -+#undef ATOMIC_BINOP_CASE -+ case kAtomicLoadInt8: -+ case kAtomicLoadUint8: -+ case kAtomicLoadInt16: -+ case kAtomicLoadUint16: -+ case kAtomicLoadWord32: -+ case kAtomicStoreWord8: -+ case kAtomicStoreWord16: -+ case kAtomicStoreWord32: -+ UNREACHABLE(); // Won't be generated by instruction selector. -+ break; -+ } -+ return kSuccess; -+} // NOLINT(readability/fn_size) -+ -+static Condition FlagsConditionToCondition(FlagsCondition condition) { -+ switch (condition) { -+ case kUnorderedEqual: -+ case kEqual: -+ return equal; -+ break; -+ case kUnorderedNotEqual: -+ case kNotEqual: -+ return not_equal; -+ break; -+ case kSignedLessThan: -+ return less; -+ break; -+ case kSignedGreaterThanOrEqual: -+ return greater_equal; -+ break; -+ case kSignedLessThanOrEqual: -+ return less_equal; -+ break; -+ case kSignedGreaterThan: -+ return greater; -+ break; -+ case kUnsignedLessThan: -+ return below; -+ break; -+ case kUnsignedGreaterThanOrEqual: -+ return above_equal; -+ break; -+ case kUnsignedLessThanOrEqual: -+ return below_equal; -+ break; -+ case kUnsignedGreaterThan: -+ return above; -+ break; -+ case kOverflow: -+ return overflow; -+ break; -+ case kNotOverflow: -+ return no_overflow; -+ break; -+ default: -+ UNREACHABLE(); -+ break; -+ } -+} -+ -+// Assembles a branch after an instruction. -+void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { -+ Label::Distance flabel_distance = -+ branch->fallthru ? Label::kNear : Label::kFar; -+ -+ Label done; -+ Label tlabel_tmp; -+ Label flabel_tmp; -+ Label* tlabel = &tlabel_tmp; -+ Label* flabel = &flabel_tmp; -+ -+ Label* tlabel_dst = branch->true_label; -+ Label* flabel_dst = branch->false_label; -+ -+ if (branch->condition == kUnorderedEqual) { -+ __ j(parity_even, flabel, flabel_distance); -+ } else if (branch->condition == kUnorderedNotEqual) { -+ __ j(parity_even, tlabel); -+ } -+ __ j(FlagsConditionToCondition(branch->condition), tlabel); -+ -+ // Add a jump if not falling through to the next block. -+ if (!branch->fallthru) __ jmp(flabel); -+ -+ __ jmp(&done); -+ __ bind(&tlabel_tmp); -+ FlagsMode mode = FlagsModeField::decode(instr->opcode()); -+ if (mode == kFlags_deoptimize) { -+ int double_register_param_count = 0; -+ int x87_layout = 0; -+ for (size_t i = 0; i < instr->InputCount(); i++) { -+ if (instr->InputAt(i)->IsFPRegister()) { -+ double_register_param_count++; -+ } -+ } -+ // Currently we use only one X87 register. If double_register_param_count -+ // is bigger than 1, it means duplicated double register is added to input -+ // of this instruction. -+ if (double_register_param_count > 0) { -+ x87_layout = (0 << 3) | 1; -+ } -+ // The layout of x87 register stack is loaded on the top of FPU register -+ // stack for deoptimization. -+ __ push(Immediate(x87_layout)); -+ __ fild_s(MemOperand(esp, 0)); -+ __ lea(esp, Operand(esp, kPointerSize)); -+ } -+ __ jmp(tlabel_dst); -+ __ bind(&flabel_tmp); -+ __ jmp(flabel_dst); -+ __ bind(&done); -+} -+ -+ -+void CodeGenerator::AssembleArchJump(RpoNumber target) { -+ if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); -+} -+ -+void CodeGenerator::AssembleArchTrap(Instruction* instr, -+ FlagsCondition condition) { -+ class OutOfLineTrap final : public OutOfLineCode { -+ public: -+ OutOfLineTrap(CodeGenerator* gen, bool frame_elided, Instruction* instr) -+ : OutOfLineCode(gen), -+ frame_elided_(frame_elided), -+ instr_(instr), -+ gen_(gen) {} -+ -+ void Generate() final { -+ X87OperandConverter i(gen_, instr_); -+ -+ Builtins::Name trap_id = -+ static_cast(i.InputInt32(instr_->InputCount() - 1)); -+ bool old_has_frame = __ has_frame(); -+ if (frame_elided_) { -+ __ set_has_frame(true); -+ __ EnterFrame(StackFrame::WASM_COMPILED); -+ } -+ GenerateCallToTrap(trap_id); -+ if (frame_elided_) { -+ __ set_has_frame(old_has_frame); -+ } -+ } -+ -+ private: -+ void GenerateCallToTrap(Builtins::Name trap_id) { -+ if (trap_id == Builtins::builtin_count) { -+ // We cannot test calls to the runtime in cctest/test-run-wasm. -+ // Therefore we emit a call to C here instead of a call to the runtime. -+ __ PrepareCallCFunction(0, esi); -+ __ CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing( -+ __ isolate()), -+ 0); -+ __ LeaveFrame(StackFrame::WASM_COMPILED); -+ __ Ret(); -+ } else { -+ gen_->AssembleSourcePosition(instr_); -+ __ Call(__ isolate()->builtins()->builtin_handle(trap_id), -+ RelocInfo::CODE_TARGET); -+ ReferenceMap* reference_map = -+ new (gen_->zone()) ReferenceMap(gen_->zone()); -+ gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, -+ Safepoint::kNoLazyDeopt); -+ __ AssertUnreachable(kUnexpectedReturnFromWasmTrap); -+ } -+ } -+ -+ bool frame_elided_; -+ Instruction* instr_; -+ CodeGenerator* gen_; -+ }; -+ bool frame_elided = !frame_access_state()->has_frame(); -+ auto ool = new (zone()) OutOfLineTrap(this, frame_elided, instr); -+ Label* tlabel = ool->entry(); -+ Label end; -+ if (condition == kUnorderedEqual) { -+ __ j(parity_even, &end); -+ } else if (condition == kUnorderedNotEqual) { -+ __ j(parity_even, tlabel); -+ } -+ __ j(FlagsConditionToCondition(condition), tlabel); -+ __ bind(&end); -+} -+ -+// Assembles boolean materializations after an instruction. -+void CodeGenerator::AssembleArchBoolean(Instruction* instr, -+ FlagsCondition condition) { -+ X87OperandConverter i(this, instr); -+ Label done; -+ -+ // Materialize a full 32-bit 1 or 0 value. The result register is always the -+ // last output of the instruction. -+ Label check; -+ DCHECK_NE(0u, instr->OutputCount()); -+ Register reg = i.OutputRegister(instr->OutputCount() - 1); -+ if (condition == kUnorderedEqual) { -+ __ j(parity_odd, &check, Label::kNear); -+ __ Move(reg, Immediate(0)); -+ __ jmp(&done, Label::kNear); -+ } else if (condition == kUnorderedNotEqual) { -+ __ j(parity_odd, &check, Label::kNear); -+ __ mov(reg, Immediate(1)); -+ __ jmp(&done, Label::kNear); -+ } -+ Condition cc = FlagsConditionToCondition(condition); -+ -+ __ bind(&check); -+ if (reg.is_byte_register()) { -+ // setcc for byte registers (al, bl, cl, dl). -+ __ setcc(cc, reg); -+ __ movzx_b(reg, reg); -+ } else { -+ // Emit a branch to set a register to either 1 or 0. -+ Label set; -+ __ j(cc, &set, Label::kNear); -+ __ Move(reg, Immediate(0)); -+ __ jmp(&done, Label::kNear); -+ __ bind(&set); -+ __ mov(reg, Immediate(1)); -+ } -+ __ bind(&done); -+} -+ -+ -+void CodeGenerator::AssembleArchLookupSwitch(Instruction* instr) { -+ X87OperandConverter i(this, instr); -+ Register input = i.InputRegister(0); -+ for (size_t index = 2; index < instr->InputCount(); index += 2) { -+ __ cmp(input, Immediate(i.InputInt32(index + 0))); -+ __ j(equal, GetLabel(i.InputRpo(index + 1))); -+ } -+ AssembleArchJump(i.InputRpo(1)); -+} -+ -+ -+void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) { -+ X87OperandConverter i(this, instr); -+ Register input = i.InputRegister(0); -+ size_t const case_count = instr->InputCount() - 2; -+ Label** cases = zone()->NewArray(case_count); -+ for (size_t index = 0; index < case_count; ++index) { -+ cases[index] = GetLabel(i.InputRpo(index + 2)); -+ } -+ Label* const table = AddJumpTable(cases, case_count); -+ __ cmp(input, Immediate(case_count)); -+ __ j(above_equal, GetLabel(i.InputRpo(1))); -+ __ jmp(Operand::JumpTable(input, times_4, table)); -+} -+ -+CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( -+ int deoptimization_id, SourcePosition pos) { -+ DeoptimizeKind deoptimization_kind = GetDeoptimizationKind(deoptimization_id); -+ DeoptimizeReason deoptimization_reason = -+ GetDeoptimizationReason(deoptimization_id); -+ Deoptimizer::BailoutType bailout_type = -+ deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT -+ : Deoptimizer::EAGER; -+ Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( -+ isolate(), deoptimization_id, bailout_type); -+ if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; -+ __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); -+ __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); -+ return kSuccess; -+} -+ -+ -+// The calling convention for JSFunctions on X87 passes arguments on the -+// stack and the JSFunction and context in EDI and ESI, respectively, thus -+// the steps of the call look as follows: -+ -+// --{ before the call instruction }-------------------------------------------- -+// | caller frame | -+// ^ esp ^ ebp -+ -+// --{ push arguments and setup ESI, EDI }-------------------------------------- -+// | args + receiver | caller frame | -+// ^ esp ^ ebp -+// [edi = JSFunction, esi = context] -+ -+// --{ call [edi + kCodeEntryOffset] }------------------------------------------ -+// | RET | args + receiver | caller frame | -+// ^ esp ^ ebp -+ -+// =={ prologue of called function }============================================ -+// --{ push ebp }--------------------------------------------------------------- -+// | FP | RET | args + receiver | caller frame | -+// ^ esp ^ ebp -+ -+// --{ mov ebp, esp }----------------------------------------------------------- -+// | FP | RET | args + receiver | caller frame | -+// ^ ebp,esp -+ -+// --{ push esi }--------------------------------------------------------------- -+// | CTX | FP | RET | args + receiver | caller frame | -+// ^esp ^ ebp -+ -+// --{ push edi }--------------------------------------------------------------- -+// | FNC | CTX | FP | RET | args + receiver | caller frame | -+// ^esp ^ ebp -+ -+// --{ subi esp, #N }----------------------------------------------------------- -+// | callee frame | FNC | CTX | FP | RET | args + receiver | caller frame | -+// ^esp ^ ebp -+ -+// =={ body of called function }================================================ -+ -+// =={ epilogue of called function }============================================ -+// --{ mov esp, ebp }----------------------------------------------------------- -+// | FP | RET | args + receiver | caller frame | -+// ^ esp,ebp -+ -+// --{ pop ebp }----------------------------------------------------------- -+// | | RET | args + receiver | caller frame | -+// ^ esp ^ ebp -+ -+// --{ ret #A+1 }----------------------------------------------------------- -+// | | caller frame | -+// ^ esp ^ ebp -+ -+ -+// Runtime function calls are accomplished by doing a stub call to the -+// CEntryStub (a real code object). On X87 passes arguments on the -+// stack, the number of arguments in EAX, the address of the runtime function -+// in EBX, and the context in ESI. -+ -+// --{ before the call instruction }-------------------------------------------- -+// | caller frame | -+// ^ esp ^ ebp -+ -+// --{ push arguments and setup EAX, EBX, and ESI }----------------------------- -+// | args + receiver | caller frame | -+// ^ esp ^ ebp -+// [eax = #args, ebx = runtime function, esi = context] -+ -+// --{ call #CEntryStub }------------------------------------------------------- -+// | RET | args + receiver | caller frame | -+// ^ esp ^ ebp -+ -+// =={ body of runtime function }=============================================== -+ -+// --{ runtime returns }-------------------------------------------------------- -+// | caller frame | -+// ^ esp ^ ebp -+ -+// Other custom linkages (e.g. for calling directly into and out of C++) may -+// need to save callee-saved registers on the stack, which is done in the -+// function prologue of generated code. -+ -+// --{ before the call instruction }-------------------------------------------- -+// | caller frame | -+// ^ esp ^ ebp -+ -+// --{ set up arguments in registers on stack }--------------------------------- -+// | args | caller frame | -+// ^ esp ^ ebp -+// [r0 = arg0, r1 = arg1, ...] -+ -+// --{ call code }-------------------------------------------------------------- -+// | RET | args | caller frame | -+// ^ esp ^ ebp -+ -+// =={ prologue of called function }============================================ -+// --{ push ebp }--------------------------------------------------------------- -+// | FP | RET | args | caller frame | -+// ^ esp ^ ebp -+ -+// --{ mov ebp, esp }----------------------------------------------------------- -+// | FP | RET | args | caller frame | -+// ^ ebp,esp -+ -+// --{ save registers }--------------------------------------------------------- -+// | regs | FP | RET | args | caller frame | -+// ^ esp ^ ebp -+ -+// --{ subi esp, #N }----------------------------------------------------------- -+// | callee frame | regs | FP | RET | args | caller frame | -+// ^esp ^ ebp -+ -+// =={ body of called function }================================================ -+ -+// =={ epilogue of called function }============================================ -+// --{ restore registers }------------------------------------------------------ -+// | regs | FP | RET | args | caller frame | -+// ^ esp ^ ebp -+ -+// --{ mov esp, ebp }----------------------------------------------------------- -+// | FP | RET | args | caller frame | -+// ^ esp,ebp -+ -+// --{ pop ebp }---------------------------------------------------------------- -+// | RET | args | caller frame | -+// ^ esp ^ ebp -+ -+void CodeGenerator::FinishFrame(Frame* frame) { -+ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); -+ const RegList saves = descriptor->CalleeSavedRegisters(); -+ if (saves != 0) { // Save callee-saved registers. -+ DCHECK(!info()->is_osr()); -+ int pushed = 0; -+ for (int i = Register::kNumRegisters - 1; i >= 0; i--) { -+ if (!((1 << i) & saves)) continue; -+ ++pushed; -+ } -+ frame->AllocateSavedCalleeRegisterSlots(pushed); -+ } -+ -+ // Initailize FPU state. -+ __ fninit(); -+ __ fld1(); -+} -+ -+void CodeGenerator::AssembleConstructFrame() { -+ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); -+ if (frame_access_state()->has_frame()) { -+ if (descriptor->IsCFunctionCall()) { -+ __ push(ebp); -+ __ mov(ebp, esp); -+ } else if (descriptor->IsJSFunctionCall()) { -+ __ Prologue(this->info()->GeneratePreagedPrologue()); -+ if (descriptor->PushArgumentCount()) { -+ __ push(kJavaScriptCallArgCountRegister); -+ } -+ } else { -+ __ StubPrologue(info()->GetOutputStackFrameType()); -+ } -+ } -+ -+ int shrink_slots = -+ frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); -+ -+ if (info()->is_osr()) { -+ // TurboFan OSR-compiled functions cannot be entered directly. -+ __ Abort(kShouldNotDirectlyEnterOsrFunction); -+ -+ // Unoptimized code jumps directly to this entrypoint while the unoptimized -+ // frame is still on the stack. Optimized code uses OSR values directly from -+ // the unoptimized frame. Thus, all that needs to be done is to allocate the -+ // remaining stack slots. -+ if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); -+ osr_pc_offset_ = __ pc_offset(); -+ shrink_slots -= osr_helper()->UnoptimizedFrameSlots(); -+ -+ // Initailize FPU state. -+ __ fninit(); -+ __ fld1(); -+ } -+ -+ const RegList saves = descriptor->CalleeSavedRegisters(); -+ if (shrink_slots > 0) { -+ if (info()->IsWasm() && shrink_slots > 128) { -+ // For WebAssembly functions with big frames we have to do the stack -+ // overflow check before we construct the frame. Otherwise we may not -+ // have enough space on the stack to call the runtime for the stack -+ // overflow. -+ Label done; -+ -+ // If the frame is bigger than the stack, we throw the stack overflow -+ // exception unconditionally. Thereby we can avoid the integer overflow -+ // check in the condition code. -+ if (shrink_slots * kPointerSize < FLAG_stack_size * 1024) { -+ Register scratch = esi; -+ __ push(scratch); -+ __ mov(scratch, -+ Immediate(ExternalReference::address_of_real_stack_limit( -+ __ isolate()))); -+ __ mov(scratch, Operand(scratch, 0)); -+ __ add(scratch, Immediate(shrink_slots * kPointerSize)); -+ __ cmp(esp, scratch); -+ __ pop(scratch); -+ __ j(above_equal, &done); -+ } -+ if (!frame_access_state()->has_frame()) { -+ __ set_has_frame(true); -+ __ EnterFrame(StackFrame::WASM_COMPILED); -+ } -+ __ Move(esi, Smi::kZero); -+ __ CallRuntimeDelayed(zone(), Runtime::kThrowWasmStackOverflow); -+ ReferenceMap* reference_map = new (zone()) ReferenceMap(zone()); -+ RecordSafepoint(reference_map, Safepoint::kSimple, 0, -+ Safepoint::kNoLazyDeopt); -+ __ AssertUnreachable(kUnexpectedReturnFromWasmTrap); -+ __ bind(&done); -+ } -+ __ sub(esp, Immediate(shrink_slots * kPointerSize)); -+ } -+ -+ if (saves != 0) { // Save callee-saved registers. -+ DCHECK(!info()->is_osr()); -+ int pushed = 0; -+ for (int i = Register::kNumRegisters - 1; i >= 0; i--) { -+ if (!((1 << i) & saves)) continue; -+ __ push(Register::from_code(i)); -+ ++pushed; -+ } -+ } -+} -+ -+void CodeGenerator::AssembleReturn(InstructionOperand* pop) { -+ CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); -+ -+ // Clear the FPU stack only if there is no return value in the stack. -+ if (FLAG_debug_code && FLAG_enable_slow_asserts) { -+ __ VerifyX87StackDepth(1); -+ } -+ bool clear_stack = true; -+ for (size_t i = 0; i < descriptor->ReturnCount(); i++) { -+ MachineRepresentation rep = descriptor->GetReturnType(i).representation(); -+ LinkageLocation loc = descriptor->GetReturnLocation(i); -+ if (IsFloatingPoint(rep) && loc == LinkageLocation::ForRegister(0)) { -+ clear_stack = false; -+ break; -+ } -+ } -+ if (clear_stack) __ fstp(0); -+ -+ const RegList saves = descriptor->CalleeSavedRegisters(); -+ // Restore registers. -+ if (saves != 0) { -+ for (int i = 0; i < Register::kNumRegisters; i++) { -+ if (!((1 << i) & saves)) continue; -+ __ pop(Register::from_code(i)); -+ } -+ } -+ -+ // Might need ecx for scratch if pop_size is too big or if there is a variable -+ // pop count. -+ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit()); -+ size_t pop_size = descriptor->StackParameterCount() * kPointerSize; -+ X87OperandConverter g(this, nullptr); -+ if (descriptor->IsCFunctionCall()) { -+ AssembleDeconstructFrame(); -+ } else if (frame_access_state()->has_frame()) { -+ // Canonicalize JSFunction return sites for now if they always have the same -+ // number of return args. -+ if (pop->IsImmediate() && g.ToConstant(pop).ToInt32() == 0) { -+ if (return_label_.is_bound()) { -+ __ jmp(&return_label_); -+ return; -+ } else { -+ __ bind(&return_label_); -+ AssembleDeconstructFrame(); -+ } -+ } else { -+ AssembleDeconstructFrame(); -+ } -+ } -+ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & edx.bit()); -+ DCHECK_EQ(0u, descriptor->CalleeSavedRegisters() & ecx.bit()); -+ if (pop->IsImmediate()) { -+ DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type()); -+ pop_size += g.ToConstant(pop).ToInt32() * kPointerSize; -+ __ Ret(static_cast(pop_size), ecx); -+ } else { -+ Register pop_reg = g.ToRegister(pop); -+ Register scratch_reg = pop_reg.is(ecx) ? edx : ecx; -+ __ pop(scratch_reg); -+ __ lea(esp, Operand(esp, pop_reg, times_4, static_cast(pop_size))); -+ __ jmp(scratch_reg); -+ } -+} -+ -+void CodeGenerator::FinishCode() {} -+ -+void CodeGenerator::AssembleMove(InstructionOperand* source, -+ InstructionOperand* destination) { -+ X87OperandConverter g(this, nullptr); -+ // Dispatch on the source and destination operand kinds. Not all -+ // combinations are possible. -+ if (source->IsRegister()) { -+ DCHECK(destination->IsRegister() || destination->IsStackSlot()); -+ Register src = g.ToRegister(source); -+ Operand dst = g.ToOperand(destination); -+ __ mov(dst, src); -+ } else if (source->IsStackSlot()) { -+ DCHECK(destination->IsRegister() || destination->IsStackSlot()); -+ Operand src = g.ToOperand(source); -+ if (destination->IsRegister()) { -+ Register dst = g.ToRegister(destination); -+ __ mov(dst, src); -+ } else { -+ Operand dst = g.ToOperand(destination); -+ __ push(src); -+ __ pop(dst); -+ } -+ } else if (source->IsConstant()) { -+ Constant src_constant = g.ToConstant(source); -+ if (src_constant.type() == Constant::kHeapObject) { -+ Handle src = src_constant.ToHeapObject(); -+ if (destination->IsRegister()) { -+ Register dst = g.ToRegister(destination); -+ __ Move(dst, src); -+ } else { -+ DCHECK(destination->IsStackSlot()); -+ Operand dst = g.ToOperand(destination); -+ __ mov(dst, src); -+ } -+ } else if (destination->IsRegister()) { -+ Register dst = g.ToRegister(destination); -+ __ Move(dst, g.ToImmediate(source)); -+ } else if (destination->IsStackSlot()) { -+ Operand dst = g.ToOperand(destination); -+ __ Move(dst, g.ToImmediate(source)); -+ } else if (src_constant.type() == Constant::kFloat32) { -+ // TODO(turbofan): Can we do better here? -+ uint32_t src = src_constant.ToFloat32AsInt(); -+ if (destination->IsFPRegister()) { -+ __ sub(esp, Immediate(kInt32Size)); -+ __ mov(MemOperand(esp, 0), Immediate(src)); -+ // always only push one value into the x87 stack. -+ __ fstp(0); -+ __ fld_s(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kInt32Size)); -+ } else { -+ DCHECK(destination->IsFPStackSlot()); -+ Operand dst = g.ToOperand(destination); -+ __ Move(dst, Immediate(src)); -+ } -+ } else { -+ DCHECK_EQ(Constant::kFloat64, src_constant.type()); -+ uint64_t src = src_constant.ToFloat64().AsUint64(); -+ uint32_t lower = static_cast(src); -+ uint32_t upper = static_cast(src >> 32); -+ if (destination->IsFPRegister()) { -+ __ sub(esp, Immediate(kDoubleSize)); -+ __ mov(MemOperand(esp, 0), Immediate(lower)); -+ __ mov(MemOperand(esp, kInt32Size), Immediate(upper)); -+ // always only push one value into the x87 stack. -+ __ fstp(0); -+ __ fld_d(MemOperand(esp, 0)); -+ __ add(esp, Immediate(kDoubleSize)); -+ } else { -+ DCHECK(destination->IsFPStackSlot()); -+ Operand dst0 = g.ToOperand(destination); -+ Operand dst1 = g.HighOperand(destination); -+ __ Move(dst0, Immediate(lower)); -+ __ Move(dst1, Immediate(upper)); -+ } -+ } -+ } else if (source->IsFPRegister()) { -+ DCHECK(destination->IsFPStackSlot()); -+ Operand dst = g.ToOperand(destination); -+ auto allocated = AllocatedOperand::cast(*source); -+ switch (allocated.representation()) { -+ case MachineRepresentation::kFloat32: -+ __ fst_s(dst); -+ break; -+ case MachineRepresentation::kFloat64: -+ __ fst_d(dst); -+ break; -+ default: -+ UNREACHABLE(); -+ } -+ } else if (source->IsFPStackSlot()) { -+ DCHECK(destination->IsFPRegister() || destination->IsFPStackSlot()); -+ Operand src = g.ToOperand(source); -+ auto allocated = AllocatedOperand::cast(*source); -+ if (destination->IsFPRegister()) { -+ // always only push one value into the x87 stack. -+ __ fstp(0); -+ switch (allocated.representation()) { -+ case MachineRepresentation::kFloat32: -+ __ fld_s(src); -+ break; -+ case MachineRepresentation::kFloat64: -+ __ fld_d(src); -+ break; -+ default: -+ UNREACHABLE(); -+ } -+ } else { -+ Operand dst = g.ToOperand(destination); -+ switch (allocated.representation()) { -+ case MachineRepresentation::kFloat32: -+ __ fld_s(src); -+ __ fstp_s(dst); -+ break; -+ case MachineRepresentation::kFloat64: -+ __ fld_d(src); -+ __ fstp_d(dst); -+ break; -+ default: -+ UNREACHABLE(); -+ } -+ } -+ } else { -+ UNREACHABLE(); -+ } -+} -+ -+ -+void CodeGenerator::AssembleSwap(InstructionOperand* source, -+ InstructionOperand* destination) { -+ X87OperandConverter g(this, nullptr); -+ // Dispatch on the source and destination operand kinds. Not all -+ // combinations are possible. -+ if (source->IsRegister() && destination->IsRegister()) { -+ // Register-register. -+ Register src = g.ToRegister(source); -+ Register dst = g.ToRegister(destination); -+ __ xchg(dst, src); -+ } else if (source->IsRegister() && destination->IsStackSlot()) { -+ // Register-memory. -+ __ xchg(g.ToRegister(source), g.ToOperand(destination)); -+ } else if (source->IsStackSlot() && destination->IsStackSlot()) { -+ // Memory-memory. -+ Operand dst1 = g.ToOperand(destination); -+ __ push(dst1); -+ frame_access_state()->IncreaseSPDelta(1); -+ Operand src1 = g.ToOperand(source); -+ __ push(src1); -+ Operand dst2 = g.ToOperand(destination); -+ __ pop(dst2); -+ frame_access_state()->IncreaseSPDelta(-1); -+ Operand src2 = g.ToOperand(source); -+ __ pop(src2); -+ } else if (source->IsFPRegister() && destination->IsFPRegister()) { -+ UNREACHABLE(); -+ } else if (source->IsFPRegister() && destination->IsFPStackSlot()) { -+ auto allocated = AllocatedOperand::cast(*source); -+ switch (allocated.representation()) { -+ case MachineRepresentation::kFloat32: -+ __ fld_s(g.ToOperand(destination)); -+ __ fxch(); -+ __ fstp_s(g.ToOperand(destination)); -+ break; -+ case MachineRepresentation::kFloat64: -+ __ fld_d(g.ToOperand(destination)); -+ __ fxch(); -+ __ fstp_d(g.ToOperand(destination)); -+ break; -+ default: -+ UNREACHABLE(); -+ } -+ } else if (source->IsFPStackSlot() && destination->IsFPStackSlot()) { -+ auto allocated = AllocatedOperand::cast(*source); -+ switch (allocated.representation()) { -+ case MachineRepresentation::kFloat32: -+ __ fld_s(g.ToOperand(source)); -+ __ fld_s(g.ToOperand(destination)); -+ __ fstp_s(g.ToOperand(source)); -+ __ fstp_s(g.ToOperand(destination)); -+ break; -+ case MachineRepresentation::kFloat64: -+ __ fld_d(g.ToOperand(source)); -+ __ fld_d(g.ToOperand(destination)); -+ __ fstp_d(g.ToOperand(source)); -+ __ fstp_d(g.ToOperand(destination)); -+ break; -+ default: -+ UNREACHABLE(); -+ } -+ } else { -+ // No other combinations are possible. -+ UNREACHABLE(); -+ } -+} -+ -+ -+void CodeGenerator::AssembleJumpTable(Label** targets, size_t target_count) { -+ for (size_t index = 0; index < target_count; ++index) { -+ __ dd(targets[index]); -+ } -+} -+ -+ -+void CodeGenerator::EnsureSpaceForLazyDeopt() { -+ if (!info()->ShouldEnsureSpaceForLazyDeopt()) { -+ return; -+ } -+ -+ int space_needed = Deoptimizer::patch_size(); -+ // Ensure that we have enough space after the previous lazy-bailout -+ // instruction for patching the code here. -+ int current_pc = tasm()->pc_offset(); -+ if (current_pc < last_lazy_deopt_pc_ + space_needed) { -+ int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; -+ __ Nop(padding_size); -+ } -+} -+ -+#undef __ -+ -+} // namespace compiler -+} // namespace internal -+} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-codes-x87.h 2018-02-18 19:00:54.013420855 +0100 -@@ -0,0 +1,141 @@ -+// Copyright 2014 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ -+#define V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ -+ -+#include "src/compiler/instruction.h" -+#include "src/compiler/instruction-codes.h" -+namespace v8 { -+namespace internal { -+namespace compiler { -+ -+// X87-specific opcodes that specify which assembly sequence to emit. -+// Most opcodes specify a single instruction. -+#define TARGET_ARCH_OPCODE_LIST(V) \ -+ V(X87Add) \ -+ V(X87And) \ -+ V(X87Cmp) \ -+ V(X87Cmp16) \ -+ V(X87Cmp8) \ -+ V(X87Test) \ -+ V(X87Test16) \ -+ V(X87Test8) \ -+ V(X87Or) \ -+ V(X87Xor) \ -+ V(X87Sub) \ -+ V(X87Imul) \ -+ V(X87ImulHigh) \ -+ V(X87UmulHigh) \ -+ V(X87Idiv) \ -+ V(X87Udiv) \ -+ V(X87Not) \ -+ V(X87Neg) \ -+ V(X87Shl) \ -+ V(X87Shr) \ -+ V(X87Sar) \ -+ V(X87AddPair) \ -+ V(X87SubPair) \ -+ V(X87MulPair) \ -+ V(X87ShlPair) \ -+ V(X87ShrPair) \ -+ V(X87SarPair) \ -+ V(X87Ror) \ -+ V(X87Lzcnt) \ -+ V(X87Popcnt) \ -+ V(X87Float32Cmp) \ -+ V(X87Float32Add) \ -+ V(X87Float32Sub) \ -+ V(X87Float32Mul) \ -+ V(X87Float32Div) \ -+ V(X87Float32Abs) \ -+ V(X87Float32Neg) \ -+ V(X87Float32Sqrt) \ -+ V(X87Float32Round) \ -+ V(X87LoadFloat64Constant) \ -+ V(X87Float64Add) \ -+ V(X87Float64Sub) \ -+ V(X87Float64Mul) \ -+ V(X87Float64Div) \ -+ V(X87Float64Mod) \ -+ V(X87Float32Max) \ -+ V(X87Float64Max) \ -+ V(X87Float32Min) \ -+ V(X87Float64Min) \ -+ V(X87Float64Abs) \ -+ V(X87Float64Neg) \ -+ V(X87Int32ToFloat32) \ -+ V(X87Uint32ToFloat32) \ -+ V(X87Int32ToFloat64) \ -+ V(X87Float32ToFloat64) \ -+ V(X87Uint32ToFloat64) \ -+ V(X87Float64ToInt32) \ -+ V(X87Float32ToInt32) \ -+ V(X87Float32ToUint32) \ -+ V(X87Float64ToFloat32) \ -+ V(X87Float64ToUint32) \ -+ V(X87Float64ExtractHighWord32) \ -+ V(X87Float64ExtractLowWord32) \ -+ V(X87Float64InsertHighWord32) \ -+ V(X87Float64InsertLowWord32) \ -+ V(X87Float64Sqrt) \ -+ V(X87Float64Round) \ -+ V(X87Float64Cmp) \ -+ V(X87Float64SilenceNaN) \ -+ V(X87Movsxbl) \ -+ V(X87Movzxbl) \ -+ V(X87Movb) \ -+ V(X87Movsxwl) \ -+ V(X87Movzxwl) \ -+ V(X87Movw) \ -+ V(X87Movl) \ -+ V(X87Movss) \ -+ V(X87Movsd) \ -+ V(X87Lea) \ -+ V(X87BitcastFI) \ -+ V(X87BitcastIF) \ -+ V(X87Push) \ -+ V(X87PushFloat64) \ -+ V(X87PushFloat32) \ -+ V(X87Poke) \ -+ V(X87StackCheck) -+ -+// Addressing modes represent the "shape" of inputs to an instruction. -+// Many instructions support multiple addressing modes. Addressing modes -+// are encoded into the InstructionCode of the instruction and tell the -+// code generator after register allocation which assembler method to call. -+// -+// We use the following local notation for addressing modes: -+// -+// M = memory operand -+// R = base register -+// N = index register * N for N in {1, 2, 4, 8} -+// I = immediate displacement (int32_t) -+ -+#define TARGET_ADDRESSING_MODE_LIST(V) \ -+ V(MR) /* [%r1 ] */ \ -+ V(MRI) /* [%r1 + K] */ \ -+ V(MR1) /* [%r1 + %r2*1 ] */ \ -+ V(MR2) /* [%r1 + %r2*2 ] */ \ -+ V(MR4) /* [%r1 + %r2*4 ] */ \ -+ V(MR8) /* [%r1 + %r2*8 ] */ \ -+ V(MR1I) /* [%r1 + %r2*1 + K] */ \ -+ V(MR2I) /* [%r1 + %r2*2 + K] */ \ -+ V(MR4I) /* [%r1 + %r2*3 + K] */ \ -+ V(MR8I) /* [%r1 + %r2*4 + K] */ \ -+ V(M1) /* [ %r2*1 ] */ \ -+ V(M2) /* [ %r2*2 ] */ \ -+ V(M4) /* [ %r2*4 ] */ \ -+ V(M8) /* [ %r2*8 ] */ \ -+ V(M1I) /* [ %r2*1 + K] */ \ -+ V(M2I) /* [ %r2*2 + K] */ \ -+ V(M4I) /* [ %r2*4 + K] */ \ -+ V(M8I) /* [ %r2*8 + K] */ \ -+ V(MI) /* [ K] */ -+ -+} // namespace compiler -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_COMPILER_X87_INSTRUCTION_CODES_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-scheduler-x87.cc 2018-02-18 19:00:54.013420855 +0100 -@@ -0,0 +1,26 @@ -+// Copyright 2015 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "src/compiler/instruction-scheduler.h" -+ -+namespace v8 { -+namespace internal { -+namespace compiler { -+ -+bool InstructionScheduler::SchedulerSupported() { return false; } -+ -+ -+int InstructionScheduler::GetTargetInstructionFlags( -+ const Instruction* instr) const { -+ UNIMPLEMENTED(); -+} -+ -+ -+int InstructionScheduler::GetInstructionLatency(const Instruction* instr) { -+ UNIMPLEMENTED(); -+} -+ -+} // namespace compiler -+} // namespace internal -+} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/instruction-selector-x87.cc 2018-02-18 19:00:54.014420841 +0100 -@@ -0,0 +1,2031 @@ -+// Copyright 2014 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "src/base/adapters.h" -+#include "src/compiler/instruction-selector-impl.h" -+#include "src/compiler/node-matchers.h" -+#include "src/compiler/node-properties.h" -+ -+namespace v8 { -+namespace internal { -+namespace compiler { -+ -+// Adds X87-specific methods for generating operands. -+class X87OperandGenerator final : public OperandGenerator { -+ public: -+ explicit X87OperandGenerator(InstructionSelector* selector) -+ : OperandGenerator(selector) {} -+ -+ InstructionOperand UseByteRegister(Node* node) { -+ // TODO(titzer): encode byte register use constraints. -+ return UseFixed(node, edx); -+ } -+ -+ InstructionOperand DefineAsByteRegister(Node* node) { -+ // TODO(titzer): encode byte register def constraints. -+ return DefineAsRegister(node); -+ } -+ -+ bool CanBeMemoryOperand(InstructionCode opcode, Node* node, Node* input, -+ int effect_level) { -+ if (input->opcode() != IrOpcode::kLoad || -+ !selector()->CanCover(node, input)) { -+ return false; -+ } -+ if (effect_level != selector()->GetEffectLevel(input)) { -+ return false; -+ } -+ MachineRepresentation rep = -+ LoadRepresentationOf(input->op()).representation(); -+ switch (opcode) { -+ case kX87Cmp: -+ case kX87Test: -+ return rep == MachineRepresentation::kWord32 || -+ rep == MachineRepresentation::kTagged; -+ case kX87Cmp16: -+ case kX87Test16: -+ return rep == MachineRepresentation::kWord16; -+ case kX87Cmp8: -+ case kX87Test8: -+ return rep == MachineRepresentation::kWord8; -+ default: -+ break; -+ } -+ return false; -+ } -+ -+ InstructionOperand CreateImmediate(int imm) { -+ return sequence()->AddImmediate(Constant(imm)); -+ } -+ -+ bool CanBeImmediate(Node* node) { -+ switch (node->opcode()) { -+ case IrOpcode::kInt32Constant: -+ case IrOpcode::kNumberConstant: -+ case IrOpcode::kExternalConstant: -+ case IrOpcode::kRelocatableInt32Constant: -+ case IrOpcode::kRelocatableInt64Constant: -+ return true; -+ case IrOpcode::kHeapConstant: { -+// TODO(bmeurer): We must not dereference handles concurrently. If we -+// really have to this here, then we need to find a way to put this -+// information on the HeapConstant node already. -+#if 0 -+ // Constants in new space cannot be used as immediates in V8 because -+ // the GC does not scan code objects when collecting the new generation. -+ Handle value = OpParameter>(node); -+ Isolate* isolate = value->GetIsolate(); -+ return !isolate->heap()->InNewSpace(*value); -+#endif -+ } -+ default: -+ return false; -+ } -+ } -+ -+ AddressingMode GenerateMemoryOperandInputs(Node* index, int scale, Node* base, -+ Node* displacement_node, -+ DisplacementMode displacement_mode, -+ InstructionOperand inputs[], -+ size_t* input_count) { -+ AddressingMode mode = kMode_MRI; -+ int32_t displacement = (displacement_node == nullptr) -+ ? 0 -+ : OpParameter(displacement_node); -+ if (displacement_mode == kNegativeDisplacement) { -+ displacement = -displacement; -+ } -+ if (base != nullptr) { -+ if (base->opcode() == IrOpcode::kInt32Constant) { -+ displacement += OpParameter(base); -+ base = nullptr; -+ } -+ } -+ if (base != nullptr) { -+ inputs[(*input_count)++] = UseRegister(base); -+ if (index != nullptr) { -+ DCHECK(scale >= 0 && scale <= 3); -+ inputs[(*input_count)++] = UseRegister(index); -+ if (displacement != 0) { -+ inputs[(*input_count)++] = TempImmediate(displacement); -+ static const AddressingMode kMRnI_modes[] = {kMode_MR1I, kMode_MR2I, -+ kMode_MR4I, kMode_MR8I}; -+ mode = kMRnI_modes[scale]; -+ } else { -+ static const AddressingMode kMRn_modes[] = {kMode_MR1, kMode_MR2, -+ kMode_MR4, kMode_MR8}; -+ mode = kMRn_modes[scale]; -+ } -+ } else { -+ if (displacement == 0) { -+ mode = kMode_MR; -+ } else { -+ inputs[(*input_count)++] = TempImmediate(displacement); -+ mode = kMode_MRI; -+ } -+ } -+ } else { -+ DCHECK(scale >= 0 && scale <= 3); -+ if (index != nullptr) { -+ inputs[(*input_count)++] = UseRegister(index); -+ if (displacement != 0) { -+ inputs[(*input_count)++] = TempImmediate(displacement); -+ static const AddressingMode kMnI_modes[] = {kMode_MRI, kMode_M2I, -+ kMode_M4I, kMode_M8I}; -+ mode = kMnI_modes[scale]; -+ } else { -+ static const AddressingMode kMn_modes[] = {kMode_MR, kMode_M2, -+ kMode_M4, kMode_M8}; -+ mode = kMn_modes[scale]; -+ } -+ } else { -+ inputs[(*input_count)++] = TempImmediate(displacement); -+ return kMode_MI; -+ } -+ } -+ return mode; -+ } -+ -+ AddressingMode GetEffectiveAddressMemoryOperand(Node* node, -+ InstructionOperand inputs[], -+ size_t* input_count) { -+ BaseWithIndexAndDisplacement32Matcher m(node, AddressOption::kAllowAll); -+ DCHECK(m.matches()); -+ if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) { -+ return GenerateMemoryOperandInputs( -+ m.index(), m.scale(), m.base(), m.displacement(), -+ m.displacement_mode(), inputs, input_count); -+ } else { -+ inputs[(*input_count)++] = UseRegister(node->InputAt(0)); -+ inputs[(*input_count)++] = UseRegister(node->InputAt(1)); -+ return kMode_MR1; -+ } -+ } -+ -+ bool CanBeBetterLeftOperand(Node* node) const { -+ return !selector()->IsLive(node); -+ } -+}; -+ -+void InstructionSelector::VisitStackSlot(Node* node) { -+ StackSlotRepresentation rep = StackSlotRepresentationOf(node->op()); -+ int slot = frame_->AllocateSpillSlot(rep.size()); -+ OperandGenerator g(this); -+ -+ Emit(kArchStackSlot, g.DefineAsRegister(node), -+ sequence()->AddImmediate(Constant(slot)), 0, nullptr); -+} -+ -+void InstructionSelector::VisitLoad(Node* node) { -+ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); -+ -+ ArchOpcode opcode = kArchNop; -+ switch (load_rep.representation()) { -+ case MachineRepresentation::kFloat32: -+ opcode = kX87Movss; -+ break; -+ case MachineRepresentation::kFloat64: -+ opcode = kX87Movsd; -+ break; -+ case MachineRepresentation::kBit: // Fall through. -+ case MachineRepresentation::kWord8: -+ opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl; -+ break; -+ case MachineRepresentation::kWord16: -+ opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; -+ break; -+ case MachineRepresentation::kTaggedSigned: // Fall through. -+ case MachineRepresentation::kTaggedPointer: // Fall through. -+ case MachineRepresentation::kTagged: // Fall through. -+ case MachineRepresentation::kWord32: -+ opcode = kX87Movl; -+ break; -+ case MachineRepresentation::kWord64: // Fall through. -+ case MachineRepresentation::kSimd128: // Fall through. -+ case MachineRepresentation::kNone: -+ UNREACHABLE(); -+ return; -+ } -+ -+ X87OperandGenerator g(this); -+ InstructionOperand outputs[1]; -+ outputs[0] = g.DefineAsRegister(node); -+ InstructionOperand inputs[3]; -+ size_t input_count = 0; -+ AddressingMode mode = -+ g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count); -+ InstructionCode code = opcode | AddressingModeField::encode(mode); -+ Emit(code, 1, outputs, input_count, inputs); -+} -+ -+void InstructionSelector::VisitProtectedLoad(Node* node) { -+ // TODO(eholk) -+ UNIMPLEMENTED(); -+} -+ -+void InstructionSelector::VisitStore(Node* node) { -+ X87OperandGenerator g(this); -+ Node* base = node->InputAt(0); -+ Node* index = node->InputAt(1); -+ Node* value = node->InputAt(2); -+ -+ StoreRepresentation store_rep = StoreRepresentationOf(node->op()); -+ WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); -+ MachineRepresentation rep = store_rep.representation(); -+ -+ if (write_barrier_kind != kNoWriteBarrier) { -+ DCHECK(CanBeTaggedPointer(rep)); -+ AddressingMode addressing_mode; -+ InstructionOperand inputs[3]; -+ size_t input_count = 0; -+ inputs[input_count++] = g.UseUniqueRegister(base); -+ if (g.CanBeImmediate(index)) { -+ inputs[input_count++] = g.UseImmediate(index); -+ addressing_mode = kMode_MRI; -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(index); -+ addressing_mode = kMode_MR1; -+ } -+ inputs[input_count++] = g.UseUniqueRegister(value); -+ RecordWriteMode record_write_mode = RecordWriteMode::kValueIsAny; -+ switch (write_barrier_kind) { -+ case kNoWriteBarrier: -+ UNREACHABLE(); -+ break; -+ case kMapWriteBarrier: -+ record_write_mode = RecordWriteMode::kValueIsMap; -+ break; -+ case kPointerWriteBarrier: -+ record_write_mode = RecordWriteMode::kValueIsPointer; -+ break; -+ case kFullWriteBarrier: -+ record_write_mode = RecordWriteMode::kValueIsAny; -+ break; -+ } -+ InstructionOperand temps[] = {g.TempRegister(), g.TempRegister()}; -+ size_t const temp_count = arraysize(temps); -+ InstructionCode code = kArchStoreWithWriteBarrier; -+ code |= AddressingModeField::encode(addressing_mode); -+ code |= MiscField::encode(static_cast(record_write_mode)); -+ Emit(code, 0, nullptr, input_count, inputs, temp_count, temps); -+ } else { -+ ArchOpcode opcode = kArchNop; -+ switch (rep) { -+ case MachineRepresentation::kFloat32: -+ opcode = kX87Movss; -+ break; -+ case MachineRepresentation::kFloat64: -+ opcode = kX87Movsd; -+ break; -+ case MachineRepresentation::kBit: // Fall through. -+ case MachineRepresentation::kWord8: -+ opcode = kX87Movb; -+ break; -+ case MachineRepresentation::kWord16: -+ opcode = kX87Movw; -+ break; -+ case MachineRepresentation::kTaggedSigned: // Fall through. -+ case MachineRepresentation::kTaggedPointer: // Fall through. -+ case MachineRepresentation::kTagged: // Fall through. -+ case MachineRepresentation::kWord32: -+ opcode = kX87Movl; -+ break; -+ case MachineRepresentation::kWord64: // Fall through. -+ case MachineRepresentation::kSimd128: // Fall through. -+ case MachineRepresentation::kNone: -+ UNREACHABLE(); -+ return; -+ } -+ -+ InstructionOperand val; -+ if (g.CanBeImmediate(value)) { -+ val = g.UseImmediate(value); -+ } else if (rep == MachineRepresentation::kWord8 || -+ rep == MachineRepresentation::kBit) { -+ val = g.UseByteRegister(value); -+ } else { -+ val = g.UseRegister(value); -+ } -+ -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ AddressingMode addressing_mode = -+ g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count); -+ InstructionCode code = -+ opcode | AddressingModeField::encode(addressing_mode); -+ inputs[input_count++] = val; -+ Emit(code, 0, static_cast(nullptr), input_count, -+ inputs); -+ } -+} -+ -+void InstructionSelector::VisitProtectedStore(Node* node) { -+ // TODO(eholk) -+ UNIMPLEMENTED(); -+} -+ -+// Architecture supports unaligned access, therefore VisitLoad is used instead -+void InstructionSelector::VisitUnalignedLoad(Node* node) { UNREACHABLE(); } -+ -+// Architecture supports unaligned access, therefore VisitStore is used instead -+void InstructionSelector::VisitUnalignedStore(Node* node) { UNREACHABLE(); } -+ -+void InstructionSelector::VisitCheckedLoad(Node* node) { -+ CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); -+ X87OperandGenerator g(this); -+ Node* const buffer = node->InputAt(0); -+ Node* const offset = node->InputAt(1); -+ Node* const length = node->InputAt(2); -+ ArchOpcode opcode = kArchNop; -+ switch (load_rep.representation()) { -+ case MachineRepresentation::kWord8: -+ opcode = load_rep.IsSigned() ? kCheckedLoadInt8 : kCheckedLoadUint8; -+ break; -+ case MachineRepresentation::kWord16: -+ opcode = load_rep.IsSigned() ? kCheckedLoadInt16 : kCheckedLoadUint16; -+ break; -+ case MachineRepresentation::kWord32: -+ opcode = kCheckedLoadWord32; -+ break; -+ case MachineRepresentation::kFloat32: -+ opcode = kCheckedLoadFloat32; -+ break; -+ case MachineRepresentation::kFloat64: -+ opcode = kCheckedLoadFloat64; -+ break; -+ case MachineRepresentation::kBit: // Fall through. -+ case MachineRepresentation::kTaggedSigned: // Fall through. -+ case MachineRepresentation::kTaggedPointer: // Fall through. -+ case MachineRepresentation::kTagged: // Fall through. -+ case MachineRepresentation::kWord64: // Fall through. -+ case MachineRepresentation::kSimd128: // Fall through. -+ case MachineRepresentation::kNone: -+ UNREACHABLE(); -+ return; -+ } -+ InstructionOperand offset_operand = g.UseRegister(offset); -+ InstructionOperand length_operand = -+ g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); -+ if (g.CanBeImmediate(buffer)) { -+ Emit(opcode | AddressingModeField::encode(kMode_MRI), -+ g.DefineAsRegister(node), offset_operand, length_operand, -+ offset_operand, g.UseImmediate(buffer)); -+ } else { -+ Emit(opcode | AddressingModeField::encode(kMode_MR1), -+ g.DefineAsRegister(node), offset_operand, length_operand, -+ g.UseRegister(buffer), offset_operand); -+ } -+} -+ -+ -+void InstructionSelector::VisitCheckedStore(Node* node) { -+ MachineRepresentation rep = CheckedStoreRepresentationOf(node->op()); -+ X87OperandGenerator g(this); -+ Node* const buffer = node->InputAt(0); -+ Node* const offset = node->InputAt(1); -+ Node* const length = node->InputAt(2); -+ Node* const value = node->InputAt(3); -+ ArchOpcode opcode = kArchNop; -+ switch (rep) { -+ case MachineRepresentation::kWord8: -+ opcode = kCheckedStoreWord8; -+ break; -+ case MachineRepresentation::kWord16: -+ opcode = kCheckedStoreWord16; -+ break; -+ case MachineRepresentation::kWord32: -+ opcode = kCheckedStoreWord32; -+ break; -+ case MachineRepresentation::kFloat32: -+ opcode = kCheckedStoreFloat32; -+ break; -+ case MachineRepresentation::kFloat64: -+ opcode = kCheckedStoreFloat64; -+ break; -+ case MachineRepresentation::kBit: // Fall through. -+ case MachineRepresentation::kTaggedSigned: // Fall through. -+ case MachineRepresentation::kTaggedPointer: // Fall through. -+ case MachineRepresentation::kTagged: // Fall through. -+ case MachineRepresentation::kWord64: // Fall through. -+ case MachineRepresentation::kSimd128: // Fall through. -+ case MachineRepresentation::kNone: -+ UNREACHABLE(); -+ return; -+ } -+ InstructionOperand value_operand = -+ g.CanBeImmediate(value) ? g.UseImmediate(value) -+ : ((rep == MachineRepresentation::kWord8 || -+ rep == MachineRepresentation::kBit) -+ ? g.UseByteRegister(value) -+ : g.UseRegister(value)); -+ InstructionOperand offset_operand = g.UseRegister(offset); -+ InstructionOperand length_operand = -+ g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); -+ if (g.CanBeImmediate(buffer)) { -+ Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), -+ offset_operand, length_operand, value_operand, offset_operand, -+ g.UseImmediate(buffer)); -+ } else { -+ Emit(opcode | AddressingModeField::encode(kMode_MR1), g.NoOutput(), -+ offset_operand, length_operand, value_operand, g.UseRegister(buffer), -+ offset_operand); -+ } -+} -+ -+namespace { -+ -+// Shared routine for multiple binary operations. -+void VisitBinop(InstructionSelector* selector, Node* node, -+ InstructionCode opcode, FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ Int32BinopMatcher m(node); -+ Node* left = m.left().node(); -+ Node* right = m.right().node(); -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ InstructionOperand outputs[2]; -+ size_t output_count = 0; -+ -+ // TODO(turbofan): match complex addressing modes. -+ if (left == right) { -+ // If both inputs refer to the same operand, enforce allocating a register -+ // for both of them to ensure that we don't end up generating code like -+ // this: -+ // -+ // mov eax, [ebp-0x10] -+ // add eax, [ebp-0x10] -+ // jo label -+ InstructionOperand const input = g.UseRegister(left); -+ inputs[input_count++] = input; -+ inputs[input_count++] = input; -+ } else if (g.CanBeImmediate(right)) { -+ inputs[input_count++] = g.UseRegister(left); -+ inputs[input_count++] = g.UseImmediate(right); -+ } else { -+ if (node->op()->HasProperty(Operator::kCommutative) && -+ g.CanBeBetterLeftOperand(right)) { -+ std::swap(left, right); -+ } -+ inputs[input_count++] = g.UseRegister(left); -+ inputs[input_count++] = g.Use(right); -+ } -+ -+ if (cont->IsBranch()) { -+ inputs[input_count++] = g.Label(cont->true_block()); -+ inputs[input_count++] = g.Label(cont->false_block()); -+ } -+ -+ outputs[output_count++] = g.DefineSameAsFirst(node); -+ if (cont->IsSet()) { -+ outputs[output_count++] = g.DefineAsRegister(cont->result()); -+ } -+ -+ DCHECK_NE(0u, input_count); -+ DCHECK_NE(0u, output_count); -+ DCHECK_GE(arraysize(inputs), input_count); -+ DCHECK_GE(arraysize(outputs), output_count); -+ -+ opcode = cont->Encode(opcode); -+ if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(opcode, output_count, outputs, input_count, inputs, -+ cont->kind(), cont->reason(), cont->frame_state()); -+ } else { -+ selector->Emit(opcode, output_count, outputs, input_count, inputs); -+ } -+} -+ -+ -+// Shared routine for multiple binary operations. -+void VisitBinop(InstructionSelector* selector, Node* node, -+ InstructionCode opcode) { -+ FlagsContinuation cont; -+ VisitBinop(selector, node, opcode, &cont); -+} -+ -+} // namespace -+ -+void InstructionSelector::VisitWord32And(Node* node) { -+ VisitBinop(this, node, kX87And); -+} -+ -+ -+void InstructionSelector::VisitWord32Or(Node* node) { -+ VisitBinop(this, node, kX87Or); -+} -+ -+ -+void InstructionSelector::VisitWord32Xor(Node* node) { -+ X87OperandGenerator g(this); -+ Int32BinopMatcher m(node); -+ if (m.right().Is(-1)) { -+ Emit(kX87Not, g.DefineSameAsFirst(node), g.UseRegister(m.left().node())); -+ } else { -+ VisitBinop(this, node, kX87Xor); -+ } -+} -+ -+ -+// Shared routine for multiple shift operations. -+static inline void VisitShift(InstructionSelector* selector, Node* node, -+ ArchOpcode opcode) { -+ X87OperandGenerator g(selector); -+ Node* left = node->InputAt(0); -+ Node* right = node->InputAt(1); -+ -+ if (g.CanBeImmediate(right)) { -+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), -+ g.UseImmediate(right)); -+ } else { -+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), -+ g.UseFixed(right, ecx)); -+ } -+} -+ -+ -+namespace { -+ -+void VisitMulHigh(InstructionSelector* selector, Node* node, -+ ArchOpcode opcode) { -+ X87OperandGenerator g(selector); -+ InstructionOperand temps[] = {g.TempRegister(eax)}; -+ selector->Emit( -+ opcode, g.DefineAsFixed(node, edx), g.UseFixed(node->InputAt(0), eax), -+ g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); -+} -+ -+ -+void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode opcode) { -+ X87OperandGenerator g(selector); -+ InstructionOperand temps[] = {g.TempRegister(edx)}; -+ selector->Emit(opcode, g.DefineAsFixed(node, eax), -+ g.UseFixed(node->InputAt(0), eax), -+ g.UseUnique(node->InputAt(1)), arraysize(temps), temps); -+} -+ -+ -+void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { -+ X87OperandGenerator g(selector); -+ InstructionOperand temps[] = {g.TempRegister(eax)}; -+ selector->Emit(opcode, g.DefineAsFixed(node, edx), -+ g.UseFixed(node->InputAt(0), eax), -+ g.UseUnique(node->InputAt(1)), arraysize(temps), temps); -+} -+ -+void EmitLea(InstructionSelector* selector, Node* result, Node* index, -+ int scale, Node* base, Node* displacement, -+ DisplacementMode displacement_mode) { -+ X87OperandGenerator g(selector); -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ AddressingMode mode = -+ g.GenerateMemoryOperandInputs(index, scale, base, displacement, -+ displacement_mode, inputs, &input_count); -+ -+ DCHECK_NE(0u, input_count); -+ DCHECK_GE(arraysize(inputs), input_count); -+ -+ InstructionOperand outputs[1]; -+ outputs[0] = g.DefineAsRegister(result); -+ -+ InstructionCode opcode = AddressingModeField::encode(mode) | kX87Lea; -+ -+ selector->Emit(opcode, 1, outputs, input_count, inputs); -+} -+ -+} // namespace -+ -+ -+void InstructionSelector::VisitWord32Shl(Node* node) { -+ Int32ScaleMatcher m(node, true); -+ if (m.matches()) { -+ Node* index = node->InputAt(0); -+ Node* base = m.power_of_two_plus_one() ? index : nullptr; -+ EmitLea(this, node, index, m.scale(), base, nullptr, kPositiveDisplacement); -+ return; -+ } -+ VisitShift(this, node, kX87Shl); -+} -+ -+ -+void InstructionSelector::VisitWord32Shr(Node* node) { -+ VisitShift(this, node, kX87Shr); -+} -+ -+ -+void InstructionSelector::VisitWord32Sar(Node* node) { -+ VisitShift(this, node, kX87Sar); -+} -+ -+void InstructionSelector::VisitInt32PairAdd(Node* node) { -+ X87OperandGenerator g(this); -+ -+ Node* projection1 = NodeProperties::FindProjection(node, 1); -+ if (projection1) { -+ // We use UseUniqueRegister here to avoid register sharing with the temp -+ // register. -+ InstructionOperand inputs[] = { -+ g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), -+ g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; -+ -+ InstructionOperand outputs[] = {g.DefineSameAsFirst(node), -+ g.DefineAsRegister(projection1)}; -+ -+ InstructionOperand temps[] = {g.TempRegister()}; -+ -+ Emit(kX87AddPair, 2, outputs, 4, inputs, 1, temps); -+ } else { -+ // The high word of the result is not used, so we emit the standard 32 bit -+ // instruction. -+ Emit(kX87Add, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), -+ g.Use(node->InputAt(2))); -+ } -+} -+ -+void InstructionSelector::VisitInt32PairSub(Node* node) { -+ X87OperandGenerator g(this); -+ -+ Node* projection1 = NodeProperties::FindProjection(node, 1); -+ if (projection1) { -+ // We use UseUniqueRegister here to avoid register sharing with the temp -+ // register. -+ InstructionOperand inputs[] = { -+ g.UseRegister(node->InputAt(0)), g.UseUniqueRegister(node->InputAt(1)), -+ g.UseRegister(node->InputAt(2)), g.UseUniqueRegister(node->InputAt(3))}; -+ -+ InstructionOperand outputs[] = {g.DefineSameAsFirst(node), -+ g.DefineAsRegister(projection1)}; -+ -+ InstructionOperand temps[] = {g.TempRegister()}; -+ -+ Emit(kX87SubPair, 2, outputs, 4, inputs, 1, temps); -+ } else { -+ // The high word of the result is not used, so we emit the standard 32 bit -+ // instruction. -+ Emit(kX87Sub, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), -+ g.Use(node->InputAt(2))); -+ } -+} -+ -+void InstructionSelector::VisitInt32PairMul(Node* node) { -+ X87OperandGenerator g(this); -+ -+ Node* projection1 = NodeProperties::FindProjection(node, 1); -+ if (projection1) { -+ // InputAt(3) explicitly shares ecx with OutputRegister(1) to save one -+ // register and one mov instruction. -+ InstructionOperand inputs[] = {g.UseUnique(node->InputAt(0)), -+ g.UseUnique(node->InputAt(1)), -+ g.UseUniqueRegister(node->InputAt(2)), -+ g.UseFixed(node->InputAt(3), ecx)}; -+ -+ InstructionOperand outputs[] = { -+ g.DefineAsFixed(node, eax), -+ g.DefineAsFixed(NodeProperties::FindProjection(node, 1), ecx)}; -+ -+ InstructionOperand temps[] = {g.TempRegister(edx)}; -+ -+ Emit(kX87MulPair, 2, outputs, 4, inputs, 1, temps); -+ } else { -+ // The high word of the result is not used, so we emit the standard 32 bit -+ // instruction. -+ Emit(kX87Imul, g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0)), -+ g.Use(node->InputAt(2))); -+ } -+} -+ -+void VisitWord32PairShift(InstructionSelector* selector, InstructionCode opcode, -+ Node* node) { -+ X87OperandGenerator g(selector); -+ -+ Node* shift = node->InputAt(2); -+ InstructionOperand shift_operand; -+ if (g.CanBeImmediate(shift)) { -+ shift_operand = g.UseImmediate(shift); -+ } else { -+ shift_operand = g.UseFixed(shift, ecx); -+ } -+ InstructionOperand inputs[] = {g.UseFixed(node->InputAt(0), eax), -+ g.UseFixed(node->InputAt(1), edx), -+ shift_operand}; -+ -+ InstructionOperand outputs[2]; -+ InstructionOperand temps[1]; -+ int32_t output_count = 0; -+ int32_t temp_count = 0; -+ outputs[output_count++] = g.DefineAsFixed(node, eax); -+ Node* projection1 = NodeProperties::FindProjection(node, 1); -+ if (projection1) { -+ outputs[output_count++] = g.DefineAsFixed(projection1, edx); -+ } else { -+ temps[temp_count++] = g.TempRegister(edx); -+ } -+ -+ selector->Emit(opcode, output_count, outputs, 3, inputs, temp_count, temps); -+} -+ -+void InstructionSelector::VisitWord32PairShl(Node* node) { -+ VisitWord32PairShift(this, kX87ShlPair, node); -+} -+ -+void InstructionSelector::VisitWord32PairShr(Node* node) { -+ VisitWord32PairShift(this, kX87ShrPair, node); -+} -+ -+void InstructionSelector::VisitWord32PairSar(Node* node) { -+ VisitWord32PairShift(this, kX87SarPair, node); -+} -+ -+void InstructionSelector::VisitWord32Ror(Node* node) { -+ VisitShift(this, node, kX87Ror); -+} -+ -+ -+void InstructionSelector::VisitWord32Clz(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Lzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } -+ -+ -+void InstructionSelector::VisitWord32ReverseBits(Node* node) { UNREACHABLE(); } -+ -+void InstructionSelector::VisitWord64ReverseBytes(Node* node) { UNREACHABLE(); } -+ -+void InstructionSelector::VisitWord32ReverseBytes(Node* node) { UNREACHABLE(); } -+ -+void InstructionSelector::VisitWord32Popcnt(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Popcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitInt32Add(Node* node) { -+ X87OperandGenerator g(this); -+ -+ // Try to match the Add to a lea pattern -+ BaseWithIndexAndDisplacement32Matcher m(node); -+ if (m.matches() && -+ (m.displacement() == nullptr || g.CanBeImmediate(m.displacement()))) { -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ AddressingMode mode = g.GenerateMemoryOperandInputs( -+ m.index(), m.scale(), m.base(), m.displacement(), m.displacement_mode(), -+ inputs, &input_count); -+ -+ DCHECK_NE(0u, input_count); -+ DCHECK_GE(arraysize(inputs), input_count); -+ -+ InstructionOperand outputs[1]; -+ outputs[0] = g.DefineAsRegister(node); -+ -+ InstructionCode opcode = AddressingModeField::encode(mode) | kX87Lea; -+ Emit(opcode, 1, outputs, input_count, inputs); -+ return; -+ } -+ -+ // No lea pattern match, use add -+ VisitBinop(this, node, kX87Add); -+} -+ -+ -+void InstructionSelector::VisitInt32Sub(Node* node) { -+ X87OperandGenerator g(this); -+ Int32BinopMatcher m(node); -+ if (m.left().Is(0)) { -+ Emit(kX87Neg, g.DefineSameAsFirst(node), g.Use(m.right().node())); -+ } else { -+ VisitBinop(this, node, kX87Sub); -+ } -+} -+ -+ -+void InstructionSelector::VisitInt32Mul(Node* node) { -+ Int32ScaleMatcher m(node, true); -+ if (m.matches()) { -+ Node* index = node->InputAt(0); -+ Node* base = m.power_of_two_plus_one() ? index : nullptr; -+ EmitLea(this, node, index, m.scale(), base, nullptr, kPositiveDisplacement); -+ return; -+ } -+ X87OperandGenerator g(this); -+ Node* left = node->InputAt(0); -+ Node* right = node->InputAt(1); -+ if (g.CanBeImmediate(right)) { -+ Emit(kX87Imul, g.DefineAsRegister(node), g.Use(left), -+ g.UseImmediate(right)); -+ } else { -+ if (g.CanBeBetterLeftOperand(right)) { -+ std::swap(left, right); -+ } -+ Emit(kX87Imul, g.DefineSameAsFirst(node), g.UseRegister(left), -+ g.Use(right)); -+ } -+} -+ -+ -+void InstructionSelector::VisitInt32MulHigh(Node* node) { -+ VisitMulHigh(this, node, kX87ImulHigh); -+} -+ -+ -+void InstructionSelector::VisitUint32MulHigh(Node* node) { -+ VisitMulHigh(this, node, kX87UmulHigh); -+} -+ -+ -+void InstructionSelector::VisitInt32Div(Node* node) { -+ VisitDiv(this, node, kX87Idiv); -+} -+ -+ -+void InstructionSelector::VisitUint32Div(Node* node) { -+ VisitDiv(this, node, kX87Udiv); -+} -+ -+ -+void InstructionSelector::VisitInt32Mod(Node* node) { -+ VisitMod(this, node, kX87Idiv); -+} -+ -+ -+void InstructionSelector::VisitUint32Mod(Node* node) { -+ VisitMod(this, node, kX87Udiv); -+} -+ -+ -+void InstructionSelector::VisitChangeFloat32ToFloat64(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32ToFloat64, g.DefineAsFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitRoundInt32ToFloat32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Int32ToFloat32, g.DefineAsFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitRoundUint32ToFloat32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Uint32ToFloat32, g.DefineAsFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Int32ToFloat64, g.DefineAsFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Uint32ToFloat64, g.DefineAsFixed(node, stX_0), -+ g.UseRegister(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitTruncateFloat32ToInt32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitTruncateFloat32ToUint32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+void InstructionSelector::VisitTruncateFloat64ToUint32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ToFloat32, g.DefineAsFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+void InstructionSelector::VisitTruncateFloat64ToWord32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kArchTruncateDoubleToI, g.DefineAsRegister(node), -+ g.Use(node->InputAt(0))); -+} -+ -+void InstructionSelector::VisitRoundFloat64ToInt32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitBitcastFloat32ToInt32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87BitcastFI, g.DefineAsRegister(node), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitBitcastInt32ToFloat32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87BitcastIF, g.DefineAsFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat32Add(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Add, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Add(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Add, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat32Sub(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat64Sub(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Sub, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat32Mul(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Mul(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Mul, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat32Div(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Div, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Div(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Div, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Mod(Node* node) { -+ X87OperandGenerator g(this); -+ InstructionOperand temps[] = {g.TempRegister(eax)}; -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Mod, g.DefineAsFixed(node, stX_0), 1, temps)->MarkAsCall(); -+} -+ -+void InstructionSelector::VisitFloat32Max(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Max, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat64Max(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Max, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat32Min(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float32Min, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat64Min(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(kX87Float64Min, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat32Abs(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float32Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Abs(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float64Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat32Sqrt(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float32Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat64Sqrt(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float64Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+ -+void InstructionSelector::VisitFloat32RoundDown(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32Round | MiscField::encode(kRoundDown), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64RoundDown(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64Round | MiscField::encode(kRoundDown), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat32RoundUp(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64RoundUp(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64Round | MiscField::encode(kRoundUp), g.UseFixed(node, stX_0), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32Round | MiscField::encode(kRoundToZero), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64Round | MiscField::encode(kRoundToZero), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { -+ UNREACHABLE(); -+} -+ -+ -+void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float32Round | MiscField::encode(kRoundToNearest), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64Round | MiscField::encode(kRoundToNearest), -+ g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); -+} -+ -+void InstructionSelector::VisitFloat32Neg(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float32Neg, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat64Neg(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float64Neg, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitFloat64Ieee754Binop(Node* node, -+ InstructionCode opcode) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ Emit(opcode, g.DefineAsFixed(node, stX_0), 0, nullptr)->MarkAsCall(); -+} -+ -+void InstructionSelector::VisitFloat64Ieee754Unop(Node* node, -+ InstructionCode opcode) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(opcode, g.DefineAsFixed(node, stX_0), 0, nullptr)->MarkAsCall(); -+} -+ -+void InstructionSelector::EmitPrepareArguments( -+ ZoneVector* arguments, const CallDescriptor* descriptor, -+ Node* node) { -+ X87OperandGenerator g(this); -+ -+ // Prepare for C function call. -+ if (descriptor->IsCFunctionCall()) { -+ InstructionOperand temps[] = {g.TempRegister()}; -+ size_t const temp_count = arraysize(temps); -+ Emit(kArchPrepareCallCFunction | -+ MiscField::encode(static_cast(descriptor->ParameterCount())), -+ 0, nullptr, 0, nullptr, temp_count, temps); -+ -+ // Poke any stack arguments. -+ for (size_t n = 0; n < arguments->size(); ++n) { -+ PushParameter input = (*arguments)[n]; -+ if (input.node()) { -+ int const slot = static_cast(n); -+ InstructionOperand value = g.CanBeImmediate(input.node()) -+ ? g.UseImmediate(input.node()) -+ : g.UseRegister(input.node()); -+ Emit(kX87Poke | MiscField::encode(slot), g.NoOutput(), value); -+ } -+ } -+ } else { -+ // Push any stack arguments. -+ for (PushParameter input : base::Reversed(*arguments)) { -+ // TODO(titzer): handle pushing double parameters. -+ if (input.node() == nullptr) continue; -+ InstructionOperand value = -+ g.CanBeImmediate(input.node()) -+ ? g.UseImmediate(input.node()) -+ : IsSupported(ATOM) || -+ sequence()->IsFP(GetVirtualRegister(input.node())) -+ ? g.UseRegister(input.node()) -+ : g.Use(input.node()); -+ Emit(kX87Push, g.NoOutput(), value); -+ } -+ } -+} -+ -+ -+bool InstructionSelector::IsTailCallAddressImmediate() { return true; } -+ -+int InstructionSelector::GetTempsCountForTailCallFromJSFunction() { return 0; } -+ -+namespace { -+ -+void VisitCompareWithMemoryOperand(InstructionSelector* selector, -+ InstructionCode opcode, Node* left, -+ InstructionOperand right, -+ FlagsContinuation* cont) { -+ DCHECK(left->opcode() == IrOpcode::kLoad); -+ X87OperandGenerator g(selector); -+ size_t input_count = 0; -+ InstructionOperand inputs[6]; -+ AddressingMode addressing_mode = -+ g.GetEffectiveAddressMemoryOperand(left, inputs, &input_count); -+ opcode |= AddressingModeField::encode(addressing_mode); -+ opcode = cont->Encode(opcode); -+ inputs[input_count++] = right; -+ -+ if (cont->IsBranch()) { -+ inputs[input_count++] = g.Label(cont->true_block()); -+ inputs[input_count++] = g.Label(cont->false_block()); -+ selector->Emit(opcode, 0, nullptr, input_count, inputs); -+ } else if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(opcode, 0, nullptr, input_count, inputs, -+ cont->kind(), cont->reason(), cont->frame_state()); -+ } else if (cont->IsSet()) { -+ InstructionOperand output = g.DefineAsRegister(cont->result()); -+ selector->Emit(opcode, 1, &output, input_count, inputs); -+ } else { -+ DCHECK(cont->IsTrap()); -+ inputs[input_count++] = g.UseImmediate(cont->trap_id()); -+ selector->Emit(opcode, 0, nullptr, input_count, inputs); -+ } -+} -+ -+// Shared routine for multiple compare operations. -+void VisitCompare(InstructionSelector* selector, InstructionCode opcode, -+ InstructionOperand left, InstructionOperand right, -+ FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ opcode = cont->Encode(opcode); -+ if (cont->IsBranch()) { -+ selector->Emit(opcode, g.NoOutput(), left, right, -+ g.Label(cont->true_block()), g.Label(cont->false_block())); -+ } else if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(opcode, g.NoOutput(), left, right, cont->kind(), -+ cont->reason(), cont->frame_state()); -+ } else if (cont->IsSet()) { -+ selector->Emit(opcode, g.DefineAsByteRegister(cont->result()), left, right); -+ } else { -+ DCHECK(cont->IsTrap()); -+ selector->Emit(opcode, g.NoOutput(), left, right, -+ g.UseImmediate(cont->trap_id())); -+ } -+} -+ -+ -+// Shared routine for multiple compare operations. -+void VisitCompare(InstructionSelector* selector, InstructionCode opcode, -+ Node* left, Node* right, FlagsContinuation* cont, -+ bool commutative) { -+ X87OperandGenerator g(selector); -+ if (commutative && g.CanBeBetterLeftOperand(right)) { -+ std::swap(left, right); -+ } -+ VisitCompare(selector, opcode, g.UseRegister(left), g.Use(right), cont); -+} -+ -+MachineType MachineTypeForNarrow(Node* node, Node* hint_node) { -+ if (hint_node->opcode() == IrOpcode::kLoad) { -+ MachineType hint = LoadRepresentationOf(hint_node->op()); -+ if (node->opcode() == IrOpcode::kInt32Constant || -+ node->opcode() == IrOpcode::kInt64Constant) { -+ int64_t constant = node->opcode() == IrOpcode::kInt32Constant -+ ? OpParameter(node) -+ : OpParameter(node); -+ if (hint == MachineType::Int8()) { -+ if (constant >= std::numeric_limits::min() && -+ constant <= std::numeric_limits::max()) { -+ return hint; -+ } -+ } else if (hint == MachineType::Uint8()) { -+ if (constant >= std::numeric_limits::min() && -+ constant <= std::numeric_limits::max()) { -+ return hint; -+ } -+ } else if (hint == MachineType::Int16()) { -+ if (constant >= std::numeric_limits::min() && -+ constant <= std::numeric_limits::max()) { -+ return hint; -+ } -+ } else if (hint == MachineType::Uint16()) { -+ if (constant >= std::numeric_limits::min() && -+ constant <= std::numeric_limits::max()) { -+ return hint; -+ } -+ } else if (hint == MachineType::Int32()) { -+ return hint; -+ } else if (hint == MachineType::Uint32()) { -+ if (constant >= 0) return hint; -+ } -+ } -+ } -+ return node->opcode() == IrOpcode::kLoad ? LoadRepresentationOf(node->op()) -+ : MachineType::None(); -+} -+ -+// Tries to match the size of the given opcode to that of the operands, if -+// possible. -+InstructionCode TryNarrowOpcodeSize(InstructionCode opcode, Node* left, -+ Node* right, FlagsContinuation* cont) { -+ // TODO(epertoso): we can probably get some size information out of phi nodes. -+ // If the load representations don't match, both operands will be -+ // zero/sign-extended to 32bit. -+ MachineType left_type = MachineTypeForNarrow(left, right); -+ MachineType right_type = MachineTypeForNarrow(right, left); -+ if (left_type == right_type) { -+ switch (left_type.representation()) { -+ case MachineRepresentation::kBit: -+ case MachineRepresentation::kWord8: { -+ if (opcode == kX87Test) return kX87Test8; -+ if (opcode == kX87Cmp) { -+ if (left_type.semantic() == MachineSemantic::kUint32) { -+ cont->OverwriteUnsignedIfSigned(); -+ } else { -+ CHECK_EQ(MachineSemantic::kInt32, left_type.semantic()); -+ } -+ return kX87Cmp8; -+ } -+ break; -+ } -+ case MachineRepresentation::kWord16: -+ if (opcode == kX87Test) return kX87Test16; -+ if (opcode == kX87Cmp) { -+ if (left_type.semantic() == MachineSemantic::kUint32) { -+ cont->OverwriteUnsignedIfSigned(); -+ } else { -+ CHECK_EQ(MachineSemantic::kInt32, left_type.semantic()); -+ } -+ return kX87Cmp16; -+ } -+ break; -+ default: -+ break; -+ } -+ } -+ return opcode; -+} -+ -+// Shared routine for multiple float32 compare operations (inputs commuted). -+void VisitFloat32Compare(InstructionSelector* selector, Node* node, -+ FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ selector->Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); -+ selector->Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(1))); -+ if (cont->IsBranch()) { -+ selector->Emit(cont->Encode(kX87Float32Cmp), g.NoOutput(), -+ g.Label(cont->true_block()), g.Label(cont->false_block())); -+ } else if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(cont->Encode(kX87Float32Cmp), g.NoOutput(), -+ g.Use(node->InputAt(0)), g.Use(node->InputAt(1)), -+ cont->kind(), cont->reason(), cont->frame_state()); -+ } else if (cont->IsSet()) { -+ selector->Emit(cont->Encode(kX87Float32Cmp), -+ g.DefineAsByteRegister(cont->result())); -+ } else { -+ DCHECK(cont->IsTrap()); -+ selector->Emit(cont->Encode(kX87Float32Cmp), g.NoOutput(), -+ g.UseImmediate(cont->trap_id())); -+ } -+} -+ -+ -+// Shared routine for multiple float64 compare operations (inputs commuted). -+void VisitFloat64Compare(InstructionSelector* selector, Node* node, -+ FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ selector->Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ selector->Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(1))); -+ if (cont->IsBranch()) { -+ selector->Emit(cont->Encode(kX87Float64Cmp), g.NoOutput(), -+ g.Label(cont->true_block()), g.Label(cont->false_block())); -+ } else if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(cont->Encode(kX87Float64Cmp), g.NoOutput(), -+ g.Use(node->InputAt(0)), g.Use(node->InputAt(1)), -+ cont->kind(), cont->reason(), cont->frame_state()); -+ } else if (cont->IsSet()) { -+ selector->Emit(cont->Encode(kX87Float64Cmp), -+ g.DefineAsByteRegister(cont->result())); -+ } else { -+ DCHECK(cont->IsTrap()); -+ selector->Emit(cont->Encode(kX87Float64Cmp), g.NoOutput(), -+ g.UseImmediate(cont->trap_id())); -+ } -+} -+ -+// Shared routine for multiple word compare operations. -+void VisitWordCompare(InstructionSelector* selector, Node* node, -+ InstructionCode opcode, FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ Node* left = node->InputAt(0); -+ Node* right = node->InputAt(1); -+ -+ InstructionCode narrowed_opcode = -+ TryNarrowOpcodeSize(opcode, left, right, cont); -+ -+ int effect_level = selector->GetEffectLevel(node); -+ if (cont->IsBranch()) { -+ effect_level = selector->GetEffectLevel( -+ cont->true_block()->PredecessorAt(0)->control_input()); -+ } -+ -+ // If one of the two inputs is an immediate, make sure it's on the right, or -+ // if one of the two inputs is a memory operand, make sure it's on the left. -+ if ((!g.CanBeImmediate(right) && g.CanBeImmediate(left)) || -+ (g.CanBeMemoryOperand(narrowed_opcode, node, right, effect_level) && -+ !g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level))) { -+ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); -+ std::swap(left, right); -+ } -+ -+ // Match immediates on right side of comparison. -+ if (g.CanBeImmediate(right)) { -+ if (g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level)) { -+ return VisitCompareWithMemoryOperand(selector, narrowed_opcode, left, -+ g.UseImmediate(right), cont); -+ } -+ return VisitCompare(selector, opcode, g.Use(left), g.UseImmediate(right), -+ cont); -+ } -+ -+ // Match memory operands on left side of comparison. -+ if (g.CanBeMemoryOperand(narrowed_opcode, node, left, effect_level)) { -+ bool needs_byte_register = -+ narrowed_opcode == kX87Test8 || narrowed_opcode == kX87Cmp8; -+ return VisitCompareWithMemoryOperand( -+ selector, narrowed_opcode, left, -+ needs_byte_register ? g.UseByteRegister(right) : g.UseRegister(right), -+ cont); -+ } -+ -+ if (g.CanBeBetterLeftOperand(right)) { -+ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); -+ std::swap(left, right); -+ } -+ -+ return VisitCompare(selector, opcode, left, right, cont, -+ node->op()->HasProperty(Operator::kCommutative)); -+} -+ -+void VisitWordCompare(InstructionSelector* selector, Node* node, -+ FlagsContinuation* cont) { -+ X87OperandGenerator g(selector); -+ Int32BinopMatcher m(node); -+ if (m.left().IsLoad() && m.right().IsLoadStackPointer()) { -+ LoadMatcher mleft(m.left().node()); -+ ExternalReference js_stack_limit = -+ ExternalReference::address_of_stack_limit(selector->isolate()); -+ if (mleft.object().Is(js_stack_limit) && mleft.index().Is(0)) { -+ // Compare(Load(js_stack_limit), LoadStackPointer) -+ if (!node->op()->HasProperty(Operator::kCommutative)) cont->Commute(); -+ InstructionCode opcode = cont->Encode(kX87StackCheck); -+ if (cont->IsBranch()) { -+ selector->Emit(opcode, g.NoOutput(), g.Label(cont->true_block()), -+ g.Label(cont->false_block())); -+ } else if (cont->IsDeoptimize()) { -+ selector->EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, cont->kind(), -+ cont->reason(), cont->frame_state()); -+ } else { -+ DCHECK(cont->IsSet()); -+ selector->Emit(opcode, g.DefineAsRegister(cont->result())); -+ } -+ return; -+ } -+ } -+ VisitWordCompare(selector, node, kX87Cmp, cont); -+} -+ -+ -+// Shared routine for word comparison with zero. -+void VisitWordCompareZero(InstructionSelector* selector, Node* user, -+ Node* value, FlagsContinuation* cont) { -+ // Try to combine with comparisons against 0 by simply inverting the branch. -+ while (value->opcode() == IrOpcode::kWord32Equal && -+ selector->CanCover(user, value)) { -+ Int32BinopMatcher m(value); -+ if (!m.right().Is(0)) break; -+ -+ user = value; -+ value = m.left().node(); -+ cont->Negate(); -+ } -+ -+ if (selector->CanCover(user, value)) { -+ switch (value->opcode()) { -+ case IrOpcode::kWord32Equal: -+ cont->OverwriteAndNegateIfEqual(kEqual); -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kInt32LessThan: -+ cont->OverwriteAndNegateIfEqual(kSignedLessThan); -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kInt32LessThanOrEqual: -+ cont->OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kUint32LessThan: -+ cont->OverwriteAndNegateIfEqual(kUnsignedLessThan); -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kUint32LessThanOrEqual: -+ cont->OverwriteAndNegateIfEqual(kUnsignedLessThanOrEqual); -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kFloat32Equal: -+ cont->OverwriteAndNegateIfEqual(kUnorderedEqual); -+ return VisitFloat32Compare(selector, value, cont); -+ case IrOpcode::kFloat32LessThan: -+ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThan); -+ return VisitFloat32Compare(selector, value, cont); -+ case IrOpcode::kFloat32LessThanOrEqual: -+ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThanOrEqual); -+ return VisitFloat32Compare(selector, value, cont); -+ case IrOpcode::kFloat64Equal: -+ cont->OverwriteAndNegateIfEqual(kUnorderedEqual); -+ return VisitFloat64Compare(selector, value, cont); -+ case IrOpcode::kFloat64LessThan: -+ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThan); -+ return VisitFloat64Compare(selector, value, cont); -+ case IrOpcode::kFloat64LessThanOrEqual: -+ cont->OverwriteAndNegateIfEqual(kUnsignedGreaterThanOrEqual); -+ return VisitFloat64Compare(selector, value, cont); -+ case IrOpcode::kProjection: -+ // Check if this is the overflow output projection of an -+ // WithOverflow node. -+ if (ProjectionIndexOf(value->op()) == 1u) { -+ // We cannot combine the WithOverflow with this branch -+ // unless the 0th projection (the use of the actual value of the -+ // is either nullptr, which means there's no use of the -+ // actual value, or was already defined, which means it is scheduled -+ // *AFTER* this branch). -+ Node* const node = value->InputAt(0); -+ Node* const result = NodeProperties::FindProjection(node, 0); -+ if (result == nullptr || selector->IsDefined(result)) { -+ switch (node->opcode()) { -+ case IrOpcode::kInt32AddWithOverflow: -+ cont->OverwriteAndNegateIfEqual(kOverflow); -+ return VisitBinop(selector, node, kX87Add, cont); -+ case IrOpcode::kInt32SubWithOverflow: -+ cont->OverwriteAndNegateIfEqual(kOverflow); -+ return VisitBinop(selector, node, kX87Sub, cont); -+ case IrOpcode::kInt32MulWithOverflow: -+ cont->OverwriteAndNegateIfEqual(kOverflow); -+ return VisitBinop(selector, node, kX87Imul, cont); -+ default: -+ break; -+ } -+ } -+ } -+ break; -+ case IrOpcode::kInt32Sub: -+ return VisitWordCompare(selector, value, cont); -+ case IrOpcode::kWord32And: -+ return VisitWordCompare(selector, value, kX87Test, cont); -+ default: -+ break; -+ } -+ } -+ -+ // Continuation could not be combined with a compare, emit compare against 0. -+ X87OperandGenerator g(selector); -+ VisitCompare(selector, kX87Cmp, g.Use(value), g.TempImmediate(0), cont); -+} -+ -+} // namespace -+ -+ -+void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch, -+ BasicBlock* fbranch) { -+ FlagsContinuation cont(kNotEqual, tbranch, fbranch); -+ VisitWordCompareZero(this, branch, branch->InputAt(0), &cont); -+} -+ -+void InstructionSelector::VisitDeoptimizeIf(Node* node) { -+ DeoptimizeParameters p = DeoptimizeParametersOf(node->op()); -+ FlagsContinuation cont = FlagsContinuation::ForDeoptimize( -+ kNotEqual, p.kind(), p.reason(), node->InputAt(1)); -+ VisitWordCompareZero(this, node, node->InputAt(0), &cont); -+} -+ -+void InstructionSelector::VisitDeoptimizeUnless(Node* node) { -+ DeoptimizeParameters p = DeoptimizeParametersOf(node->op()); -+ FlagsContinuation cont = FlagsContinuation::ForDeoptimize( -+ kEqual, p.kind(), p.reason(), node->InputAt(1)); -+ VisitWordCompareZero(this, node, node->InputAt(0), &cont); -+} -+ -+void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1)); -+ VisitWordCompareZero(this, node, node->InputAt(0), &cont); -+} -+ -+void InstructionSelector::VisitTrapUnless(Node* node, -+ Runtime::FunctionId func_id) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1)); -+ VisitWordCompareZero(this, node, node->InputAt(0), &cont); -+} -+ -+void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { -+ X87OperandGenerator g(this); -+ InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); -+ -+ // Emit either ArchTableSwitch or ArchLookupSwitch. -+ static const size_t kMaxTableSwitchValueRange = 2 << 16; -+ size_t table_space_cost = 4 + sw.value_range; -+ size_t table_time_cost = 3; -+ size_t lookup_space_cost = 3 + 2 * sw.case_count; -+ size_t lookup_time_cost = sw.case_count; -+ if (sw.case_count > 4 && -+ table_space_cost + 3 * table_time_cost <= -+ lookup_space_cost + 3 * lookup_time_cost && -+ sw.min_value > std::numeric_limits::min() && -+ sw.value_range <= kMaxTableSwitchValueRange) { -+ InstructionOperand index_operand = value_operand; -+ if (sw.min_value) { -+ index_operand = g.TempRegister(); -+ Emit(kX87Lea | AddressingModeField::encode(kMode_MRI), index_operand, -+ value_operand, g.TempImmediate(-sw.min_value)); -+ } -+ // Generate a table lookup. -+ return EmitTableSwitch(sw, index_operand); -+ } -+ -+ // Generate a sequence of conditional jumps. -+ return EmitLookupSwitch(sw, value_operand); -+} -+ -+ -+void InstructionSelector::VisitWord32Equal(Node* const node) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kEqual, node); -+ Int32BinopMatcher m(node); -+ if (m.right().Is(0)) { -+ return VisitWordCompareZero(this, m.node(), m.left().node(), &cont); -+ } -+ VisitWordCompare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitInt32LessThan(Node* node) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kSignedLessThan, node); -+ VisitWordCompare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitInt32LessThanOrEqual(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kSignedLessThanOrEqual, node); -+ VisitWordCompare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitUint32LessThan(Node* node) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kUnsignedLessThan, node); -+ VisitWordCompare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitUint32LessThanOrEqual(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kUnsignedLessThanOrEqual, node); -+ VisitWordCompare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitInt32AddWithOverflow(Node* node) { -+ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); -+ return VisitBinop(this, node, kX87Add, &cont); -+ } -+ FlagsContinuation cont; -+ VisitBinop(this, node, kX87Add, &cont); -+} -+ -+ -+void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { -+ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); -+ return VisitBinop(this, node, kX87Sub, &cont); -+ } -+ FlagsContinuation cont; -+ VisitBinop(this, node, kX87Sub, &cont); -+} -+ -+void InstructionSelector::VisitInt32MulWithOverflow(Node* node) { -+ if (Node* ovf = NodeProperties::FindProjection(node, 1)) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); -+ return VisitBinop(this, node, kX87Imul, &cont); -+ } -+ FlagsContinuation cont; -+ VisitBinop(this, node, kX87Imul, &cont); -+} -+ -+void InstructionSelector::VisitFloat32Equal(Node* node) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node); -+ VisitFloat32Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat32LessThan(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kUnsignedGreaterThan, node); -+ VisitFloat32Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat32LessThanOrEqual(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kUnsignedGreaterThanOrEqual, node); -+ VisitFloat32Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat64Equal(Node* node) { -+ FlagsContinuation cont = FlagsContinuation::ForSet(kUnorderedEqual, node); -+ VisitFloat64Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat64LessThan(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kUnsignedGreaterThan, node); -+ VisitFloat64Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { -+ FlagsContinuation cont = -+ FlagsContinuation::ForSet(kUnsignedGreaterThanOrEqual, node); -+ VisitFloat64Compare(this, node, &cont); -+} -+ -+ -+void InstructionSelector::VisitFloat64ExtractLowWord32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ExtractLowWord32, g.DefineAsRegister(node), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64ExtractHighWord32(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87Float64ExtractHighWord32, g.DefineAsRegister(node), -+ g.Use(node->InputAt(0))); -+} -+ -+ -+void InstructionSelector::VisitFloat64InsertLowWord32(Node* node) { -+ X87OperandGenerator g(this); -+ Node* left = node->InputAt(0); -+ Node* right = node->InputAt(1); -+ Emit(kX87Float64InsertLowWord32, g.UseFixed(node, stX_0), g.UseRegister(left), -+ g.UseRegister(right)); -+} -+ -+ -+void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { -+ X87OperandGenerator g(this); -+ Node* left = node->InputAt(0); -+ Node* right = node->InputAt(1); -+ Emit(kX87Float64InsertHighWord32, g.UseFixed(node, stX_0), -+ g.UseRegister(left), g.UseRegister(right)); -+} -+ -+void InstructionSelector::VisitFloat64SilenceNaN(Node* node) { -+ X87OperandGenerator g(this); -+ Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); -+ Emit(kX87Float64SilenceNaN, g.DefineAsFixed(node, stX_0), 0, nullptr); -+} -+ -+void InstructionSelector::VisitAtomicLoad(Node* node) { -+ LoadRepresentation load_rep = LoadRepresentationOf(node->op()); -+ DCHECK(load_rep.representation() == MachineRepresentation::kWord8 || -+ load_rep.representation() == MachineRepresentation::kWord16 || -+ load_rep.representation() == MachineRepresentation::kWord32); -+ USE(load_rep); -+ VisitLoad(node); -+} -+ -+void InstructionSelector::VisitAtomicStore(Node* node) { -+ X87OperandGenerator g(this); -+ Node* base = node->InputAt(0); -+ Node* index = node->InputAt(1); -+ Node* value = node->InputAt(2); -+ -+ MachineRepresentation rep = AtomicStoreRepresentationOf(node->op()); -+ ArchOpcode opcode = kArchNop; -+ switch (rep) { -+ case MachineRepresentation::kWord8: -+ opcode = kAtomicExchangeInt8; -+ break; -+ case MachineRepresentation::kWord16: -+ opcode = kAtomicExchangeInt16; -+ break; -+ case MachineRepresentation::kWord32: -+ opcode = kAtomicExchangeWord32; -+ break; -+ default: -+ UNREACHABLE(); -+ break; -+ } -+ AddressingMode addressing_mode; -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ if (rep == MachineRepresentation::kWord8) { -+ inputs[input_count++] = g.UseByteRegister(value); -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(value); -+ } -+ inputs[input_count++] = g.UseUniqueRegister(base); -+ if (g.CanBeImmediate(index)) { -+ inputs[input_count++] = g.UseImmediate(index); -+ addressing_mode = kMode_MRI; -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(index); -+ addressing_mode = kMode_MR1; -+ } -+ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); -+ Emit(code, 0, nullptr, input_count, inputs); -+} -+ -+void InstructionSelector::VisitAtomicExchange(Node* node) { -+ X87OperandGenerator g(this); -+ Node* base = node->InputAt(0); -+ Node* index = node->InputAt(1); -+ Node* value = node->InputAt(2); -+ -+ MachineType type = AtomicOpRepresentationOf(node->op()); -+ ArchOpcode opcode = kArchNop; -+ if (type == MachineType::Int8()) { -+ opcode = kAtomicExchangeInt8; -+ } else if (type == MachineType::Uint8()) { -+ opcode = kAtomicExchangeUint8; -+ } else if (type == MachineType::Int16()) { -+ opcode = kAtomicExchangeInt16; -+ } else if (type == MachineType::Uint16()) { -+ opcode = kAtomicExchangeUint16; -+ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { -+ opcode = kAtomicExchangeWord32; -+ } else { -+ UNREACHABLE(); -+ return; -+ } -+ InstructionOperand outputs[1]; -+ AddressingMode addressing_mode; -+ InstructionOperand inputs[3]; -+ size_t input_count = 0; -+ if (type == MachineType::Int8() || type == MachineType::Uint8()) { -+ inputs[input_count++] = g.UseFixed(value, edx); -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(value); -+ } -+ inputs[input_count++] = g.UseUniqueRegister(base); -+ if (g.CanBeImmediate(index)) { -+ inputs[input_count++] = g.UseImmediate(index); -+ addressing_mode = kMode_MRI; -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(index); -+ addressing_mode = kMode_MR1; -+ } -+ if (type == MachineType::Int8() || type == MachineType::Uint8()) { -+ // Using DefineSameAsFirst requires the register to be unallocated. -+ outputs[0] = g.DefineAsFixed(node, edx); -+ } else { -+ outputs[0] = g.DefineSameAsFirst(node); -+ } -+ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); -+ Emit(code, 1, outputs, input_count, inputs); -+} -+ -+void InstructionSelector::VisitAtomicCompareExchange(Node* node) { -+ X87OperandGenerator g(this); -+ Node* base = node->InputAt(0); -+ Node* index = node->InputAt(1); -+ Node* old_value = node->InputAt(2); -+ Node* new_value = node->InputAt(3); -+ -+ MachineType type = AtomicOpRepresentationOf(node->op()); -+ ArchOpcode opcode = kArchNop; -+ if (type == MachineType::Int8()) { -+ opcode = kAtomicCompareExchangeInt8; -+ } else if (type == MachineType::Uint8()) { -+ opcode = kAtomicCompareExchangeUint8; -+ } else if (type == MachineType::Int16()) { -+ opcode = kAtomicCompareExchangeInt16; -+ } else if (type == MachineType::Uint16()) { -+ opcode = kAtomicCompareExchangeUint16; -+ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { -+ opcode = kAtomicCompareExchangeWord32; -+ } else { -+ UNREACHABLE(); -+ return; -+ } -+ InstructionOperand outputs[1]; -+ AddressingMode addressing_mode; -+ InstructionOperand inputs[4]; -+ size_t input_count = 0; -+ inputs[input_count++] = g.UseFixed(old_value, eax); -+ if (type == MachineType::Int8() || type == MachineType::Uint8()) { -+ inputs[input_count++] = g.UseByteRegister(new_value); -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(new_value); -+ } -+ inputs[input_count++] = g.UseUniqueRegister(base); -+ if (g.CanBeImmediate(index)) { -+ inputs[input_count++] = g.UseImmediate(index); -+ addressing_mode = kMode_MRI; -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(index); -+ addressing_mode = kMode_MR1; -+ } -+ outputs[0] = g.DefineAsFixed(node, eax); -+ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); -+ Emit(code, 1, outputs, input_count, inputs); -+} -+ -+void InstructionSelector::VisitAtomicBinaryOperation( -+ Node* node, ArchOpcode int8_op, ArchOpcode uint8_op, ArchOpcode int16_op, -+ ArchOpcode uint16_op, ArchOpcode word32_op) { -+ X87OperandGenerator g(this); -+ Node* base = node->InputAt(0); -+ Node* index = node->InputAt(1); -+ Node* value = node->InputAt(2); -+ -+ MachineType type = AtomicOpRepresentationOf(node->op()); -+ ArchOpcode opcode = kArchNop; -+ if (type == MachineType::Int8()) { -+ opcode = int8_op; -+ } else if (type == MachineType::Uint8()) { -+ opcode = uint8_op; -+ } else if (type == MachineType::Int16()) { -+ opcode = int16_op; -+ } else if (type == MachineType::Uint16()) { -+ opcode = uint16_op; -+ } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { -+ opcode = word32_op; -+ } else { -+ UNREACHABLE(); -+ return; -+ } -+ InstructionOperand outputs[1]; -+ AddressingMode addressing_mode; -+ InstructionOperand inputs[3]; -+ size_t input_count = 0; -+ inputs[input_count++] = g.UseUniqueRegister(value); -+ inputs[input_count++] = g.UseUniqueRegister(base); -+ if (g.CanBeImmediate(index)) { -+ inputs[input_count++] = g.UseImmediate(index); -+ addressing_mode = kMode_MRI; -+ } else { -+ inputs[input_count++] = g.UseUniqueRegister(index); -+ addressing_mode = kMode_MR1; -+ } -+ outputs[0] = g.DefineAsFixed(node, eax); -+ InstructionOperand temp[1]; -+ if (type == MachineType::Int8() || type == MachineType::Uint8()) { -+ temp[0] = g.UseByteRegister(node); -+ } else { -+ temp[0] = g.TempRegister(); -+ } -+ InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); -+ Emit(code, 1, outputs, input_count, inputs, 1, temp); -+} -+ -+#define VISIT_ATOMIC_BINOP(op) \ -+ void InstructionSelector::VisitAtomic##op(Node* node) { \ -+ VisitAtomicBinaryOperation(node, kAtomic##op##Int8, kAtomic##op##Uint8, \ -+ kAtomic##op##Int16, kAtomic##op##Uint16, \ -+ kAtomic##op##Word32); \ -+ } -+VISIT_ATOMIC_BINOP(Add) -+VISIT_ATOMIC_BINOP(Sub) -+VISIT_ATOMIC_BINOP(And) -+VISIT_ATOMIC_BINOP(Or) -+VISIT_ATOMIC_BINOP(Xor) -+#undef VISIT_ATOMIC_BINOP -+ -+void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { -+ UNREACHABLE(); -+} -+ -+void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { -+ UNREACHABLE(); -+} -+ -+// static -+MachineOperatorBuilder::Flags -+InstructionSelector::SupportedMachineOperatorFlags() { -+ MachineOperatorBuilder::Flags flags = -+ MachineOperatorBuilder::kWord32ShiftIsSafe; -+ if (CpuFeatures::IsSupported(POPCNT)) { -+ flags |= MachineOperatorBuilder::kWord32Popcnt; -+ } -+ -+ flags |= MachineOperatorBuilder::kFloat32RoundDown | -+ MachineOperatorBuilder::kFloat64RoundDown | -+ MachineOperatorBuilder::kFloat32RoundUp | -+ MachineOperatorBuilder::kFloat64RoundUp | -+ MachineOperatorBuilder::kFloat32RoundTruncate | -+ MachineOperatorBuilder::kFloat64RoundTruncate | -+ MachineOperatorBuilder::kFloat32RoundTiesEven | -+ MachineOperatorBuilder::kFloat64RoundTiesEven; -+ return flags; -+} -+ -+// static -+MachineOperatorBuilder::AlignmentRequirements -+InstructionSelector::AlignmentRequirements() { -+ return MachineOperatorBuilder::AlignmentRequirements:: -+ FullUnalignedAccessSupport(); -+} -+ -+} // namespace compiler -+} // namespace internal -+} // namespace v8 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/compiler/x87/OWNERS 2018-02-18 19:00:54.014420841 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/debug-x87.cc 2018-02-18 19:00:54.014420841 +0100 -@@ -0,0 +1,141 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/debug/debug.h" -+ -+#include "src/codegen.h" -+#include "src/debug/liveedit.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm) -+ -+ -+void EmitDebugBreakSlot(MacroAssembler* masm) { -+ Label check_codesize; -+ __ bind(&check_codesize); -+ __ Nop(Assembler::kDebugBreakSlotLength); -+ DCHECK_EQ(Assembler::kDebugBreakSlotLength, -+ masm->SizeOfCodeGeneratedSince(&check_codesize)); -+} -+ -+ -+void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { -+ // Generate enough nop's to make space for a call instruction. -+ masm->RecordDebugBreakSlot(mode); -+ EmitDebugBreakSlot(masm); -+} -+ -+ -+void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { -+ CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotLength); -+ EmitDebugBreakSlot(patcher.masm()); -+} -+ -+ -+void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, -+ Handle code) { -+ DCHECK(code->is_debug_stub()); -+ static const int kSize = Assembler::kDebugBreakSlotLength; -+ CodePatcher patcher(isolate, pc, kSize); -+ -+ // Add a label for checking the size of the code used for returning. -+ Label check_codesize; -+ patcher.masm()->bind(&check_codesize); -+ patcher.masm()->call(code->entry(), RelocInfo::NONE32); -+ // Check that the size of the code generated is as expected. -+ DCHECK_EQ(kSize, patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); -+} -+ -+bool DebugCodegen::DebugBreakSlotIsPatched(Address pc) { -+ return !Assembler::IsNop(pc); -+} -+ -+void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm, -+ DebugBreakCallHelperMode mode) { -+ __ RecordComment("Debug break"); -+ -+ // Enter an internal frame. -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Push arguments for DebugBreak call. -+ if (mode == SAVE_RESULT_REGISTER) { -+ // Break on return. -+ __ push(eax); -+ } else { -+ // Non-return breaks. -+ __ Push(masm->isolate()->factory()->the_hole_value()); -+ } -+ __ Move(eax, Immediate(1)); -+ __ mov(ebx, -+ Immediate(ExternalReference( -+ Runtime::FunctionForId(Runtime::kDebugBreak), masm->isolate()))); -+ -+ CEntryStub ceb(masm->isolate(), 1); -+ __ CallStub(&ceb); -+ -+ if (FLAG_debug_code) { -+ for (int i = 0; i < kNumJSCallerSaved; ++i) { -+ Register reg = {JSCallerSavedCode(i)}; -+ // Do not clobber eax if mode is SAVE_RESULT_REGISTER. It will -+ // contain return value of the function. -+ if (!(reg.is(eax) && (mode == SAVE_RESULT_REGISTER))) { -+ __ Move(reg, Immediate(kDebugZapValue)); -+ } -+ } -+ } -+ -+ // Get rid of the internal frame. -+ } -+ -+ __ MaybeDropFrames(); -+ -+ // Return to caller. -+ __ ret(0); -+} -+ -+void DebugCodegen::GenerateHandleDebuggerStatement(MacroAssembler* masm) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ CallRuntime(Runtime::kHandleDebuggerStatement, 0); -+ } -+ __ MaybeDropFrames(); -+ -+ // Return to caller. -+ __ ret(0); -+} -+ -+void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) { -+ // Frame is being dropped: -+ // - Drop to the target frame specified by ebx. -+ // - Look up current function on the frame. -+ // - Leave the frame. -+ // - Restart the frame by calling the function. -+ __ mov(ebp, ebx); -+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ leave(); -+ -+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ebx, -+ FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ -+ ParameterCount dummy(ebx); -+ __ InvokeFunction(edi, dummy, dummy, JUMP_FUNCTION, -+ CheckDebugStepCallWrapper()); -+} -+ -+ -+const bool LiveEdit::kFrameDropperSupported = true; -+ -+#undef __ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/debug/x87/OWNERS 2018-02-18 19:00:54.015420826 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/frames-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/frames-inl.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/frames-inl.h 2018-02-18 19:00:54.015420826 +0100 -@@ -26,6 +26,8 @@ - #include "src/mips64/frames-mips64.h" // NOLINT - #elif V8_TARGET_ARCH_S390 - #include "src/s390/frames-s390.h" // NOLINT -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/frames-x87.h" // NOLINT - #else - #error Unsupported target architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/full-codegen.h 2018-02-18 19:00:54.015420826 +0100 -@@ -45,7 +45,7 @@ - static const int kMaxBackEdgeWeight = 127; - - // Platform-specific code size multiplier. --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - static const int kCodeSizeMultiplier = 105; - #elif V8_TARGET_ARCH_X64 - static const int kCodeSizeMultiplier = 165; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/full-codegen-x87.cc 2018-02-18 19:00:54.100419575 +0100 -@@ -0,0 +1,2410 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/ast/compile-time-value.h" -+#include "src/ast/scopes.h" -+#include "src/builtins/builtins-constructor.h" -+#include "src/code-factory.h" -+#include "src/code-stubs.h" -+#include "src/codegen.h" -+#include "src/compilation-info.h" -+#include "src/compiler.h" -+#include "src/debug/debug.h" -+#include "src/full-codegen/full-codegen.h" -+#include "src/ic/ic.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm()) -+ -+class JumpPatchSite BASE_EMBEDDED { -+ public: -+ explicit JumpPatchSite(MacroAssembler* masm) : masm_(masm) { -+#ifdef DEBUG -+ info_emitted_ = false; -+#endif -+ } -+ -+ ~JumpPatchSite() { -+ DCHECK(patch_site_.is_bound() == info_emitted_); -+ } -+ -+ void EmitJumpIfNotSmi(Register reg, -+ Label* target, -+ Label::Distance distance = Label::kFar) { -+ __ test(reg, Immediate(kSmiTagMask)); -+ EmitJump(not_carry, target, distance); // Always taken before patched. -+ } -+ -+ void EmitJumpIfSmi(Register reg, -+ Label* target, -+ Label::Distance distance = Label::kFar) { -+ __ test(reg, Immediate(kSmiTagMask)); -+ EmitJump(carry, target, distance); // Never taken before patched. -+ } -+ -+ void EmitPatchInfo() { -+ if (patch_site_.is_bound()) { -+ int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site_); -+ DCHECK(is_uint8(delta_to_patch_site)); -+ __ test(eax, Immediate(delta_to_patch_site)); -+#ifdef DEBUG -+ info_emitted_ = true; -+#endif -+ } else { -+ __ nop(); // Signals no inlined code. -+ } -+ } -+ -+ private: -+ // jc will be patched with jz, jnc will become jnz. -+ void EmitJump(Condition cc, Label* target, Label::Distance distance) { -+ DCHECK(!patch_site_.is_bound() && !info_emitted_); -+ DCHECK(cc == carry || cc == not_carry); -+ __ bind(&patch_site_); -+ __ j(cc, target, distance); -+ } -+ -+ MacroAssembler* masm() { return masm_; } -+ MacroAssembler* masm_; -+ Label patch_site_; -+#ifdef DEBUG -+ bool info_emitted_; -+#endif -+}; -+ -+ -+// Generate code for a JS function. On entry to the function the receiver -+// and arguments have been pushed on the stack left to right, with the -+// return address on top of them. The actual argument count matches the -+// formal parameter count expected by the function. -+// -+// The live registers are: -+// o edi: the JS function object being called (i.e. ourselves) -+// o edx: the new target value -+// o esi: our context -+// o ebp: our caller's frame pointer -+// o esp: stack pointer (pointing to return address) -+// -+// The function builds a JS frame. Please see JavaScriptFrameConstants in -+// frames-x87.h for its layout. -+void FullCodeGenerator::Generate() { -+ CompilationInfo* info = info_; -+ profiling_counter_ = isolate()->factory()->NewCell( -+ Handle(Smi::FromInt(FLAG_interrupt_budget), isolate())); -+ SetFunctionPosition(literal()); -+ Comment cmnt(masm_, "[ function compiled by full code generator"); -+ -+ ProfileEntryHookStub::MaybeCallEntryHook(masm_); -+ -+ if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) { -+ int receiver_offset = (info->scope()->num_parameters() + 1) * kPointerSize; -+ __ mov(ecx, Operand(esp, receiver_offset)); -+ __ AssertNotSmi(ecx); -+ __ CmpObjectType(ecx, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); -+ } -+ -+ // Open a frame scope to indicate that there is a frame on the stack. The -+ // MANUAL indicates that the scope shouldn't actually generate code to set up -+ // the frame (that is done below). -+ FrameScope frame_scope(masm_, StackFrame::MANUAL); -+ -+ info->set_prologue_offset(masm_->pc_offset()); -+ __ Prologue(info->GeneratePreagedPrologue()); -+ -+ // Increment invocation count for the function. -+ { -+ Comment cmnt(masm_, "[ Increment invocation count"); -+ __ mov(ecx, FieldOperand(edi, JSFunction::kFeedbackVectorOffset)); -+ __ mov(ecx, FieldOperand(ecx, Cell::kValueOffset)); -+ __ add( -+ FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize + -+ FeedbackVector::kHeaderSize), -+ Immediate(Smi::FromInt(1))); -+ } -+ -+ { Comment cmnt(masm_, "[ Allocate locals"); -+ int locals_count = info->scope()->num_stack_slots(); -+ OperandStackDepthIncrement(locals_count); -+ if (locals_count == 1) { -+ __ push(Immediate(isolate()->factory()->undefined_value())); -+ } else if (locals_count > 1) { -+ if (locals_count >= 128) { -+ Label ok; -+ __ mov(ecx, esp); -+ __ sub(ecx, Immediate(locals_count * kPointerSize)); -+ ExternalReference stack_limit = -+ ExternalReference::address_of_real_stack_limit(isolate()); -+ __ cmp(ecx, Operand::StaticVariable(stack_limit)); -+ __ j(above_equal, &ok, Label::kNear); -+ __ CallRuntime(Runtime::kThrowStackOverflow); -+ __ bind(&ok); -+ } -+ __ mov(eax, Immediate(isolate()->factory()->undefined_value())); -+ const int kMaxPushes = 32; -+ if (locals_count >= kMaxPushes) { -+ int loop_iterations = locals_count / kMaxPushes; -+ __ mov(ecx, loop_iterations); -+ Label loop_header; -+ __ bind(&loop_header); -+ // Do pushes. -+ for (int i = 0; i < kMaxPushes; i++) { -+ __ push(eax); -+ } -+ __ dec(ecx); -+ __ j(not_zero, &loop_header, Label::kNear); -+ } -+ int remaining = locals_count % kMaxPushes; -+ // Emit the remaining pushes. -+ for (int i = 0; i < remaining; i++) { -+ __ push(eax); -+ } -+ } -+ } -+ -+ bool function_in_register = true; -+ -+ // Possibly allocate a local context. -+ if (info->scope()->NeedsContext()) { -+ Comment cmnt(masm_, "[ Allocate context"); -+ bool need_write_barrier = true; -+ int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; -+ // Argument to NewContext is the function, which is still in edi. -+ if (info->scope()->is_script_scope()) { -+ __ push(edi); -+ __ Push(info->scope()->scope_info()); -+ __ CallRuntime(Runtime::kNewScriptContext); -+ // The new target value is not used, clobbering is safe. -+ DCHECK_NULL(info->scope()->new_target_var()); -+ } else { -+ if (info->scope()->new_target_var() != nullptr) { -+ __ push(edx); // Preserve new target. -+ } -+ if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { -+ Callable callable = CodeFactory::FastNewFunctionContext( -+ isolate(), info->scope()->scope_type()); -+ __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), -+ Immediate(slots)); -+ __ Call(callable.code(), RelocInfo::CODE_TARGET); -+ // Result of the FastNewFunctionContext builtin is always in new space. -+ need_write_barrier = false; -+ } else { -+ __ push(edi); -+ __ Push(Smi::FromInt(info->scope()->scope_type())); -+ __ CallRuntime(Runtime::kNewFunctionContext); -+ } -+ if (info->scope()->new_target_var() != nullptr) { -+ __ pop(edx); // Restore new target. -+ } -+ } -+ function_in_register = false; -+ // Context is returned in eax. It replaces the context passed to us. -+ // It's saved in the stack and kept live in esi. -+ __ mov(esi, eax); -+ __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); -+ -+ // Copy parameters into context if necessary. -+ int num_parameters = info->scope()->num_parameters(); -+ int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; -+ for (int i = first_parameter; i < num_parameters; i++) { -+ Variable* var = -+ (i == -1) ? info->scope()->receiver() : info->scope()->parameter(i); -+ if (var->IsContextSlot()) { -+ int parameter_offset = StandardFrameConstants::kCallerSPOffset + -+ (num_parameters - 1 - i) * kPointerSize; -+ // Load parameter from stack. -+ __ mov(eax, Operand(ebp, parameter_offset)); -+ // Store it in the context. -+ int context_offset = Context::SlotOffset(var->index()); -+ __ mov(Operand(esi, context_offset), eax); -+ // Update the write barrier. This clobbers eax and ebx. -+ if (need_write_barrier) { -+ __ RecordWriteContextSlot(esi, context_offset, eax, ebx, -+ kDontSaveFPRegs); -+ } else if (FLAG_debug_code) { -+ Label done; -+ __ JumpIfInNewSpace(esi, eax, &done, Label::kNear); -+ __ Abort(kExpectedNewSpaceObject); -+ __ bind(&done); -+ } -+ } -+ } -+ } -+ -+ // We don't support new.target and rest parameters here. -+ DCHECK_NULL(info->scope()->new_target_var()); -+ DCHECK_NULL(info->scope()->rest_parameter()); -+ DCHECK_NULL(info->scope()->this_function_var()); -+ -+ Variable* arguments = info->scope()->arguments(); -+ if (arguments != NULL) { -+ // Arguments object must be allocated after the context object, in -+ // case the "arguments" or ".arguments" variables are in the context. -+ Comment cmnt(masm_, "[ Allocate arguments object"); -+ if (!function_in_register) { -+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ } -+ if (is_strict(language_mode()) || !has_simple_parameters()) { -+ __ call(isolate()->builtins()->FastNewStrictArguments(), -+ RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ } else if (literal()->has_duplicate_parameters()) { -+ __ Push(edi); -+ __ CallRuntime(Runtime::kNewSloppyArguments_Generic); -+ } else { -+ __ call(isolate()->builtins()->FastNewSloppyArguments(), -+ RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ } -+ -+ SetVar(arguments, eax, ebx, edx); -+ } -+ -+ if (FLAG_trace) { -+ __ CallRuntime(Runtime::kTraceEnter); -+ } -+ -+ // Visit the declarations and body. -+ { -+ Comment cmnt(masm_, "[ Declarations"); -+ VisitDeclarations(scope()->declarations()); -+ } -+ -+ // Assert that the declarations do not use ICs. Otherwise the debugger -+ // won't be able to redirect a PC at an IC to the correct IC in newly -+ // recompiled code. -+ DCHECK_EQ(0, ic_total_count_); -+ -+ { -+ Comment cmnt(masm_, "[ Stack check"); -+ Label ok; -+ ExternalReference stack_limit = -+ ExternalReference::address_of_stack_limit(isolate()); -+ __ cmp(esp, Operand::StaticVariable(stack_limit)); -+ __ j(above_equal, &ok, Label::kNear); -+ __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); -+ __ bind(&ok); -+ } -+ -+ { -+ Comment cmnt(masm_, "[ Body"); -+ DCHECK(loop_depth() == 0); -+ VisitStatements(literal()->body()); -+ DCHECK(loop_depth() == 0); -+ } -+ -+ // Always emit a 'return undefined' in case control fell off the end of -+ // the body. -+ { Comment cmnt(masm_, "[ return ;"); -+ __ mov(eax, isolate()->factory()->undefined_value()); -+ EmitReturnSequence(); -+ } -+} -+ -+ -+void FullCodeGenerator::ClearAccumulator() { -+ __ Move(eax, Immediate(Smi::kZero)); -+} -+ -+ -+void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { -+ __ mov(ebx, Immediate(profiling_counter_)); -+ __ sub(FieldOperand(ebx, Cell::kValueOffset), -+ Immediate(Smi::FromInt(delta))); -+} -+ -+ -+void FullCodeGenerator::EmitProfilingCounterReset() { -+ int reset_value = FLAG_interrupt_budget; -+ __ mov(ebx, Immediate(profiling_counter_)); -+ __ mov(FieldOperand(ebx, Cell::kValueOffset), -+ Immediate(Smi::FromInt(reset_value))); -+} -+ -+ -+void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, -+ Label* back_edge_target) { -+ Comment cmnt(masm_, "[ Back edge bookkeeping"); -+ Label ok; -+ -+ DCHECK(back_edge_target->is_bound()); -+ int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); -+ int weight = Min(kMaxBackEdgeWeight, -+ Max(1, distance / kCodeSizeMultiplier)); -+ EmitProfilingCounterDecrement(weight); -+ __ j(positive, &ok, Label::kNear); -+ __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); -+ -+ // Record a mapping of this PC offset to the OSR id. This is used to find -+ // the AST id from the unoptimized code in order to use it as a key into -+ // the deoptimization input data found in the optimized code. -+ RecordBackEdge(stmt->OsrEntryId()); -+ -+ EmitProfilingCounterReset(); -+ -+ __ bind(&ok); -+} -+ -+void FullCodeGenerator::EmitProfilingCounterHandlingForReturnSequence( -+ bool is_tail_call) { -+ // Pretend that the exit is a backwards jump to the entry. -+ int weight = 1; -+ if (info_->ShouldSelfOptimize()) { -+ weight = FLAG_interrupt_budget / FLAG_self_opt_count; -+ } else { -+ int distance = masm_->pc_offset(); -+ weight = Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier)); -+ } -+ EmitProfilingCounterDecrement(weight); -+ Label ok; -+ __ j(positive, &ok, Label::kNear); -+ // Don't need to save result register if we are going to do a tail call. -+ if (!is_tail_call) { -+ __ push(eax); -+ } -+ __ call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); -+ if (!is_tail_call) { -+ __ pop(eax); -+ } -+ EmitProfilingCounterReset(); -+ __ bind(&ok); -+} -+ -+void FullCodeGenerator::EmitReturnSequence() { -+ Comment cmnt(masm_, "[ Return sequence"); -+ if (return_label_.is_bound()) { -+ __ jmp(&return_label_); -+ } else { -+ // Common return label -+ __ bind(&return_label_); -+ if (FLAG_trace) { -+ __ push(eax); -+ __ CallRuntime(Runtime::kTraceExit); -+ } -+ EmitProfilingCounterHandlingForReturnSequence(false); -+ -+ SetReturnPosition(literal()); -+ __ leave(); -+ -+ int arg_count = info_->scope()->num_parameters() + 1; -+ int arguments_bytes = arg_count * kPointerSize; -+ __ Ret(arguments_bytes, ecx); -+ } -+} -+ -+void FullCodeGenerator::RestoreContext() { -+ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); -+} -+ -+void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { -+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); -+ MemOperand operand = codegen()->VarOperand(var, result_register()); -+ // Memory operands can be pushed directly. -+ codegen()->PushOperand(operand); -+} -+ -+ -+void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { -+ UNREACHABLE(); // Not used on X87. -+} -+ -+ -+void FullCodeGenerator::AccumulatorValueContext::Plug( -+ Heap::RootListIndex index) const { -+ UNREACHABLE(); // Not used on X87. -+} -+ -+ -+void FullCodeGenerator::StackValueContext::Plug( -+ Heap::RootListIndex index) const { -+ UNREACHABLE(); // Not used on X87. -+} -+ -+ -+void FullCodeGenerator::TestContext::Plug(Heap::RootListIndex index) const { -+ UNREACHABLE(); // Not used on X87. -+} -+ -+ -+void FullCodeGenerator::EffectContext::Plug(Handle lit) const { -+} -+ -+ -+void FullCodeGenerator::AccumulatorValueContext::Plug( -+ Handle lit) const { -+ if (lit->IsSmi()) { -+ __ SafeMove(result_register(), Immediate(Smi::cast(*lit))); -+ } else { -+ __ Move(result_register(), Immediate(Handle::cast(lit))); -+ } -+} -+ -+ -+void FullCodeGenerator::StackValueContext::Plug(Handle lit) const { -+ codegen()->OperandStackDepthIncrement(1); -+ if (lit->IsSmi()) { -+ __ SafePush(Immediate(Smi::cast(*lit))); -+ } else { -+ __ push(Immediate(Handle::cast(lit))); -+ } -+} -+ -+ -+void FullCodeGenerator::TestContext::Plug(Handle lit) const { -+ DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); -+ if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { -+ if (false_label_ != fall_through_) __ jmp(false_label_); -+ } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { -+ if (true_label_ != fall_through_) __ jmp(true_label_); -+ } else if (lit->IsString()) { -+ if (String::cast(*lit)->length() == 0) { -+ if (false_label_ != fall_through_) __ jmp(false_label_); -+ } else { -+ if (true_label_ != fall_through_) __ jmp(true_label_); -+ } -+ } else if (lit->IsSmi()) { -+ if (Smi::ToInt(*lit) == 0) { -+ if (false_label_ != fall_through_) __ jmp(false_label_); -+ } else { -+ if (true_label_ != fall_through_) __ jmp(true_label_); -+ } -+ } else { -+ // For simplicity we always test the accumulator register. -+ __ mov(result_register(), Handle::cast(lit)); -+ codegen()->DoTest(this); -+ } -+} -+ -+ -+void FullCodeGenerator::StackValueContext::DropAndPlug(int count, -+ Register reg) const { -+ DCHECK(count > 0); -+ if (count > 1) codegen()->DropOperands(count - 1); -+ __ mov(Operand(esp, 0), reg); -+} -+ -+ -+void FullCodeGenerator::EffectContext::Plug(Label* materialize_true, -+ Label* materialize_false) const { -+ DCHECK(materialize_true == materialize_false); -+ __ bind(materialize_true); -+} -+ -+ -+void FullCodeGenerator::AccumulatorValueContext::Plug( -+ Label* materialize_true, -+ Label* materialize_false) const { -+ Label done; -+ __ bind(materialize_true); -+ __ mov(result_register(), isolate()->factory()->true_value()); -+ __ jmp(&done, Label::kNear); -+ __ bind(materialize_false); -+ __ mov(result_register(), isolate()->factory()->false_value()); -+ __ bind(&done); -+} -+ -+ -+void FullCodeGenerator::StackValueContext::Plug( -+ Label* materialize_true, -+ Label* materialize_false) const { -+ codegen()->OperandStackDepthIncrement(1); -+ Label done; -+ __ bind(materialize_true); -+ __ push(Immediate(isolate()->factory()->true_value())); -+ __ jmp(&done, Label::kNear); -+ __ bind(materialize_false); -+ __ push(Immediate(isolate()->factory()->false_value())); -+ __ bind(&done); -+} -+ -+ -+void FullCodeGenerator::TestContext::Plug(Label* materialize_true, -+ Label* materialize_false) const { -+ DCHECK(materialize_true == true_label_); -+ DCHECK(materialize_false == false_label_); -+} -+ -+ -+void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { -+ Handle value = flag ? isolate()->factory()->true_value() -+ : isolate()->factory()->false_value(); -+ __ mov(result_register(), value); -+} -+ -+ -+void FullCodeGenerator::StackValueContext::Plug(bool flag) const { -+ codegen()->OperandStackDepthIncrement(1); -+ Handle value = flag ? isolate()->factory()->true_value() -+ : isolate()->factory()->false_value(); -+ __ push(Immediate(value)); -+} -+ -+ -+void FullCodeGenerator::TestContext::Plug(bool flag) const { -+ if (flag) { -+ if (true_label_ != fall_through_) __ jmp(true_label_); -+ } else { -+ if (false_label_ != fall_through_) __ jmp(false_label_); -+ } -+} -+ -+ -+void FullCodeGenerator::DoTest(Expression* condition, -+ Label* if_true, -+ Label* if_false, -+ Label* fall_through) { -+ Callable callable = Builtins::CallableFor(isolate(), Builtins::kToBoolean); -+ __ Call(callable.code(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ __ CompareRoot(result_register(), Heap::kTrueValueRootIndex); -+ Split(equal, if_true, if_false, fall_through); -+} -+ -+ -+void FullCodeGenerator::Split(Condition cc, -+ Label* if_true, -+ Label* if_false, -+ Label* fall_through) { -+ if (if_false == fall_through) { -+ __ j(cc, if_true); -+ } else if (if_true == fall_through) { -+ __ j(NegateCondition(cc), if_false); -+ } else { -+ __ j(cc, if_true); -+ __ jmp(if_false); -+ } -+} -+ -+ -+MemOperand FullCodeGenerator::StackOperand(Variable* var) { -+ DCHECK(var->IsStackAllocated()); -+ // Offset is negative because higher indexes are at lower addresses. -+ int offset = -var->index() * kPointerSize; -+ // Adjust by a (parameter or local) base offset. -+ if (var->IsParameter()) { -+ offset += (info_->scope()->num_parameters() + 1) * kPointerSize; -+ } else { -+ offset += JavaScriptFrameConstants::kLocal0Offset; -+ } -+ return Operand(ebp, offset); -+} -+ -+ -+MemOperand FullCodeGenerator::VarOperand(Variable* var, Register scratch) { -+ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); -+ if (var->IsContextSlot()) { -+ int context_chain_length = scope()->ContextChainLength(var->scope()); -+ __ LoadContext(scratch, context_chain_length); -+ return ContextOperand(scratch, var->index()); -+ } else { -+ return StackOperand(var); -+ } -+} -+ -+ -+void FullCodeGenerator::GetVar(Register dest, Variable* var) { -+ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); -+ MemOperand location = VarOperand(var, dest); -+ __ mov(dest, location); -+} -+ -+ -+void FullCodeGenerator::SetVar(Variable* var, -+ Register src, -+ Register scratch0, -+ Register scratch1) { -+ DCHECK(var->IsContextSlot() || var->IsStackAllocated()); -+ DCHECK(!scratch0.is(src)); -+ DCHECK(!scratch0.is(scratch1)); -+ DCHECK(!scratch1.is(src)); -+ MemOperand location = VarOperand(var, scratch0); -+ __ mov(location, src); -+ -+ // Emit the write barrier code if the location is in the heap. -+ if (var->IsContextSlot()) { -+ int offset = Context::SlotOffset(var->index()); -+ DCHECK(!scratch0.is(esi) && !src.is(esi) && !scratch1.is(esi)); -+ __ RecordWriteContextSlot(scratch0, offset, src, scratch1, kDontSaveFPRegs); -+ } -+} -+ -+ -+void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { -+ // The variable in the declaration always resides in the current context. -+ DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); -+ if (FLAG_debug_code) { -+ // Check that we're not inside a with or catch context. -+ __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset)); -+ __ cmp(ebx, isolate()->factory()->with_context_map()); -+ __ Check(not_equal, kDeclarationInWithContext); -+ __ cmp(ebx, isolate()->factory()->catch_context_map()); -+ __ Check(not_equal, kDeclarationInCatchContext); -+ } -+} -+ -+ -+void FullCodeGenerator::VisitVariableDeclaration( -+ VariableDeclaration* declaration) { -+ VariableProxy* proxy = declaration->proxy(); -+ Variable* variable = proxy->var(); -+ switch (variable->location()) { -+ case VariableLocation::UNALLOCATED: { -+ DCHECK(!variable->binding_needs_init()); -+ globals_->Add(variable->name(), zone()); -+ FeedbackSlot slot = proxy->VariableFeedbackSlot(); -+ DCHECK(!slot.IsInvalid()); -+ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); -+ globals_->Add(isolate()->factory()->undefined_value(), zone()); -+ globals_->Add(isolate()->factory()->undefined_value(), zone()); -+ break; -+ } -+ case VariableLocation::PARAMETER: -+ case VariableLocation::LOCAL: -+ if (variable->binding_needs_init()) { -+ Comment cmnt(masm_, "[ VariableDeclaration"); -+ __ mov(StackOperand(variable), -+ Immediate(isolate()->factory()->the_hole_value())); -+ } -+ break; -+ -+ case VariableLocation::CONTEXT: -+ if (variable->binding_needs_init()) { -+ Comment cmnt(masm_, "[ VariableDeclaration"); -+ EmitDebugCheckDeclarationContext(variable); -+ __ mov(ContextOperand(esi, variable->index()), -+ Immediate(isolate()->factory()->the_hole_value())); -+ // No write barrier since the hole value is in old space. -+ } -+ break; -+ -+ case VariableLocation::LOOKUP: -+ case VariableLocation::MODULE: -+ UNREACHABLE(); -+ } -+} -+ -+void FullCodeGenerator::VisitFunctionDeclaration( -+ FunctionDeclaration* declaration) { -+ VariableProxy* proxy = declaration->proxy(); -+ Variable* variable = proxy->var(); -+ switch (variable->location()) { -+ case VariableLocation::UNALLOCATED: { -+ globals_->Add(variable->name(), zone()); -+ FeedbackSlot slot = proxy->VariableFeedbackSlot(); -+ DCHECK(!slot.IsInvalid()); -+ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); -+ -+ // We need the slot where the literals array lives, too. -+ slot = declaration->fun()->LiteralFeedbackSlot(); -+ DCHECK(!slot.IsInvalid()); -+ globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); -+ -+ Handle function = -+ Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); -+ // Check for stack-overflow exception. -+ if (function.is_null()) return SetStackOverflow(); -+ globals_->Add(function, zone()); -+ break; -+ } -+ -+ case VariableLocation::PARAMETER: -+ case VariableLocation::LOCAL: { -+ Comment cmnt(masm_, "[ FunctionDeclaration"); -+ VisitForAccumulatorValue(declaration->fun()); -+ __ mov(StackOperand(variable), result_register()); -+ break; -+ } -+ -+ case VariableLocation::CONTEXT: { -+ Comment cmnt(masm_, "[ FunctionDeclaration"); -+ EmitDebugCheckDeclarationContext(variable); -+ VisitForAccumulatorValue(declaration->fun()); -+ __ mov(ContextOperand(esi, variable->index()), result_register()); -+ // We know that we have written a function, which is not a smi. -+ __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), -+ result_register(), ecx, kDontSaveFPRegs, -+ EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); -+ break; -+ } -+ -+ case VariableLocation::LOOKUP: -+ case VariableLocation::MODULE: -+ UNREACHABLE(); -+ } -+} -+ -+ -+void FullCodeGenerator::DeclareGlobals(Handle pairs) { -+ // Call the runtime to declare the globals. -+ __ Push(pairs); -+ __ Push(Smi::FromInt(DeclareGlobalsFlags())); -+ __ EmitLoadFeedbackVector(eax); -+ __ Push(eax); -+ __ CallRuntime(Runtime::kDeclareGlobals); -+ // Return value is ignored. -+} -+ -+ -+void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { -+ Comment cmnt(masm_, "[ SwitchStatement"); -+ Breakable nested_statement(this, stmt); -+ SetStatementPosition(stmt); -+ -+ // Keep the switch value on the stack until a case matches. -+ VisitForStackValue(stmt->tag()); -+ -+ ZoneList* clauses = stmt->cases(); -+ CaseClause* default_clause = NULL; // Can occur anywhere in the list. -+ -+ Label next_test; // Recycled for each test. -+ // Compile all the tests with branches to their bodies. -+ for (int i = 0; i < clauses->length(); i++) { -+ CaseClause* clause = clauses->at(i); -+ clause->body_target()->Unuse(); -+ -+ // The default is not a test, but remember it as final fall through. -+ if (clause->is_default()) { -+ default_clause = clause; -+ continue; -+ } -+ -+ Comment cmnt(masm_, "[ Case comparison"); -+ __ bind(&next_test); -+ next_test.Unuse(); -+ -+ // Compile the label expression. -+ VisitForAccumulatorValue(clause->label()); -+ -+ // Perform the comparison as if via '==='. -+ __ mov(edx, Operand(esp, 0)); // Switch value. -+ bool inline_smi_code = ShouldInlineSmiCase(Token::EQ_STRICT); -+ JumpPatchSite patch_site(masm_); -+ if (inline_smi_code) { -+ Label slow_case; -+ __ mov(ecx, edx); -+ __ or_(ecx, eax); -+ patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); -+ -+ __ cmp(edx, eax); -+ __ j(not_equal, &next_test); -+ __ Drop(1); // Switch value is no longer needed. -+ __ jmp(clause->body_target()); -+ __ bind(&slow_case); -+ } -+ -+ SetExpressionPosition(clause); -+ Handle ic = -+ CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); -+ CallIC(ic); -+ patch_site.EmitPatchInfo(); -+ -+ Label skip; -+ __ jmp(&skip, Label::kNear); -+ __ cmp(eax, isolate()->factory()->true_value()); -+ __ j(not_equal, &next_test); -+ __ Drop(1); -+ __ jmp(clause->body_target()); -+ __ bind(&skip); -+ -+ __ test(eax, eax); -+ __ j(not_equal, &next_test); -+ __ Drop(1); // Switch value is no longer needed. -+ __ jmp(clause->body_target()); -+ } -+ -+ // Discard the test value and jump to the default if present, otherwise to -+ // the end of the statement. -+ __ bind(&next_test); -+ DropOperands(1); // Switch value is no longer needed. -+ if (default_clause == NULL) { -+ __ jmp(nested_statement.break_label()); -+ } else { -+ __ jmp(default_clause->body_target()); -+ } -+ -+ // Compile all the case bodies. -+ for (int i = 0; i < clauses->length(); i++) { -+ Comment cmnt(masm_, "[ Case body"); -+ CaseClause* clause = clauses->at(i); -+ __ bind(clause->body_target()); -+ VisitStatements(clause->statements()); -+ } -+ -+ __ bind(nested_statement.break_label()); -+} -+ -+ -+void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { -+ Comment cmnt(masm_, "[ ForInStatement"); -+ SetStatementPosition(stmt, SKIP_BREAK); -+ -+ FeedbackSlot slot = stmt->ForInFeedbackSlot(); -+ -+ // Get the object to enumerate over. -+ SetExpressionAsStatementPosition(stmt->enumerable()); -+ VisitForAccumulatorValue(stmt->enumerable()); -+ OperandStackDepthIncrement(5); -+ -+ Label loop, exit; -+ Iteration loop_statement(this, stmt); -+ increment_loop_depth(); -+ -+ // If the object is null or undefined, skip over the loop, otherwise convert -+ // it to a JS receiver. See ECMA-262 version 5, section 12.6.4. -+ Label convert, done_convert; -+ __ JumpIfSmi(eax, &convert, Label::kNear); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(above_equal, &done_convert, Label::kNear); -+ __ cmp(eax, isolate()->factory()->undefined_value()); -+ __ j(equal, &exit); -+ __ cmp(eax, isolate()->factory()->null_value()); -+ __ j(equal, &exit); -+ __ bind(&convert); -+ __ Call(isolate()->builtins()->ToObject(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ __ bind(&done_convert); -+ __ push(eax); -+ -+ // Check cache validity in generated code. If we cannot guarantee cache -+ // validity, call the runtime system to check cache validity or get the -+ // property names in a fixed array. Note: Proxies never have an enum cache, -+ // so will always take the slow path. -+ Label call_runtime, use_cache, fixed_array; -+ __ CheckEnumCache(&call_runtime); -+ -+ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ jmp(&use_cache, Label::kNear); -+ -+ // Get the set of properties to enumerate. -+ __ bind(&call_runtime); -+ __ push(eax); -+ __ CallRuntime(Runtime::kForInEnumerate); -+ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), -+ isolate()->factory()->meta_map()); -+ __ j(not_equal, &fixed_array); -+ -+ -+ // We got a map in register eax. Get the enumeration cache from it. -+ Label no_descriptors; -+ __ bind(&use_cache); -+ -+ __ EnumLength(edx, eax); -+ __ cmp(edx, Immediate(Smi::kZero)); -+ __ j(equal, &no_descriptors); -+ -+ __ LoadInstanceDescriptors(eax, ecx); -+ __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeOffset)); -+ __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); -+ -+ // Set up the four remaining stack slots. -+ __ push(eax); // Map. -+ __ push(ecx); // Enumeration cache. -+ __ push(edx); // Number of valid entries for the map in the enum cache. -+ __ push(Immediate(Smi::kZero)); // Initial index. -+ __ jmp(&loop); -+ -+ __ bind(&no_descriptors); -+ __ add(esp, Immediate(kPointerSize)); -+ __ jmp(&exit); -+ -+ // We got a fixed array in register eax. Iterate through that. -+ __ bind(&fixed_array); -+ -+ __ push(Immediate(Smi::FromInt(1))); // Smi(1) indicates slow check -+ __ push(eax); // Array -+ __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); -+ __ push(eax); // Fixed array length (as smi). -+ __ push(Immediate(Smi::kZero)); // Initial index. -+ -+ // Generate code for doing the condition check. -+ __ bind(&loop); -+ SetExpressionAsStatementPosition(stmt->each()); -+ -+ __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. -+ __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length. -+ __ j(above_equal, loop_statement.break_label()); -+ -+ // Get the current entry of the array into register eax. -+ __ mov(ebx, Operand(esp, 2 * kPointerSize)); -+ __ mov(eax, FieldOperand(ebx, eax, times_2, FixedArray::kHeaderSize)); -+ -+ // Get the expected map from the stack or a smi in the -+ // permanent slow case into register edx. -+ __ mov(edx, Operand(esp, 3 * kPointerSize)); -+ -+ // Check if the expected map still matches that of the enumerable. -+ // If not, we may have to filter the key. -+ Label update_each; -+ __ mov(ebx, Operand(esp, 4 * kPointerSize)); -+ __ cmp(edx, FieldOperand(ebx, HeapObject::kMapOffset)); -+ __ j(equal, &update_each, Label::kNear); -+ -+ // We need to filter the key, record slow-path here. -+ int const vector_index = SmiFromSlot(slot)->value(); -+ __ EmitLoadFeedbackVector(edx); -+ __ mov(FieldOperand(edx, FixedArray::OffsetOfElementAt(vector_index)), -+ Immediate(FeedbackVector::MegamorphicSentinel(isolate()))); -+ -+ // eax contains the key. The receiver in ebx is the second argument to the -+ // ForInFilter. ForInFilter returns undefined if the receiver doesn't -+ // have the key or returns the name-converted key. -+ __ Call(isolate()->builtins()->ForInFilter(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ __ JumpIfRoot(result_register(), Heap::kUndefinedValueRootIndex, -+ loop_statement.continue_label()); -+ -+ // Update the 'each' property or variable from the possibly filtered -+ // entry in register eax. -+ __ bind(&update_each); -+ // Perform the assignment as if via '='. -+ { EffectContext context(this); -+ EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); -+ } -+ -+ // Generate code for the body of the loop. -+ Visit(stmt->body()); -+ -+ // Generate code for going to the next element by incrementing the -+ // index (smi) stored on top of the stack. -+ __ bind(loop_statement.continue_label()); -+ __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); -+ -+ EmitBackEdgeBookkeeping(stmt, &loop); -+ __ jmp(&loop); -+ -+ // Remove the pointers stored on the stack. -+ __ bind(loop_statement.break_label()); -+ DropOperands(5); -+ -+ // Exit and decrement the loop depth. -+ __ bind(&exit); -+ decrement_loop_depth(); -+} -+ -+void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, -+ FeedbackSlot slot) { -+ DCHECK(NeedsHomeObject(initializer)); -+ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); -+ CallStoreIC(slot, isolate()->factory()->home_object_symbol()); -+} -+ -+void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer, -+ int offset, -+ FeedbackSlot slot) { -+ DCHECK(NeedsHomeObject(initializer)); -+ __ mov(StoreDescriptor::ReceiverRegister(), eax); -+ __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); -+ CallStoreIC(slot, isolate()->factory()->home_object_symbol()); -+} -+ -+void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, -+ TypeofMode typeof_mode) { -+ SetExpressionPosition(proxy); -+ Variable* var = proxy->var(); -+ -+ // Two cases: global variables and all other types of variables. -+ switch (var->location()) { -+ case VariableLocation::UNALLOCATED: { -+ Comment cmnt(masm_, "[ Global variable"); -+ EmitGlobalVariableLoad(proxy, typeof_mode); -+ context()->Plug(eax); -+ break; -+ } -+ -+ case VariableLocation::PARAMETER: -+ case VariableLocation::LOCAL: -+ case VariableLocation::CONTEXT: { -+ DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); -+ Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" -+ : "[ Stack variable"); -+ -+ if (proxy->hole_check_mode() == HoleCheckMode::kRequired) { -+ // Throw a reference error when using an uninitialized let/const -+ // binding in harmony mode. -+ Label done; -+ GetVar(eax, var); -+ __ cmp(eax, isolate()->factory()->the_hole_value()); -+ __ j(not_equal, &done, Label::kNear); -+ __ push(Immediate(var->name())); -+ __ CallRuntime(Runtime::kThrowReferenceError); -+ __ bind(&done); -+ context()->Plug(eax); -+ break; -+ } -+ context()->Plug(var); -+ break; -+ } -+ -+ case VariableLocation::LOOKUP: -+ case VariableLocation::MODULE: -+ UNREACHABLE(); -+ } -+} -+ -+ -+void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { -+ Expression* expression = (property == NULL) ? NULL : property->value(); -+ if (expression == NULL) { -+ PushOperand(isolate()->factory()->null_value()); -+ } else { -+ VisitForStackValue(expression); -+ if (NeedsHomeObject(expression)) { -+ DCHECK(property->kind() == ObjectLiteral::Property::GETTER || -+ property->kind() == ObjectLiteral::Property::SETTER); -+ int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; -+ EmitSetHomeObject(expression, offset, property->GetSlot()); -+ } -+ } -+} -+ -+ -+void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { -+ Comment cmnt(masm_, "[ ObjectLiteral"); -+ -+ Handle constant_properties = -+ expr->GetOrBuildConstantProperties(isolate()); -+ int flags = expr->ComputeFlags(); -+ // If any of the keys would store to the elements array, then we shouldn't -+ // allow it. -+ if (MustCreateObjectLiteralWithRuntime(expr)) { -+ __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ push(Immediate(SmiFromSlot(expr->literal_slot()))); -+ __ push(Immediate(constant_properties)); -+ __ push(Immediate(Smi::FromInt(flags))); -+ __ CallRuntime(Runtime::kCreateObjectLiteral); -+ } else { -+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(ebx, Immediate(SmiFromSlot(expr->literal_slot()))); -+ __ mov(ecx, Immediate(constant_properties)); -+ __ mov(edx, Immediate(Smi::FromInt(flags))); -+ Callable callable = -+ Builtins::CallableFor(isolate(), Builtins::kFastCloneShallowObject); -+ __ Call(callable.code(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ } -+ -+ // If result_saved is true the result is on top of the stack. If -+ // result_saved is false the result is in eax. -+ bool result_saved = false; -+ -+ AccessorTable accessor_table(zone()); -+ for (int i = 0; i < expr->properties()->length(); i++) { -+ ObjectLiteral::Property* property = expr->properties()->at(i); -+ DCHECK(!property->is_computed_name()); -+ if (property->IsCompileTimeValue()) continue; -+ -+ Literal* key = property->key()->AsLiteral(); -+ Expression* value = property->value(); -+ if (!result_saved) { -+ PushOperand(eax); // Save result on the stack -+ result_saved = true; -+ } -+ switch (property->kind()) { -+ case ObjectLiteral::Property::SPREAD: -+ case ObjectLiteral::Property::CONSTANT: -+ UNREACHABLE(); -+ case ObjectLiteral::Property::MATERIALIZED_LITERAL: -+ DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); -+ // Fall through. -+ case ObjectLiteral::Property::COMPUTED: -+ // It is safe to use [[Put]] here because the boilerplate already -+ // contains computed properties with an uninitialized value. -+ if (key->IsStringLiteral()) { -+ DCHECK(key->IsPropertyName()); -+ if (property->emit_store()) { -+ VisitForAccumulatorValue(value); -+ DCHECK(StoreDescriptor::ValueRegister().is(eax)); -+ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ CallStoreIC(property->GetSlot(0), key->value(), kStoreOwn); -+ if (NeedsHomeObject(value)) { -+ EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); -+ } -+ } else { -+ VisitForEffect(value); -+ } -+ break; -+ } -+ PushOperand(Operand(esp, 0)); // Duplicate receiver. -+ VisitForStackValue(key); -+ VisitForStackValue(value); -+ if (property->emit_store()) { -+ if (NeedsHomeObject(value)) { -+ EmitSetHomeObject(value, 2, property->GetSlot()); -+ } -+ PushOperand(Smi::FromInt(SLOPPY)); // Language mode -+ CallRuntimeWithOperands(Runtime::kSetProperty); -+ } else { -+ DropOperands(3); -+ } -+ break; -+ case ObjectLiteral::Property::PROTOTYPE: -+ PushOperand(Operand(esp, 0)); // Duplicate receiver. -+ VisitForStackValue(value); -+ DCHECK(property->emit_store()); -+ CallRuntimeWithOperands(Runtime::kInternalSetPrototype); -+ break; -+ case ObjectLiteral::Property::GETTER: -+ if (property->emit_store()) { -+ AccessorTable::Iterator it = accessor_table.lookup(key); -+ it->second->getter = property; -+ } -+ break; -+ case ObjectLiteral::Property::SETTER: -+ if (property->emit_store()) { -+ AccessorTable::Iterator it = accessor_table.lookup(key); -+ it->second->setter = property; -+ } -+ break; -+ } -+ } -+ -+ // Emit code to define accessors, using only a single call to the runtime for -+ // each pair of corresponding getters and setters. -+ for (AccessorTable::Iterator it = accessor_table.begin(); -+ it != accessor_table.end(); -+ ++it) { -+ PushOperand(Operand(esp, 0)); // Duplicate receiver. -+ VisitForStackValue(it->first); -+ -+ EmitAccessor(it->second->getter); -+ EmitAccessor(it->second->setter); -+ -+ PushOperand(Smi::FromInt(NONE)); -+ CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); -+ } -+ -+ if (result_saved) { -+ context()->PlugTOS(); -+ } else { -+ context()->Plug(eax); -+ } -+} -+ -+ -+void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { -+ Comment cmnt(masm_, "[ ArrayLiteral"); -+ -+ Handle constant_elements = -+ expr->GetOrBuildConstantElements(isolate()); -+ -+ if (MustCreateArrayLiteralWithRuntime(expr)) { -+ __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ push(Immediate(SmiFromSlot(expr->literal_slot()))); -+ __ push(Immediate(constant_elements)); -+ __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); -+ __ CallRuntime(Runtime::kCreateArrayLiteral); -+ } else { -+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ mov(ebx, Immediate(SmiFromSlot(expr->literal_slot()))); -+ __ mov(ecx, Immediate(constant_elements)); -+ Callable callable = -+ CodeFactory::FastCloneShallowArray(isolate(), TRACK_ALLOCATION_SITE); -+ __ Call(callable.code(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ } -+ -+ bool result_saved = false; // Is the result saved to the stack? -+ ZoneList* subexprs = expr->values(); -+ int length = subexprs->length(); -+ -+ // Emit code to evaluate all the non-constant subexpressions and to store -+ // them into the newly cloned array. -+ for (int array_index = 0; array_index < length; array_index++) { -+ Expression* subexpr = subexprs->at(array_index); -+ DCHECK(!subexpr->IsSpread()); -+ -+ // If the subexpression is a literal or a simple materialized literal it -+ // is already set in the cloned array. -+ if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; -+ -+ if (!result_saved) { -+ PushOperand(eax); // array literal. -+ result_saved = true; -+ } -+ VisitForAccumulatorValue(subexpr); -+ -+ __ mov(StoreDescriptor::NameRegister(), -+ Immediate(Smi::FromInt(array_index))); -+ __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ CallKeyedStoreIC(expr->LiteralFeedbackSlot()); -+ } -+ -+ if (result_saved) { -+ context()->PlugTOS(); -+ } else { -+ context()->Plug(eax); -+ } -+} -+ -+ -+void FullCodeGenerator::VisitAssignment(Assignment* expr) { -+ DCHECK(expr->target()->IsValidReferenceExpressionOrThis()); -+ -+ Comment cmnt(masm_, "[ Assignment"); -+ -+ Property* property = expr->target()->AsProperty(); -+ LhsKind assign_type = Property::GetAssignType(property); -+ -+ // Evaluate LHS expression. -+ switch (assign_type) { -+ case VARIABLE: -+ // Nothing to do here. -+ break; -+ case NAMED_PROPERTY: -+ if (expr->is_compound()) { -+ // We need the receiver both on the stack and in the register. -+ VisitForStackValue(property->obj()); -+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ } else { -+ VisitForStackValue(property->obj()); -+ } -+ break; -+ case KEYED_PROPERTY: { -+ if (expr->is_compound()) { -+ VisitForStackValue(property->obj()); -+ VisitForStackValue(property->key()); -+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, kPointerSize)); -+ __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); -+ } else { -+ VisitForStackValue(property->obj()); -+ VisitForStackValue(property->key()); -+ } -+ break; -+ } -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+ -+ // For compound assignments we need another deoptimization point after the -+ // variable/property load. -+ if (expr->is_compound()) { -+ AccumulatorValueContext result_context(this); -+ { AccumulatorValueContext left_operand_context(this); -+ switch (assign_type) { -+ case VARIABLE: -+ EmitVariableLoad(expr->target()->AsVariableProxy()); -+ break; -+ case NAMED_PROPERTY: -+ EmitNamedPropertyLoad(property); -+ break; -+ case KEYED_PROPERTY: -+ EmitKeyedPropertyLoad(property); -+ break; -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+ } -+ -+ Token::Value op = expr->binary_op(); -+ PushOperand(eax); // Left operand goes on the stack. -+ VisitForAccumulatorValue(expr->value()); -+ -+ EmitBinaryOp(expr->binary_operation(), op); -+ } else { -+ VisitForAccumulatorValue(expr->value()); -+ } -+ -+ SetExpressionPosition(expr); -+ -+ // Store the value. -+ switch (assign_type) { -+ case VARIABLE: { -+ VariableProxy* proxy = expr->target()->AsVariableProxy(); -+ EmitVariableAssignment(proxy->var(), expr->op(), expr->AssignmentSlot(), -+ proxy->hole_check_mode()); -+ context()->Plug(eax); -+ break; -+ } -+ case NAMED_PROPERTY: -+ EmitNamedPropertyAssignment(expr); -+ break; -+ case KEYED_PROPERTY: -+ EmitKeyedPropertyAssignment(expr); -+ break; -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+} -+ -+void FullCodeGenerator::PushOperand(MemOperand operand) { -+ OperandStackDepthIncrement(1); -+ __ Push(operand); -+} -+ -+void FullCodeGenerator::EmitOperandStackDepthCheck() { -+ if (FLAG_debug_code) { -+ int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + -+ operand_stack_depth_ * kPointerSize; -+ __ mov(eax, ebp); -+ __ sub(eax, esp); -+ __ cmp(eax, Immediate(expected_diff)); -+ __ Assert(equal, kUnexpectedStackDepth); -+ } -+} -+ -+ -+void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { -+ PopOperand(edx); -+ Handle code = CodeFactory::BinaryOperation(isolate(), op).code(); -+ __ Call(code, RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ context()->Plug(eax); -+} -+ -+void FullCodeGenerator::EmitAssignment(Expression* expr, FeedbackSlot slot) { -+ DCHECK(expr->IsValidReferenceExpressionOrThis()); -+ -+ Property* prop = expr->AsProperty(); -+ LhsKind assign_type = Property::GetAssignType(prop); -+ -+ switch (assign_type) { -+ case VARIABLE: { -+ VariableProxy* proxy = expr->AsVariableProxy(); -+ EffectContext context(this); -+ EmitVariableAssignment(proxy->var(), Token::ASSIGN, slot, -+ proxy->hole_check_mode()); -+ break; -+ } -+ case NAMED_PROPERTY: { -+ PushOperand(eax); // Preserve value. -+ VisitForAccumulatorValue(prop->obj()); -+ __ Move(StoreDescriptor::ReceiverRegister(), eax); -+ PopOperand(StoreDescriptor::ValueRegister()); // Restore value. -+ CallStoreIC(slot, prop->key()->AsLiteral()->value()); -+ break; -+ } -+ case KEYED_PROPERTY: { -+ PushOperand(eax); // Preserve value. -+ VisitForStackValue(prop->obj()); -+ VisitForAccumulatorValue(prop->key()); -+ __ Move(StoreDescriptor::NameRegister(), eax); -+ PopOperand(StoreDescriptor::ReceiverRegister()); // Receiver. -+ PopOperand(StoreDescriptor::ValueRegister()); // Restore value. -+ CallKeyedStoreIC(slot); -+ break; -+ } -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+ context()->Plug(eax); -+} -+ -+ -+void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( -+ Variable* var, MemOperand location) { -+ __ mov(location, eax); -+ if (var->IsContextSlot()) { -+ __ mov(edx, eax); -+ int offset = Context::SlotOffset(var->index()); -+ __ RecordWriteContextSlot(ecx, offset, edx, ebx, kDontSaveFPRegs); -+ } -+} -+ -+void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, -+ FeedbackSlot slot, -+ HoleCheckMode hole_check_mode) { -+ if (var->IsUnallocated()) { -+ // Global var, const, or let. -+ __ mov(StoreDescriptor::ReceiverRegister(), NativeContextOperand()); -+ __ mov(StoreDescriptor::ReceiverRegister(), -+ ContextOperand(StoreDescriptor::ReceiverRegister(), -+ Context::EXTENSION_INDEX)); -+ CallStoreIC(slot, var->name(), kStoreGlobal); -+ -+ } else if (IsLexicalVariableMode(var->mode()) && op != Token::INIT) { -+ DCHECK(!var->IsLookupSlot()); -+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); -+ MemOperand location = VarOperand(var, ecx); -+ // Perform an initialization check for lexically declared variables. -+ if (hole_check_mode == HoleCheckMode::kRequired) { -+ Label assign; -+ __ mov(edx, location); -+ __ cmp(edx, isolate()->factory()->the_hole_value()); -+ __ j(not_equal, &assign, Label::kNear); -+ __ push(Immediate(var->name())); -+ __ CallRuntime(Runtime::kThrowReferenceError); -+ __ bind(&assign); -+ } -+ if (var->mode() != CONST) { -+ EmitStoreToStackLocalOrContextSlot(var, location); -+ } else if (var->throw_on_const_assignment(language_mode())) { -+ __ CallRuntime(Runtime::kThrowConstAssignError); -+ } -+ } else if (var->is_this() && var->mode() == CONST && op == Token::INIT) { -+ // Initializing assignment to const {this} needs a write barrier. -+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); -+ Label uninitialized_this; -+ MemOperand location = VarOperand(var, ecx); -+ __ mov(edx, location); -+ __ cmp(edx, isolate()->factory()->the_hole_value()); -+ __ j(equal, &uninitialized_this); -+ __ push(Immediate(var->name())); -+ __ CallRuntime(Runtime::kThrowReferenceError); -+ __ bind(&uninitialized_this); -+ EmitStoreToStackLocalOrContextSlot(var, location); -+ -+ } else { -+ DCHECK(var->mode() != CONST || op == Token::INIT); -+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); -+ DCHECK(!var->IsLookupSlot()); -+ // Assignment to var or initializing assignment to let/const in harmony -+ // mode. -+ MemOperand location = VarOperand(var, ecx); -+ EmitStoreToStackLocalOrContextSlot(var, location); -+ } -+} -+ -+ -+void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { -+ // Assignment to a property, using a named store IC. -+ // eax : value -+ // esp[0] : receiver -+ Property* prop = expr->target()->AsProperty(); -+ DCHECK(prop != NULL); -+ DCHECK(prop->key()->IsLiteral()); -+ -+ PopOperand(StoreDescriptor::ReceiverRegister()); -+ CallStoreIC(expr->AssignmentSlot(), prop->key()->AsLiteral()->value()); -+ context()->Plug(eax); -+} -+ -+ -+void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { -+ // Assignment to a property, using a keyed store IC. -+ // eax : value -+ // esp[0] : key -+ // esp[kPointerSize] : receiver -+ -+ PopOperand(StoreDescriptor::NameRegister()); // Key. -+ PopOperand(StoreDescriptor::ReceiverRegister()); -+ DCHECK(StoreDescriptor::ValueRegister().is(eax)); -+ CallKeyedStoreIC(expr->AssignmentSlot()); -+ context()->Plug(eax); -+} -+ -+// Code common for calls using the IC. -+void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { -+ Expression* callee = expr->expression(); -+ -+ // Get the target function. -+ ConvertReceiverMode convert_mode; -+ if (callee->IsVariableProxy()) { -+ { StackValueContext context(this); -+ EmitVariableLoad(callee->AsVariableProxy()); -+ } -+ // Push undefined as receiver. This is patched in the method prologue if it -+ // is a sloppy mode method. -+ PushOperand(isolate()->factory()->undefined_value()); -+ convert_mode = ConvertReceiverMode::kNullOrUndefined; -+ } else { -+ // Load the function from the receiver. -+ DCHECK(callee->IsProperty()); -+ DCHECK(!callee->AsProperty()->IsSuperAccess()); -+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ EmitNamedPropertyLoad(callee->AsProperty()); -+ // Push the target function under the receiver. -+ PushOperand(Operand(esp, 0)); -+ __ mov(Operand(esp, kPointerSize), eax); -+ convert_mode = ConvertReceiverMode::kNotNullOrUndefined; -+ } -+ -+ EmitCall(expr, convert_mode); -+} -+ -+ -+// Code common for calls using the IC. -+void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, -+ Expression* key) { -+ // Load the key. -+ VisitForAccumulatorValue(key); -+ -+ Expression* callee = expr->expression(); -+ -+ // Load the function from the receiver. -+ DCHECK(callee->IsProperty()); -+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ __ mov(LoadDescriptor::NameRegister(), eax); -+ EmitKeyedPropertyLoad(callee->AsProperty()); -+ -+ // Push the target function under the receiver. -+ PushOperand(Operand(esp, 0)); -+ __ mov(Operand(esp, kPointerSize), eax); -+ -+ EmitCall(expr, ConvertReceiverMode::kNotNullOrUndefined); -+} -+ -+ -+void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { -+ // Load the arguments. -+ ZoneList* args = expr->arguments(); -+ int arg_count = args->length(); -+ for (int i = 0; i < arg_count; i++) { -+ VisitForStackValue(args->at(i)); -+ } -+ -+ SetCallPosition(expr); -+ Handle code = CodeFactory::CallICTrampoline(isolate(), mode).code(); -+ __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); -+ __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); -+ __ Move(eax, Immediate(arg_count)); -+ CallIC(code); -+ OperandStackDepthDecrement(arg_count + 1); -+ -+ RestoreContext(); -+ context()->DropAndPlug(1, eax); -+} -+ -+void FullCodeGenerator::VisitCallNew(CallNew* expr) { -+ Comment cmnt(masm_, "[ CallNew"); -+ // According to ECMA-262, section 11.2.2, page 44, the function -+ // expression in new calls must be evaluated before the -+ // arguments. -+ -+ // Push constructor on the stack. If it's not a function it's used as -+ // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is -+ // ignored. -+ DCHECK(!expr->expression()->IsSuperPropertyReference()); -+ VisitForStackValue(expr->expression()); -+ -+ // Push the arguments ("left-to-right") on the stack. -+ ZoneList* args = expr->arguments(); -+ int arg_count = args->length(); -+ for (int i = 0; i < arg_count; i++) { -+ VisitForStackValue(args->at(i)); -+ } -+ -+ // Call the construct call builtin that handles allocation and -+ // constructor invocation. -+ SetConstructCallPosition(expr); -+ -+ // Load function and argument count into edi and eax. -+ __ Move(eax, Immediate(arg_count)); -+ __ mov(edi, Operand(esp, arg_count * kPointerSize)); -+ -+ // Record call targets in unoptimized code. -+ __ EmitLoadFeedbackVector(ebx); -+ __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); -+ -+ CallConstructStub stub(isolate()); -+ CallIC(stub.GetCode()); -+ OperandStackDepthDecrement(arg_count + 1); -+ RestoreContext(); -+ context()->Plug(eax); -+} -+ -+ -+void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ __ test(eax, Immediate(kSmiTagMask)); -+ Split(zero, if_true, if_false, fall_through); -+ -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::EmitIsJSReceiver(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ebx); -+ Split(above_equal, if_true, if_false, fall_through); -+ -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, JS_ARRAY_TYPE, ebx); -+ Split(equal, if_true, if_false, fall_through); -+ -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, &if_true, -+ &if_false, &fall_through); -+ -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); -+ Split(equal, if_true, if_false, fall_through); -+ -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, &if_true, -+ &if_false, &fall_through); -+ -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); -+ Split(equal, if_true, if_false, fall_through); -+ -+ context()->Plug(if_true, if_false); -+} -+ -+void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 1); -+ Label done, null, function, non_function_constructor; -+ -+ VisitForAccumulatorValue(args->at(0)); -+ -+ // If the object is not a JSReceiver, we return null. -+ __ JumpIfSmi(eax, &null, Label::kNear); -+ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); -+ __ j(below, &null, Label::kNear); -+ -+ // Return 'Function' for JSFunction and JSBoundFunction objects. -+ __ CmpInstanceType(eax, FIRST_FUNCTION_TYPE); -+ STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); -+ __ j(above_equal, &function, Label::kNear); -+ -+ // Check if the constructor in the map is a JS function. -+ __ GetMapConstructor(eax, eax, ebx); -+ __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); -+ __ j(not_equal, &non_function_constructor, Label::kNear); -+ -+ // eax now contains the constructor function. Grab the -+ // instance class name from there. -+ __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); -+ __ jmp(&done, Label::kNear); -+ -+ // Non-JS objects have class null. -+ __ bind(&null); -+ __ mov(eax, isolate()->factory()->null_value()); -+ __ jmp(&done, Label::kNear); -+ -+ // Functions have class 'Function'. -+ __ bind(&function); -+ __ mov(eax, isolate()->factory()->Function_string()); -+ __ jmp(&done, Label::kNear); -+ -+ // Objects with a non-function constructor have class 'Object'. -+ __ bind(&non_function_constructor); -+ __ mov(eax, isolate()->factory()->Object_string()); -+ -+ // All done. -+ __ bind(&done); -+ -+ context()->Plug(eax); -+} -+ -+void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK(args->length() == 2); -+ -+ VisitForStackValue(args->at(0)); -+ VisitForAccumulatorValue(args->at(1)); -+ -+ Register object = ebx; -+ Register index = eax; -+ Register result = edx; -+ -+ PopOperand(object); -+ -+ Label need_conversion; -+ Label index_out_of_range; -+ Label done; -+ StringCharCodeAtGenerator generator(object, index, result, &need_conversion, -+ &need_conversion, &index_out_of_range); -+ generator.GenerateFast(masm_); -+ __ jmp(&done); -+ -+ __ bind(&index_out_of_range); -+ // When the index is out of range, the spec requires us to return -+ // NaN. -+ __ Move(result, Immediate(isolate()->factory()->nan_value())); -+ __ jmp(&done); -+ -+ __ bind(&need_conversion); -+ // Move the undefined value into the result register, which will -+ // trigger conversion. -+ __ Move(result, Immediate(isolate()->factory()->undefined_value())); -+ __ jmp(&done); -+ -+ NopRuntimeCallHelper call_helper; -+ generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); -+ -+ __ bind(&done); -+ context()->Plug(result); -+} -+ -+ -+void FullCodeGenerator::EmitCall(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK_LE(2, args->length()); -+ // Push target, receiver and arguments onto the stack. -+ for (Expression* const arg : *args) { -+ VisitForStackValue(arg); -+ } -+ // Move target to edi. -+ int const argc = args->length() - 2; -+ __ mov(edi, Operand(esp, (argc + 1) * kPointerSize)); -+ // Call the target. -+ __ mov(eax, Immediate(argc)); -+ __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); -+ OperandStackDepthDecrement(argc + 1); -+ RestoreContext(); -+ // Discard the function left on TOS. -+ context()->DropAndPlug(1, eax); -+} -+ -+void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ DCHECK_EQ(1, args->length()); -+ VisitForAccumulatorValue(args->at(0)); -+ __ AssertFunction(eax); -+ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ mov(eax, FieldOperand(eax, Map::kPrototypeOffset)); -+ context()->Plug(eax); -+} -+ -+void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { -+ DCHECK(expr->arguments()->length() == 0); -+ ExternalReference debug_is_active = -+ ExternalReference::debug_is_active_address(isolate()); -+ __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); -+ __ SmiTag(eax); -+ context()->Plug(eax); -+} -+ -+ -+void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { -+ // Push function. -+ __ LoadGlobalFunction(expr->context_index(), eax); -+ PushOperand(eax); -+ -+ // Push undefined as receiver. -+ PushOperand(isolate()->factory()->undefined_value()); -+} -+ -+ -+void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { -+ ZoneList* args = expr->arguments(); -+ int arg_count = args->length(); -+ -+ SetCallPosition(expr); -+ __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); -+ __ Set(eax, arg_count); -+ __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined), -+ RelocInfo::CODE_TARGET); -+ OperandStackDepthDecrement(arg_count + 1); -+ RestoreContext(); -+} -+ -+ -+void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { -+ switch (expr->op()) { -+ case Token::DELETE: { -+ Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); -+ Property* property = expr->expression()->AsProperty(); -+ VariableProxy* proxy = expr->expression()->AsVariableProxy(); -+ -+ if (property != NULL) { -+ VisitForStackValue(property->obj()); -+ VisitForStackValue(property->key()); -+ PushOperand(Smi::FromInt(language_mode())); -+ CallRuntimeWithOperands(Runtime::kDeleteProperty); -+ context()->Plug(eax); -+ } else if (proxy != NULL) { -+ Variable* var = proxy->var(); -+ // Delete of an unqualified identifier is disallowed in strict mode but -+ // "delete this" is allowed. -+ bool is_this = var->is_this(); -+ DCHECK(is_sloppy(language_mode()) || is_this); -+ if (var->IsUnallocated()) { -+ __ mov(eax, NativeContextOperand()); -+ __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); -+ __ push(Immediate(var->name())); -+ __ Push(Smi::FromInt(SLOPPY)); -+ __ CallRuntime(Runtime::kDeleteProperty); -+ context()->Plug(eax); -+ } else { -+ DCHECK(!var->IsLookupSlot()); -+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); -+ // Result of deleting non-global variables is false. 'this' is -+ // not really a variable, though we implement it as one. The -+ // subexpression does not have side effects. -+ context()->Plug(is_this); -+ } -+ } else { -+ // Result of deleting non-property, non-variable reference is true. -+ // The subexpression may have side effects. -+ VisitForEffect(expr->expression()); -+ context()->Plug(true); -+ } -+ break; -+ } -+ -+ case Token::VOID: { -+ Comment cmnt(masm_, "[ UnaryOperation (VOID)"); -+ VisitForEffect(expr->expression()); -+ context()->Plug(isolate()->factory()->undefined_value()); -+ break; -+ } -+ -+ case Token::NOT: { -+ Comment cmnt(masm_, "[ UnaryOperation (NOT)"); -+ if (context()->IsEffect()) { -+ // Unary NOT has no side effects so it's only necessary to visit the -+ // subexpression. Match the optimizing compiler by not branching. -+ VisitForEffect(expr->expression()); -+ } else if (context()->IsTest()) { -+ const TestContext* test = TestContext::cast(context()); -+ // The labels are swapped for the recursive call. -+ VisitForControl(expr->expression(), -+ test->false_label(), -+ test->true_label(), -+ test->fall_through()); -+ context()->Plug(test->true_label(), test->false_label()); -+ } else { -+ // We handle value contexts explicitly rather than simply visiting -+ // for control and plugging the control flow into the context, -+ // because we need to prepare a pair of extra administrative AST ids -+ // for the optimizing compiler. -+ DCHECK(context()->IsAccumulatorValue() || context()->IsStackValue()); -+ Label materialize_true, materialize_false, done; -+ VisitForControl(expr->expression(), -+ &materialize_false, -+ &materialize_true, -+ &materialize_true); -+ if (!context()->IsAccumulatorValue()) OperandStackDepthIncrement(1); -+ __ bind(&materialize_true); -+ if (context()->IsAccumulatorValue()) { -+ __ mov(eax, isolate()->factory()->true_value()); -+ } else { -+ __ Push(isolate()->factory()->true_value()); -+ } -+ __ jmp(&done, Label::kNear); -+ __ bind(&materialize_false); -+ if (context()->IsAccumulatorValue()) { -+ __ mov(eax, isolate()->factory()->false_value()); -+ } else { -+ __ Push(isolate()->factory()->false_value()); -+ } -+ __ bind(&done); -+ } -+ break; -+ } -+ -+ case Token::TYPEOF: { -+ Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); -+ { -+ AccumulatorValueContext context(this); -+ VisitForTypeofValue(expr->expression()); -+ } -+ __ mov(ebx, eax); -+ __ Call(isolate()->builtins()->Typeof(), RelocInfo::CODE_TARGET); -+ context()->Plug(eax); -+ break; -+ } -+ -+ default: -+ UNREACHABLE(); -+ } -+} -+ -+ -+void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { -+ DCHECK(expr->expression()->IsValidReferenceExpressionOrThis()); -+ -+ Comment cmnt(masm_, "[ CountOperation"); -+ -+ Property* prop = expr->expression()->AsProperty(); -+ LhsKind assign_type = Property::GetAssignType(prop); -+ -+ // Evaluate expression and get value. -+ if (assign_type == VARIABLE) { -+ DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); -+ AccumulatorValueContext context(this); -+ EmitVariableLoad(expr->expression()->AsVariableProxy()); -+ } else { -+ // Reserve space for result of postfix operation. -+ if (expr->is_postfix() && !context()->IsEffect()) { -+ PushOperand(Smi::kZero); -+ } -+ switch (assign_type) { -+ case NAMED_PROPERTY: { -+ // Put the object both on the stack and in the register. -+ VisitForStackValue(prop->obj()); -+ __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); -+ EmitNamedPropertyLoad(prop); -+ break; -+ } -+ -+ case KEYED_PROPERTY: { -+ VisitForStackValue(prop->obj()); -+ VisitForStackValue(prop->key()); -+ __ mov(LoadDescriptor::ReceiverRegister(), -+ Operand(esp, kPointerSize)); // Object. -+ __ mov(LoadDescriptor::NameRegister(), Operand(esp, 0)); // Key. -+ EmitKeyedPropertyLoad(prop); -+ break; -+ } -+ -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ case VARIABLE: -+ UNREACHABLE(); -+ } -+ } -+ -+ // Convert old value into a number. -+ __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ -+ // Save result for postfix expressions. -+ if (expr->is_postfix()) { -+ if (!context()->IsEffect()) { -+ // Save the result on the stack. If we have a named or keyed property -+ // we store the result under the receiver that is currently on top -+ // of the stack. -+ switch (assign_type) { -+ case VARIABLE: -+ PushOperand(eax); -+ break; -+ case NAMED_PROPERTY: -+ __ mov(Operand(esp, kPointerSize), eax); -+ break; -+ case KEYED_PROPERTY: -+ __ mov(Operand(esp, 2 * kPointerSize), eax); -+ break; -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+ } -+ } -+ -+ SetExpressionPosition(expr); -+ -+ // Call stub for +1/-1. -+ __ mov(edx, eax); -+ __ mov(eax, Immediate(Smi::FromInt(1))); -+ Handle code = -+ CodeFactory::BinaryOperation(isolate(), expr->binary_op()).code(); -+ __ Call(code, RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ -+ // Store the value returned in eax. -+ switch (assign_type) { -+ case VARIABLE: { -+ VariableProxy* proxy = expr->expression()->AsVariableProxy(); -+ if (expr->is_postfix()) { -+ // Perform the assignment as if via '='. -+ { EffectContext context(this); -+ EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), -+ proxy->hole_check_mode()); -+ context.Plug(eax); -+ } -+ // For all contexts except EffectContext We have the result on -+ // top of the stack. -+ if (!context()->IsEffect()) { -+ context()->PlugTOS(); -+ } -+ } else { -+ // Perform the assignment as if via '='. -+ EmitVariableAssignment(proxy->var(), Token::ASSIGN, expr->CountSlot(), -+ proxy->hole_check_mode()); -+ context()->Plug(eax); -+ } -+ break; -+ } -+ case NAMED_PROPERTY: { -+ PopOperand(StoreDescriptor::ReceiverRegister()); -+ CallStoreIC(expr->CountSlot(), prop->key()->AsLiteral()->value()); -+ if (expr->is_postfix()) { -+ if (!context()->IsEffect()) { -+ context()->PlugTOS(); -+ } -+ } else { -+ context()->Plug(eax); -+ } -+ break; -+ } -+ case KEYED_PROPERTY: { -+ PopOperand(StoreDescriptor::NameRegister()); -+ PopOperand(StoreDescriptor::ReceiverRegister()); -+ CallKeyedStoreIC(expr->CountSlot()); -+ if (expr->is_postfix()) { -+ // Result is on the stack -+ if (!context()->IsEffect()) { -+ context()->PlugTOS(); -+ } -+ } else { -+ context()->Plug(eax); -+ } -+ break; -+ } -+ case NAMED_SUPER_PROPERTY: -+ case KEYED_SUPER_PROPERTY: -+ UNREACHABLE(); -+ break; -+ } -+} -+ -+ -+void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, -+ Expression* sub_expr, -+ Handle check) { -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ { AccumulatorValueContext context(this); -+ VisitForTypeofValue(sub_expr); -+ } -+ -+ Factory* factory = isolate()->factory(); -+ if (String::Equals(check, factory->number_string())) { -+ __ JumpIfSmi(eax, if_true); -+ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), -+ isolate()->factory()->heap_number_map()); -+ Split(equal, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->string_string())) { -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); -+ Split(below, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->symbol_string())) { -+ __ JumpIfSmi(eax, if_false); -+ __ CmpObjectType(eax, SYMBOL_TYPE, edx); -+ Split(equal, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->boolean_string())) { -+ __ cmp(eax, isolate()->factory()->true_value()); -+ __ j(equal, if_true); -+ __ cmp(eax, isolate()->factory()->false_value()); -+ Split(equal, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->undefined_string())) { -+ __ cmp(eax, isolate()->factory()->null_value()); -+ __ j(equal, if_false); -+ __ JumpIfSmi(eax, if_false); -+ // Check for undetectable objects => true. -+ __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(edx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsUndetectable)); -+ Split(not_zero, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->function_string())) { -+ __ JumpIfSmi(eax, if_false); -+ // Check for callable and not undetectable objects => true. -+ __ mov(edx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ movzx_b(ecx, FieldOperand(edx, Map::kBitFieldOffset)); -+ __ and_(ecx, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)); -+ __ cmp(ecx, 1 << Map::kIsCallable); -+ Split(equal, if_true, if_false, fall_through); -+ } else if (String::Equals(check, factory->object_string())) { -+ __ JumpIfSmi(eax, if_false); -+ __ cmp(eax, isolate()->factory()->null_value()); -+ __ j(equal, if_true); -+ STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, edx); -+ __ j(below, if_false); -+ // Check for callable or undetectable objects => false. -+ __ test_b(FieldOperand(edx, Map::kBitFieldOffset), -+ Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); -+ Split(zero, if_true, if_false, fall_through); -+ } else { -+ if (if_false != fall_through) __ jmp(if_false); -+ } -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { -+ Comment cmnt(masm_, "[ CompareOperation"); -+ -+ // First we try a fast inlined version of the compare when one of -+ // the operands is a literal. -+ if (TryLiteralCompare(expr)) return; -+ -+ // Always perform the comparison for its control flow. Pack the result -+ // into the expression's context after the comparison is performed. -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ Token::Value op = expr->op(); -+ VisitForStackValue(expr->left()); -+ switch (op) { -+ case Token::IN: -+ VisitForStackValue(expr->right()); -+ SetExpressionPosition(expr); -+ EmitHasProperty(); -+ __ cmp(eax, isolate()->factory()->true_value()); -+ Split(equal, if_true, if_false, fall_through); -+ break; -+ -+ case Token::INSTANCEOF: { -+ VisitForAccumulatorValue(expr->right()); -+ SetExpressionPosition(expr); -+ PopOperand(edx); -+ __ Call(isolate()->builtins()->InstanceOf(), RelocInfo::CODE_TARGET); -+ RestoreContext(); -+ __ cmp(eax, isolate()->factory()->true_value()); -+ Split(equal, if_true, if_false, fall_through); -+ break; -+ } -+ -+ default: { -+ VisitForAccumulatorValue(expr->right()); -+ SetExpressionPosition(expr); -+ Condition cc = CompareIC::ComputeCondition(op); -+ PopOperand(edx); -+ -+ bool inline_smi_code = ShouldInlineSmiCase(op); -+ JumpPatchSite patch_site(masm_); -+ if (inline_smi_code) { -+ Label slow_case; -+ __ mov(ecx, edx); -+ __ or_(ecx, eax); -+ patch_site.EmitJumpIfNotSmi(ecx, &slow_case, Label::kNear); -+ __ cmp(edx, eax); -+ Split(cc, if_true, if_false, NULL); -+ __ bind(&slow_case); -+ } -+ -+ Handle ic = CodeFactory::CompareIC(isolate(), op).code(); -+ CallIC(ic); -+ patch_site.EmitPatchInfo(); -+ -+ __ test(eax, eax); -+ Split(cc, if_true, if_false, fall_through); -+ } -+ } -+ -+ // Convert the result of the comparison into one expected for this -+ // expression's context. -+ context()->Plug(if_true, if_false); -+} -+ -+ -+void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, -+ Expression* sub_expr, -+ NilValue nil) { -+ Label materialize_true, materialize_false; -+ Label* if_true = NULL; -+ Label* if_false = NULL; -+ Label* fall_through = NULL; -+ context()->PrepareTest(&materialize_true, &materialize_false, -+ &if_true, &if_false, &fall_through); -+ -+ VisitForAccumulatorValue(sub_expr); -+ -+ Handle nil_value = nil == kNullValue -+ ? isolate()->factory()->null_value() -+ : isolate()->factory()->undefined_value(); -+ if (expr->op() == Token::EQ_STRICT) { -+ __ cmp(eax, nil_value); -+ Split(equal, if_true, if_false, fall_through); -+ } else { -+ __ JumpIfSmi(eax, if_false); -+ __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ test_b(FieldOperand(eax, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsUndetectable)); -+ Split(not_zero, if_true, if_false, fall_through); -+ } -+ context()->Plug(if_true, if_false); -+} -+ -+ -+Register FullCodeGenerator::result_register() { -+ return eax; -+} -+ -+ -+Register FullCodeGenerator::context_register() { -+ return esi; -+} -+ -+void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { -+ DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); -+ __ mov(value, Operand(ebp, frame_offset)); -+} -+ -+void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { -+ DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); -+ __ mov(Operand(ebp, frame_offset), value); -+} -+ -+ -+void FullCodeGenerator::LoadContextField(Register dst, int context_index) { -+ __ mov(dst, ContextOperand(esi, context_index)); -+} -+ -+ -+void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { -+ DeclarationScope* closure_scope = scope()->GetClosureScope(); -+ if (closure_scope->is_script_scope() || -+ closure_scope->is_module_scope()) { -+ // Contexts nested in the native context have a canonical empty function -+ // as their closure, not the anonymous closure containing the global -+ // code. -+ __ mov(eax, NativeContextOperand()); -+ PushOperand(ContextOperand(eax, Context::CLOSURE_INDEX)); -+ } else if (closure_scope->is_eval_scope()) { -+ // Contexts nested inside eval code have the same closure as the context -+ // calling eval, not the anonymous closure containing the eval code. -+ // Fetch it from the context. -+ PushOperand(ContextOperand(esi, Context::CLOSURE_INDEX)); -+ } else { -+ DCHECK(closure_scope->is_function_scope()); -+ PushOperand(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ } -+} -+ -+ -+#undef __ -+ -+ -+static const byte kJnsInstruction = 0x79; -+static const byte kJnsOffset = 0x11; -+static const byte kNopByteOne = 0x66; -+static const byte kNopByteTwo = 0x90; -+#ifdef DEBUG -+static const byte kCallInstruction = 0xe8; -+#endif -+ -+ -+void BackEdgeTable::PatchAt(Code* unoptimized_code, -+ Address pc, -+ BackEdgeState target_state, -+ Code* replacement_code) { -+ Address call_target_address = pc - kIntSize; -+ Address jns_instr_address = call_target_address - 3; -+ Address jns_offset_address = call_target_address - 2; -+ -+ switch (target_state) { -+ case INTERRUPT: -+ // sub , ;; Not changed -+ // jns ok -+ // call -+ // ok: -+ *jns_instr_address = kJnsInstruction; -+ *jns_offset_address = kJnsOffset; -+ break; -+ case ON_STACK_REPLACEMENT: -+ // sub , ;; Not changed -+ // nop -+ // nop -+ // call -+ // ok: -+ *jns_instr_address = kNopByteOne; -+ *jns_offset_address = kNopByteTwo; -+ break; -+ } -+ -+ Assembler::set_target_address_at(unoptimized_code->GetIsolate(), -+ call_target_address, unoptimized_code, -+ replacement_code->entry()); -+ unoptimized_code->GetHeap()->incremental_marking()->RecordCodeTargetPatch( -+ unoptimized_code, call_target_address, replacement_code); -+} -+ -+ -+BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState( -+ Isolate* isolate, -+ Code* unoptimized_code, -+ Address pc) { -+ Address call_target_address = pc - kIntSize; -+ Address jns_instr_address = call_target_address - 3; -+ DCHECK_EQ(kCallInstruction, *(call_target_address - 1)); -+ -+ if (*jns_instr_address == kJnsInstruction) { -+ DCHECK_EQ(kJnsOffset, *(call_target_address - 2)); -+ DCHECK_EQ(isolate->builtins()->InterruptCheck()->entry(), -+ Assembler::target_address_at(call_target_address, -+ unoptimized_code)); -+ return INTERRUPT; -+ } -+ -+ DCHECK_EQ(kNopByteOne, *jns_instr_address); -+ DCHECK_EQ(kNopByteTwo, *(call_target_address - 2)); -+ -+ DCHECK_EQ( -+ isolate->builtins()->OnStackReplacement()->entry(), -+ Assembler::target_address_at(call_target_address, unoptimized_code)); -+ return ON_STACK_REPLACEMENT; -+} -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/full-codegen/x87/OWNERS 2018-02-18 19:00:54.100419575 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/gdb-jit.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/gdb-jit.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/gdb-jit.cc 2018-02-18 19:00:54.101419561 +0100 -@@ -199,7 +199,7 @@ - struct MachOSectionHeader { - char sectname[16]; - char segname[16]; --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - uint32_t addr; - uint32_t size; - #else -@@ -507,7 +507,7 @@ - uint32_t cmd; - uint32_t cmdsize; - char segname[16]; --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - uint32_t vmaddr; - uint32_t vmsize; - uint32_t fileoff; -@@ -533,7 +533,7 @@ - Writer::Slot WriteHeader(Writer* w) { - DCHECK(w->position() == 0); - Writer::Slot header = w->CreateSlotHere(); --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - header->magic = 0xFEEDFACEu; - header->cputype = 7; // i386 - header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL -@@ -558,7 +558,7 @@ - uintptr_t code_size) { - Writer::Slot cmd = - w->CreateSlotHere(); --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - cmd->cmd = LC_SEGMENT_32; - #else - cmd->cmd = LC_SEGMENT_64; -@@ -646,7 +646,7 @@ - void WriteHeader(Writer* w) { - DCHECK(w->position() == 0); - Writer::Slot header = w->CreateSlotHere(); --#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ -+#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \ - (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT)) - const uint8_t ident[16] = - { 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -@@ -668,7 +668,7 @@ - #endif - memcpy(header->ident, ident, 16); - header->type = 1; --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - header->machine = 3; - #elif V8_TARGET_ARCH_X64 - // Processor identification value for x64 is 62 as defined in -@@ -783,8 +783,8 @@ - Binding binding() const { - return static_cast(info >> 4); - } --#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || \ -- (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT) || \ -+#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \ -+ (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT) || \ - (V8_TARGET_ARCH_S390 && V8_TARGET_ARCH_32_BIT)) - struct SerializedLayout { - SerializedLayout(uint32_t name, -@@ -1146,7 +1146,7 @@ - w->Write(desc_->CodeStart() + desc_->CodeSize()); - Writer::Slot fb_block_size = w->CreateSlotHere(); - uintptr_t fb_block_start = w->position(); --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - w->Write(DW_OP_reg5); // The frame pointer's here on ia32 - #elif V8_TARGET_ARCH_X64 - w->Write(DW_OP_reg6); // and here on x64. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/globals.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/globals.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/globals.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/globals.h 2018-02-18 19:00:54.102419546 +0100 -@@ -167,7 +167,7 @@ - const int kPCOnStackSize = kRegisterSize; - const int kFPOnStackSize = kRegisterSize; - --#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - const int kElidedFrameSlots = kPCOnStackSize / kPointerSize; - #else - const int kElidedFrameSlots = 0; -@@ -912,10 +912,16 @@ - }; - - // The mips architecture prior to revision 5 has inverted encoding for sNaN. -+// The x87 FPU convert the sNaN to qNaN automatically when loading sNaN from -+// memmory. -+// Use mips sNaN which is a not used qNaN in x87 port as sNaN to workaround this -+// issue -+// for some test cases. - #if (V8_TARGET_ARCH_MIPS && !defined(_MIPS_ARCH_MIPS32R6) && \ - (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) || \ - (V8_TARGET_ARCH_MIPS64 && !defined(_MIPS_ARCH_MIPS64R6) && \ -- (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) -+ (!defined(USE_SIMULATOR) || !defined(_MIPS_TARGET_SIMULATOR))) || \ -+ (V8_TARGET_ARCH_X87) - const uint32_t kHoleNanUpper32 = 0xFFFF7FFF; - const uint32_t kHoleNanLower32 = 0xFFFF7FFF; - #else -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/access-compiler-x87.cc 2018-02-18 19:00:54.102419546 +0100 -@@ -0,0 +1,40 @@ -+// Copyright 2014 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/ic/access-compiler.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm) -+ -+void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, -+ Handle code) { -+ __ jmp(code, RelocInfo::CODE_TARGET); -+} -+ -+void PropertyAccessCompiler::InitializePlatformSpecific( -+ AccessCompilerData* data) { -+ Register receiver = LoadDescriptor::ReceiverRegister(); -+ Register name = LoadDescriptor::NameRegister(); -+ -+ // Load calling convention. -+ // receiver, name, scratch1, scratch2, scratch3. -+ Register load_registers[] = {receiver, name, ebx, eax, edi}; -+ -+ // Store calling convention. -+ // receiver, name, scratch1, scratch2. -+ Register store_registers[] = {receiver, name, ebx, edi}; -+ -+ data->Initialize(arraysize(load_registers), load_registers, -+ arraysize(store_registers), store_registers); -+} -+ -+#undef __ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/handler-compiler-x87.cc 2018-02-18 19:00:54.102419546 +0100 -@@ -0,0 +1,447 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/ic/handler-compiler.h" -+ -+#include "src/api-arguments.h" -+#include "src/field-type.h" -+#include "src/ic/call-optimization.h" -+#include "src/ic/ic.h" -+#include "src/isolate-inl.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm) -+ -+void NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt( -+ MacroAssembler* masm) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ // If we generate a global code snippet for deoptimization only, remember -+ // the place to continue after deoptimization. -+ masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); -+ // Restore context register. -+ __ pop(esi); -+ } -+ __ ret(0); -+} -+ -+ -+void PropertyHandlerCompiler::PushVectorAndSlot(Register vector, -+ Register slot) { -+ MacroAssembler* masm = this->masm(); -+ STATIC_ASSERT(LoadWithVectorDescriptor::kSlot < -+ LoadWithVectorDescriptor::kVector); -+ STATIC_ASSERT(StoreWithVectorDescriptor::kSlot < -+ StoreWithVectorDescriptor::kVector); -+ STATIC_ASSERT(StoreTransitionDescriptor::kSlot < -+ StoreTransitionDescriptor::kVector); -+ __ push(slot); -+ __ push(vector); -+} -+ -+ -+void PropertyHandlerCompiler::PopVectorAndSlot(Register vector, Register slot) { -+ MacroAssembler* masm = this->masm(); -+ __ pop(vector); -+ __ pop(slot); -+} -+ -+ -+void PropertyHandlerCompiler::DiscardVectorAndSlot() { -+ MacroAssembler* masm = this->masm(); -+ // Remove vector and slot. -+ __ add(esp, Immediate(2 * kPointerSize)); -+} -+ -+void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup( -+ MacroAssembler* masm, Label* miss_label, Register receiver, -+ Handle name, Register scratch0, Register scratch1) { -+ DCHECK(name->IsUniqueName()); -+ DCHECK(!receiver.is(scratch0)); -+ Counters* counters = masm->isolate()->counters(); -+ __ IncrementCounter(counters->negative_lookups(), 1); -+ __ IncrementCounter(counters->negative_lookups_miss(), 1); -+ -+ __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); -+ -+ const int kInterceptorOrAccessCheckNeededMask = -+ (1 << Map::kHasNamedInterceptor) | (1 << Map::kIsAccessCheckNeeded); -+ -+ // Bail out if the receiver has a named interceptor or requires access checks. -+ __ test_b(FieldOperand(scratch0, Map::kBitFieldOffset), -+ Immediate(kInterceptorOrAccessCheckNeededMask)); -+ __ j(not_zero, miss_label); -+ -+ // Check that receiver is a JSObject. -+ __ CmpInstanceType(scratch0, FIRST_JS_RECEIVER_TYPE); -+ __ j(below, miss_label); -+ -+ // Load properties array. -+ Register properties = scratch0; -+ __ mov(properties, FieldOperand(receiver, JSObject::kPropertiesOrHashOffset)); -+ -+ // Check that the properties array is a dictionary. -+ __ cmp(FieldOperand(properties, HeapObject::kMapOffset), -+ Immediate(masm->isolate()->factory()->hash_table_map())); -+ __ j(not_equal, miss_label); -+ -+ Label done; -+ NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, -+ properties, name, scratch1); -+ __ bind(&done); -+ __ DecrementCounter(counters->negative_lookups_miss(), 1); -+} -+ -+// Generate call to api function. -+// This function uses push() to generate smaller, faster code than -+// the version above. It is an optimization that should will be removed -+// when api call ICs are generated in hydrogen. -+void PropertyHandlerCompiler::GenerateApiAccessorCall( -+ MacroAssembler* masm, const CallOptimization& optimization, -+ Handle receiver_map, Register receiver, Register scratch, -+ bool is_store, Register store_parameter, Register accessor_holder, -+ int accessor_index) { -+ DCHECK(!accessor_holder.is(scratch)); -+ // Copy return value. -+ __ pop(scratch); -+ -+ if (is_store) { -+ // Discard stack arguments. -+ __ add(esp, Immediate(StoreWithVectorDescriptor::kStackArgumentsCount * -+ kPointerSize)); -+ } -+ // Write the receiver and arguments to stack frame. -+ __ push(receiver); -+ if (is_store) { -+ DCHECK(!AreAliased(receiver, scratch, store_parameter)); -+ __ push(store_parameter); -+ } -+ __ push(scratch); -+ // Stack now matches JSFunction abi. -+ DCHECK(optimization.is_simple_api_call()); -+ -+ // Abi for CallApiCallbackStub. -+ Register callee = edi; -+ Register data = ebx; -+ Register holder = ecx; -+ Register api_function_address = edx; -+ scratch = no_reg; -+ -+ // Put callee in place. -+ __ LoadAccessor(callee, accessor_holder, accessor_index, -+ is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); -+ -+ // Put holder in place. -+ CallOptimization::HolderLookup holder_lookup; -+ optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); -+ switch (holder_lookup) { -+ case CallOptimization::kHolderIsReceiver: -+ __ Move(holder, receiver); -+ break; -+ case CallOptimization::kHolderFound: -+ __ mov(holder, FieldOperand(receiver, HeapObject::kMapOffset)); -+ __ mov(holder, FieldOperand(holder, Map::kPrototypeOffset)); -+ break; -+ case CallOptimization::kHolderNotFound: -+ UNREACHABLE(); -+ break; -+ } -+ -+ Isolate* isolate = masm->isolate(); -+ Handle api_call_info = optimization.api_call_info(); -+ // Put call data in place. -+ if (api_call_info->data()->IsUndefined(isolate)) { -+ __ mov(data, Immediate(isolate->factory()->undefined_value())); -+ } else { -+ if (optimization.is_constant_call()) { -+ __ mov(data, FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(data, FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); -+ __ mov(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); -+ } else { -+ __ mov(data, FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); -+ } -+ __ mov(data, FieldOperand(data, CallHandlerInfo::kDataOffset)); -+ } -+ -+ // Put api_function_address in place. -+ Address function_address = v8::ToCData
(api_call_info->callback()); -+ __ mov(api_function_address, Immediate(function_address)); -+ -+ // Jump to stub. -+ CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call()); -+ __ TailCallStub(&stub); -+} -+ -+ -+// Generate code to check that a global property cell is empty. Create -+// the property cell at compilation time if no cell exists for the -+// property. -+void PropertyHandlerCompiler::GenerateCheckPropertyCell( -+ MacroAssembler* masm, Handle global, Handle name, -+ Register scratch, Label* miss) { -+ Handle cell = JSGlobalObject::EnsureEmptyPropertyCell( -+ global, name, PropertyCellType::kInvalidated); -+ Isolate* isolate = masm->isolate(); -+ DCHECK(cell->value()->IsTheHole(isolate)); -+ Handle weak_cell = isolate->factory()->NewWeakCell(cell); -+ __ LoadWeakValue(scratch, weak_cell, miss); -+ __ cmp(FieldOperand(scratch, PropertyCell::kValueOffset), -+ Immediate(isolate->factory()->the_hole_value())); -+ __ j(not_equal, miss); -+} -+ -+ -+void NamedStoreHandlerCompiler::GenerateStoreViaSetter( -+ MacroAssembler* masm, Handle map, Register receiver, Register holder, -+ int accessor_index, int expected_arguments, Register scratch) { -+ // ----------- S t a t e ------------- -+ // -- esp[12] : value -+ // -- esp[8] : slot -+ // -- esp[4] : vector -+ // -- esp[0] : return address -+ // ----------------------------------- -+ __ LoadParameterFromStack(value(), Descriptor::kValue); -+ -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Save context register -+ __ push(esi); -+ // Save value register, so we can restore it later. -+ __ push(value()); -+ -+ if (accessor_index >= 0) { -+ DCHECK(!holder.is(scratch)); -+ DCHECK(!receiver.is(scratch)); -+ DCHECK(!value().is(scratch)); -+ // Call the JavaScript setter with receiver and value on the stack. -+ if (map->IsJSGlobalObjectMap()) { -+ __ mov(scratch, -+ FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); -+ receiver = scratch; -+ } -+ __ push(receiver); -+ __ push(value()); -+ __ LoadAccessor(edi, holder, accessor_index, ACCESSOR_SETTER); -+ __ Set(eax, 1); -+ __ Call(masm->isolate()->builtins()->CallFunction( -+ ConvertReceiverMode::kNotNullOrUndefined), -+ RelocInfo::CODE_TARGET); -+ } else { -+ // If we generate a global code snippet for deoptimization only, remember -+ // the place to continue after deoptimization. -+ masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); -+ } -+ -+ // We have to return the passed value, not the return value of the setter. -+ __ pop(eax); -+ // Restore context register. -+ __ pop(esi); -+ } -+ if (accessor_index >= 0) { -+ __ ret(StoreWithVectorDescriptor::kStackArgumentsCount * kPointerSize); -+ } else { -+ // If we generate a global code snippet for deoptimization only, don't try -+ // to drop stack arguments for the StoreIC because they are not a part of -+ // expression stack and deoptimizer does not reconstruct them. -+ __ ret(0); -+ } -+} -+ -+#undef __ -+#define __ ACCESS_MASM(masm()) -+ -+ -+void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, -+ Handle name) { -+ if (!label->is_unused()) { -+ __ bind(label); -+ __ mov(this->name(), Immediate(name)); -+ } -+} -+ -+void PropertyHandlerCompiler::GenerateAccessCheck( -+ Handle native_context_cell, Register scratch1, Register scratch2, -+ Label* miss, bool compare_native_contexts_only) { -+ Label done; -+ // Load current native context. -+ __ mov(scratch1, NativeContextOperand()); -+ // Load expected native context. -+ __ LoadWeakValue(scratch2, native_context_cell, miss); -+ __ cmp(scratch1, scratch2); -+ -+ if (!compare_native_contexts_only) { -+ __ j(equal, &done); -+ -+ // Compare security tokens of current and expected native contexts. -+ __ mov(scratch1, ContextOperand(scratch1, Context::SECURITY_TOKEN_INDEX)); -+ __ mov(scratch2, ContextOperand(scratch2, Context::SECURITY_TOKEN_INDEX)); -+ __ cmp(scratch1, scratch2); -+ } -+ __ j(not_equal, miss); -+ -+ __ bind(&done); -+} -+ -+Register PropertyHandlerCompiler::CheckPrototypes( -+ Register object_reg, Register holder_reg, Register scratch1, -+ Register scratch2, Handle name, Label* miss) { -+ Handle receiver_map = map(); -+ -+ // Make sure there's no overlap between holder and object registers. -+ DCHECK(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); -+ DCHECK(!scratch2.is(object_reg) && !scratch2.is(holder_reg) && -+ !scratch2.is(scratch1)); -+ -+ Handle validity_cell = -+ Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); -+ if (!validity_cell.is_null()) { -+ DCHECK_EQ(Smi::FromInt(Map::kPrototypeChainValid), validity_cell->value()); -+ // Operand::ForCell(...) points to the cell's payload! -+ __ cmp(Operand::ForCell(validity_cell), -+ Immediate(Smi::FromInt(Map::kPrototypeChainValid))); -+ __ j(not_equal, miss); -+ } -+ -+ // Keep track of the current object in register reg. -+ Register reg = object_reg; -+ int depth = 0; -+ -+ Handle current = Handle::null(); -+ if (receiver_map->IsJSGlobalObjectMap()) { -+ current = isolate()->global_object(); -+ } -+ -+ Handle current_map(receiver_map->GetPrototypeChainRootMap(isolate()), -+ isolate()); -+ Handle holder_map(holder()->map()); -+ // Traverse the prototype chain and check the maps in the prototype chain for -+ // fast and global objects or do negative lookup for normal objects. -+ while (!current_map.is_identical_to(holder_map)) { -+ ++depth; -+ -+ if (current_map->IsJSGlobalObjectMap()) { -+ GenerateCheckPropertyCell(masm(), Handle::cast(current), -+ name, scratch2, miss); -+ } else if (current_map->is_dictionary_map()) { -+ DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. -+ DCHECK(name->IsUniqueName()); -+ DCHECK(current.is_null() || -+ current->property_dictionary()->FindEntry(name) == -+ NameDictionary::kNotFound); -+ -+ if (depth > 1) { -+ Handle weak_cell = -+ Map::GetOrCreatePrototypeWeakCell(current, isolate()); -+ __ LoadWeakValue(reg, weak_cell, miss); -+ } -+ GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, -+ scratch2); -+ } -+ -+ reg = holder_reg; // From now on the object will be in holder_reg. -+ // Go to the next object in the prototype chain. -+ current = handle(JSObject::cast(current_map->prototype())); -+ current_map = handle(current->map()); -+ } -+ -+ DCHECK(!current_map->IsJSGlobalProxyMap()); -+ -+ // Log the check depth. -+ LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); -+ -+ if (depth != 0) { -+ Handle weak_cell = -+ Map::GetOrCreatePrototypeWeakCell(current, isolate()); -+ __ LoadWeakValue(reg, weak_cell, miss); -+ } -+ -+ // Return the register containing the holder. -+ return reg; -+} -+ -+ -+void NamedLoadHandlerCompiler::FrontendFooter(Handle name, Label* miss) { -+ if (!miss->is_unused()) { -+ Label success; -+ __ jmp(&success); -+ __ bind(miss); -+ if (IC::ShouldPushPopSlotAndVector(kind())) { -+ DCHECK(kind() == Code::LOAD_IC); -+ PopVectorAndSlot(); -+ } -+ TailCallBuiltin(masm(), MissBuiltin(kind())); -+ __ bind(&success); -+ } -+} -+ -+ -+void NamedStoreHandlerCompiler::FrontendFooter(Handle name, Label* miss) { -+ if (!miss->is_unused()) { -+ Label success; -+ __ jmp(&success); -+ GenerateRestoreName(miss, name); -+ DCHECK(!IC::ShouldPushPopSlotAndVector(kind())); -+ TailCallBuiltin(masm(), MissBuiltin(kind())); -+ __ bind(&success); -+ } -+} -+ -+void NamedStoreHandlerCompiler::ZapStackArgumentsRegisterAliases() { -+ // Zap register aliases of the arguments passed on the stack to ensure they -+ // are properly loaded by the handler (debug-only). -+ STATIC_ASSERT(Descriptor::kPassLastArgsOnStack); -+ STATIC_ASSERT(Descriptor::kStackArgumentsCount == 3); -+ __ mov(Descriptor::ValueRegister(), Immediate(kDebugZapValue)); -+ __ mov(Descriptor::SlotRegister(), Immediate(kDebugZapValue)); -+ __ mov(Descriptor::VectorRegister(), Immediate(kDebugZapValue)); -+} -+ -+Handle NamedStoreHandlerCompiler::CompileStoreCallback( -+ Handle object, Handle name, Handle callback, -+ LanguageMode language_mode) { -+ Register holder_reg = Frontend(name); -+ __ LoadParameterFromStack(value(), Descriptor::kValue); -+ -+ __ pop(scratch1()); // remove the return address -+ // Discard stack arguments. -+ __ add(esp, Immediate(StoreWithVectorDescriptor::kStackArgumentsCount * -+ kPointerSize)); -+ __ push(receiver()); -+ __ push(holder_reg); -+ // If the callback cannot leak, then push the callback directly, -+ // otherwise wrap it in a weak cell. -+ if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { -+ __ Push(callback); -+ } else { -+ Handle cell = isolate()->factory()->NewWeakCell(callback); -+ __ Push(cell); -+ } -+ __ Push(name); -+ __ push(value()); -+ __ push(Immediate(Smi::FromInt(language_mode))); -+ __ push(scratch1()); // restore return address -+ -+ // Do tail-call to the runtime system. -+ __ TailCallRuntime(Runtime::kStoreCallbackProperty); -+ -+ // Return the generated code. -+ return GetCode(kind(), name); -+} -+ -+ -+Register NamedStoreHandlerCompiler::value() { -+ return StoreDescriptor::ValueRegister(); -+} -+ -+ -+#undef __ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/ic-x87.cc 2018-02-18 19:00:54.103419531 +0100 -@@ -0,0 +1,84 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/codegen.h" -+#include "src/ic/ic.h" -+#include "src/ic/stub-cache.h" -+ -+namespace v8 { -+namespace internal { -+ -+ -+Condition CompareIC::ComputeCondition(Token::Value op) { -+ switch (op) { -+ case Token::EQ_STRICT: -+ case Token::EQ: -+ return equal; -+ case Token::LT: -+ return less; -+ case Token::GT: -+ return greater; -+ case Token::LTE: -+ return less_equal; -+ case Token::GTE: -+ return greater_equal; -+ default: -+ UNREACHABLE(); -+ } -+} -+ -+ -+bool CompareIC::HasInlinedSmiCode(Address address) { -+ // The address of the instruction following the call. -+ Address test_instruction_address = -+ address + Assembler::kCallTargetAddressOffset; -+ -+ // If the instruction following the call is not a test al, nothing -+ // was inlined. -+ return *test_instruction_address == Assembler::kTestAlByte; -+} -+ -+ -+void PatchInlinedSmiCode(Isolate* isolate, Address address, -+ InlinedSmiCheck check) { -+ // The address of the instruction following the call. -+ Address test_instruction_address = -+ address + Assembler::kCallTargetAddressOffset; -+ -+ // If the instruction following the call is not a test al, nothing -+ // was inlined. -+ if (*test_instruction_address != Assembler::kTestAlByte) { -+ DCHECK(*test_instruction_address == Assembler::kNopByte); -+ return; -+ } -+ -+ Address delta_address = test_instruction_address + 1; -+ // The delta to the start of the map check instruction and the -+ // condition code uses at the patched jump. -+ uint8_t delta = *reinterpret_cast(delta_address); -+ if (FLAG_trace_ic) { -+ LOG(isolate, PatchIC(address, test_instruction_address, delta)); -+ } -+ -+ // Patch with a short conditional jump. Enabling means switching from a short -+ // jump-if-carry/not-carry to jump-if-zero/not-zero, whereas disabling is the -+ // reverse operation of that. -+ Address jmp_address = test_instruction_address - delta; -+ DCHECK((check == ENABLE_INLINED_SMI_CHECK) -+ ? (*jmp_address == Assembler::kJncShortOpcode || -+ *jmp_address == Assembler::kJcShortOpcode) -+ : (*jmp_address == Assembler::kJnzShortOpcode || -+ *jmp_address == Assembler::kJzShortOpcode)); -+ Condition cc = -+ (check == ENABLE_INLINED_SMI_CHECK) -+ ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) -+ : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); -+ *jmp_address = static_cast(Assembler::kJccShortPrefix | cc); -+} -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/ic/x87/OWNERS 2018-02-18 19:00:54.103419531 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/inspector/BUILD.gn 2018-02-18 19:00:54.103419531 +0100 -@@ -106,7 +106,7 @@ - "/wd4996", # Deprecated function call. - ] - } -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - defines = [ "BUILDING_V8_SHARED" ] - } - } -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interface-descriptors.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interface-descriptors.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interface-descriptors.h 2018-02-18 19:00:54.103419531 +0100 -@@ -392,7 +392,7 @@ - static const Register ValueRegister(); - static const Register SlotRegister(); - --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - static const bool kPassLastArgsOnStack = true; - #else - static const bool kPassLastArgsOnStack = false; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc 2018-02-18 19:00:54.104419517 +0100 -@@ -1367,8 +1367,9 @@ - bool InterpreterAssembler::TargetSupportsUnalignedAccess() { - #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 - return false; --#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \ -- V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC -+#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_X87 || \ -+ V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || \ -+ V8_TARGET_ARCH_PPC - return true; - #else - #error "Unknown Architecture" -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/log.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/log.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/log.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/log.cc 2018-02-18 19:00:54.104419517 +0100 -@@ -370,6 +370,8 @@ - const char arch[] = "ppc"; - #elif V8_TARGET_ARCH_MIPS - const char arch[] = "mips"; -+#elif V8_TARGET_ARCH_X87 -+ const char arch[] = "x87"; - #elif V8_TARGET_ARCH_ARM64 - const char arch[] = "arm64"; - #elif V8_TARGET_ARCH_S390 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/macro-assembler.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/macro-assembler.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/macro-assembler.h 2018-02-18 19:00:54.105419502 +0100 -@@ -52,6 +52,8 @@ - #elif V8_TARGET_ARCH_S390 - #include "src/s390/constants-s390.h" - #include "src/s390/macro-assembler-s390.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/macro-assembler-x87.h" - #else - #error Unsupported target architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/jsregexp.cc 2018-02-18 19:00:54.106419487 +0100 -@@ -48,6 +48,8 @@ - #include "src/regexp/mips/regexp-macro-assembler-mips.h" - #elif V8_TARGET_ARCH_MIPS64 - #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/regexp/x87/regexp-macro-assembler-x87.h" - #else - #error Unsupported target architecture. - #endif -@@ -6760,6 +6762,9 @@ - #elif V8_TARGET_ARCH_MIPS64 - RegExpMacroAssemblerMIPS macro_assembler(isolate, zone, mode, - (data->capture_count + 1) * 2); -+#elif V8_TARGET_ARCH_X87 -+ RegExpMacroAssemblerX87 macro_assembler(isolate, zone, mode, -+ (data->capture_count + 1) * 2); - #else - #error "Unsupported architecture" - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/OWNERS 2018-02-18 19:00:54.189418266 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.cc 2018-02-18 19:00:54.190418252 +0100 -@@ -0,0 +1,1273 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/regexp/x87/regexp-macro-assembler-x87.h" -+ -+#include "src/log.h" -+#include "src/macro-assembler.h" -+#include "src/regexp/regexp-macro-assembler.h" -+#include "src/regexp/regexp-stack.h" -+#include "src/unicode.h" -+ -+namespace v8 { -+namespace internal { -+ -+#ifndef V8_INTERPRETED_REGEXP -+/* -+ * This assembler uses the following register assignment convention -+ * - edx : Current character. Must be loaded using LoadCurrentCharacter -+ * before using any of the dispatch methods. Temporarily stores the -+ * index of capture start after a matching pass for a global regexp. -+ * - edi : Current position in input, as negative offset from end of string. -+ * Please notice that this is the byte offset, not the character offset! -+ * - esi : end of input (points to byte after last character in input). -+ * - ebp : Frame pointer. Used to access arguments, local variables and -+ * RegExp registers. -+ * - esp : Points to tip of C stack. -+ * - ecx : Points to tip of backtrack stack -+ * -+ * The registers eax and ebx are free to use for computations. -+ * -+ * Each call to a public method should retain this convention. -+ * The stack will have the following structure: -+ * - Isolate* isolate (address of the current isolate) -+ * - direct_call (if 1, direct call from JavaScript code, if 0 -+ * call through the runtime system) -+ * - stack_area_base (high end of the memory area to use as -+ * backtracking stack) -+ * - capture array size (may fit multiple sets of matches) -+ * - int* capture_array (int[num_saved_registers_], for output). -+ * - end of input (address of end of string) -+ * - start of input (address of first character in string) -+ * - start index (character index of start) -+ * - String* input_string (location of a handle containing the string) -+ * --- frame alignment (if applicable) --- -+ * - return address -+ * ebp-> - old ebp -+ * - backup of caller esi -+ * - backup of caller edi -+ * - backup of caller ebx -+ * - success counter (only for global regexps to count matches). -+ * - Offset of location before start of input (effectively character -+ * string start - 1). Used to initialize capture registers to a -+ * non-position. -+ * - register 0 ebp[-4] (only positions must be stored in the first -+ * - register 1 ebp[-8] num_saved_registers_ registers) -+ * - ... -+ * -+ * The first num_saved_registers_ registers are initialized to point to -+ * "character -1" in the string (i.e., char_size() bytes before the first -+ * character of the string). The remaining registers starts out as garbage. -+ * -+ * The data up to the return address must be placed there by the calling -+ * code, by calling the code entry as cast to a function with the signature: -+ * int (*match)(String* input_string, -+ * int start_index, -+ * Address start, -+ * Address end, -+ * int* capture_output_array, -+ * int num_capture_registers, -+ * byte* stack_area_base, -+ * bool direct_call = false, -+ * Isolate* isolate); -+ */ -+ -+#define __ ACCESS_MASM(masm_) -+ -+RegExpMacroAssemblerX87::RegExpMacroAssemblerX87(Isolate* isolate, Zone* zone, -+ Mode mode, -+ int registers_to_save) -+ : NativeRegExpMacroAssembler(isolate, zone), -+ masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize, -+ CodeObjectRequired::kYes)), -+ mode_(mode), -+ num_registers_(registers_to_save), -+ num_saved_registers_(registers_to_save), -+ entry_label_(), -+ start_label_(), -+ success_label_(), -+ backtrack_label_(), -+ exit_label_() { -+ DCHECK_EQ(0, registers_to_save % 2); -+ __ jmp(&entry_label_); // We'll write the entry code later. -+ __ bind(&start_label_); // And then continue from here. -+} -+ -+ -+RegExpMacroAssemblerX87::~RegExpMacroAssemblerX87() { -+ delete masm_; -+ // Unuse labels in case we throw away the assembler without calling GetCode. -+ entry_label_.Unuse(); -+ start_label_.Unuse(); -+ success_label_.Unuse(); -+ backtrack_label_.Unuse(); -+ exit_label_.Unuse(); -+ check_preempt_label_.Unuse(); -+ stack_overflow_label_.Unuse(); -+} -+ -+ -+int RegExpMacroAssemblerX87::stack_limit_slack() { -+ return RegExpStack::kStackLimitSlack; -+} -+ -+ -+void RegExpMacroAssemblerX87::AdvanceCurrentPosition(int by) { -+ if (by != 0) { -+ __ add(edi, Immediate(by * char_size())); -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::AdvanceRegister(int reg, int by) { -+ DCHECK(reg >= 0); -+ DCHECK(reg < num_registers_); -+ if (by != 0) { -+ __ add(register_location(reg), Immediate(by)); -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::Backtrack() { -+ CheckPreemption(); -+ // Pop Code* offset from backtrack stack, add Code* and jump to location. -+ Pop(ebx); -+ __ add(ebx, Immediate(masm_->CodeObject())); -+ __ jmp(ebx); -+} -+ -+ -+void RegExpMacroAssemblerX87::Bind(Label* label) { -+ __ bind(label); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacter(uint32_t c, Label* on_equal) { -+ __ cmp(current_character(), c); -+ BranchOrBacktrack(equal, on_equal); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacterGT(uc16 limit, Label* on_greater) { -+ __ cmp(current_character(), limit); -+ BranchOrBacktrack(greater, on_greater); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckAtStart(Label* on_at_start) { -+ __ lea(eax, Operand(edi, -char_size())); -+ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); -+ BranchOrBacktrack(equal, on_at_start); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckNotAtStart(int cp_offset, -+ Label* on_not_at_start) { -+ __ lea(eax, Operand(edi, -char_size() + cp_offset * char_size())); -+ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); -+ BranchOrBacktrack(not_equal, on_not_at_start); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacterLT(uc16 limit, Label* on_less) { -+ __ cmp(current_character(), limit); -+ BranchOrBacktrack(less, on_less); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckGreedyLoop(Label* on_equal) { -+ Label fallthrough; -+ __ cmp(edi, Operand(backtrack_stackpointer(), 0)); -+ __ j(not_equal, &fallthrough); -+ __ add(backtrack_stackpointer(), Immediate(kPointerSize)); // Pop. -+ BranchOrBacktrack(no_condition, on_equal); -+ __ bind(&fallthrough); -+} -+ -+void RegExpMacroAssemblerX87::CheckNotBackReferenceIgnoreCase( -+ int start_reg, bool read_backward, bool unicode, Label* on_no_match) { -+ Label fallthrough; -+ __ mov(edx, register_location(start_reg)); // Index of start of capture -+ __ mov(ebx, register_location(start_reg + 1)); // Index of end of capture -+ __ sub(ebx, edx); // Length of capture. -+ -+ // At this point, the capture registers are either both set or both cleared. -+ // If the capture length is zero, then the capture is either empty or cleared. -+ // Fall through in both cases. -+ __ j(equal, &fallthrough); -+ -+ // Check that there are sufficient characters left in the input. -+ if (read_backward) { -+ __ mov(eax, Operand(ebp, kStringStartMinusOne)); -+ __ add(eax, ebx); -+ __ cmp(edi, eax); -+ BranchOrBacktrack(less_equal, on_no_match); -+ } else { -+ __ mov(eax, edi); -+ __ add(eax, ebx); -+ BranchOrBacktrack(greater, on_no_match); -+ } -+ -+ if (mode_ == LATIN1) { -+ Label success; -+ Label fail; -+ Label loop_increment; -+ // Save register contents to make the registers available below. -+ __ push(edi); -+ __ push(backtrack_stackpointer()); -+ // After this, the eax, ecx, and edi registers are available. -+ -+ __ add(edx, esi); // Start of capture -+ __ add(edi, esi); // Start of text to match against capture. -+ if (read_backward) { -+ __ sub(edi, ebx); // Offset by length when matching backwards. -+ } -+ __ add(ebx, edi); // End of text to match against capture. -+ -+ Label loop; -+ __ bind(&loop); -+ __ movzx_b(eax, Operand(edi, 0)); -+ __ cmpb_al(Operand(edx, 0)); -+ __ j(equal, &loop_increment); -+ -+ // Mismatch, try case-insensitive match (converting letters to lower-case). -+ __ or_(eax, 0x20); // Convert match character to lower-case. -+ __ lea(ecx, Operand(eax, -'a')); -+ __ cmp(ecx, static_cast('z' - 'a')); // Is eax a lowercase letter? -+ Label convert_capture; -+ __ j(below_equal, &convert_capture); // In range 'a'-'z'. -+ // Latin-1: Check for values in range [224,254] but not 247. -+ __ sub(ecx, Immediate(224 - 'a')); -+ __ cmp(ecx, Immediate(254 - 224)); -+ __ j(above, &fail); // Weren't Latin-1 letters. -+ __ cmp(ecx, Immediate(247 - 224)); // Check for 247. -+ __ j(equal, &fail); -+ __ bind(&convert_capture); -+ // Also convert capture character. -+ __ movzx_b(ecx, Operand(edx, 0)); -+ __ or_(ecx, 0x20); -+ -+ __ cmp(eax, ecx); -+ __ j(not_equal, &fail); -+ -+ __ bind(&loop_increment); -+ // Increment pointers into match and capture strings. -+ __ add(edx, Immediate(1)); -+ __ add(edi, Immediate(1)); -+ // Compare to end of match, and loop if not done. -+ __ cmp(edi, ebx); -+ __ j(below, &loop); -+ __ jmp(&success); -+ -+ __ bind(&fail); -+ // Restore original values before failing. -+ __ pop(backtrack_stackpointer()); -+ __ pop(edi); -+ BranchOrBacktrack(no_condition, on_no_match); -+ -+ __ bind(&success); -+ // Restore original value before continuing. -+ __ pop(backtrack_stackpointer()); -+ // Drop original value of character position. -+ __ add(esp, Immediate(kPointerSize)); -+ // Compute new value of character position after the matched part. -+ __ sub(edi, esi); -+ if (read_backward) { -+ // Subtract match length if we matched backward. -+ __ add(edi, register_location(start_reg)); -+ __ sub(edi, register_location(start_reg + 1)); -+ } -+ } else { -+ DCHECK(mode_ == UC16); -+ // Save registers before calling C function. -+ __ push(esi); -+ __ push(edi); -+ __ push(backtrack_stackpointer()); -+ __ push(ebx); -+ -+ static const int argument_count = 4; -+ __ PrepareCallCFunction(argument_count, ecx); -+ // Put arguments into allocated stack area, last argument highest on stack. -+ // Parameters are -+ // Address byte_offset1 - Address captured substring's start. -+ // Address byte_offset2 - Address of current character position. -+ // size_t byte_length - length of capture in bytes(!) -+// Isolate* isolate or 0 if unicode flag. -+ -+ // Set isolate. -+#ifdef V8_INTL_SUPPORT -+ if (unicode) { -+ __ mov(Operand(esp, 3 * kPointerSize), Immediate(0)); -+ } else // NOLINT -+#endif // V8_INTL_SUPPORT -+ { -+ __ mov(Operand(esp, 3 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ } -+ // Set byte_length. -+ __ mov(Operand(esp, 2 * kPointerSize), ebx); -+ // Set byte_offset2. -+ // Found by adding negative string-end offset of current position (edi) -+ // to end of string. -+ __ add(edi, esi); -+ if (read_backward) { -+ __ sub(edi, ebx); // Offset by length when matching backwards. -+ } -+ __ mov(Operand(esp, 1 * kPointerSize), edi); -+ // Set byte_offset1. -+ // Start of capture, where edx already holds string-end negative offset. -+ __ add(edx, esi); -+ __ mov(Operand(esp, 0 * kPointerSize), edx); -+ -+ { -+ AllowExternalCallThatCantCauseGC scope(masm_); -+ ExternalReference compare = -+ ExternalReference::re_case_insensitive_compare_uc16(isolate()); -+ __ CallCFunction(compare, argument_count); -+ } -+ // Pop original values before reacting on result value. -+ __ pop(ebx); -+ __ pop(backtrack_stackpointer()); -+ __ pop(edi); -+ __ pop(esi); -+ -+ // Check if function returned non-zero for success or zero for failure. -+ __ or_(eax, eax); -+ BranchOrBacktrack(zero, on_no_match); -+ // On success, advance position by length of capture. -+ if (read_backward) { -+ __ sub(edi, ebx); -+ } else { -+ __ add(edi, ebx); -+ } -+ } -+ __ bind(&fallthrough); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckNotBackReference(int start_reg, -+ bool read_backward, -+ Label* on_no_match) { -+ Label fallthrough; -+ Label success; -+ Label fail; -+ -+ // Find length of back-referenced capture. -+ __ mov(edx, register_location(start_reg)); -+ __ mov(eax, register_location(start_reg + 1)); -+ __ sub(eax, edx); // Length to check. -+ -+ // At this point, the capture registers are either both set or both cleared. -+ // If the capture length is zero, then the capture is either empty or cleared. -+ // Fall through in both cases. -+ __ j(equal, &fallthrough); -+ -+ // Check that there are sufficient characters left in the input. -+ if (read_backward) { -+ __ mov(ebx, Operand(ebp, kStringStartMinusOne)); -+ __ add(ebx, eax); -+ __ cmp(edi, ebx); -+ BranchOrBacktrack(less_equal, on_no_match); -+ } else { -+ __ mov(ebx, edi); -+ __ add(ebx, eax); -+ BranchOrBacktrack(greater, on_no_match); -+ } -+ -+ // Save register to make it available below. -+ __ push(backtrack_stackpointer()); -+ -+ // Compute pointers to match string and capture string -+ __ add(edx, esi); // Start of capture. -+ __ lea(ebx, Operand(esi, edi, times_1, 0)); // Start of match. -+ if (read_backward) { -+ __ sub(ebx, eax); // Offset by length when matching backwards. -+ } -+ __ lea(ecx, Operand(eax, ebx, times_1, 0)); // End of match -+ -+ Label loop; -+ __ bind(&loop); -+ if (mode_ == LATIN1) { -+ __ movzx_b(eax, Operand(edx, 0)); -+ __ cmpb_al(Operand(ebx, 0)); -+ } else { -+ DCHECK(mode_ == UC16); -+ __ movzx_w(eax, Operand(edx, 0)); -+ __ cmpw_ax(Operand(ebx, 0)); -+ } -+ __ j(not_equal, &fail); -+ // Increment pointers into capture and match string. -+ __ add(edx, Immediate(char_size())); -+ __ add(ebx, Immediate(char_size())); -+ // Check if we have reached end of match area. -+ __ cmp(ebx, ecx); -+ __ j(below, &loop); -+ __ jmp(&success); -+ -+ __ bind(&fail); -+ // Restore backtrack stackpointer. -+ __ pop(backtrack_stackpointer()); -+ BranchOrBacktrack(no_condition, on_no_match); -+ -+ __ bind(&success); -+ // Move current character position to position after match. -+ __ mov(edi, ecx); -+ __ sub(edi, esi); -+ if (read_backward) { -+ // Subtract match length if we matched backward. -+ __ add(edi, register_location(start_reg)); -+ __ sub(edi, register_location(start_reg + 1)); -+ } -+ // Restore backtrack stackpointer. -+ __ pop(backtrack_stackpointer()); -+ -+ __ bind(&fallthrough); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckNotCharacter(uint32_t c, -+ Label* on_not_equal) { -+ __ cmp(current_character(), c); -+ BranchOrBacktrack(not_equal, on_not_equal); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacterAfterAnd(uint32_t c, -+ uint32_t mask, -+ Label* on_equal) { -+ if (c == 0) { -+ __ test(current_character(), Immediate(mask)); -+ } else { -+ __ mov(eax, mask); -+ __ and_(eax, current_character()); -+ __ cmp(eax, c); -+ } -+ BranchOrBacktrack(equal, on_equal); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckNotCharacterAfterAnd(uint32_t c, -+ uint32_t mask, -+ Label* on_not_equal) { -+ if (c == 0) { -+ __ test(current_character(), Immediate(mask)); -+ } else { -+ __ mov(eax, mask); -+ __ and_(eax, current_character()); -+ __ cmp(eax, c); -+ } -+ BranchOrBacktrack(not_equal, on_not_equal); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckNotCharacterAfterMinusAnd( -+ uc16 c, -+ uc16 minus, -+ uc16 mask, -+ Label* on_not_equal) { -+ DCHECK(minus < String::kMaxUtf16CodeUnit); -+ __ lea(eax, Operand(current_character(), -minus)); -+ if (c == 0) { -+ __ test(eax, Immediate(mask)); -+ } else { -+ __ and_(eax, mask); -+ __ cmp(eax, c); -+ } -+ BranchOrBacktrack(not_equal, on_not_equal); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacterInRange( -+ uc16 from, -+ uc16 to, -+ Label* on_in_range) { -+ __ lea(eax, Operand(current_character(), -from)); -+ __ cmp(eax, to - from); -+ BranchOrBacktrack(below_equal, on_in_range); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckCharacterNotInRange( -+ uc16 from, -+ uc16 to, -+ Label* on_not_in_range) { -+ __ lea(eax, Operand(current_character(), -from)); -+ __ cmp(eax, to - from); -+ BranchOrBacktrack(above, on_not_in_range); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckBitInTable( -+ Handle table, -+ Label* on_bit_set) { -+ __ mov(eax, Immediate(table)); -+ Register index = current_character(); -+ if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) { -+ __ mov(ebx, kTableSize - 1); -+ __ and_(ebx, current_character()); -+ index = ebx; -+ } -+ __ cmpb(FieldOperand(eax, index, times_1, ByteArray::kHeaderSize), -+ Immediate(0)); -+ BranchOrBacktrack(not_equal, on_bit_set); -+} -+ -+ -+bool RegExpMacroAssemblerX87::CheckSpecialCharacterClass(uc16 type, -+ Label* on_no_match) { -+ // Range checks (c in min..max) are generally implemented by an unsigned -+ // (c - min) <= (max - min) check -+ switch (type) { -+ case 's': -+ // Match space-characters -+ if (mode_ == LATIN1) { -+ // One byte space characters are '\t'..'\r', ' ' and \u00a0. -+ Label success; -+ __ cmp(current_character(), ' '); -+ __ j(equal, &success, Label::kNear); -+ // Check range 0x09..0x0d -+ __ lea(eax, Operand(current_character(), -'\t')); -+ __ cmp(eax, '\r' - '\t'); -+ __ j(below_equal, &success, Label::kNear); -+ // \u00a0 (NBSP). -+ __ cmp(eax, 0x00a0 - '\t'); -+ BranchOrBacktrack(not_equal, on_no_match); -+ __ bind(&success); -+ return true; -+ } -+ return false; -+ case 'S': -+ // The emitted code for generic character classes is good enough. -+ return false; -+ case 'd': -+ // Match ASCII digits ('0'..'9') -+ __ lea(eax, Operand(current_character(), -'0')); -+ __ cmp(eax, '9' - '0'); -+ BranchOrBacktrack(above, on_no_match); -+ return true; -+ case 'D': -+ // Match non ASCII-digits -+ __ lea(eax, Operand(current_character(), -'0')); -+ __ cmp(eax, '9' - '0'); -+ BranchOrBacktrack(below_equal, on_no_match); -+ return true; -+ case '.': { -+ // Match non-newlines (not 0x0a('\n'), 0x0d('\r'), 0x2028 and 0x2029) -+ __ mov(eax, current_character()); -+ __ xor_(eax, Immediate(0x01)); -+ // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c -+ __ sub(eax, Immediate(0x0b)); -+ __ cmp(eax, 0x0c - 0x0b); -+ BranchOrBacktrack(below_equal, on_no_match); -+ if (mode_ == UC16) { -+ // Compare original value to 0x2028 and 0x2029, using the already -+ // computed (current_char ^ 0x01 - 0x0b). I.e., check for -+ // 0x201d (0x2028 - 0x0b) or 0x201e. -+ __ sub(eax, Immediate(0x2028 - 0x0b)); -+ __ cmp(eax, 0x2029 - 0x2028); -+ BranchOrBacktrack(below_equal, on_no_match); -+ } -+ return true; -+ } -+ case 'w': { -+ if (mode_ != LATIN1) { -+ // Table is 256 entries, so all Latin1 characters can be tested. -+ __ cmp(current_character(), Immediate('z')); -+ BranchOrBacktrack(above, on_no_match); -+ } -+ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. -+ ExternalReference word_map = ExternalReference::re_word_character_map(); -+ __ test_b(current_character(), -+ Operand::StaticArray(current_character(), times_1, word_map)); -+ BranchOrBacktrack(zero, on_no_match); -+ return true; -+ } -+ case 'W': { -+ Label done; -+ if (mode_ != LATIN1) { -+ // Table is 256 entries, so all Latin1 characters can be tested. -+ __ cmp(current_character(), Immediate('z')); -+ __ j(above, &done); -+ } -+ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. -+ ExternalReference word_map = ExternalReference::re_word_character_map(); -+ __ test_b(current_character(), -+ Operand::StaticArray(current_character(), times_1, word_map)); -+ BranchOrBacktrack(not_zero, on_no_match); -+ if (mode_ != LATIN1) { -+ __ bind(&done); -+ } -+ return true; -+ } -+ // Non-standard classes (with no syntactic shorthand) used internally. -+ case '*': -+ // Match any character. -+ return true; -+ case 'n': { -+ // Match newlines (0x0a('\n'), 0x0d('\r'), 0x2028 or 0x2029). -+ // The opposite of '.'. -+ __ mov(eax, current_character()); -+ __ xor_(eax, Immediate(0x01)); -+ // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c -+ __ sub(eax, Immediate(0x0b)); -+ __ cmp(eax, 0x0c - 0x0b); -+ if (mode_ == LATIN1) { -+ BranchOrBacktrack(above, on_no_match); -+ } else { -+ Label done; -+ BranchOrBacktrack(below_equal, &done); -+ DCHECK_EQ(UC16, mode_); -+ // Compare original value to 0x2028 and 0x2029, using the already -+ // computed (current_char ^ 0x01 - 0x0b). I.e., check for -+ // 0x201d (0x2028 - 0x0b) or 0x201e. -+ __ sub(eax, Immediate(0x2028 - 0x0b)); -+ __ cmp(eax, 1); -+ BranchOrBacktrack(above, on_no_match); -+ __ bind(&done); -+ } -+ return true; -+ } -+ // No custom implementation (yet): s(UC16), S(UC16). -+ default: -+ return false; -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::Fail() { -+ STATIC_ASSERT(FAILURE == 0); // Return value for failure is zero. -+ if (!global()) { -+ __ Move(eax, Immediate(FAILURE)); -+ } -+ __ jmp(&exit_label_); -+} -+ -+ -+Handle RegExpMacroAssemblerX87::GetCode(Handle source) { -+ Label return_eax; -+ // Finalize code - write the entry point code now we know how many -+ // registers we need. -+ -+ // Entry code: -+ __ bind(&entry_label_); -+ -+ // Tell the system that we have a stack frame. Because the type is MANUAL, no -+ // code is generated. -+ FrameScope scope(masm_, StackFrame::MANUAL); -+ -+ // Actually emit code to start a new stack frame. -+ __ push(ebp); -+ __ mov(ebp, esp); -+ // Save callee-save registers. Order here should correspond to order of -+ // kBackup_ebx etc. -+ __ push(esi); -+ __ push(edi); -+ __ push(ebx); // Callee-save on MacOS. -+ __ push(Immediate(0)); // Number of successful matches in a global regexp. -+ __ push(Immediate(0)); // Make room for "string start - 1" constant. -+ -+ // Check if we have space on the stack for registers. -+ Label stack_limit_hit; -+ Label stack_ok; -+ -+ ExternalReference stack_limit = -+ ExternalReference::address_of_stack_limit(isolate()); -+ __ mov(ecx, esp); -+ __ sub(ecx, Operand::StaticVariable(stack_limit)); -+ // Handle it if the stack pointer is already below the stack limit. -+ __ j(below_equal, &stack_limit_hit); -+ // Check if there is room for the variable number of registers above -+ // the stack limit. -+ __ cmp(ecx, num_registers_ * kPointerSize); -+ __ j(above_equal, &stack_ok); -+ // Exit with OutOfMemory exception. There is not enough space on the stack -+ // for our working registers. -+ __ mov(eax, EXCEPTION); -+ __ jmp(&return_eax); -+ -+ __ bind(&stack_limit_hit); -+ CallCheckStackGuardState(ebx); -+ __ or_(eax, eax); -+ // If returned value is non-zero, we exit with the returned value as result. -+ __ j(not_zero, &return_eax); -+ -+ __ bind(&stack_ok); -+ // Load start index for later use. -+ __ mov(ebx, Operand(ebp, kStartIndex)); -+ -+ // Allocate space on stack for registers. -+ __ sub(esp, Immediate(num_registers_ * kPointerSize)); -+ // Load string length. -+ __ mov(esi, Operand(ebp, kInputEnd)); -+ // Load input position. -+ __ mov(edi, Operand(ebp, kInputStart)); -+ // Set up edi to be negative offset from string end. -+ __ sub(edi, esi); -+ -+ // Set eax to address of char before start of the string. -+ // (effectively string position -1). -+ __ neg(ebx); -+ if (mode_ == UC16) { -+ __ lea(eax, Operand(edi, ebx, times_2, -char_size())); -+ } else { -+ __ lea(eax, Operand(edi, ebx, times_1, -char_size())); -+ } -+ // Store this value in a local variable, for use when clearing -+ // position registers. -+ __ mov(Operand(ebp, kStringStartMinusOne), eax); -+ -+#if V8_OS_WIN -+ // Ensure that we write to each stack page, in order. Skipping a page -+ // on Windows can cause segmentation faults. Assuming page size is 4k. -+ const int kPageSize = 4096; -+ const int kRegistersPerPage = kPageSize / kPointerSize; -+ for (int i = num_saved_registers_ + kRegistersPerPage - 1; -+ i < num_registers_; -+ i += kRegistersPerPage) { -+ __ mov(register_location(i), eax); // One write every page. -+ } -+#endif // V8_OS_WIN -+ -+ Label load_char_start_regexp, start_regexp; -+ // Load newline if index is at start, previous character otherwise. -+ __ cmp(Operand(ebp, kStartIndex), Immediate(0)); -+ __ j(not_equal, &load_char_start_regexp, Label::kNear); -+ __ mov(current_character(), '\n'); -+ __ jmp(&start_regexp, Label::kNear); -+ -+ // Global regexp restarts matching here. -+ __ bind(&load_char_start_regexp); -+ // Load previous char as initial value of current character register. -+ LoadCurrentCharacterUnchecked(-1, 1); -+ __ bind(&start_regexp); -+ -+ // Initialize on-stack registers. -+ if (num_saved_registers_ > 0) { // Always is, if generated from a regexp. -+ // Fill saved registers with initial value = start offset - 1 -+ // Fill in stack push order, to avoid accessing across an unwritten -+ // page (a problem on Windows). -+ if (num_saved_registers_ > 8) { -+ __ mov(ecx, kRegisterZero); -+ Label init_loop; -+ __ bind(&init_loop); -+ __ mov(Operand(ebp, ecx, times_1, 0), eax); -+ __ sub(ecx, Immediate(kPointerSize)); -+ __ cmp(ecx, kRegisterZero - num_saved_registers_ * kPointerSize); -+ __ j(greater, &init_loop); -+ } else { // Unroll the loop. -+ for (int i = 0; i < num_saved_registers_; i++) { -+ __ mov(register_location(i), eax); -+ } -+ } -+ } -+ -+ // Initialize backtrack stack pointer. -+ __ mov(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); -+ -+ __ jmp(&start_label_); -+ -+ // Exit code: -+ if (success_label_.is_linked()) { -+ // Save captures when successful. -+ __ bind(&success_label_); -+ if (num_saved_registers_ > 0) { -+ // copy captures to output -+ __ mov(ebx, Operand(ebp, kRegisterOutput)); -+ __ mov(ecx, Operand(ebp, kInputEnd)); -+ __ mov(edx, Operand(ebp, kStartIndex)); -+ __ sub(ecx, Operand(ebp, kInputStart)); -+ if (mode_ == UC16) { -+ __ lea(ecx, Operand(ecx, edx, times_2, 0)); -+ } else { -+ __ add(ecx, edx); -+ } -+ for (int i = 0; i < num_saved_registers_; i++) { -+ __ mov(eax, register_location(i)); -+ if (i == 0 && global_with_zero_length_check()) { -+ // Keep capture start in edx for the zero-length check later. -+ __ mov(edx, eax); -+ } -+ // Convert to index from start of string, not end. -+ __ add(eax, ecx); -+ if (mode_ == UC16) { -+ __ sar(eax, 1); // Convert byte index to character index. -+ } -+ __ mov(Operand(ebx, i * kPointerSize), eax); -+ } -+ } -+ -+ if (global()) { -+ // Restart matching if the regular expression is flagged as global. -+ // Increment success counter. -+ __ inc(Operand(ebp, kSuccessfulCaptures)); -+ // Capture results have been stored, so the number of remaining global -+ // output registers is reduced by the number of stored captures. -+ __ mov(ecx, Operand(ebp, kNumOutputRegisters)); -+ __ sub(ecx, Immediate(num_saved_registers_)); -+ // Check whether we have enough room for another set of capture results. -+ __ cmp(ecx, Immediate(num_saved_registers_)); -+ __ j(less, &exit_label_); -+ -+ __ mov(Operand(ebp, kNumOutputRegisters), ecx); -+ // Advance the location for output. -+ __ add(Operand(ebp, kRegisterOutput), -+ Immediate(num_saved_registers_ * kPointerSize)); -+ -+ // Prepare eax to initialize registers with its value in the next run. -+ __ mov(eax, Operand(ebp, kStringStartMinusOne)); -+ -+ if (global_with_zero_length_check()) { -+ // Special case for zero-length matches. -+ // edx: capture start index -+ __ cmp(edi, edx); -+ // Not a zero-length match, restart. -+ __ j(not_equal, &load_char_start_regexp); -+ // edi (offset from the end) is zero if we already reached the end. -+ __ test(edi, edi); -+ __ j(zero, &exit_label_, Label::kNear); -+ // Advance current position after a zero-length match. -+ Label advance; -+ __ bind(&advance); -+ if (mode_ == UC16) { -+ __ add(edi, Immediate(2)); -+ } else { -+ __ inc(edi); -+ } -+ if (global_unicode()) CheckNotInSurrogatePair(0, &advance); -+ } -+ __ jmp(&load_char_start_regexp); -+ } else { -+ __ mov(eax, Immediate(SUCCESS)); -+ } -+ } -+ -+ __ bind(&exit_label_); -+ if (global()) { -+ // Return the number of successful captures. -+ __ mov(eax, Operand(ebp, kSuccessfulCaptures)); -+ } -+ -+ __ bind(&return_eax); -+ // Skip esp past regexp registers. -+ __ lea(esp, Operand(ebp, kBackup_ebx)); -+ // Restore callee-save registers. -+ __ pop(ebx); -+ __ pop(edi); -+ __ pop(esi); -+ // Exit function frame, restore previous one. -+ __ pop(ebp); -+ __ ret(0); -+ -+ // Backtrack code (branch target for conditional backtracks). -+ if (backtrack_label_.is_linked()) { -+ __ bind(&backtrack_label_); -+ Backtrack(); -+ } -+ -+ Label exit_with_exception; -+ -+ // Preempt-code -+ if (check_preempt_label_.is_linked()) { -+ SafeCallTarget(&check_preempt_label_); -+ -+ __ push(backtrack_stackpointer()); -+ __ push(edi); -+ -+ CallCheckStackGuardState(ebx); -+ __ or_(eax, eax); -+ // If returning non-zero, we should end execution with the given -+ // result as return value. -+ __ j(not_zero, &return_eax); -+ -+ __ pop(edi); -+ __ pop(backtrack_stackpointer()); -+ // String might have moved: Reload esi from frame. -+ __ mov(esi, Operand(ebp, kInputEnd)); -+ SafeReturn(); -+ } -+ -+ // Backtrack stack overflow code. -+ if (stack_overflow_label_.is_linked()) { -+ SafeCallTarget(&stack_overflow_label_); -+ // Reached if the backtrack-stack limit has been hit. -+ -+ Label grow_failed; -+ // Save registers before calling C function -+ __ push(esi); -+ __ push(edi); -+ -+ // Call GrowStack(backtrack_stackpointer()) -+ static const int num_arguments = 3; -+ __ PrepareCallCFunction(num_arguments, ebx); -+ __ mov(Operand(esp, 2 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ __ lea(eax, Operand(ebp, kStackHighEnd)); -+ __ mov(Operand(esp, 1 * kPointerSize), eax); -+ __ mov(Operand(esp, 0 * kPointerSize), backtrack_stackpointer()); -+ ExternalReference grow_stack = -+ ExternalReference::re_grow_stack(isolate()); -+ __ CallCFunction(grow_stack, num_arguments); -+ // If return NULL, we have failed to grow the stack, and -+ // must exit with a stack-overflow exception. -+ __ or_(eax, eax); -+ __ j(equal, &exit_with_exception); -+ // Otherwise use return value as new stack pointer. -+ __ mov(backtrack_stackpointer(), eax); -+ // Restore saved registers and continue. -+ __ pop(edi); -+ __ pop(esi); -+ SafeReturn(); -+ } -+ -+ if (exit_with_exception.is_linked()) { -+ // If any of the code above needed to exit with an exception. -+ __ bind(&exit_with_exception); -+ // Exit with Result EXCEPTION(-1) to signal thrown exception. -+ __ mov(eax, EXCEPTION); -+ __ jmp(&return_eax); -+ } -+ -+ CodeDesc code_desc; -+ masm_->GetCode(masm_->isolate(), &code_desc); -+ Handle code = -+ isolate()->factory()->NewCode(code_desc, -+ Code::ComputeFlags(Code::REGEXP), -+ masm_->CodeObject()); -+ PROFILE(masm_->isolate(), -+ RegExpCodeCreateEvent(AbstractCode::cast(*code), *source)); -+ return Handle::cast(code); -+} -+ -+ -+void RegExpMacroAssemblerX87::GoTo(Label* to) { -+ BranchOrBacktrack(no_condition, to); -+} -+ -+ -+void RegExpMacroAssemblerX87::IfRegisterGE(int reg, -+ int comparand, -+ Label* if_ge) { -+ __ cmp(register_location(reg), Immediate(comparand)); -+ BranchOrBacktrack(greater_equal, if_ge); -+} -+ -+ -+void RegExpMacroAssemblerX87::IfRegisterLT(int reg, -+ int comparand, -+ Label* if_lt) { -+ __ cmp(register_location(reg), Immediate(comparand)); -+ BranchOrBacktrack(less, if_lt); -+} -+ -+ -+void RegExpMacroAssemblerX87::IfRegisterEqPos(int reg, -+ Label* if_eq) { -+ __ cmp(edi, register_location(reg)); -+ BranchOrBacktrack(equal, if_eq); -+} -+ -+ -+RegExpMacroAssembler::IrregexpImplementation -+ RegExpMacroAssemblerX87::Implementation() { -+ return kX87Implementation; -+} -+ -+ -+void RegExpMacroAssemblerX87::LoadCurrentCharacter(int cp_offset, -+ Label* on_end_of_input, -+ bool check_bounds, -+ int characters) { -+ DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works) -+ if (check_bounds) { -+ if (cp_offset >= 0) { -+ CheckPosition(cp_offset + characters - 1, on_end_of_input); -+ } else { -+ CheckPosition(cp_offset, on_end_of_input); -+ } -+ } -+ LoadCurrentCharacterUnchecked(cp_offset, characters); -+} -+ -+ -+void RegExpMacroAssemblerX87::PopCurrentPosition() { -+ Pop(edi); -+} -+ -+ -+void RegExpMacroAssemblerX87::PopRegister(int register_index) { -+ Pop(eax); -+ __ mov(register_location(register_index), eax); -+} -+ -+ -+void RegExpMacroAssemblerX87::PushBacktrack(Label* label) { -+ Push(Immediate::CodeRelativeOffset(label)); -+ CheckStackLimit(); -+} -+ -+ -+void RegExpMacroAssemblerX87::PushCurrentPosition() { -+ Push(edi); -+} -+ -+ -+void RegExpMacroAssemblerX87::PushRegister(int register_index, -+ StackCheckFlag check_stack_limit) { -+ __ mov(eax, register_location(register_index)); -+ Push(eax); -+ if (check_stack_limit) CheckStackLimit(); -+} -+ -+ -+void RegExpMacroAssemblerX87::ReadCurrentPositionFromRegister(int reg) { -+ __ mov(edi, register_location(reg)); -+} -+ -+ -+void RegExpMacroAssemblerX87::ReadStackPointerFromRegister(int reg) { -+ __ mov(backtrack_stackpointer(), register_location(reg)); -+ __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); -+} -+ -+void RegExpMacroAssemblerX87::SetCurrentPositionFromEnd(int by) { -+ Label after_position; -+ __ cmp(edi, -by * char_size()); -+ __ j(greater_equal, &after_position, Label::kNear); -+ __ mov(edi, -by * char_size()); -+ // On RegExp code entry (where this operation is used), the character before -+ // the current position is expected to be already loaded. -+ // We have advanced the position, so it's safe to read backwards. -+ LoadCurrentCharacterUnchecked(-1, 1); -+ __ bind(&after_position); -+} -+ -+ -+void RegExpMacroAssemblerX87::SetRegister(int register_index, int to) { -+ DCHECK(register_index >= num_saved_registers_); // Reserved for positions! -+ __ mov(register_location(register_index), Immediate(to)); -+} -+ -+ -+bool RegExpMacroAssemblerX87::Succeed() { -+ __ jmp(&success_label_); -+ return global(); -+} -+ -+ -+void RegExpMacroAssemblerX87::WriteCurrentPositionToRegister(int reg, -+ int cp_offset) { -+ if (cp_offset == 0) { -+ __ mov(register_location(reg), edi); -+ } else { -+ __ lea(eax, Operand(edi, cp_offset * char_size())); -+ __ mov(register_location(reg), eax); -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::ClearRegisters(int reg_from, int reg_to) { -+ DCHECK(reg_from <= reg_to); -+ __ mov(eax, Operand(ebp, kStringStartMinusOne)); -+ for (int reg = reg_from; reg <= reg_to; reg++) { -+ __ mov(register_location(reg), eax); -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::WriteStackPointerToRegister(int reg) { -+ __ mov(eax, backtrack_stackpointer()); -+ __ sub(eax, Operand(ebp, kStackHighEnd)); -+ __ mov(register_location(reg), eax); -+} -+ -+ -+// Private methods: -+ -+void RegExpMacroAssemblerX87::CallCheckStackGuardState(Register scratch) { -+ static const int num_arguments = 3; -+ __ PrepareCallCFunction(num_arguments, scratch); -+ // RegExp code frame pointer. -+ __ mov(Operand(esp, 2 * kPointerSize), ebp); -+ // Code* of self. -+ __ mov(Operand(esp, 1 * kPointerSize), Immediate(masm_->CodeObject())); -+ // Next address on the stack (will be address of return address). -+ __ lea(eax, Operand(esp, -kPointerSize)); -+ __ mov(Operand(esp, 0 * kPointerSize), eax); -+ ExternalReference check_stack_guard = -+ ExternalReference::re_check_stack_guard_state(isolate()); -+ __ CallCFunction(check_stack_guard, num_arguments); -+} -+ -+ -+// Helper function for reading a value out of a stack frame. -+template -+static T& frame_entry(Address re_frame, int frame_offset) { -+ return reinterpret_cast(Memory::int32_at(re_frame + frame_offset)); -+} -+ -+ -+template -+static T* frame_entry_address(Address re_frame, int frame_offset) { -+ return reinterpret_cast(re_frame + frame_offset); -+} -+ -+ -+int RegExpMacroAssemblerX87::CheckStackGuardState(Address* return_address, -+ Code* re_code, -+ Address re_frame) { -+ return NativeRegExpMacroAssembler::CheckStackGuardState( -+ frame_entry(re_frame, kIsolate), -+ frame_entry(re_frame, kStartIndex), -+ frame_entry(re_frame, kDirectCall) == 1, return_address, re_code, -+ frame_entry_address(re_frame, kInputString), -+ frame_entry_address(re_frame, kInputStart), -+ frame_entry_address(re_frame, kInputEnd)); -+} -+ -+ -+Operand RegExpMacroAssemblerX87::register_location(int register_index) { -+ DCHECK(register_index < (1<<30)); -+ if (num_registers_ <= register_index) { -+ num_registers_ = register_index + 1; -+ } -+ return Operand(ebp, kRegisterZero - register_index * kPointerSize); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckPosition(int cp_offset, -+ Label* on_outside_input) { -+ if (cp_offset >= 0) { -+ __ cmp(edi, -cp_offset * char_size()); -+ BranchOrBacktrack(greater_equal, on_outside_input); -+ } else { -+ __ lea(eax, Operand(edi, cp_offset * char_size())); -+ __ cmp(eax, Operand(ebp, kStringStartMinusOne)); -+ BranchOrBacktrack(less_equal, on_outside_input); -+ } -+} -+ -+ -+void RegExpMacroAssemblerX87::BranchOrBacktrack(Condition condition, -+ Label* to) { -+ if (condition < 0) { // No condition -+ if (to == NULL) { -+ Backtrack(); -+ return; -+ } -+ __ jmp(to); -+ return; -+ } -+ if (to == NULL) { -+ __ j(condition, &backtrack_label_); -+ return; -+ } -+ __ j(condition, to); -+} -+ -+ -+void RegExpMacroAssemblerX87::SafeCall(Label* to) { -+ Label return_to; -+ __ push(Immediate::CodeRelativeOffset(&return_to)); -+ __ jmp(to); -+ __ bind(&return_to); -+} -+ -+ -+void RegExpMacroAssemblerX87::SafeReturn() { -+ __ pop(ebx); -+ __ add(ebx, Immediate(masm_->CodeObject())); -+ __ jmp(ebx); -+} -+ -+ -+void RegExpMacroAssemblerX87::SafeCallTarget(Label* name) { -+ __ bind(name); -+} -+ -+ -+void RegExpMacroAssemblerX87::Push(Register source) { -+ DCHECK(!source.is(backtrack_stackpointer())); -+ // Notice: This updates flags, unlike normal Push. -+ __ sub(backtrack_stackpointer(), Immediate(kPointerSize)); -+ __ mov(Operand(backtrack_stackpointer(), 0), source); -+} -+ -+ -+void RegExpMacroAssemblerX87::Push(Immediate value) { -+ // Notice: This updates flags, unlike normal Push. -+ __ sub(backtrack_stackpointer(), Immediate(kPointerSize)); -+ __ mov(Operand(backtrack_stackpointer(), 0), value); -+} -+ -+ -+void RegExpMacroAssemblerX87::Pop(Register target) { -+ DCHECK(!target.is(backtrack_stackpointer())); -+ __ mov(target, Operand(backtrack_stackpointer(), 0)); -+ // Notice: This updates flags, unlike normal Pop. -+ __ add(backtrack_stackpointer(), Immediate(kPointerSize)); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckPreemption() { -+ // Check for preemption. -+ Label no_preempt; -+ ExternalReference stack_limit = -+ ExternalReference::address_of_stack_limit(isolate()); -+ __ cmp(esp, Operand::StaticVariable(stack_limit)); -+ __ j(above, &no_preempt); -+ -+ SafeCall(&check_preempt_label_); -+ -+ __ bind(&no_preempt); -+} -+ -+ -+void RegExpMacroAssemblerX87::CheckStackLimit() { -+ Label no_stack_overflow; -+ ExternalReference stack_limit = -+ ExternalReference::address_of_regexp_stack_limit(isolate()); -+ __ cmp(backtrack_stackpointer(), Operand::StaticVariable(stack_limit)); -+ __ j(above, &no_stack_overflow); -+ -+ SafeCall(&stack_overflow_label_); -+ -+ __ bind(&no_stack_overflow); -+} -+ -+ -+void RegExpMacroAssemblerX87::LoadCurrentCharacterUnchecked(int cp_offset, -+ int characters) { -+ if (mode_ == LATIN1) { -+ if (characters == 4) { -+ __ mov(current_character(), Operand(esi, edi, times_1, cp_offset)); -+ } else if (characters == 2) { -+ __ movzx_w(current_character(), Operand(esi, edi, times_1, cp_offset)); -+ } else { -+ DCHECK(characters == 1); -+ __ movzx_b(current_character(), Operand(esi, edi, times_1, cp_offset)); -+ } -+ } else { -+ DCHECK(mode_ == UC16); -+ if (characters == 2) { -+ __ mov(current_character(), -+ Operand(esi, edi, times_1, cp_offset * sizeof(uc16))); -+ } else { -+ DCHECK(characters == 1); -+ __ movzx_w(current_character(), -+ Operand(esi, edi, times_1, cp_offset * sizeof(uc16))); -+ } -+ } -+} -+ -+ -+#undef __ -+ -+#endif // V8_INTERPRETED_REGEXP -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/regexp/x87/regexp-macro-assembler-x87.h 2018-02-18 19:00:54.190418252 +0100 -@@ -0,0 +1,204 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ -+#define V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ -+ -+#include "src/macro-assembler.h" -+#include "src/regexp/regexp-macro-assembler.h" -+#include "src/x87/assembler-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+#ifndef V8_INTERPRETED_REGEXP -+class RegExpMacroAssemblerX87: public NativeRegExpMacroAssembler { -+ public: -+ RegExpMacroAssemblerX87(Isolate* isolate, Zone* zone, Mode mode, -+ int registers_to_save); -+ virtual ~RegExpMacroAssemblerX87(); -+ virtual int stack_limit_slack(); -+ virtual void AdvanceCurrentPosition(int by); -+ virtual void AdvanceRegister(int reg, int by); -+ virtual void Backtrack(); -+ virtual void Bind(Label* label); -+ virtual void CheckAtStart(Label* on_at_start); -+ virtual void CheckCharacter(uint32_t c, Label* on_equal); -+ virtual void CheckCharacterAfterAnd(uint32_t c, -+ uint32_t mask, -+ Label* on_equal); -+ virtual void CheckCharacterGT(uc16 limit, Label* on_greater); -+ virtual void CheckCharacterLT(uc16 limit, Label* on_less); -+ // A "greedy loop" is a loop that is both greedy and with a simple -+ // body. It has a particularly simple implementation. -+ virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); -+ virtual void CheckNotAtStart(int cp_offset, Label* on_not_at_start); -+ virtual void CheckNotBackReference(int start_reg, bool read_backward, -+ Label* on_no_match); -+ virtual void CheckNotBackReferenceIgnoreCase(int start_reg, -+ bool read_backward, bool unicode, -+ Label* on_no_match); -+ virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); -+ virtual void CheckNotCharacterAfterAnd(uint32_t c, -+ uint32_t mask, -+ Label* on_not_equal); -+ virtual void CheckNotCharacterAfterMinusAnd(uc16 c, -+ uc16 minus, -+ uc16 mask, -+ Label* on_not_equal); -+ virtual void CheckCharacterInRange(uc16 from, -+ uc16 to, -+ Label* on_in_range); -+ virtual void CheckCharacterNotInRange(uc16 from, -+ uc16 to, -+ Label* on_not_in_range); -+ virtual void CheckBitInTable(Handle table, Label* on_bit_set); -+ -+ // Checks whether the given offset from the current position is before -+ // the end of the string. -+ virtual void CheckPosition(int cp_offset, Label* on_outside_input); -+ virtual bool CheckSpecialCharacterClass(uc16 type, Label* on_no_match); -+ virtual void Fail(); -+ virtual Handle GetCode(Handle source); -+ virtual void GoTo(Label* label); -+ virtual void IfRegisterGE(int reg, int comparand, Label* if_ge); -+ virtual void IfRegisterLT(int reg, int comparand, Label* if_lt); -+ virtual void IfRegisterEqPos(int reg, Label* if_eq); -+ virtual IrregexpImplementation Implementation(); -+ virtual void LoadCurrentCharacter(int cp_offset, -+ Label* on_end_of_input, -+ bool check_bounds = true, -+ int characters = 1); -+ virtual void PopCurrentPosition(); -+ virtual void PopRegister(int register_index); -+ virtual void PushBacktrack(Label* label); -+ virtual void PushCurrentPosition(); -+ virtual void PushRegister(int register_index, -+ StackCheckFlag check_stack_limit); -+ virtual void ReadCurrentPositionFromRegister(int reg); -+ virtual void ReadStackPointerFromRegister(int reg); -+ virtual void SetCurrentPositionFromEnd(int by); -+ virtual void SetRegister(int register_index, int to); -+ virtual bool Succeed(); -+ virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); -+ virtual void ClearRegisters(int reg_from, int reg_to); -+ virtual void WriteStackPointerToRegister(int reg); -+ -+ // Called from RegExp if the stack-guard is triggered. -+ // If the code object is relocated, the return address is fixed before -+ // returning. -+ static int CheckStackGuardState(Address* return_address, -+ Code* re_code, -+ Address re_frame); -+ -+ private: -+ // Offsets from ebp of function parameters and stored registers. -+ static const int kFramePointer = 0; -+ // Above the frame pointer - function parameters and return address. -+ static const int kReturn_eip = kFramePointer + kPointerSize; -+ static const int kFrameAlign = kReturn_eip + kPointerSize; -+ // Parameters. -+ static const int kInputString = kFrameAlign; -+ static const int kStartIndex = kInputString + kPointerSize; -+ static const int kInputStart = kStartIndex + kPointerSize; -+ static const int kInputEnd = kInputStart + kPointerSize; -+ static const int kRegisterOutput = kInputEnd + kPointerSize; -+ // For the case of global regular expression, we have room to store at least -+ // one set of capture results. For the case of non-global regexp, we ignore -+ // this value. -+ static const int kNumOutputRegisters = kRegisterOutput + kPointerSize; -+ static const int kStackHighEnd = kNumOutputRegisters + kPointerSize; -+ static const int kDirectCall = kStackHighEnd + kPointerSize; -+ static const int kIsolate = kDirectCall + kPointerSize; -+ // Below the frame pointer - local stack variables. -+ // When adding local variables remember to push space for them in -+ // the frame in GetCode. -+ static const int kBackup_esi = kFramePointer - kPointerSize; -+ static const int kBackup_edi = kBackup_esi - kPointerSize; -+ static const int kBackup_ebx = kBackup_edi - kPointerSize; -+ static const int kSuccessfulCaptures = kBackup_ebx - kPointerSize; -+ static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize; -+ // First register address. Following registers are below it on the stack. -+ static const int kRegisterZero = kStringStartMinusOne - kPointerSize; -+ -+ // Initial size of code buffer. -+ static const size_t kRegExpCodeSize = 1024; -+ -+ // Load a number of characters at the given offset from the -+ // current position, into the current-character register. -+ void LoadCurrentCharacterUnchecked(int cp_offset, int character_count); -+ -+ // Check whether preemption has been requested. -+ void CheckPreemption(); -+ -+ // Check whether we are exceeding the stack limit on the backtrack stack. -+ void CheckStackLimit(); -+ -+ // Generate a call to CheckStackGuardState. -+ void CallCheckStackGuardState(Register scratch); -+ -+ // The ebp-relative location of a regexp register. -+ Operand register_location(int register_index); -+ -+ // The register containing the current character after LoadCurrentCharacter. -+ inline Register current_character() { return edx; } -+ -+ // The register containing the backtrack stack top. Provides a meaningful -+ // name to the register. -+ inline Register backtrack_stackpointer() { return ecx; } -+ -+ // Byte size of chars in the string to match (decided by the Mode argument) -+ inline int char_size() { return static_cast(mode_); } -+ -+ // Equivalent to a conditional branch to the label, unless the label -+ // is NULL, in which case it is a conditional Backtrack. -+ void BranchOrBacktrack(Condition condition, Label* to); -+ -+ // Call and return internally in the generated code in a way that -+ // is GC-safe (i.e., doesn't leave absolute code addresses on the stack) -+ inline void SafeCall(Label* to); -+ inline void SafeReturn(); -+ inline void SafeCallTarget(Label* name); -+ -+ // Pushes the value of a register on the backtrack stack. Decrements the -+ // stack pointer (ecx) by a word size and stores the register's value there. -+ inline void Push(Register source); -+ -+ // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) -+ // by a word size and stores the value there. -+ inline void Push(Immediate value); -+ -+ // Pops a value from the backtrack stack. Reads the word at the stack pointer -+ // (ecx) and increments it by a word size. -+ inline void Pop(Register target); -+ -+ Isolate* isolate() const { return masm_->isolate(); } -+ -+ MacroAssembler* masm_; -+ -+ // Which mode to generate code for (LATIN1 or UC16). -+ Mode mode_; -+ -+ // One greater than maximal register index actually used. -+ int num_registers_; -+ -+ // Number of registers to output at the end (the saved registers -+ // are always 0..num_saved_registers_-1) -+ int num_saved_registers_; -+ -+ // Labels used internally. -+ Label entry_label_; -+ Label start_label_; -+ Label success_label_; -+ Label backtrack_label_; -+ Label exit_label_; -+ Label check_preempt_label_; -+ Label stack_overflow_label_; -+}; -+#endif // V8_INTERPRETED_REGEXP -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_REGEXP_X87_REGEXP_MACRO_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.cc 2018-02-18 19:00:54.190418252 +0100 -@@ -74,6 +74,9 @@ - #if V8_TARGET_ARCH_IA32 - kMaxAllocatableGeneralRegisterCount, - kMaxAllocatableDoubleRegisterCount, -+#elif V8_TARGET_ARCH_X87 -+ kMaxAllocatableGeneralRegisterCount, -+ compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount, - #elif V8_TARGET_ARCH_X64 - kMaxAllocatableGeneralRegisterCount, - kMaxAllocatableDoubleRegisterCount, -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/register-configuration.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/register-configuration.h 2018-02-18 19:00:54.190418252 +0100 -@@ -28,7 +28,8 @@ - static const int kMaxFPRegisters = 32; - - // Default RegisterConfigurations for the target architecture. -- // TODO(mstarzinger): Crankshaft is gone. -+ // TODO(X87): This distinction in RegisterConfigurations is temporary -+ // until x87 TF supports all of the registers that Crankshaft does. - static const RegisterConfiguration* Crankshaft(); - static const RegisterConfiguration* Turbofan(); - -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/simulator.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/simulator.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/simulator.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/simulator.h 2018-02-18 19:00:54.191418237 +0100 -@@ -21,6 +21,8 @@ - #include "src/mips64/simulator-mips64.h" - #elif V8_TARGET_ARCH_S390 - #include "src/s390/simulator-s390.h" -+#elif V8_TARGET_ARCH_X87 -+#include "src/x87/simulator-x87.h" - #else - #error Unsupported target architecture. - #endif -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/strtod.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/strtod.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/strtod.cc 2018-02-18 19:00:54.191418237 +0100 -@@ -154,7 +154,8 @@ - static bool DoubleStrtod(Vector trimmed, - int exponent, - double* result) { --#if (V8_TARGET_ARCH_IA32 || defined(USE_SIMULATOR)) && !defined(_MSC_VER) -+#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 || defined(USE_SIMULATOR)) && \ -+ !defined(_MSC_VER) - // On x86 the floating-point stack can be 64 or 80 bits wide. If it is - // 80 bits wide (as is the case on Linux) then double-rounding occurs and the - // result is not accurate. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.cc 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.cc 2018-02-18 19:00:54.191418237 +0100 -@@ -356,7 +356,8 @@ - } - } - --#if V8_TARGET_ARCH_IA32 -+ -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - static void MemMoveWrapper(void* dest, const void* src, size_t size) { - memmove(dest, src, size); - } -@@ -410,7 +411,7 @@ - void init_memcopy_functions(Isolate* isolate) { - if (g_memcopy_functions_initialized) return; - g_memcopy_functions_initialized = true; --#if V8_TARGET_ARCH_IA32 -+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 - MemMoveFunction generated_memmove = CreateMemMoveFunction(isolate); - if (generated_memmove != NULL) { - memmove_function = generated_memmove; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/utils.h 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/utils.h 2018-02-18 19:00:54.192418222 +0100 -@@ -431,7 +431,7 @@ - // Initializes the codegen support that depends on CPU features. - void init_memcopy_functions(Isolate* isolate); - --#if defined(V8_TARGET_ARCH_IA32) -+#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X87) - // Limit below which the extra overhead of the MemCopy function is likely - // to outweigh the benefits of faster copying. - const int kMinComplexMemCopy = 64; -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/v8.gyp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/v8.gyp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/v8.gyp 2018-02-18 19:00:54.193418208 +0100 -@@ -279,6 +279,11 @@ - 'builtins/s390/builtins-s390.cc', - ], - }], -+ ['v8_target_arch=="x87"', { -+ 'sources': [ ### gcmole(arch:x87) ### -+ 'builtins/x87/builtins-x87.cc', -+ ], -+ }], - ['v8_enable_i18n_support==0', { - 'sources!': [ - 'builtins/builtins-intl-gen.cc', -@@ -1587,6 +1592,38 @@ - 'regexp/ia32/regexp-macro-assembler-ia32.h', - ], - }], -+ ['v8_target_arch=="x87"', { -+ 'sources': [ ### gcmole(arch:x87) ### -+ 'x87/assembler-x87-inl.h', -+ 'x87/assembler-x87.cc', -+ 'x87/assembler-x87.h', -+ 'x87/code-stubs-x87.cc', -+ 'x87/code-stubs-x87.h', -+ 'x87/codegen-x87.cc', -+ 'x87/codegen-x87.h', -+ 'x87/cpu-x87.cc', -+ 'x87/deoptimizer-x87.cc', -+ 'x87/disasm-x87.cc', -+ 'x87/frames-x87.cc', -+ 'x87/frames-x87.h', -+ 'x87/interface-descriptors-x87.cc', -+ 'x87/macro-assembler-x87.cc', -+ 'x87/macro-assembler-x87.h', -+ 'x87/simulator-x87.cc', -+ 'x87/simulator-x87.h', -+ 'compiler/x87/code-generator-x87.cc', -+ 'compiler/x87/instruction-codes-x87.h', -+ 'compiler/x87/instruction-scheduler-x87.cc', -+ 'compiler/x87/instruction-selector-x87.cc', -+ 'debug/x87/debug-x87.cc', -+ 'full-codegen/x87/full-codegen-x87.cc', -+ 'ic/x87/access-compiler-x87.cc', -+ 'ic/x87/handler-compiler-x87.cc', -+ 'ic/x87/ic-x87.cc', -+ 'regexp/x87/regexp-macro-assembler-x87.cc', -+ 'regexp/x87/regexp-macro-assembler-x87.h', -+ ], -+ }], - ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', { - 'sources': [ ### gcmole(arch:mipsel) ### - 'mips/assembler-mips.cc', -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.cc 2018-02-18 19:00:54.194418193 +0100 -@@ -0,0 +1,2258 @@ -+// Copyright (c) 1994-2006 Sun Microsystems 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. -+// -+// - Redistribution in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the -+// distribution. -+// -+// - Neither the name of Sun Microsystems or the names of contributors may -+// be used to endorse or promote products derived from this software without -+// specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+// STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been modified -+// significantly by Google Inc. -+// Copyright 2012 the V8 project authors. All rights reserved. -+ -+#include "src/x87/assembler-x87.h" -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/base/bits.h" -+#include "src/base/cpu.h" -+#include "src/code-stubs.h" -+#include "src/disassembler.h" -+#include "src/macro-assembler.h" -+#include "src/v8.h" -+ -+namespace v8 { -+namespace internal { -+ -+Immediate Immediate::EmbeddedNumber(double value) { -+ int32_t smi; -+ if (DoubleToSmiInteger(value, &smi)) return Immediate(Smi::FromInt(smi)); -+ Immediate result(0, RelocInfo::EMBEDDED_OBJECT); -+ result.is_heap_object_request_ = true; -+ result.value_.heap_object_request = HeapObjectRequest(value); -+ return result; -+} -+ -+Immediate Immediate::EmbeddedCode(CodeStub* stub) { -+ Immediate result(0, RelocInfo::CODE_TARGET); -+ result.is_heap_object_request_ = true; -+ result.value_.heap_object_request = HeapObjectRequest(stub); -+ return result; -+} -+ -+// ----------------------------------------------------------------------------- -+// Implementation of CpuFeatures -+ -+void CpuFeatures::ProbeImpl(bool cross_compile) { -+ base::CPU cpu; -+ -+ // Only use statically determined features for cross compile (snapshot). -+ if (cross_compile) return; -+} -+ -+ -+void CpuFeatures::PrintTarget() { } -+void CpuFeatures::PrintFeatures() { } -+ -+ -+// ----------------------------------------------------------------------------- -+// Implementation of Displacement -+ -+void Displacement::init(Label* L, Type type) { -+ DCHECK(!L->is_bound()); -+ int next = 0; -+ if (L->is_linked()) { -+ next = L->pos(); -+ DCHECK(next > 0); // Displacements must be at positions > 0 -+ } -+ // Ensure that we _never_ overflow the next field. -+ DCHECK(NextField::is_valid(Assembler::kMaximalBufferSize)); -+ data_ = NextField::encode(next) | TypeField::encode(type); -+} -+ -+ -+// ----------------------------------------------------------------------------- -+// Implementation of RelocInfo -+ -+ -+const int RelocInfo::kApplyMask = -+ RelocInfo::kCodeTargetMask | 1 << RelocInfo::RUNTIME_ENTRY | -+ 1 << RelocInfo::INTERNAL_REFERENCE | 1 << RelocInfo::CODE_AGE_SEQUENCE | -+ RelocInfo::kDebugBreakSlotMask; -+ -+ -+bool RelocInfo::IsCodedSpecially() { -+ // The deserializer needs to know whether a pointer is specially coded. Being -+ // specially coded on IA32 means that it is a relative address, as used by -+ // branch instructions. These are also the ones that need changing when a -+ // code object moves. -+ return (1 << rmode_) & kApplyMask; -+} -+ -+ -+bool RelocInfo::IsInConstantPool() { -+ return false; -+} -+ -+Address RelocInfo::wasm_memory_reference() { -+ DCHECK(IsWasmMemoryReference(rmode_)); -+ return Memory::Address_at(pc_); -+} -+ -+Address RelocInfo::wasm_global_reference() { -+ DCHECK(IsWasmGlobalReference(rmode_)); -+ return Memory::Address_at(pc_); -+} -+ -+uint32_t RelocInfo::wasm_memory_size_reference() { -+ DCHECK(IsWasmMemorySizeReference(rmode_)); -+ return Memory::uint32_at(pc_); -+} -+ -+uint32_t RelocInfo::wasm_function_table_size_reference() { -+ DCHECK(IsWasmFunctionTableSizeReference(rmode_)); -+ return Memory::uint32_at(pc_); -+} -+ -+void RelocInfo::unchecked_update_wasm_memory_reference( -+ Isolate* isolate, Address address, ICacheFlushMode icache_flush_mode) { -+ Memory::Address_at(pc_) = address; -+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { -+ Assembler::FlushICache(isolate, pc_, sizeof(Address)); -+ } -+} -+ -+void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, -+ ICacheFlushMode icache_flush_mode) { -+ Memory::uint32_at(pc_) = size; -+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { -+ Assembler::FlushICache(isolate, pc_, sizeof(uint32_t)); -+ } -+} -+ -+// ----------------------------------------------------------------------------- -+// Implementation of Operand -+ -+Operand::Operand(Register base, int32_t disp, RelocInfo::Mode rmode) { -+ // [base + disp/r] -+ if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) { -+ // [base] -+ set_modrm(0, base); -+ if (base.is(esp)) set_sib(times_1, esp, base); -+ } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) { -+ // [base + disp8] -+ set_modrm(1, base); -+ if (base.is(esp)) set_sib(times_1, esp, base); -+ set_disp8(disp); -+ } else { -+ // [base + disp/r] -+ set_modrm(2, base); -+ if (base.is(esp)) set_sib(times_1, esp, base); -+ set_dispr(disp, rmode); -+ } -+} -+ -+ -+Operand::Operand(Register base, -+ Register index, -+ ScaleFactor scale, -+ int32_t disp, -+ RelocInfo::Mode rmode) { -+ DCHECK(!index.is(esp)); // illegal addressing mode -+ // [base + index*scale + disp/r] -+ if (disp == 0 && RelocInfo::IsNone(rmode) && !base.is(ebp)) { -+ // [base + index*scale] -+ set_modrm(0, esp); -+ set_sib(scale, index, base); -+ } else if (is_int8(disp) && RelocInfo::IsNone(rmode)) { -+ // [base + index*scale + disp8] -+ set_modrm(1, esp); -+ set_sib(scale, index, base); -+ set_disp8(disp); -+ } else { -+ // [base + index*scale + disp/r] -+ set_modrm(2, esp); -+ set_sib(scale, index, base); -+ set_dispr(disp, rmode); -+ } -+} -+ -+ -+Operand::Operand(Register index, -+ ScaleFactor scale, -+ int32_t disp, -+ RelocInfo::Mode rmode) { -+ DCHECK(!index.is(esp)); // illegal addressing mode -+ // [index*scale + disp/r] -+ set_modrm(0, esp); -+ set_sib(scale, index, ebp); -+ set_dispr(disp, rmode); -+} -+ -+ -+bool Operand::is_reg(Register reg) const { -+ return ((buf_[0] & 0xF8) == 0xC0) // addressing mode is register only. -+ && ((buf_[0] & 0x07) == reg.code()); // register codes match. -+} -+ -+ -+bool Operand::is_reg_only() const { -+ return (buf_[0] & 0xF8) == 0xC0; // Addressing mode is register only. -+} -+ -+ -+Register Operand::reg() const { -+ DCHECK(is_reg_only()); -+ return Register::from_code(buf_[0] & 0x07); -+} -+ -+void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) { -+ for (auto& request : heap_object_requests_) { -+ Handle object; -+ switch (request.kind()) { -+ case HeapObjectRequest::kHeapNumber: -+ object = isolate->factory()->NewHeapNumber(request.heap_number(), -+ IMMUTABLE, TENURED); -+ break; -+ case HeapObjectRequest::kCodeStub: -+ request.code_stub()->set_isolate(isolate); -+ object = request.code_stub()->GetCode(); -+ break; -+ } -+ Address pc = buffer_ + request.offset(); -+ Memory::Object_Handle_at(pc) = object; -+ } -+} -+ -+ -+// ----------------------------------------------------------------------------- -+// Implementation of Assembler. -+ -+// Emit a single byte. Must always be inlined. -+#define EMIT(x) \ -+ *pc_++ = (x) -+ -+Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) -+ : AssemblerBase(isolate_data, buffer, buffer_size) { -+// Clear the buffer in debug mode unless it was provided by the -+// caller in which case we can't be sure it's okay to overwrite -+// existing code in it; see CodePatcher::CodePatcher(...). -+#ifdef DEBUG -+ if (own_buffer_) { -+ memset(buffer_, 0xCC, buffer_size_); // int3 -+ } -+#endif -+ -+ reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); -+} -+ -+ -+void Assembler::GetCode(Isolate* isolate, CodeDesc* desc) { -+ // Finalize code (at this point overflow() may be true, but the gap ensures -+ // that we are still not overlapping instructions and relocation info). -+ DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. -+ -+ AllocateAndInstallRequestedHeapObjects(isolate); -+ -+ // Set up code descriptor. -+ desc->buffer = buffer_; -+ desc->buffer_size = buffer_size_; -+ desc->instr_size = pc_offset(); -+ desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); -+ desc->origin = this; -+ desc->constant_pool_size = 0; -+ desc->unwinding_info_size = 0; -+ desc->unwinding_info = nullptr; -+} -+ -+ -+void Assembler::Align(int m) { -+ DCHECK(base::bits::IsPowerOfTwo(m)); -+ int mask = m - 1; -+ int addr = pc_offset(); -+ Nop((m - (addr & mask)) & mask); -+} -+ -+ -+bool Assembler::IsNop(Address addr) { -+ Address a = addr; -+ while (*a == 0x66) a++; -+ if (*a == 0x90) return true; -+ if (a[0] == 0xf && a[1] == 0x1f) return true; -+ return false; -+} -+ -+ -+void Assembler::Nop(int bytes) { -+ EnsureSpace ensure_space(this); -+ -+ // Older CPUs that do not support SSE2 may not support multibyte NOP -+ // instructions. -+ for (; bytes > 0; bytes--) { -+ EMIT(0x90); -+ } -+ return; -+} -+ -+ -+void Assembler::CodeTargetAlign() { -+ Align(16); // Preferred alignment of jump targets on ia32. -+} -+ -+ -+void Assembler::cpuid() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xA2); -+} -+ -+ -+void Assembler::pushad() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x60); -+} -+ -+ -+void Assembler::popad() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x61); -+} -+ -+ -+void Assembler::pushfd() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x9C); -+} -+ -+ -+void Assembler::popfd() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x9D); -+} -+ -+ -+void Assembler::push(const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ if (x.is_int8()) { -+ EMIT(0x6a); -+ EMIT(x.immediate()); -+ } else { -+ EMIT(0x68); -+ emit(x); -+ } -+} -+ -+ -+void Assembler::push_imm32(int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x68); -+ emit(imm32); -+} -+ -+ -+void Assembler::push(Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x50 | src.code()); -+} -+ -+ -+void Assembler::push(const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFF); -+ emit_operand(esi, src); -+} -+ -+ -+void Assembler::pop(Register dst) { -+ DCHECK(reloc_info_writer.last_pc() != NULL); -+ EnsureSpace ensure_space(this); -+ EMIT(0x58 | dst.code()); -+} -+ -+ -+void Assembler::pop(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x8F); -+ emit_operand(eax, dst); -+} -+ -+ -+void Assembler::enter(const Immediate& size) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC8); -+ emit_w(size); -+ EMIT(0); -+} -+ -+ -+void Assembler::leave() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC9); -+} -+ -+ -+void Assembler::mov_b(Register dst, const Operand& src) { -+ CHECK(dst.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x8A); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::mov_b(const Operand& dst, const Immediate& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC6); -+ emit_operand(eax, dst); -+ EMIT(static_cast(src.immediate())); -+} -+ -+ -+void Assembler::mov_b(const Operand& dst, int8_t imm8) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC6); -+ emit_operand(eax, dst); -+ EMIT(imm8); -+} -+ -+ -+void Assembler::mov_b(const Operand& dst, Register src) { -+ CHECK(src.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x88); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::mov_w(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x8B); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::mov_w(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x89); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::mov_w(const Operand& dst, int16_t imm16) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0xC7); -+ emit_operand(eax, dst); -+ EMIT(static_cast(imm16 & 0xff)); -+ EMIT(static_cast(imm16 >> 8)); -+} -+ -+ -+void Assembler::mov_w(const Operand& dst, const Immediate& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0xC7); -+ emit_operand(eax, dst); -+ EMIT(static_cast(src.immediate() & 0xff)); -+ EMIT(static_cast(src.immediate() >> 8)); -+} -+ -+ -+void Assembler::mov(Register dst, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xB8 | dst.code()); -+ emit(imm32); -+} -+ -+ -+void Assembler::mov(Register dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xB8 | dst.code()); -+ emit(x); -+} -+ -+ -+void Assembler::mov(Register dst, Handle handle) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xB8 | dst.code()); -+ emit(handle); -+} -+ -+ -+void Assembler::mov(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x8B); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::mov(Register dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x89); -+ EMIT(0xC0 | src.code() << 3 | dst.code()); -+} -+ -+ -+void Assembler::mov(const Operand& dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC7); -+ emit_operand(eax, dst); -+ emit(x); -+} -+ -+ -+void Assembler::mov(const Operand& dst, Handle handle) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xC7); -+ emit_operand(eax, dst); -+ emit(handle); -+} -+ -+ -+void Assembler::mov(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x89); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::movsx_b(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xBE); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::movsx_w(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xBF); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::movzx_b(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xB6); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::movzx_w(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xB7); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::cld() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFC); -+} -+ -+ -+void Assembler::rep_movs() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF3); -+ EMIT(0xA5); -+} -+ -+ -+void Assembler::rep_stos() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF3); -+ EMIT(0xAB); -+} -+ -+ -+void Assembler::stos() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xAB); -+} -+ -+ -+void Assembler::xchg(Register dst, Register src) { -+ EnsureSpace ensure_space(this); -+ if (src.is(eax) || dst.is(eax)) { // Single-byte encoding. -+ EMIT(0x90 | (src.is(eax) ? dst.code() : src.code())); -+ } else { -+ EMIT(0x87); -+ EMIT(0xC0 | src.code() << 3 | dst.code()); -+ } -+} -+ -+ -+void Assembler::xchg(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x87); -+ emit_operand(dst, src); -+} -+ -+void Assembler::xchg_b(Register reg, const Operand& op) { -+ DCHECK(reg.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x86); -+ emit_operand(reg, op); -+} -+ -+void Assembler::xchg_w(Register reg, const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x87); -+ emit_operand(reg, op); -+} -+ -+void Assembler::lock() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF0); -+} -+ -+void Assembler::cmpxchg(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xB1); -+ emit_operand(src, dst); -+} -+ -+void Assembler::cmpxchg_b(const Operand& dst, Register src) { -+ DCHECK(src.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xB0); -+ emit_operand(src, dst); -+} -+ -+void Assembler::cmpxchg_w(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x0F); -+ EMIT(0xB1); -+ emit_operand(src, dst); -+} -+ -+void Assembler::adc(Register dst, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ emit_arith(2, Operand(dst), Immediate(imm32)); -+} -+ -+ -+void Assembler::adc(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x13); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::add(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x03); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::add(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x01); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::add(const Operand& dst, const Immediate& x) { -+ DCHECK(reloc_info_writer.last_pc() != NULL); -+ EnsureSpace ensure_space(this); -+ emit_arith(0, dst, x); -+} -+ -+ -+void Assembler::and_(Register dst, int32_t imm32) { -+ and_(dst, Immediate(imm32)); -+} -+ -+ -+void Assembler::and_(Register dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ emit_arith(4, Operand(dst), x); -+} -+ -+ -+void Assembler::and_(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x23); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::and_(const Operand& dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ emit_arith(4, dst, x); -+} -+ -+ -+void Assembler::and_(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x21); -+ emit_operand(src, dst); -+} -+ -+void Assembler::cmpb(const Operand& op, Immediate imm8) { -+ DCHECK(imm8.is_int8() || imm8.is_uint8()); -+ EnsureSpace ensure_space(this); -+ if (op.is_reg(eax)) { -+ EMIT(0x3C); -+ } else { -+ EMIT(0x80); -+ emit_operand(edi, op); // edi == 7 -+ } -+ emit_b(imm8); -+} -+ -+ -+void Assembler::cmpb(const Operand& op, Register reg) { -+ CHECK(reg.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x38); -+ emit_operand(reg, op); -+} -+ -+ -+void Assembler::cmpb(Register reg, const Operand& op) { -+ CHECK(reg.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x3A); -+ emit_operand(reg, op); -+} -+ -+ -+void Assembler::cmpw(const Operand& op, Immediate imm16) { -+ DCHECK(imm16.is_int16()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x81); -+ emit_operand(edi, op); -+ emit_w(imm16); -+} -+ -+void Assembler::cmpw(Register reg, const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x3B); -+ emit_operand(reg, op); -+} -+ -+void Assembler::cmpw(const Operand& op, Register reg) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x39); -+ emit_operand(reg, op); -+} -+ -+void Assembler::cmp(Register reg, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ emit_arith(7, Operand(reg), Immediate(imm32)); -+} -+ -+ -+void Assembler::cmp(Register reg, Handle handle) { -+ EnsureSpace ensure_space(this); -+ emit_arith(7, Operand(reg), Immediate(handle)); -+} -+ -+ -+void Assembler::cmp(Register reg, const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x3B); -+ emit_operand(reg, op); -+} -+ -+void Assembler::cmp(const Operand& op, Register reg) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x39); -+ emit_operand(reg, op); -+} -+ -+void Assembler::cmp(const Operand& op, const Immediate& imm) { -+ EnsureSpace ensure_space(this); -+ emit_arith(7, op, imm); -+} -+ -+ -+void Assembler::cmp(const Operand& op, Handle handle) { -+ EnsureSpace ensure_space(this); -+ emit_arith(7, op, Immediate(handle)); -+} -+ -+ -+void Assembler::cmpb_al(const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x38); // CMP r/m8, r8 -+ emit_operand(eax, op); // eax has same code as register al. -+} -+ -+ -+void Assembler::cmpw_ax(const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x39); // CMP r/m16, r16 -+ emit_operand(eax, op); // eax has same code as register ax. -+} -+ -+ -+void Assembler::dec_b(Register dst) { -+ CHECK(dst.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0xFE); -+ EMIT(0xC8 | dst.code()); -+} -+ -+ -+void Assembler::dec_b(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFE); -+ emit_operand(ecx, dst); -+} -+ -+ -+void Assembler::dec(Register dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x48 | dst.code()); -+} -+ -+ -+void Assembler::dec(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFF); -+ emit_operand(ecx, dst); -+} -+ -+ -+void Assembler::cdq() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x99); -+} -+ -+ -+void Assembler::idiv(const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ emit_operand(edi, src); -+} -+ -+ -+void Assembler::div(const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ emit_operand(esi, src); -+} -+ -+ -+void Assembler::imul(Register reg) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ EMIT(0xE8 | reg.code()); -+} -+ -+ -+void Assembler::imul(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xAF); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::imul(Register dst, Register src, int32_t imm32) { -+ imul(dst, Operand(src), imm32); -+} -+ -+ -+void Assembler::imul(Register dst, const Operand& src, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ if (is_int8(imm32)) { -+ EMIT(0x6B); -+ emit_operand(dst, src); -+ EMIT(imm32); -+ } else { -+ EMIT(0x69); -+ emit_operand(dst, src); -+ emit(imm32); -+ } -+} -+ -+ -+void Assembler::inc(Register dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x40 | dst.code()); -+} -+ -+ -+void Assembler::inc(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFF); -+ emit_operand(eax, dst); -+} -+ -+ -+void Assembler::lea(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x8D); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::mul(Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ EMIT(0xE0 | src.code()); -+} -+ -+ -+void Assembler::neg(Register dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ EMIT(0xD8 | dst.code()); -+} -+ -+ -+void Assembler::neg(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ emit_operand(ebx, dst); -+} -+ -+ -+void Assembler::not_(Register dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ EMIT(0xD0 | dst.code()); -+} -+ -+ -+void Assembler::not_(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ emit_operand(edx, dst); -+} -+ -+ -+void Assembler::or_(Register dst, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ emit_arith(1, Operand(dst), Immediate(imm32)); -+} -+ -+ -+void Assembler::or_(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0B); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::or_(const Operand& dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ emit_arith(1, dst, x); -+} -+ -+ -+void Assembler::or_(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x09); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::rcl(Register dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ EMIT(0xD0 | dst.code()); -+ } else { -+ EMIT(0xC1); -+ EMIT(0xD0 | dst.code()); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::rcr(Register dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ EMIT(0xD8 | dst.code()); -+ } else { -+ EMIT(0xC1); -+ EMIT(0xD8 | dst.code()); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::ror(const Operand& dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ emit_operand(ecx, dst); -+ } else { -+ EMIT(0xC1); -+ emit_operand(ecx, dst); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::ror_cl(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD3); -+ emit_operand(ecx, dst); -+} -+ -+ -+void Assembler::sar(const Operand& dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ emit_operand(edi, dst); -+ } else { -+ EMIT(0xC1); -+ emit_operand(edi, dst); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::sar_cl(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD3); -+ emit_operand(edi, dst); -+} -+ -+void Assembler::sbb(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x1B); -+ emit_operand(dst, src); -+} -+ -+void Assembler::shld(Register dst, Register src, uint8_t shift) { -+ DCHECK(is_uint5(shift)); -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xA4); -+ emit_operand(src, Operand(dst)); -+ EMIT(shift); -+} -+ -+void Assembler::shld_cl(Register dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xA5); -+ emit_operand(src, Operand(dst)); -+} -+ -+ -+void Assembler::shl(const Operand& dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ emit_operand(esp, dst); -+ } else { -+ EMIT(0xC1); -+ emit_operand(esp, dst); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::shl_cl(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD3); -+ emit_operand(esp, dst); -+} -+ -+void Assembler::shr(const Operand& dst, uint8_t imm8) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint5(imm8)); // illegal shift count -+ if (imm8 == 1) { -+ EMIT(0xD1); -+ emit_operand(ebp, dst); -+ } else { -+ EMIT(0xC1); -+ emit_operand(ebp, dst); -+ EMIT(imm8); -+ } -+} -+ -+ -+void Assembler::shr_cl(const Operand& dst) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD3); -+ emit_operand(ebp, dst); -+} -+ -+void Assembler::shrd(Register dst, Register src, uint8_t shift) { -+ DCHECK(is_uint5(shift)); -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xAC); -+ emit_operand(dst, Operand(src)); -+ EMIT(shift); -+} -+ -+void Assembler::shrd_cl(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xAD); -+ emit_operand(src, dst); -+} -+ -+void Assembler::sub(const Operand& dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ emit_arith(5, dst, x); -+} -+ -+ -+void Assembler::sub(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x2B); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::sub(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x29); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::test(Register reg, const Immediate& imm) { -+ if (imm.is_uint8()) { -+ test_b(reg, imm); -+ return; -+ } -+ -+ EnsureSpace ensure_space(this); -+ // This is not using emit_arith because test doesn't support -+ // sign-extension of 8-bit operands. -+ if (reg.is(eax)) { -+ EMIT(0xA9); -+ } else { -+ EMIT(0xF7); -+ EMIT(0xC0 | reg.code()); -+ } -+ emit(imm); -+} -+ -+ -+void Assembler::test(Register reg, const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x85); -+ emit_operand(reg, op); -+} -+ -+ -+void Assembler::test_b(Register reg, const Operand& op) { -+ CHECK(reg.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x84); -+ emit_operand(reg, op); -+} -+ -+ -+void Assembler::test(const Operand& op, const Immediate& imm) { -+ if (op.is_reg_only()) { -+ test(op.reg(), imm); -+ return; -+ } -+ if (imm.is_uint8()) { -+ return test_b(op, imm); -+ } -+ EnsureSpace ensure_space(this); -+ EMIT(0xF7); -+ emit_operand(eax, op); -+ emit(imm); -+} -+ -+void Assembler::test_b(Register reg, Immediate imm8) { -+ DCHECK(imm8.is_uint8()); -+ EnsureSpace ensure_space(this); -+ // Only use test against byte for registers that have a byte -+ // variant: eax, ebx, ecx, and edx. -+ if (reg.is(eax)) { -+ EMIT(0xA8); -+ emit_b(imm8); -+ } else if (reg.is_byte_register()) { -+ emit_arith_b(0xF6, 0xC0, reg, static_cast(imm8.immediate())); -+ } else { -+ EMIT(0x66); -+ EMIT(0xF7); -+ EMIT(0xC0 | reg.code()); -+ emit_w(imm8); -+ } -+} -+ -+void Assembler::test_b(const Operand& op, Immediate imm8) { -+ if (op.is_reg_only()) { -+ test_b(op.reg(), imm8); -+ return; -+ } -+ EnsureSpace ensure_space(this); -+ EMIT(0xF6); -+ emit_operand(eax, op); -+ emit_b(imm8); -+} -+ -+void Assembler::test_w(Register reg, Immediate imm16) { -+ DCHECK(imm16.is_int16() || imm16.is_uint16()); -+ EnsureSpace ensure_space(this); -+ if (reg.is(eax)) { -+ EMIT(0xA9); -+ emit_w(imm16); -+ } else { -+ EMIT(0x66); -+ EMIT(0xF7); -+ EMIT(0xc0 | reg.code()); -+ emit_w(imm16); -+ } -+} -+ -+void Assembler::test_w(Register reg, const Operand& op) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0x85); -+ emit_operand(reg, op); -+} -+ -+void Assembler::test_w(const Operand& op, Immediate imm16) { -+ DCHECK(imm16.is_int16() || imm16.is_uint16()); -+ if (op.is_reg_only()) { -+ test_w(op.reg(), imm16); -+ return; -+ } -+ EnsureSpace ensure_space(this); -+ EMIT(0x66); -+ EMIT(0xF7); -+ emit_operand(eax, op); -+ emit_w(imm16); -+} -+ -+void Assembler::xor_(Register dst, int32_t imm32) { -+ EnsureSpace ensure_space(this); -+ emit_arith(6, Operand(dst), Immediate(imm32)); -+} -+ -+ -+void Assembler::xor_(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x33); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::xor_(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x31); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::xor_(const Operand& dst, const Immediate& x) { -+ EnsureSpace ensure_space(this); -+ emit_arith(6, dst, x); -+} -+ -+ -+void Assembler::bt(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xA3); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::bts(const Operand& dst, Register src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xAB); -+ emit_operand(src, dst); -+} -+ -+ -+void Assembler::bsr(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xBD); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::bsf(Register dst, const Operand& src) { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0xBC); -+ emit_operand(dst, src); -+} -+ -+ -+void Assembler::hlt() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xF4); -+} -+ -+ -+void Assembler::int3() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xCC); -+} -+ -+ -+void Assembler::nop() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x90); -+} -+ -+ -+void Assembler::ret(int imm16) { -+ EnsureSpace ensure_space(this); -+ DCHECK(is_uint16(imm16)); -+ if (imm16 == 0) { -+ EMIT(0xC3); -+ } else { -+ EMIT(0xC2); -+ EMIT(imm16 & 0xFF); -+ EMIT((imm16 >> 8) & 0xFF); -+ } -+} -+ -+ -+void Assembler::ud2() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0x0B); -+} -+ -+ -+// Labels refer to positions in the (to be) generated code. -+// There are bound, linked, and unused labels. -+// -+// Bound labels refer to known positions in the already -+// generated code. pos() is the position the label refers to. -+// -+// Linked labels refer to unknown positions in the code -+// to be generated; pos() is the position of the 32bit -+// Displacement of the last instruction using the label. -+ -+ -+void Assembler::print(Label* L) { -+ if (L->is_unused()) { -+ PrintF("unused label\n"); -+ } else if (L->is_bound()) { -+ PrintF("bound label to %d\n", L->pos()); -+ } else if (L->is_linked()) { -+ Label l = *L; -+ PrintF("unbound label"); -+ while (l.is_linked()) { -+ Displacement disp = disp_at(&l); -+ PrintF("@ %d ", l.pos()); -+ disp.print(); -+ PrintF("\n"); -+ disp.next(&l); -+ } -+ } else { -+ PrintF("label in inconsistent state (pos = %d)\n", L->pos_); -+ } -+} -+ -+ -+void Assembler::bind_to(Label* L, int pos) { -+ EnsureSpace ensure_space(this); -+ DCHECK(0 <= pos && pos <= pc_offset()); // must have a valid binding position -+ while (L->is_linked()) { -+ Displacement disp = disp_at(L); -+ int fixup_pos = L->pos(); -+ if (disp.type() == Displacement::CODE_ABSOLUTE) { -+ long_at_put(fixup_pos, reinterpret_cast(buffer_ + pos)); -+ internal_reference_positions_.push_back(fixup_pos); -+ } else if (disp.type() == Displacement::CODE_RELATIVE) { -+ // Relative to Code* heap object pointer. -+ long_at_put(fixup_pos, pos + Code::kHeaderSize - kHeapObjectTag); -+ } else { -+ if (disp.type() == Displacement::UNCONDITIONAL_JUMP) { -+ DCHECK(byte_at(fixup_pos - 1) == 0xE9); // jmp expected -+ } -+ // Relative address, relative to point after address. -+ int imm32 = pos - (fixup_pos + sizeof(int32_t)); -+ long_at_put(fixup_pos, imm32); -+ } -+ disp.next(L); -+ } -+ while (L->is_near_linked()) { -+ int fixup_pos = L->near_link_pos(); -+ int offset_to_next = -+ static_cast(*reinterpret_cast(addr_at(fixup_pos))); -+ DCHECK(offset_to_next <= 0); -+ // Relative address, relative to point after address. -+ int disp = pos - fixup_pos - sizeof(int8_t); -+ CHECK(0 <= disp && disp <= 127); -+ set_byte_at(fixup_pos, disp); -+ if (offset_to_next < 0) { -+ L->link_to(fixup_pos + offset_to_next, Label::kNear); -+ } else { -+ L->UnuseNear(); -+ } -+ } -+ L->bind_to(pos); -+} -+ -+ -+void Assembler::bind(Label* L) { -+ EnsureSpace ensure_space(this); -+ DCHECK(!L->is_bound()); // label can only be bound once -+ bind_to(L, pc_offset()); -+} -+ -+ -+void Assembler::call(Label* L) { -+ EnsureSpace ensure_space(this); -+ if (L->is_bound()) { -+ const int long_size = 5; -+ int offs = L->pos() - pc_offset(); -+ DCHECK(offs <= 0); -+ // 1110 1000 #32-bit disp. -+ EMIT(0xE8); -+ emit(offs - long_size); -+ } else { -+ // 1110 1000 #32-bit disp. -+ EMIT(0xE8); -+ emit_disp(L, Displacement::OTHER); -+ } -+} -+ -+ -+void Assembler::call(byte* entry, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ DCHECK(!RelocInfo::IsCodeTarget(rmode)); -+ EMIT(0xE8); -+ if (RelocInfo::IsRuntimeEntry(rmode)) { -+ emit(reinterpret_cast(entry), rmode); -+ } else { -+ emit(entry - (pc_ + sizeof(int32_t)), rmode); -+ } -+} -+ -+ -+int Assembler::CallSize(const Operand& adr) { -+ // Call size is 1 (opcode) + adr.len_ (operand). -+ return 1 + adr.len_; -+} -+ -+ -+void Assembler::call(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFF); -+ emit_operand(edx, adr); -+} -+ -+ -+int Assembler::CallSize(Handle code, RelocInfo::Mode rmode) { -+ return 1 /* EMIT */ + sizeof(uint32_t) /* emit */; -+} -+ -+ -+void Assembler::call(Handle code, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ DCHECK(RelocInfo::IsCodeTarget(rmode) -+ || rmode == RelocInfo::CODE_AGE_SEQUENCE); -+ EMIT(0xE8); -+ emit(code, rmode); -+} -+ -+void Assembler::call(CodeStub* stub) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xE8); -+ emit(Immediate::EmbeddedCode(stub)); -+} -+ -+void Assembler::jmp(Label* L, Label::Distance distance) { -+ EnsureSpace ensure_space(this); -+ if (L->is_bound()) { -+ const int short_size = 2; -+ const int long_size = 5; -+ int offs = L->pos() - pc_offset(); -+ DCHECK(offs <= 0); -+ if (is_int8(offs - short_size)) { -+ // 1110 1011 #8-bit disp. -+ EMIT(0xEB); -+ EMIT((offs - short_size) & 0xFF); -+ } else { -+ // 1110 1001 #32-bit disp. -+ EMIT(0xE9); -+ emit(offs - long_size); -+ } -+ } else if (distance == Label::kNear) { -+ EMIT(0xEB); -+ emit_near_disp(L); -+ } else { -+ // 1110 1001 #32-bit disp. -+ EMIT(0xE9); -+ emit_disp(L, Displacement::UNCONDITIONAL_JUMP); -+ } -+} -+ -+ -+void Assembler::jmp(byte* entry, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ DCHECK(!RelocInfo::IsCodeTarget(rmode)); -+ EMIT(0xE9); -+ if (RelocInfo::IsRuntimeEntry(rmode)) { -+ emit(reinterpret_cast(entry), rmode); -+ } else { -+ emit(entry - (pc_ + sizeof(int32_t)), rmode); -+ } -+} -+ -+ -+void Assembler::jmp(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xFF); -+ emit_operand(esp, adr); -+} -+ -+ -+void Assembler::jmp(Handle code, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ DCHECK(RelocInfo::IsCodeTarget(rmode)); -+ EMIT(0xE9); -+ emit(code, rmode); -+} -+ -+ -+void Assembler::j(Condition cc, Label* L, Label::Distance distance) { -+ EnsureSpace ensure_space(this); -+ DCHECK(0 <= cc && static_cast(cc) < 16); -+ if (L->is_bound()) { -+ const int short_size = 2; -+ const int long_size = 6; -+ int offs = L->pos() - pc_offset(); -+ DCHECK(offs <= 0); -+ if (is_int8(offs - short_size)) { -+ // 0111 tttn #8-bit disp -+ EMIT(0x70 | cc); -+ EMIT((offs - short_size) & 0xFF); -+ } else { -+ // 0000 1111 1000 tttn #32-bit disp -+ EMIT(0x0F); -+ EMIT(0x80 | cc); -+ emit(offs - long_size); -+ } -+ } else if (distance == Label::kNear) { -+ EMIT(0x70 | cc); -+ emit_near_disp(L); -+ } else { -+ // 0000 1111 1000 tttn #32-bit disp -+ // Note: could eliminate cond. jumps to this jump if condition -+ // is the same however, seems to be rather unlikely case. -+ EMIT(0x0F); -+ EMIT(0x80 | cc); -+ emit_disp(L, Displacement::OTHER); -+ } -+} -+ -+ -+void Assembler::j(Condition cc, byte* entry, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ DCHECK((0 <= cc) && (static_cast(cc) < 16)); -+ // 0000 1111 1000 tttn #32-bit disp. -+ EMIT(0x0F); -+ EMIT(0x80 | cc); -+ if (RelocInfo::IsRuntimeEntry(rmode)) { -+ emit(reinterpret_cast(entry), rmode); -+ } else { -+ emit(entry - (pc_ + sizeof(int32_t)), rmode); -+ } -+} -+ -+ -+void Assembler::j(Condition cc, Handle code, RelocInfo::Mode rmode) { -+ EnsureSpace ensure_space(this); -+ // 0000 1111 1000 tttn #32-bit disp -+ EMIT(0x0F); -+ EMIT(0x80 | cc); -+ emit(code, rmode); -+} -+ -+ -+// FPU instructions. -+ -+void Assembler::fld(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD9, 0xC0, i); -+} -+ -+ -+void Assembler::fstp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDD, 0xD8, i); -+} -+ -+ -+void Assembler::fld1() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xE8); -+} -+ -+ -+void Assembler::fldpi() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xEB); -+} -+ -+ -+void Assembler::fldz() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xEE); -+} -+ -+ -+void Assembler::fldln2() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xED); -+} -+ -+ -+void Assembler::fld_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ emit_operand(eax, adr); -+} -+ -+ -+void Assembler::fld_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(eax, adr); -+} -+ -+ -+void Assembler::fstp_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ emit_operand(ebx, adr); -+} -+ -+ -+void Assembler::fst_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ emit_operand(edx, adr); -+} -+ -+ -+void Assembler::fldcw(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ emit_operand(ebp, adr); -+} -+ -+ -+void Assembler::fnstcw(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ emit_operand(edi, adr); -+} -+ -+ -+void Assembler::fstp_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(ebx, adr); -+} -+ -+ -+void Assembler::fst_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(edx, adr); -+} -+ -+ -+void Assembler::fild_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ emit_operand(eax, adr); -+} -+ -+ -+void Assembler::fild_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDF); -+ emit_operand(ebp, adr); -+} -+ -+ -+void Assembler::fistp_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ emit_operand(ebx, adr); -+} -+ -+ -+void Assembler::fisttp_s(const Operand& adr) { -+ DCHECK(IsEnabled(SSE3)); -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ emit_operand(ecx, adr); -+} -+ -+ -+void Assembler::fisttp_d(const Operand& adr) { -+ DCHECK(IsEnabled(SSE3)); -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(ecx, adr); -+} -+ -+ -+void Assembler::fist_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ emit_operand(edx, adr); -+} -+ -+ -+void Assembler::fistp_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDF); -+ emit_operand(edi, adr); -+} -+ -+ -+void Assembler::fabs() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xE1); -+} -+ -+ -+void Assembler::fchs() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xE0); -+} -+ -+ -+void Assembler::fsqrt() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xFA); -+} -+ -+ -+void Assembler::fcos() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xFF); -+} -+ -+ -+void Assembler::fsin() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xFE); -+} -+ -+ -+void Assembler::fptan() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF2); -+} -+ -+ -+void Assembler::fyl2x() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF1); -+} -+ -+ -+void Assembler::f2xm1() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF0); -+} -+ -+ -+void Assembler::fscale() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xFD); -+} -+ -+ -+void Assembler::fninit() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ EMIT(0xE3); -+} -+ -+ -+void Assembler::fadd(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDC, 0xC0, i); -+} -+ -+ -+void Assembler::fadd_i(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD8, 0xC0, i); -+} -+ -+ -+void Assembler::fadd_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(eax, adr); -+} -+ -+ -+void Assembler::fsub(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDC, 0xE8, i); -+} -+ -+ -+void Assembler::fsub_i(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD8, 0xE0, i); -+} -+ -+ -+void Assembler::fsubr_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(ebp, adr); -+} -+ -+ -+void Assembler::fsub_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(esp, adr); -+} -+ -+ -+void Assembler::fisub_s(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDA); -+ emit_operand(esp, adr); -+} -+ -+ -+void Assembler::fmul_i(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD8, 0xC8, i); -+} -+ -+ -+void Assembler::fmul(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDC, 0xC8, i); -+} -+ -+ -+void Assembler::fmul_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(ecx, adr); -+} -+ -+ -+void Assembler::fdiv(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDC, 0xF8, i); -+} -+ -+ -+void Assembler::fdiv_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(esi, adr); -+} -+ -+ -+void Assembler::fdivr_d(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDC); -+ emit_operand(edi, adr); -+} -+ -+ -+void Assembler::fdiv_i(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD8, 0xF0, i); -+} -+ -+ -+void Assembler::faddp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDE, 0xC0, i); -+} -+ -+ -+void Assembler::fsubp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDE, 0xE8, i); -+} -+ -+ -+void Assembler::fsubrp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDE, 0xE0, i); -+} -+ -+ -+void Assembler::fmulp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDE, 0xC8, i); -+} -+ -+ -+void Assembler::fdivp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDE, 0xF8, i); -+} -+ -+ -+void Assembler::fprem() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF8); -+} -+ -+ -+void Assembler::fprem1() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF5); -+} -+ -+ -+void Assembler::fxch(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xD9, 0xC8, i); -+} -+ -+ -+void Assembler::fincstp() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xF7); -+} -+ -+ -+void Assembler::ffree(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDD, 0xC0, i); -+} -+ -+ -+void Assembler::ftst() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xE4); -+} -+ -+ -+void Assembler::fxam() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xE5); -+} -+ -+ -+void Assembler::fucomp(int i) { -+ EnsureSpace ensure_space(this); -+ emit_farith(0xDD, 0xE8, i); -+} -+ -+ -+void Assembler::fucompp() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDA); -+ EMIT(0xE9); -+} -+ -+ -+void Assembler::fucomi(int i) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ EMIT(0xE8 + i); -+} -+ -+ -+void Assembler::fucomip() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDF); -+ EMIT(0xE9); -+} -+ -+ -+void Assembler::fcompp() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDE); -+ EMIT(0xD9); -+} -+ -+ -+void Assembler::fnstsw_ax() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDF); -+ EMIT(0xE0); -+} -+ -+ -+void Assembler::fwait() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x9B); -+} -+ -+ -+void Assembler::frndint() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xD9); -+ EMIT(0xFC); -+} -+ -+ -+void Assembler::fnclex() { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDB); -+ EMIT(0xE2); -+} -+ -+ -+void Assembler::fnsave(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(esi, adr); -+} -+ -+ -+void Assembler::frstor(const Operand& adr) { -+ EnsureSpace ensure_space(this); -+ EMIT(0xDD); -+ emit_operand(esp, adr); -+} -+ -+ -+void Assembler::sahf() { -+ EnsureSpace ensure_space(this); -+ EMIT(0x9E); -+} -+ -+ -+void Assembler::setcc(Condition cc, Register reg) { -+ DCHECK(reg.is_byte_register()); -+ EnsureSpace ensure_space(this); -+ EMIT(0x0F); -+ EMIT(0x90 | cc); -+ EMIT(0xC0 | reg.code()); -+} -+ -+ -+void Assembler::GrowBuffer() { -+ DCHECK(buffer_overflow()); -+ if (!own_buffer_) FATAL("external code buffer is too small"); -+ -+ // Compute new buffer size. -+ CodeDesc desc; // the new buffer -+ desc.buffer_size = 2 * buffer_size_; -+ -+ // Some internal data structures overflow for very large buffers, -+ // they must ensure that kMaximalBufferSize is not too large. -+ if (desc.buffer_size > kMaximalBufferSize) { -+ V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); -+ } -+ -+ // Set up new buffer. -+ desc.buffer = NewArray(desc.buffer_size); -+ desc.origin = this; -+ desc.instr_size = pc_offset(); -+ desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos()); -+ -+ // Clear the buffer in debug mode. Use 'int3' instructions to make -+ // sure to get into problems if we ever run uninitialized code. -+#ifdef DEBUG -+ memset(desc.buffer, 0xCC, desc.buffer_size); -+#endif -+ -+ // Copy the data. -+ int pc_delta = desc.buffer - buffer_; -+ int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); -+ MemMove(desc.buffer, buffer_, desc.instr_size); -+ MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(), -+ desc.reloc_size); -+ -+ DeleteArray(buffer_); -+ buffer_ = desc.buffer; -+ buffer_size_ = desc.buffer_size; -+ pc_ += pc_delta; -+ reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta, -+ reloc_info_writer.last_pc() + pc_delta); -+ -+ // Relocate internal references. -+ for (auto pos : internal_reference_positions_) { -+ int32_t* p = reinterpret_cast(buffer_ + pos); -+ *p += pc_delta; -+ } -+ -+ DCHECK(!buffer_overflow()); -+} -+ -+ -+void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) { -+ DCHECK(is_uint8(op1) && is_uint8(op2)); // wrong opcode -+ DCHECK(is_uint8(imm8)); -+ DCHECK((op1 & 0x01) == 0); // should be 8bit operation -+ EMIT(op1); -+ EMIT(op2 | dst.code()); -+ EMIT(imm8); -+} -+ -+ -+void Assembler::emit_arith(int sel, Operand dst, const Immediate& x) { -+ DCHECK((0 <= sel) && (sel <= 7)); -+ Register ireg = { sel }; -+ if (x.is_int8()) { -+ EMIT(0x83); // using a sign-extended 8-bit immediate. -+ emit_operand(ireg, dst); -+ EMIT(x.immediate() & 0xFF); -+ } else if (dst.is_reg(eax)) { -+ EMIT((sel << 3) | 0x05); // short form if the destination is eax. -+ emit(x); -+ } else { -+ EMIT(0x81); // using a literal 32-bit immediate. -+ emit_operand(ireg, dst); -+ emit(x); -+ } -+} -+ -+ -+void Assembler::emit_operand(Register reg, const Operand& adr) { -+ const unsigned length = adr.len_; -+ DCHECK(length > 0); -+ -+ // Emit updated ModRM byte containing the given register. -+ pc_[0] = (adr.buf_[0] & ~0x38) | (reg.code() << 3); -+ -+ // Emit the rest of the encoded operand. -+ for (unsigned i = 1; i < length; i++) pc_[i] = adr.buf_[i]; -+ pc_ += length; -+ -+ // Emit relocation information if necessary. -+ if (length >= sizeof(int32_t) && !RelocInfo::IsNone(adr.rmode_)) { -+ pc_ -= sizeof(int32_t); // pc_ must be *at* disp32 -+ RecordRelocInfo(adr.rmode_); -+ if (adr.rmode_ == RelocInfo::INTERNAL_REFERENCE) { // Fixup for labels -+ emit_label(*reinterpret_cast(pc_)); -+ } else { -+ pc_ += sizeof(int32_t); -+ } -+ } -+} -+ -+ -+void Assembler::emit_label(Label* label) { -+ if (label->is_bound()) { -+ internal_reference_positions_.push_back(pc_offset()); -+ emit(reinterpret_cast(buffer_ + label->pos())); -+ } else { -+ emit_disp(label, Displacement::CODE_ABSOLUTE); -+ } -+} -+ -+ -+void Assembler::emit_farith(int b1, int b2, int i) { -+ DCHECK(is_uint8(b1) && is_uint8(b2)); // wrong opcode -+ DCHECK(0 <= i && i < 8); // illegal stack offset -+ EMIT(b1); -+ EMIT(b2 + i); -+} -+ -+ -+void Assembler::db(uint8_t data) { -+ EnsureSpace ensure_space(this); -+ EMIT(data); -+} -+ -+ -+void Assembler::dd(uint32_t data) { -+ EnsureSpace ensure_space(this); -+ emit(data); -+} -+ -+ -+void Assembler::dq(uint64_t data) { -+ EnsureSpace ensure_space(this); -+ emit_q(data); -+} -+ -+ -+void Assembler::dd(Label* label) { -+ EnsureSpace ensure_space(this); -+ RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); -+ emit_label(label); -+} -+ -+ -+void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { -+ DCHECK(!RelocInfo::IsNone(rmode)); -+ // Don't record external references unless the heap will be serialized. -+ if (rmode == RelocInfo::EXTERNAL_REFERENCE && -+ !serializer_enabled() && !emit_debug_code()) { -+ return; -+ } -+ RelocInfo rinfo(pc_, rmode, data, NULL); -+ reloc_info_writer.Write(&rinfo); -+} -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87.h 2018-02-18 19:00:54.195418178 +0100 -@@ -0,0 +1,1140 @@ -+// Copyright (c) 1994-2006 Sun Microsystems 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. -+// -+// - Redistribution in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// -+// - Neither the name of Sun Microsystems or the names of contributors may -+// be used to endorse or promote products derived from this software without -+// specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -+// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been -+// modified significantly by Google Inc. -+// Copyright 2011 the V8 project authors. All rights reserved. -+ -+// A light-weight IA32 Assembler. -+ -+#ifndef V8_X87_ASSEMBLER_X87_H_ -+#define V8_X87_ASSEMBLER_X87_H_ -+ -+#include -+ -+#include "src/assembler.h" -+#include "src/isolate.h" -+#include "src/utils.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define GENERAL_REGISTERS(V) \ -+ V(eax) \ -+ V(ecx) \ -+ V(edx) \ -+ V(ebx) \ -+ V(esp) \ -+ V(ebp) \ -+ V(esi) \ -+ V(edi) -+ -+#define ALLOCATABLE_GENERAL_REGISTERS(V) \ -+ V(eax) \ -+ V(ecx) \ -+ V(edx) \ -+ V(ebx) \ -+ V(esi) \ -+ V(edi) -+ -+#define DOUBLE_REGISTERS(V) \ -+ V(stX_0) \ -+ V(stX_1) \ -+ V(stX_2) \ -+ V(stX_3) \ -+ V(stX_4) \ -+ V(stX_5) \ -+ V(stX_6) \ -+ V(stX_7) -+ -+#define FLOAT_REGISTERS DOUBLE_REGISTERS -+#define SIMD128_REGISTERS DOUBLE_REGISTERS -+ -+#define ALLOCATABLE_DOUBLE_REGISTERS(V) \ -+ V(stX_0) \ -+ V(stX_1) \ -+ V(stX_2) \ -+ V(stX_3) \ -+ V(stX_4) \ -+ V(stX_5) -+ -+// CPU Registers. -+// -+// 1) We would prefer to use an enum, but enum values are assignment- -+// compatible with int, which has caused code-generation bugs. -+// -+// 2) We would prefer to use a class instead of a struct but we don't like -+// the register initialization to depend on the particular initialization -+// order (which appears to be different on OS X, Linux, and Windows for the -+// installed versions of C++ we tried). Using a struct permits C-style -+// "initialization". Also, the Register objects cannot be const as this -+// forces initialization stubs in MSVC, making us dependent on initialization -+// order. -+// -+// 3) By not using an enum, we are possibly preventing the compiler from -+// doing certain constant folds, which may significantly reduce the -+// code generated for some assembly instructions (because they boil down -+// to a few constants). If this is a problem, we could change the code -+// such that we use an enum in optimized mode, and the struct in debug -+// mode. This way we get the compile-time error checking in debug mode -+// and best performance in optimized code. -+// -+struct Register { -+ enum Code { -+#define REGISTER_CODE(R) kCode_##R, -+ GENERAL_REGISTERS(REGISTER_CODE) -+#undef REGISTER_CODE -+ kAfterLast, -+ kCode_no_reg = -1 -+ }; -+ -+ static const int kNumRegisters = Code::kAfterLast; -+ -+ static Register from_code(int code) { -+ DCHECK(code >= 0); -+ DCHECK(code < kNumRegisters); -+ Register r = {code}; -+ return r; -+ } -+ bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } -+ bool is(Register reg) const { return reg_code == reg.reg_code; } -+ int code() const { -+ DCHECK(is_valid()); -+ return reg_code; -+ } -+ int bit() const { -+ DCHECK(is_valid()); -+ return 1 << reg_code; -+ } -+ -+ bool is_byte_register() const { return reg_code <= 3; } -+ -+ // Unfortunately we can't make this private in a struct. -+ int reg_code; -+}; -+ -+ -+#define DECLARE_REGISTER(R) const Register R = {Register::kCode_##R}; -+GENERAL_REGISTERS(DECLARE_REGISTER) -+#undef DECLARE_REGISTER -+const Register no_reg = {Register::kCode_no_reg}; -+ -+static const bool kSimpleFPAliasing = true; -+static const bool kSimdMaskRegisters = false; -+ -+struct X87Register { -+ enum Code { -+#define REGISTER_CODE(R) kCode_##R, -+ DOUBLE_REGISTERS(REGISTER_CODE) -+#undef REGISTER_CODE -+ kAfterLast, -+ kCode_no_reg = -1 -+ }; -+ -+ static const int kMaxNumRegisters = Code::kAfterLast; -+ static const int kMaxNumAllocatableRegisters = 6; -+ -+ static X87Register from_code(int code) { -+ X87Register result = {code}; -+ return result; -+ } -+ -+ bool is_valid() const { return 0 <= reg_code && reg_code < kMaxNumRegisters; } -+ -+ int code() const { -+ DCHECK(is_valid()); -+ return reg_code; -+ } -+ -+ bool is(X87Register reg) const { return reg_code == reg.reg_code; } -+ -+ int reg_code; -+}; -+ -+typedef X87Register FloatRegister; -+ -+typedef X87Register DoubleRegister; -+ -+// TODO(x87) Define SIMD registers. -+typedef X87Register Simd128Register; -+ -+#define DECLARE_REGISTER(R) \ -+ const DoubleRegister R = {DoubleRegister::kCode_##R}; -+DOUBLE_REGISTERS(DECLARE_REGISTER) -+#undef DECLARE_REGISTER -+const DoubleRegister no_double_reg = {DoubleRegister::kCode_no_reg}; -+ -+enum Condition { -+ // any value < 0 is considered no_condition -+ no_condition = -1, -+ -+ overflow = 0, -+ no_overflow = 1, -+ below = 2, -+ above_equal = 3, -+ equal = 4, -+ not_equal = 5, -+ below_equal = 6, -+ above = 7, -+ negative = 8, -+ positive = 9, -+ parity_even = 10, -+ parity_odd = 11, -+ less = 12, -+ greater_equal = 13, -+ less_equal = 14, -+ greater = 15, -+ -+ // aliases -+ carry = below, -+ not_carry = above_equal, -+ zero = equal, -+ not_zero = not_equal, -+ sign = negative, -+ not_sign = positive -+}; -+ -+ -+// Returns the equivalent of !cc. -+// Negation of the default no_condition (-1) results in a non-default -+// no_condition value (-2). As long as tests for no_condition check -+// for condition < 0, this will work as expected. -+inline Condition NegateCondition(Condition cc) { -+ return static_cast(cc ^ 1); -+} -+ -+ -+// Commute a condition such that {a cond b == b cond' a}. -+inline Condition CommuteCondition(Condition cc) { -+ switch (cc) { -+ case below: -+ return above; -+ case above: -+ return below; -+ case above_equal: -+ return below_equal; -+ case below_equal: -+ return above_equal; -+ case less: -+ return greater; -+ case greater: -+ return less; -+ case greater_equal: -+ return less_equal; -+ case less_equal: -+ return greater_equal; -+ default: -+ return cc; -+ } -+} -+ -+ -+enum RoundingMode { -+ kRoundToNearest = 0x0, -+ kRoundDown = 0x1, -+ kRoundUp = 0x2, -+ kRoundToZero = 0x3 -+}; -+ -+ -+// ----------------------------------------------------------------------------- -+// Machine instruction Immediates -+ -+class Immediate BASE_EMBEDDED { -+ public: -+ inline explicit Immediate(int x); -+ inline explicit Immediate(const ExternalReference& ext); -+ inline explicit Immediate(Handle handle); -+ inline explicit Immediate(Smi* value); -+ inline explicit Immediate(Address addr); -+ inline explicit Immediate(Address x, RelocInfo::Mode rmode); -+ -+ static Immediate EmbeddedNumber(double number); // Smi or HeapNumber. -+ static Immediate EmbeddedCode(CodeStub* code); -+ -+ static Immediate CodeRelativeOffset(Label* label) { -+ return Immediate(label); -+ } -+ -+ bool is_heap_object_request() const { -+ DCHECK_IMPLIES(is_heap_object_request_, -+ rmode_ == RelocInfo::EMBEDDED_OBJECT || -+ rmode_ == RelocInfo::CODE_TARGET); -+ return is_heap_object_request_; -+ } -+ -+ HeapObjectRequest heap_object_request() const { -+ DCHECK(is_heap_object_request()); -+ return value_.heap_object_request; -+ } -+ -+ int immediate() const { -+ DCHECK(!is_heap_object_request()); -+ return value_.immediate; -+ } -+ -+ bool is_zero() const { return RelocInfo::IsNone(rmode_) && immediate() == 0; } -+ bool is_int8() const { -+ return RelocInfo::IsNone(rmode_) && i::is_int8(immediate()); -+ } -+ bool is_uint8() const { -+ return RelocInfo::IsNone(rmode_) && i::is_uint8(immediate()); -+ } -+ bool is_int16() const { -+ return RelocInfo::IsNone(rmode_) && i::is_int16(immediate()); -+ } -+ -+ bool is_uint16() const { -+ return RelocInfo::IsNone(rmode_) && i::is_uint16(immediate()); -+ } -+ -+ RelocInfo::Mode rmode() const { return rmode_; } -+ -+ private: -+ inline explicit Immediate(Label* value); -+ -+ union Value { -+ Value() {} -+ HeapObjectRequest heap_object_request; -+ int immediate; -+ } value_; -+ bool is_heap_object_request_ = false; -+ RelocInfo::Mode rmode_; -+ -+ friend class Operand; -+ friend class Assembler; -+ friend class MacroAssembler; -+}; -+ -+ -+// ----------------------------------------------------------------------------- -+// Machine instruction Operands -+ -+enum ScaleFactor { -+ times_1 = 0, -+ times_2 = 1, -+ times_4 = 2, -+ times_8 = 3, -+ times_int_size = times_4, -+ times_half_pointer_size = times_2, -+ times_pointer_size = times_4, -+ times_twice_pointer_size = times_8 -+}; -+ -+ -+class Operand BASE_EMBEDDED { -+ public: -+ // reg -+ INLINE(explicit Operand(Register reg)); -+ -+ // [disp/r] -+ INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); -+ -+ // [disp/r] -+ INLINE(explicit Operand(Immediate imm)); -+ -+ // [base + disp/r] -+ explicit Operand(Register base, int32_t disp, -+ RelocInfo::Mode rmode = RelocInfo::NONE32); -+ -+ // [base + index*scale + disp/r] -+ explicit Operand(Register base, -+ Register index, -+ ScaleFactor scale, -+ int32_t disp, -+ RelocInfo::Mode rmode = RelocInfo::NONE32); -+ -+ // [index*scale + disp/r] -+ explicit Operand(Register index, -+ ScaleFactor scale, -+ int32_t disp, -+ RelocInfo::Mode rmode = RelocInfo::NONE32); -+ -+ static Operand JumpTable(Register index, ScaleFactor scale, Label* table) { -+ return Operand(index, scale, reinterpret_cast(table), -+ RelocInfo::INTERNAL_REFERENCE); -+ } -+ -+ static Operand StaticVariable(const ExternalReference& ext) { -+ return Operand(reinterpret_cast(ext.address()), -+ RelocInfo::EXTERNAL_REFERENCE); -+ } -+ -+ static Operand StaticArray(Register index, -+ ScaleFactor scale, -+ const ExternalReference& arr) { -+ return Operand(index, scale, reinterpret_cast(arr.address()), -+ RelocInfo::EXTERNAL_REFERENCE); -+ } -+ -+ static Operand ForCell(Handle cell) { -+ return Operand(reinterpret_cast(cell.address()), RelocInfo::CELL); -+ } -+ -+ static Operand ForRegisterPlusImmediate(Register base, Immediate imm) { -+ return Operand(base, imm.value_.immediate, imm.rmode_); -+ } -+ -+ // Returns true if this Operand is a wrapper for the specified register. -+ bool is_reg(Register reg) const; -+ -+ // Returns true if this Operand is a wrapper for one register. -+ bool is_reg_only() const; -+ -+ // Asserts that this Operand is a wrapper for one register and returns the -+ // register. -+ Register reg() const; -+ -+ private: -+ // Set the ModRM byte without an encoded 'reg' register. The -+ // register is encoded later as part of the emit_operand operation. -+ inline void set_modrm(int mod, Register rm); -+ -+ inline void set_sib(ScaleFactor scale, Register index, Register base); -+ inline void set_disp8(int8_t disp); -+ inline void set_dispr(int32_t disp, RelocInfo::Mode rmode); -+ -+ byte buf_[6]; -+ // The number of bytes in buf_. -+ unsigned int len_; -+ // Only valid if len_ > 4. -+ RelocInfo::Mode rmode_; -+ -+ friend class Assembler; -+}; -+ -+ -+// ----------------------------------------------------------------------------- -+// A Displacement describes the 32bit immediate field of an instruction which -+// may be used together with a Label in order to refer to a yet unknown code -+// position. Displacements stored in the instruction stream are used to describe -+// the instruction and to chain a list of instructions using the same Label. -+// A Displacement contains 2 different fields: -+// -+// next field: position of next displacement in the chain (0 = end of list) -+// type field: instruction type -+// -+// A next value of null (0) indicates the end of a chain (note that there can -+// be no displacement at position zero, because there is always at least one -+// instruction byte before the displacement). -+// -+// Displacement _data field layout -+// -+// |31.....2|1......0| -+// [ next | type | -+ -+class Displacement BASE_EMBEDDED { -+ public: -+ enum Type { UNCONDITIONAL_JUMP, CODE_RELATIVE, OTHER, CODE_ABSOLUTE }; -+ -+ int data() const { return data_; } -+ Type type() const { return TypeField::decode(data_); } -+ void next(Label* L) const { -+ int n = NextField::decode(data_); -+ n > 0 ? L->link_to(n) : L->Unuse(); -+ } -+ void link_to(Label* L) { init(L, type()); } -+ -+ explicit Displacement(int data) { data_ = data; } -+ -+ Displacement(Label* L, Type type) { init(L, type); } -+ -+ void print() { -+ PrintF("%s (%x) ", (type() == UNCONDITIONAL_JUMP ? "jmp" : "[other]"), -+ NextField::decode(data_)); -+ } -+ -+ private: -+ int data_; -+ -+ class TypeField: public BitField {}; -+ class NextField: public BitField {}; -+ -+ void init(Label* L, Type type); -+}; -+ -+ -+class Assembler : public AssemblerBase { -+ private: -+ // We check before assembling an instruction that there is sufficient -+ // space to write an instruction and its relocation information. -+ // The relocation writer's position must be kGap bytes above the end of -+ // the generated instructions. This leaves enough space for the -+ // longest possible ia32 instruction, 15 bytes, and the longest possible -+ // relocation information encoding, RelocInfoWriter::kMaxLength == 16. -+ // (There is a 15 byte limit on ia32 instruction length that rules out some -+ // otherwise valid instructions.) -+ // This allows for a single, fast space check per instruction. -+ static const int kGap = 32; -+ -+ public: -+ // Create an assembler. Instructions and relocation information are emitted -+ // into a buffer, with the instructions starting from the beginning and the -+ // relocation information starting from the end of the buffer. See CodeDesc -+ // for a detailed comment on the layout (globals.h). -+ // -+ // If the provided buffer is NULL, the assembler allocates and grows its own -+ // buffer, and buffer_size determines the initial buffer size. The buffer is -+ // owned by the assembler and deallocated upon destruction of the assembler. -+ // -+ // If the provided buffer is not NULL, the assembler uses the provided buffer -+ // for code generation and assumes its size to be buffer_size. If the buffer -+ // is too small, a fatal error occurs. No deallocation of the buffer is done -+ // upon destruction of the assembler. -+ Assembler(Isolate* isolate, void* buffer, int buffer_size) -+ : Assembler(IsolateData(isolate), buffer, buffer_size) {} -+ Assembler(IsolateData isolate_data, void* buffer, int buffer_size); -+ virtual ~Assembler() {} -+ -+ // GetCode emits any pending (non-emitted) code and fills the descriptor -+ // desc. GetCode() is idempotent; it returns the same result if no other -+ // Assembler functions are invoked in between GetCode() calls. -+ void GetCode(Isolate* isolate, CodeDesc* desc); -+ -+ // Read/Modify the code target in the branch/call instruction at pc. -+ // The isolate argument is unused (and may be nullptr) when skipping flushing. -+ inline static Address target_address_at(Address pc, Address constant_pool); -+ inline static void set_target_address_at( -+ Isolate* isolate, Address pc, Address constant_pool, Address target, -+ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); -+ static inline Address target_address_at(Address pc, Code* code); -+ static inline void set_target_address_at( -+ Isolate* isolate, Address pc, Code* code, Address target, -+ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); -+ -+ // Return the code target address at a call site from the return address -+ // of that call in the instruction stream. -+ inline static Address target_address_from_return_address(Address pc); -+ -+ // This sets the branch destination (which is in the instruction on x86). -+ // This is for calls and branches within generated code. -+ inline static void deserialization_set_special_target_at( -+ Isolate* isolate, Address instruction_payload, Code* code, -+ Address target) { -+ set_target_address_at(isolate, instruction_payload, code, target); -+ } -+ -+ // This sets the internal reference at the pc. -+ inline static void deserialization_set_target_internal_reference_at( -+ Isolate* isolate, Address pc, Address target, -+ RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); -+ -+ static const int kSpecialTargetSize = kPointerSize; -+ -+ // Distance between the address of the code target in the call instruction -+ // and the return address -+ static const int kCallTargetAddressOffset = kPointerSize; -+ -+ static const int kCallInstructionLength = 5; -+ -+ // The debug break slot must be able to contain a call instruction. -+ static const int kDebugBreakSlotLength = kCallInstructionLength; -+ -+ // Distance between start of patched debug break slot and the emitted address -+ // to jump to. -+ static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32. -+ -+ // One byte opcode for test al, 0xXX. -+ static const byte kTestAlByte = 0xA8; -+ // One byte opcode for nop. -+ static const byte kNopByte = 0x90; -+ -+ // One byte opcode for a short unconditional jump. -+ static const byte kJmpShortOpcode = 0xEB; -+ // One byte prefix for a short conditional jump. -+ static const byte kJccShortPrefix = 0x70; -+ static const byte kJncShortOpcode = kJccShortPrefix | not_carry; -+ static const byte kJcShortOpcode = kJccShortPrefix | carry; -+ static const byte kJnzShortOpcode = kJccShortPrefix | not_zero; -+ static const byte kJzShortOpcode = kJccShortPrefix | zero; -+ -+ -+ // --------------------------------------------------------------------------- -+ // Code generation -+ // -+ // - function names correspond one-to-one to ia32 instruction mnemonics -+ // - unless specified otherwise, instructions operate on 32bit operands -+ // - instructions on 8bit (byte) operands/registers have a trailing '_b' -+ // - instructions on 16bit (word) operands/registers have a trailing '_w' -+ // - naming conflicts with C++ keywords are resolved via a trailing '_' -+ -+ // NOTE ON INTERFACE: Currently, the interface is not very consistent -+ // in the sense that some operations (e.g. mov()) can be called in more -+ // the one way to generate the same instruction: The Register argument -+ // can in some cases be replaced with an Operand(Register) argument. -+ // This should be cleaned up and made more orthogonal. The questions -+ // is: should we always use Operands instead of Registers where an -+ // Operand is possible, or should we have a Register (overloaded) form -+ // instead? We must be careful to make sure that the selected instruction -+ // is obvious from the parameters to avoid hard-to-find code generation -+ // bugs. -+ -+ // Insert the smallest number of nop instructions -+ // possible to align the pc offset to a multiple -+ // of m. m must be a power of 2. -+ void Align(int m); -+ // Insert the smallest number of zero bytes possible to align the pc offset -+ // to a mulitple of m. m must be a power of 2 (>= 2). -+ void DataAlign(int m); -+ void Nop(int bytes = 1); -+ // Aligns code to something that's optimal for a jump target for the platform. -+ void CodeTargetAlign(); -+ -+ // Stack -+ void pushad(); -+ void popad(); -+ -+ void pushfd(); -+ void popfd(); -+ -+ void push(const Immediate& x); -+ void push_imm32(int32_t imm32); -+ void push(Register src); -+ void push(const Operand& src); -+ -+ void pop(Register dst); -+ void pop(const Operand& dst); -+ -+ void enter(const Immediate& size); -+ void leave(); -+ -+ // Moves -+ void mov_b(Register dst, Register src) { mov_b(dst, Operand(src)); } -+ void mov_b(Register dst, const Operand& src); -+ void mov_b(Register dst, int8_t imm8) { mov_b(Operand(dst), imm8); } -+ void mov_b(const Operand& dst, int8_t imm8); -+ void mov_b(const Operand& dst, const Immediate& src); -+ void mov_b(const Operand& dst, Register src); -+ -+ void mov_w(Register dst, const Operand& src); -+ void mov_w(const Operand& dst, Register src); -+ void mov_w(const Operand& dst, int16_t imm16); -+ void mov_w(const Operand& dst, const Immediate& src); -+ -+ -+ void mov(Register dst, int32_t imm32); -+ void mov(Register dst, const Immediate& x); -+ void mov(Register dst, Handle handle); -+ void mov(Register dst, const Operand& src); -+ void mov(Register dst, Register src); -+ void mov(const Operand& dst, const Immediate& x); -+ void mov(const Operand& dst, Handle handle); -+ void mov(const Operand& dst, Register src); -+ -+ void movsx_b(Register dst, Register src) { movsx_b(dst, Operand(src)); } -+ void movsx_b(Register dst, const Operand& src); -+ -+ void movsx_w(Register dst, Register src) { movsx_w(dst, Operand(src)); } -+ void movsx_w(Register dst, const Operand& src); -+ -+ void movzx_b(Register dst, Register src) { movzx_b(dst, Operand(src)); } -+ void movzx_b(Register dst, const Operand& src); -+ -+ void movzx_w(Register dst, Register src) { movzx_w(dst, Operand(src)); } -+ void movzx_w(Register dst, const Operand& src); -+ -+ // Flag management. -+ void cld(); -+ -+ // Repetitive string instructions. -+ void rep_movs(); -+ void rep_stos(); -+ void stos(); -+ -+ // Exchange -+ void xchg(Register dst, Register src); -+ void xchg(Register dst, const Operand& src); -+ void xchg_b(Register reg, const Operand& op); -+ void xchg_w(Register reg, const Operand& op); -+ -+ // Lock prefix -+ void lock(); -+ -+ // CompareExchange -+ void cmpxchg(const Operand& dst, Register src); -+ void cmpxchg_b(const Operand& dst, Register src); -+ void cmpxchg_w(const Operand& dst, Register src); -+ -+ // Arithmetics -+ void adc(Register dst, int32_t imm32); -+ void adc(Register dst, const Operand& src); -+ -+ void add(Register dst, Register src) { add(dst, Operand(src)); } -+ void add(Register dst, const Operand& src); -+ void add(const Operand& dst, Register src); -+ void add(Register dst, const Immediate& imm) { add(Operand(dst), imm); } -+ void add(const Operand& dst, const Immediate& x); -+ -+ void and_(Register dst, int32_t imm32); -+ void and_(Register dst, const Immediate& x); -+ void and_(Register dst, Register src) { and_(dst, Operand(src)); } -+ void and_(Register dst, const Operand& src); -+ void and_(const Operand& dst, Register src); -+ void and_(const Operand& dst, const Immediate& x); -+ -+ void cmpb(Register reg, Immediate imm8) { cmpb(Operand(reg), imm8); } -+ void cmpb(const Operand& op, Immediate imm8); -+ void cmpb(Register reg, const Operand& op); -+ void cmpb(const Operand& op, Register reg); -+ void cmpb(Register dst, Register src) { cmpb(Operand(dst), src); } -+ void cmpb_al(const Operand& op); -+ void cmpw_ax(const Operand& op); -+ void cmpw(const Operand& dst, Immediate src); -+ void cmpw(Register dst, Immediate src) { cmpw(Operand(dst), src); } -+ void cmpw(Register dst, const Operand& src); -+ void cmpw(Register dst, Register src) { cmpw(Operand(dst), src); } -+ void cmpw(const Operand& dst, Register src); -+ void cmp(Register reg, int32_t imm32); -+ void cmp(Register reg, Handle handle); -+ void cmp(Register reg0, Register reg1) { cmp(reg0, Operand(reg1)); } -+ void cmp(Register reg, const Operand& op); -+ void cmp(Register reg, const Immediate& imm) { cmp(Operand(reg), imm); } -+ void cmp(const Operand& op, Register reg); -+ void cmp(const Operand& op, const Immediate& imm); -+ void cmp(const Operand& op, Handle handle); -+ -+ void dec_b(Register dst); -+ void dec_b(const Operand& dst); -+ -+ void dec(Register dst); -+ void dec(const Operand& dst); -+ -+ void cdq(); -+ -+ void idiv(Register src) { idiv(Operand(src)); } -+ void idiv(const Operand& src); -+ void div(Register src) { div(Operand(src)); } -+ void div(const Operand& src); -+ -+ // Signed multiply instructions. -+ void imul(Register src); // edx:eax = eax * src. -+ void imul(Register dst, Register src) { imul(dst, Operand(src)); } -+ void imul(Register dst, const Operand& src); // dst = dst * src. -+ void imul(Register dst, Register src, int32_t imm32); // dst = src * imm32. -+ void imul(Register dst, const Operand& src, int32_t imm32); -+ -+ void inc(Register dst); -+ void inc(const Operand& dst); -+ -+ void lea(Register dst, const Operand& src); -+ -+ // Unsigned multiply instruction. -+ void mul(Register src); // edx:eax = eax * reg. -+ -+ void neg(Register dst); -+ void neg(const Operand& dst); -+ -+ void not_(Register dst); -+ void not_(const Operand& dst); -+ -+ void or_(Register dst, int32_t imm32); -+ void or_(Register dst, Register src) { or_(dst, Operand(src)); } -+ void or_(Register dst, const Operand& src); -+ void or_(const Operand& dst, Register src); -+ void or_(Register dst, const Immediate& imm) { or_(Operand(dst), imm); } -+ void or_(const Operand& dst, const Immediate& x); -+ -+ void rcl(Register dst, uint8_t imm8); -+ void rcr(Register dst, uint8_t imm8); -+ -+ void ror(Register dst, uint8_t imm8) { ror(Operand(dst), imm8); } -+ void ror(const Operand& dst, uint8_t imm8); -+ void ror_cl(Register dst) { ror_cl(Operand(dst)); } -+ void ror_cl(const Operand& dst); -+ -+ void sar(Register dst, uint8_t imm8) { sar(Operand(dst), imm8); } -+ void sar(const Operand& dst, uint8_t imm8); -+ void sar_cl(Register dst) { sar_cl(Operand(dst)); } -+ void sar_cl(const Operand& dst); -+ -+ void sbb(Register dst, const Operand& src); -+ -+ void shl(Register dst, uint8_t imm8) { shl(Operand(dst), imm8); } -+ void shl(const Operand& dst, uint8_t imm8); -+ void shl_cl(Register dst) { shl_cl(Operand(dst)); } -+ void shl_cl(const Operand& dst); -+ void shld(Register dst, Register src, uint8_t shift); -+ void shld_cl(Register dst, Register src); -+ -+ void shr(Register dst, uint8_t imm8) { shr(Operand(dst), imm8); } -+ void shr(const Operand& dst, uint8_t imm8); -+ void shr_cl(Register dst) { shr_cl(Operand(dst)); } -+ void shr_cl(const Operand& dst); -+ void shrd(Register dst, Register src, uint8_t shift); -+ void shrd_cl(Register dst, Register src) { shrd_cl(Operand(dst), src); } -+ void shrd_cl(const Operand& dst, Register src); -+ -+ void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } -+ void sub(const Operand& dst, const Immediate& x); -+ void sub(Register dst, Register src) { sub(dst, Operand(src)); } -+ void sub(Register dst, const Operand& src); -+ void sub(const Operand& dst, Register src); -+ -+ void test(Register reg, const Immediate& imm); -+ void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } -+ void test(Register reg, const Operand& op); -+ void test(const Operand& op, const Immediate& imm); -+ void test(const Operand& op, Register reg) { test(reg, op); } -+ void test_b(Register reg, const Operand& op); -+ void test_b(Register reg, Immediate imm8); -+ void test_b(const Operand& op, Immediate imm8); -+ void test_b(const Operand& op, Register reg) { test_b(reg, op); } -+ void test_b(Register dst, Register src) { test_b(dst, Operand(src)); } -+ void test_w(Register reg, const Operand& op); -+ void test_w(Register reg, Immediate imm16); -+ void test_w(const Operand& op, Immediate imm16); -+ void test_w(const Operand& op, Register reg) { test_w(reg, op); } -+ void test_w(Register dst, Register src) { test_w(dst, Operand(src)); } -+ -+ void xor_(Register dst, int32_t imm32); -+ void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } -+ void xor_(Register dst, const Operand& src); -+ void xor_(const Operand& dst, Register src); -+ void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); } -+ void xor_(const Operand& dst, const Immediate& x); -+ -+ // Bit operations. -+ void bt(const Operand& dst, Register src); -+ void bts(Register dst, Register src) { bts(Operand(dst), src); } -+ void bts(const Operand& dst, Register src); -+ void bsr(Register dst, Register src) { bsr(dst, Operand(src)); } -+ void bsr(Register dst, const Operand& src); -+ void bsf(Register dst, Register src) { bsf(dst, Operand(src)); } -+ void bsf(Register dst, const Operand& src); -+ -+ // Miscellaneous -+ void hlt(); -+ void int3(); -+ void nop(); -+ void ret(int imm16); -+ void ud2(); -+ -+ // Label operations & relative jumps (PPUM Appendix D) -+ // -+ // Takes a branch opcode (cc) and a label (L) and generates -+ // either a backward branch or a forward branch and links it -+ // to the label fixup chain. Usage: -+ // -+ // Label L; // unbound label -+ // j(cc, &L); // forward branch to unbound label -+ // bind(&L); // bind label to the current pc -+ // j(cc, &L); // backward branch to bound label -+ // bind(&L); // illegal: a label may be bound only once -+ // -+ // Note: The same Label can be used for forward and backward branches -+ // but it may be bound only once. -+ -+ void bind(Label* L); // binds an unbound label L to the current code position -+ -+ // Calls -+ void call(Label* L); -+ void call(byte* entry, RelocInfo::Mode rmode); -+ int CallSize(const Operand& adr); -+ void call(Register reg) { call(Operand(reg)); } -+ void call(const Operand& adr); -+ int CallSize(Handle code, RelocInfo::Mode mode); -+ void call(Handle code, RelocInfo::Mode rmode); -+ void call(CodeStub* stub); -+ -+ // Jumps -+ // unconditional jump to L -+ void jmp(Label* L, Label::Distance distance = Label::kFar); -+ void jmp(byte* entry, RelocInfo::Mode rmode); -+ void jmp(Register reg) { jmp(Operand(reg)); } -+ void jmp(const Operand& adr); -+ void jmp(Handle code, RelocInfo::Mode rmode); -+ -+ // Conditional jumps -+ void j(Condition cc, -+ Label* L, -+ Label::Distance distance = Label::kFar); -+ void j(Condition cc, byte* entry, RelocInfo::Mode rmode); -+ void j(Condition cc, Handle code, -+ RelocInfo::Mode rmode = RelocInfo::CODE_TARGET); -+ -+ // Floating-point operations -+ void fld(int i); -+ void fstp(int i); -+ -+ void fld1(); -+ void fldz(); -+ void fldpi(); -+ void fldln2(); -+ -+ void fld_s(const Operand& adr); -+ void fld_d(const Operand& adr); -+ -+ void fstp_s(const Operand& adr); -+ void fst_s(const Operand& adr); -+ void fstp_d(const Operand& adr); -+ void fst_d(const Operand& adr); -+ -+ void fild_s(const Operand& adr); -+ void fild_d(const Operand& adr); -+ -+ void fist_s(const Operand& adr); -+ -+ void fistp_s(const Operand& adr); -+ void fistp_d(const Operand& adr); -+ -+ // The fisttp instructions require SSE3. -+ void fisttp_s(const Operand& adr); -+ void fisttp_d(const Operand& adr); -+ -+ void fabs(); -+ void fchs(); -+ void fsqrt(); -+ void fcos(); -+ void fsin(); -+ void fptan(); -+ void fyl2x(); -+ void f2xm1(); -+ void fscale(); -+ void fninit(); -+ -+ void fadd(int i); -+ void fadd_i(int i); -+ void fadd_d(const Operand& adr); -+ void fsub(int i); -+ void fsub_i(int i); -+ void fsub_d(const Operand& adr); -+ void fsubr_d(const Operand& adr); -+ void fmul(int i); -+ void fmul_d(const Operand& adr); -+ void fmul_i(int i); -+ void fdiv(int i); -+ void fdiv_d(const Operand& adr); -+ void fdivr_d(const Operand& adr); -+ void fdiv_i(int i); -+ -+ void fisub_s(const Operand& adr); -+ -+ void faddp(int i = 1); -+ void fsubp(int i = 1); -+ void fsubr(int i = 1); -+ void fsubrp(int i = 1); -+ void fmulp(int i = 1); -+ void fdivp(int i = 1); -+ void fprem(); -+ void fprem1(); -+ -+ void fxch(int i = 1); -+ void fincstp(); -+ void ffree(int i = 0); -+ -+ void ftst(); -+ void fxam(); -+ void fucomp(int i); -+ void fucompp(); -+ void fucomi(int i); -+ void fucomip(); -+ void fcompp(); -+ void fnstsw_ax(); -+ void fldcw(const Operand& adr); -+ void fnstcw(const Operand& adr); -+ void fwait(); -+ void fnclex(); -+ void fnsave(const Operand& adr); -+ void frstor(const Operand& adr); -+ -+ void frndint(); -+ -+ void sahf(); -+ void setcc(Condition cc, Register reg); -+ -+ void cpuid(); -+ -+ // TODO(lrn): Need SFENCE for movnt? -+ -+ // Check the code size generated from label to here. -+ int SizeOfCodeGeneratedSince(Label* label) { -+ return pc_offset() - label->pos(); -+ } -+ -+ // Mark address of a debug break slot. -+ void RecordDebugBreakSlot(RelocInfo::Mode mode); -+ -+ // Record a comment relocation entry that can be used by a disassembler. -+ // Use --code-comments to enable. -+ void RecordComment(const char* msg); -+ -+ // Record a deoptimization reason that can be used by a log or cpu profiler. -+ // Use --trace-deopt to enable. -+ void RecordDeoptReason(DeoptimizeReason reason, SourcePosition position, -+ int id); -+ -+ // Writes a single byte or word of data in the code stream. Used for -+ // inline tables, e.g., jump-tables. -+ void db(uint8_t data); -+ void dd(uint32_t data); -+ void dq(uint64_t data); -+ void dp(uintptr_t data) { dd(data); } -+ void dd(Label* label); -+ -+ // Check if there is less than kGap bytes available in the buffer. -+ // If this is the case, we need to grow the buffer before emitting -+ // an instruction or relocation information. -+ inline bool buffer_overflow() const { -+ return pc_ >= reloc_info_writer.pos() - kGap; -+ } -+ -+ // Get the number of bytes available in the buffer. -+ inline int available_space() const { return reloc_info_writer.pos() - pc_; } -+ -+ static bool IsNop(Address addr); -+ -+ int relocation_writer_size() { -+ return (buffer_ + buffer_size_) - reloc_info_writer.pos(); -+ } -+ -+ // Avoid overflows for displacements etc. -+ static const int kMaximalBufferSize = 512*MB; -+ -+ byte byte_at(int pos) { return buffer_[pos]; } -+ void set_byte_at(int pos, byte value) { buffer_[pos] = value; } -+ -+ void PatchConstantPoolAccessInstruction(int pc_offset, int offset, -+ ConstantPoolEntry::Access access, -+ ConstantPoolEntry::Type type) { -+ // No embedded constant pool support. -+ UNREACHABLE(); -+ } -+ -+ protected: -+ byte* addr_at(int pos) { return buffer_ + pos; } -+ -+ -+ private: -+ uint32_t long_at(int pos) { -+ return *reinterpret_cast(addr_at(pos)); -+ } -+ void long_at_put(int pos, uint32_t x) { -+ *reinterpret_cast(addr_at(pos)) = x; -+ } -+ -+ // code emission -+ void GrowBuffer(); -+ inline void emit(uint32_t x); -+ inline void emit(Handle handle); -+ inline void emit(uint32_t x, RelocInfo::Mode rmode); -+ inline void emit(Handle code, RelocInfo::Mode rmode); -+ inline void emit(const Immediate& x); -+ inline void emit_b(Immediate x); -+ inline void emit_w(const Immediate& x); -+ inline void emit_q(uint64_t x); -+ -+ // Emit the code-object-relative offset of the label's position -+ inline void emit_code_relative_offset(Label* label); -+ -+ // instruction generation -+ void emit_arith_b(int op1, int op2, Register dst, int imm8); -+ -+ // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) -+ // with a given destination expression and an immediate operand. It attempts -+ // to use the shortest encoding possible. -+ // sel specifies the /n in the modrm byte (see the Intel PRM). -+ void emit_arith(int sel, Operand dst, const Immediate& x); -+ -+ void emit_operand(Register reg, const Operand& adr); -+ -+ void emit_label(Label* label); -+ -+ void emit_farith(int b1, int b2, int i); -+ -+ // labels -+ void print(Label* L); -+ void bind_to(Label* L, int pos); -+ -+ // displacements -+ inline Displacement disp_at(Label* L); -+ inline void disp_at_put(Label* L, Displacement disp); -+ inline void emit_disp(Label* L, Displacement::Type type); -+ inline void emit_near_disp(Label* L); -+ -+ // record reloc info for current pc_ -+ void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); -+ -+ friend class CodePatcher; -+ friend class EnsureSpace; -+ -+ // Internal reference positions, required for (potential) patching in -+ // GrowBuffer(); contains only those internal references whose labels -+ // are already bound. -+ std::deque internal_reference_positions_; -+ -+ // code generation -+ RelocInfoWriter reloc_info_writer; -+ -+ // The following functions help with avoiding allocations of embedded heap -+ // objects during the code assembly phase. {RequestHeapObject} records the -+ // need for a future heap number allocation or code stub generation. After -+ // code assembly, {AllocateAndInstallRequestedHeapObjects} will allocate these -+ // objects and place them where they are expected (determined by the pc offset -+ // associated with each request). That is, for each request, it will patch the -+ // dummy heap object handle that we emitted during code assembly with the -+ // actual heap object handle. -+ void RequestHeapObject(HeapObjectRequest request); -+ void AllocateAndInstallRequestedHeapObjects(Isolate* isolate); -+ -+ std::forward_list heap_object_requests_; -+}; -+ -+ -+// Helper class that ensures that there is enough space for generating -+// instructions and relocation information. The constructor makes -+// sure that there is enough space and (in debug mode) the destructor -+// checks that we did not generate too much. -+class EnsureSpace BASE_EMBEDDED { -+ public: -+ explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { -+ if (assembler_->buffer_overflow()) assembler_->GrowBuffer(); -+#ifdef DEBUG -+ space_before_ = assembler_->available_space(); -+#endif -+ } -+ -+#ifdef DEBUG -+ ~EnsureSpace() { -+ int bytes_generated = space_before_ - assembler_->available_space(); -+ DCHECK(bytes_generated < assembler_->kGap); -+ } -+#endif -+ -+ private: -+ Assembler* assembler_; -+#ifdef DEBUG -+ int space_before_; -+#endif -+}; -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/assembler-x87-inl.h 2018-02-18 19:00:54.195418178 +0100 -@@ -0,0 +1,528 @@ -+// Copyright (c) 1994-2006 Sun Microsystems 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. -+// -+// - Redistribution in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// -+// - Neither the name of Sun Microsystems or the names of contributors may -+// be used to endorse or promote products derived from this software without -+// specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -+// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -+// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 original source code covered by the above license above has been -+// modified significantly by Google Inc. -+// Copyright 2012 the V8 project authors. All rights reserved. -+ -+// A light-weight IA32 Assembler. -+ -+#ifndef V8_X87_ASSEMBLER_X87_INL_H_ -+#define V8_X87_ASSEMBLER_X87_INL_H_ -+ -+#include "src/x87/assembler-x87.h" -+ -+#include "src/assembler.h" -+#include "src/debug/debug.h" -+#include "src/objects-inl.h" -+ -+namespace v8 { -+namespace internal { -+ -+bool CpuFeatures::SupportsCrankshaft() { return true; } -+ -+bool CpuFeatures::SupportsWasmSimd128() { return false; } -+ -+static const byte kCallOpcode = 0xE8; -+static const int kNoCodeAgeSequenceLength = 5; -+ -+ -+// The modes possibly affected by apply must be in kApplyMask. -+void RelocInfo::apply(intptr_t delta) { -+ if (IsRuntimeEntry(rmode_) || IsCodeTarget(rmode_)) { -+ int32_t* p = reinterpret_cast(pc_); -+ *p -= delta; // Relocate entry. -+ } else if (IsCodeAgeSequence(rmode_)) { -+ if (*pc_ == kCallOpcode) { -+ int32_t* p = reinterpret_cast(pc_ + 1); -+ *p -= delta; // Relocate entry. -+ } -+ } else if (IsDebugBreakSlot(rmode_) && IsPatchedDebugBreakSlotSequence()) { -+ // Special handling of a debug break slot when a break point is set (call -+ // instruction has been inserted). -+ int32_t* p = reinterpret_cast( -+ pc_ + Assembler::kPatchDebugBreakSlotAddressOffset); -+ *p -= delta; // Relocate entry. -+ } else if (IsInternalReference(rmode_)) { -+ // absolute code pointer inside code object moves with the code object. -+ int32_t* p = reinterpret_cast(pc_); -+ *p += delta; // Relocate entry. -+ } -+} -+ -+ -+Address RelocInfo::target_address() { -+ DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); -+ return Assembler::target_address_at(pc_, host_); -+} -+ -+Address RelocInfo::target_address_address() { -+ DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) -+ || rmode_ == EMBEDDED_OBJECT -+ || rmode_ == EXTERNAL_REFERENCE); -+ return reinterpret_cast
(pc_); -+} -+ -+ -+Address RelocInfo::constant_pool_entry_address() { -+ UNREACHABLE(); -+} -+ -+ -+int RelocInfo::target_address_size() { -+ return Assembler::kSpecialTargetSize; -+} -+ -+HeapObject* RelocInfo::target_object() { -+ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); -+ return HeapObject::cast(Memory::Object_at(pc_)); -+} -+ -+Handle RelocInfo::target_object_handle(Assembler* origin) { -+ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); -+ return Handle::cast(Memory::Object_Handle_at(pc_)); -+} -+ -+void RelocInfo::set_target_object(HeapObject* target, -+ WriteBarrierMode write_barrier_mode, -+ ICacheFlushMode icache_flush_mode) { -+ DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); -+ Memory::Object_at(pc_) = target; -+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { -+ Assembler::FlushICache(target->GetIsolate(), pc_, sizeof(Address)); -+ } -+ if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != nullptr) { -+ host()->GetHeap()->RecordWriteIntoCode(host(), this, target); -+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, -+ target); -+ } -+} -+ -+ -+Address RelocInfo::target_external_reference() { -+ DCHECK(rmode_ == RelocInfo::EXTERNAL_REFERENCE); -+ return Memory::Address_at(pc_); -+} -+ -+ -+Address RelocInfo::target_internal_reference() { -+ DCHECK(rmode_ == INTERNAL_REFERENCE); -+ return Memory::Address_at(pc_); -+} -+ -+ -+Address RelocInfo::target_internal_reference_address() { -+ DCHECK(rmode_ == INTERNAL_REFERENCE); -+ return reinterpret_cast
(pc_); -+} -+ -+ -+Address RelocInfo::target_runtime_entry(Assembler* origin) { -+ DCHECK(IsRuntimeEntry(rmode_)); -+ return reinterpret_cast
(*reinterpret_cast(pc_)); -+} -+ -+void RelocInfo::set_target_runtime_entry(Isolate* isolate, Address target, -+ WriteBarrierMode write_barrier_mode, -+ ICacheFlushMode icache_flush_mode) { -+ DCHECK(IsRuntimeEntry(rmode_)); -+ if (target_address() != target) { -+ set_target_address(isolate, target, write_barrier_mode, icache_flush_mode); -+ } -+} -+ -+ -+Handle RelocInfo::target_cell_handle() { -+ DCHECK(rmode_ == RelocInfo::CELL); -+ Address address = Memory::Address_at(pc_); -+ return Handle(reinterpret_cast(address)); -+} -+ -+ -+Cell* RelocInfo::target_cell() { -+ DCHECK(rmode_ == RelocInfo::CELL); -+ return Cell::FromValueAddress(Memory::Address_at(pc_)); -+} -+ -+ -+void RelocInfo::set_target_cell(Cell* cell, -+ WriteBarrierMode write_barrier_mode, -+ ICacheFlushMode icache_flush_mode) { -+ DCHECK(cell->IsCell()); -+ DCHECK(rmode_ == RelocInfo::CELL); -+ Address address = cell->address() + Cell::kValueOffset; -+ Memory::Address_at(pc_) = address; -+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { -+ Assembler::FlushICache(cell->GetIsolate(), pc_, sizeof(Address)); -+ } -+ if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { -+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, -+ cell); -+ } -+} -+ -+Handle RelocInfo::code_age_stub_handle(Assembler* origin) { -+ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); -+ DCHECK(*pc_ == kCallOpcode); -+ return Handle::cast(Memory::Object_Handle_at(pc_ + 1)); -+} -+ -+ -+Code* RelocInfo::code_age_stub() { -+ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); -+ DCHECK(*pc_ == kCallOpcode); -+ return Code::GetCodeFromTargetAddress( -+ Assembler::target_address_at(pc_ + 1, host_)); -+} -+ -+ -+void RelocInfo::set_code_age_stub(Code* stub, -+ ICacheFlushMode icache_flush_mode) { -+ DCHECK(*pc_ == kCallOpcode); -+ DCHECK(rmode_ == RelocInfo::CODE_AGE_SEQUENCE); -+ Assembler::set_target_address_at(stub->GetIsolate(), pc_ + 1, host_, -+ stub->instruction_start(), -+ icache_flush_mode); -+} -+ -+ -+Address RelocInfo::debug_call_address() { -+ DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); -+ Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; -+ return Assembler::target_address_at(location, host_); -+} -+ -+void RelocInfo::set_debug_call_address(Isolate* isolate, Address target) { -+ DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); -+ Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; -+ Assembler::set_target_address_at(isolate, location, host_, target); -+ if (host() != NULL) { -+ Code* target_code = Code::GetCodeFromTargetAddress(target); -+ host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, -+ target_code); -+ } -+} -+ -+void RelocInfo::WipeOut(Isolate* isolate) { -+ if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || -+ IsInternalReference(rmode_)) { -+ Memory::Address_at(pc_) = NULL; -+ } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { -+ // Effectively write zero into the relocation. -+ Assembler::set_target_address_at(isolate, pc_, host_, -+ pc_ + sizeof(int32_t)); -+ } else { -+ UNREACHABLE(); -+ } -+} -+ -+template -+void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { -+ RelocInfo::Mode mode = rmode(); -+ if (mode == RelocInfo::EMBEDDED_OBJECT) { -+ visitor->VisitEmbeddedPointer(host(), this); -+ Assembler::FlushICache(isolate, pc_, sizeof(Address)); -+ } else if (RelocInfo::IsCodeTarget(mode)) { -+ visitor->VisitCodeTarget(host(), this); -+ } else if (mode == RelocInfo::CELL) { -+ visitor->VisitCellPointer(host(), this); -+ } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { -+ visitor->VisitExternalReference(host(), this); -+ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { -+ visitor->VisitInternalReference(host(), this); -+ } else if (RelocInfo::IsCodeAgeSequence(mode)) { -+ visitor->VisitCodeAgeSequence(host(), this); -+ } else if (RelocInfo::IsDebugBreakSlot(mode) && -+ IsPatchedDebugBreakSlotSequence()) { -+ visitor->VisitDebugTarget(host(), this); -+ } else if (IsRuntimeEntry(mode)) { -+ visitor->VisitRuntimeEntry(host(), this); -+ } -+} -+ -+ -+template -+void RelocInfo::Visit(Heap* heap) { -+ RelocInfo::Mode mode = rmode(); -+ if (mode == RelocInfo::EMBEDDED_OBJECT) { -+ StaticVisitor::VisitEmbeddedPointer(heap, this); -+ Assembler::FlushICache(heap->isolate(), pc_, sizeof(Address)); -+ } else if (RelocInfo::IsCodeTarget(mode)) { -+ StaticVisitor::VisitCodeTarget(heap, this); -+ } else if (mode == RelocInfo::CELL) { -+ StaticVisitor::VisitCell(heap, this); -+ } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { -+ StaticVisitor::VisitExternalReference(this); -+ } else if (mode == RelocInfo::INTERNAL_REFERENCE) { -+ StaticVisitor::VisitInternalReference(this); -+ } else if (RelocInfo::IsCodeAgeSequence(mode)) { -+ StaticVisitor::VisitCodeAgeSequence(heap, this); -+ } else if (RelocInfo::IsDebugBreakSlot(mode) && -+ IsPatchedDebugBreakSlotSequence()) { -+ StaticVisitor::VisitDebugTarget(heap, this); -+ } else if (IsRuntimeEntry(mode)) { -+ StaticVisitor::VisitRuntimeEntry(this); -+ } -+} -+ -+ -+ -+Immediate::Immediate(int x) { -+ value_.immediate = x; -+ rmode_ = RelocInfo::NONE32; -+} -+ -+Immediate::Immediate(Address x, RelocInfo::Mode rmode) { -+ value_.immediate = reinterpret_cast(x); -+ rmode_ = rmode; -+} -+ -+Immediate::Immediate(const ExternalReference& ext) { -+ value_.immediate = reinterpret_cast(ext.address()); -+ rmode_ = RelocInfo::EXTERNAL_REFERENCE; -+} -+ -+ -+Immediate::Immediate(Label* internal_offset) { -+ value_.immediate = reinterpret_cast(internal_offset); -+ rmode_ = RelocInfo::INTERNAL_REFERENCE; -+} -+ -+ -+Immediate::Immediate(Handle handle) { -+ value_.immediate = reinterpret_cast(handle.address()); -+ rmode_ = RelocInfo::EMBEDDED_OBJECT; -+} -+ -+ -+Immediate::Immediate(Smi* value) { -+ value_.immediate = reinterpret_cast(value); -+ rmode_ = RelocInfo::NONE32; -+} -+ -+ -+Immediate::Immediate(Address addr) { -+ value_.immediate = reinterpret_cast(addr); -+ rmode_ = RelocInfo::NONE32; -+} -+ -+ -+void Assembler::emit(uint32_t x) { -+ *reinterpret_cast(pc_) = x; -+ pc_ += sizeof(uint32_t); -+} -+ -+ -+void Assembler::emit_q(uint64_t x) { -+ *reinterpret_cast(pc_) = x; -+ pc_ += sizeof(uint64_t); -+} -+ -+ -+void Assembler::emit(Handle handle) { -+ emit(reinterpret_cast(handle.address()), -+ RelocInfo::EMBEDDED_OBJECT); -+} -+ -+ -+void Assembler::emit(uint32_t x, RelocInfo::Mode rmode) { -+ if (!RelocInfo::IsNone(rmode) && rmode != RelocInfo::CODE_AGE_SEQUENCE) { -+ RecordRelocInfo(rmode); -+ } -+ emit(x); -+} -+ -+ -+void Assembler::emit(Handle code, RelocInfo::Mode rmode) { -+ emit(reinterpret_cast(code.address()), rmode); -+} -+ -+ -+void Assembler::emit(const Immediate& x) { -+ if (x.rmode_ == RelocInfo::INTERNAL_REFERENCE) { -+ Label* label = reinterpret_cast(x.immediate()); -+ emit_code_relative_offset(label); -+ return; -+ } -+ if (!RelocInfo::IsNone(x.rmode_)) RecordRelocInfo(x.rmode_); -+ if (x.is_heap_object_request()) { -+ RequestHeapObject(x.heap_object_request()); -+ emit(0); -+ } else { -+ emit(x.immediate()); -+ } -+} -+ -+ -+void Assembler::emit_code_relative_offset(Label* label) { -+ if (label->is_bound()) { -+ int32_t pos; -+ pos = label->pos() + Code::kHeaderSize - kHeapObjectTag; -+ emit(pos); -+ } else { -+ emit_disp(label, Displacement::CODE_RELATIVE); -+ } -+} -+ -+void Assembler::emit_b(Immediate x) { -+ DCHECK(x.is_int8() || x.is_uint8()); -+ uint8_t value = static_cast(x.immediate()); -+ *pc_++ = value; -+} -+ -+void Assembler::emit_w(const Immediate& x) { -+ DCHECK(RelocInfo::IsNone(x.rmode_)); -+ uint16_t value = static_cast(x.immediate()); -+ reinterpret_cast(pc_)[0] = value; -+ pc_ += sizeof(uint16_t); -+} -+ -+ -+Address Assembler::target_address_at(Address pc, Address constant_pool) { -+ return pc + sizeof(int32_t) + *reinterpret_cast(pc); -+} -+ -+ -+void Assembler::set_target_address_at(Isolate* isolate, Address pc, -+ Address constant_pool, Address target, -+ ICacheFlushMode icache_flush_mode) { -+ DCHECK_IMPLIES(isolate == nullptr, icache_flush_mode == SKIP_ICACHE_FLUSH); -+ int32_t* p = reinterpret_cast(pc); -+ *p = target - (pc + sizeof(int32_t)); -+ if (icache_flush_mode != SKIP_ICACHE_FLUSH) { -+ Assembler::FlushICache(isolate, p, sizeof(int32_t)); -+ } -+} -+ -+Address Assembler::target_address_at(Address pc, Code* code) { -+ Address constant_pool = code ? code->constant_pool() : NULL; -+ return target_address_at(pc, constant_pool); -+} -+ -+void Assembler::set_target_address_at(Isolate* isolate, Address pc, Code* code, -+ Address target, -+ ICacheFlushMode icache_flush_mode) { -+ Address constant_pool = code ? code->constant_pool() : NULL; -+ set_target_address_at(isolate, pc, constant_pool, target, icache_flush_mode); -+} -+ -+Address Assembler::target_address_from_return_address(Address pc) { -+ return pc - kCallTargetAddressOffset; -+} -+ -+ -+Displacement Assembler::disp_at(Label* L) { -+ return Displacement(long_at(L->pos())); -+} -+ -+ -+void Assembler::disp_at_put(Label* L, Displacement disp) { -+ long_at_put(L->pos(), disp.data()); -+} -+ -+ -+void Assembler::emit_disp(Label* L, Displacement::Type type) { -+ Displacement disp(L, type); -+ L->link_to(pc_offset()); -+ emit(static_cast(disp.data())); -+} -+ -+ -+void Assembler::emit_near_disp(Label* L) { -+ byte disp = 0x00; -+ if (L->is_near_linked()) { -+ int offset = L->near_link_pos() - pc_offset(); -+ DCHECK(is_int8(offset)); -+ disp = static_cast(offset & 0xFF); -+ } -+ L->link_to(pc_offset(), Label::kNear); -+ *pc_++ = disp; -+} -+ -+ -+void Assembler::deserialization_set_target_internal_reference_at( -+ Isolate* isolate, Address pc, Address target, RelocInfo::Mode mode) { -+ Memory::Address_at(pc) = target; -+} -+ -+ -+void Operand::set_modrm(int mod, Register rm) { -+ DCHECK((mod & -4) == 0); -+ buf_[0] = mod << 6 | rm.code(); -+ len_ = 1; -+} -+ -+ -+void Operand::set_sib(ScaleFactor scale, Register index, Register base) { -+ DCHECK(len_ == 1); -+ DCHECK((scale & -4) == 0); -+ // Use SIB with no index register only for base esp. -+ DCHECK(!index.is(esp) || base.is(esp)); -+ buf_[1] = scale << 6 | index.code() << 3 | base.code(); -+ len_ = 2; -+} -+ -+ -+void Operand::set_disp8(int8_t disp) { -+ DCHECK(len_ == 1 || len_ == 2); -+ *reinterpret_cast(&buf_[len_++]) = disp; -+} -+ -+ -+void Operand::set_dispr(int32_t disp, RelocInfo::Mode rmode) { -+ DCHECK(len_ == 1 || len_ == 2); -+ int32_t* p = reinterpret_cast(&buf_[len_]); -+ *p = disp; -+ len_ += sizeof(int32_t); -+ rmode_ = rmode; -+} -+ -+Operand::Operand(Register reg) { -+ // reg -+ set_modrm(3, reg); -+} -+ -+ -+Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { -+ // [disp/r] -+ set_modrm(0, ebp); -+ set_dispr(disp, rmode); -+} -+ -+ -+Operand::Operand(Immediate imm) { -+ // [disp/r] -+ set_modrm(0, ebp); -+ set_dispr(imm.immediate(), imm.rmode_); -+} -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_ASSEMBLER_X87_INL_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.cc 2018-02-18 19:00:54.195418178 +0100 -@@ -0,0 +1,381 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "src/x87/codegen-x87.h" -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/codegen.h" -+#include "src/heap/heap.h" -+#include "src/macro-assembler.h" -+ -+namespace v8 { -+namespace internal { -+ -+ -+// ------------------------------------------------------------------------- -+// Platform-specific RuntimeCallHelper functions. -+ -+void StubRuntimeCallHelper::BeforeCall(MacroAssembler* masm) const { -+ masm->EnterFrame(StackFrame::INTERNAL); -+ DCHECK(!masm->has_frame()); -+ masm->set_has_frame(true); -+} -+ -+ -+void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const { -+ masm->LeaveFrame(StackFrame::INTERNAL); -+ DCHECK(masm->has_frame()); -+ masm->set_has_frame(false); -+} -+ -+ -+#define __ masm. -+ -+ -+UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { -+ size_t actual_size; -+ // Allocate buffer in executable space. -+ byte* buffer = -+ static_cast(base::OS::Allocate(1 * KB, &actual_size, true)); -+ if (buffer == nullptr) return nullptr; -+ -+ MacroAssembler masm(isolate, buffer, static_cast(actual_size), -+ CodeObjectRequired::kNo); -+ // Load double input into registers. -+ __ fld_d(MemOperand(esp, 4)); -+ __ X87SetFPUCW(0x027F); -+ __ fsqrt(); -+ __ X87SetFPUCW(0x037F); -+ __ Ret(); -+ -+ CodeDesc desc; -+ masm.GetCode(isolate, &desc); -+ DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); -+ -+ Assembler::FlushICache(isolate, buffer, actual_size); -+ base::OS::ProtectCode(buffer, actual_size); -+ return FUNCTION_CAST(buffer); -+} -+ -+ -+// Helper functions for CreateMemMoveFunction. -+#undef __ -+#define __ ACCESS_MASM(masm) -+ -+enum Direction { FORWARD, BACKWARD }; -+enum Alignment { MOVE_ALIGNED, MOVE_UNALIGNED }; -+ -+ -+void MemMoveEmitPopAndReturn(MacroAssembler* masm) { -+ __ pop(esi); -+ __ pop(edi); -+ __ ret(0); -+} -+ -+ -+#undef __ -+#define __ masm. -+ -+ -+class LabelConverter { -+ public: -+ explicit LabelConverter(byte* buffer) : buffer_(buffer) {} -+ int32_t address(Label* l) const { -+ return reinterpret_cast(buffer_) + l->pos(); -+ } -+ private: -+ byte* buffer_; -+}; -+ -+ -+MemMoveFunction CreateMemMoveFunction(Isolate* isolate) { -+ size_t actual_size; -+ // Allocate buffer in executable space. -+ byte* buffer = -+ static_cast(base::OS::Allocate(1 * KB, &actual_size, true)); -+ if (buffer == nullptr) return nullptr; -+ MacroAssembler masm(isolate, buffer, static_cast(actual_size), -+ CodeObjectRequired::kNo); -+ LabelConverter conv(buffer); -+ -+ // Generated code is put into a fixed, unmovable buffer, and not into -+ // the V8 heap. We can't, and don't, refer to any relocatable addresses -+ // (e.g. the JavaScript nan-object). -+ -+ // 32-bit C declaration function calls pass arguments on stack. -+ -+ // Stack layout: -+ // esp[12]: Third argument, size. -+ // esp[8]: Second argument, source pointer. -+ // esp[4]: First argument, destination pointer. -+ // esp[0]: return address -+ -+ const int kDestinationOffset = 1 * kPointerSize; -+ const int kSourceOffset = 2 * kPointerSize; -+ const int kSizeOffset = 3 * kPointerSize; -+ -+ int stack_offset = 0; // Update if we change the stack height. -+ -+ Label backward, backward_much_overlap; -+ Label forward_much_overlap, small_size, medium_size, pop_and_return; -+ __ push(edi); -+ __ push(esi); -+ stack_offset += 2 * kPointerSize; -+ Register dst = edi; -+ Register src = esi; -+ Register count = ecx; -+ __ mov(dst, Operand(esp, stack_offset + kDestinationOffset)); -+ __ mov(src, Operand(esp, stack_offset + kSourceOffset)); -+ __ mov(count, Operand(esp, stack_offset + kSizeOffset)); -+ -+ __ cmp(dst, src); -+ __ j(equal, &pop_and_return); -+ -+ // No SSE2. -+ Label forward; -+ __ cmp(count, 0); -+ __ j(equal, &pop_and_return); -+ __ cmp(dst, src); -+ __ j(above, &backward); -+ __ jmp(&forward); -+ { -+ // Simple forward copier. -+ Label forward_loop_1byte, forward_loop_4byte; -+ __ bind(&forward_loop_4byte); -+ __ mov(eax, Operand(src, 0)); -+ __ sub(count, Immediate(4)); -+ __ add(src, Immediate(4)); -+ __ mov(Operand(dst, 0), eax); -+ __ add(dst, Immediate(4)); -+ __ bind(&forward); // Entry point. -+ __ cmp(count, 3); -+ __ j(above, &forward_loop_4byte); -+ __ bind(&forward_loop_1byte); -+ __ cmp(count, 0); -+ __ j(below_equal, &pop_and_return); -+ __ mov_b(eax, Operand(src, 0)); -+ __ dec(count); -+ __ inc(src); -+ __ mov_b(Operand(dst, 0), eax); -+ __ inc(dst); -+ __ jmp(&forward_loop_1byte); -+ } -+ { -+ // Simple backward copier. -+ Label backward_loop_1byte, backward_loop_4byte, entry_shortcut; -+ __ bind(&backward); -+ __ add(src, count); -+ __ add(dst, count); -+ __ cmp(count, 3); -+ __ j(below_equal, &entry_shortcut); -+ -+ __ bind(&backward_loop_4byte); -+ __ sub(src, Immediate(4)); -+ __ sub(count, Immediate(4)); -+ __ mov(eax, Operand(src, 0)); -+ __ sub(dst, Immediate(4)); -+ __ mov(Operand(dst, 0), eax); -+ __ cmp(count, 3); -+ __ j(above, &backward_loop_4byte); -+ __ bind(&backward_loop_1byte); -+ __ cmp(count, 0); -+ __ j(below_equal, &pop_and_return); -+ __ bind(&entry_shortcut); -+ __ dec(src); -+ __ dec(count); -+ __ mov_b(eax, Operand(src, 0)); -+ __ dec(dst); -+ __ mov_b(Operand(dst, 0), eax); -+ __ jmp(&backward_loop_1byte); -+ } -+ -+ __ bind(&pop_and_return); -+ MemMoveEmitPopAndReturn(&masm); -+ -+ CodeDesc desc; -+ masm.GetCode(isolate, &desc); -+ DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); -+ Assembler::FlushICache(isolate, buffer, actual_size); -+ base::OS::ProtectCode(buffer, actual_size); -+ // TODO(jkummerow): It would be nice to register this code creation event -+ // with the PROFILE / GDBJIT system. -+ return FUNCTION_CAST(buffer); -+} -+ -+ -+#undef __ -+ -+// ------------------------------------------------------------------------- -+// Code generators -+ -+#define __ ACCESS_MASM(masm) -+ -+void StringCharLoadGenerator::Generate(MacroAssembler* masm, -+ Factory* factory, -+ Register string, -+ Register index, -+ Register result, -+ Label* call_runtime) { -+ Label indirect_string_loaded; -+ __ bind(&indirect_string_loaded); -+ -+ // Fetch the instance type of the receiver into result register. -+ __ mov(result, FieldOperand(string, HeapObject::kMapOffset)); -+ __ movzx_b(result, FieldOperand(result, Map::kInstanceTypeOffset)); -+ -+ // We need special handling for indirect strings. -+ Label check_sequential; -+ __ test(result, Immediate(kIsIndirectStringMask)); -+ __ j(zero, &check_sequential, Label::kNear); -+ -+ // Dispatch on the indirect string shape: slice or cons. -+ Label cons_string, thin_string; -+ __ and_(result, Immediate(kStringRepresentationMask)); -+ __ cmp(result, Immediate(kConsStringTag)); -+ __ j(equal, &cons_string, Label::kNear); -+ __ cmp(result, Immediate(kThinStringTag)); -+ __ j(equal, &thin_string, Label::kNear); -+ -+ // Handle slices. -+ __ mov(result, FieldOperand(string, SlicedString::kOffsetOffset)); -+ __ SmiUntag(result); -+ __ add(index, result); -+ __ mov(string, FieldOperand(string, SlicedString::kParentOffset)); -+ __ jmp(&indirect_string_loaded); -+ -+ // Handle thin strings. -+ __ bind(&thin_string); -+ __ mov(string, FieldOperand(string, ThinString::kActualOffset)); -+ __ jmp(&indirect_string_loaded); -+ -+ // Handle cons strings. -+ // Check whether the right hand side is the empty string (i.e. if -+ // this is really a flat string in a cons string). If that is not -+ // the case we would rather go to the runtime system now to flatten -+ // the string. -+ __ bind(&cons_string); -+ __ cmp(FieldOperand(string, ConsString::kSecondOffset), -+ Immediate(factory->empty_string())); -+ __ j(not_equal, call_runtime); -+ __ mov(string, FieldOperand(string, ConsString::kFirstOffset)); -+ __ jmp(&indirect_string_loaded); -+ -+ // Distinguish sequential and external strings. Only these two string -+ // representations can reach here (slices and flat cons strings have been -+ // reduced to the underlying sequential or external string). -+ Label seq_string; -+ __ bind(&check_sequential); -+ STATIC_ASSERT(kSeqStringTag == 0); -+ __ test(result, Immediate(kStringRepresentationMask)); -+ __ j(zero, &seq_string, Label::kNear); -+ -+ // Handle external strings. -+ Label one_byte_external, done; -+ if (FLAG_debug_code) { -+ // Assert that we do not have a cons or slice (indirect strings) here. -+ // Sequential strings have already been ruled out. -+ __ test(result, Immediate(kIsIndirectStringMask)); -+ __ Assert(zero, kExternalStringExpectedButNotFound); -+ } -+ // Rule out short external strings. -+ STATIC_ASSERT(kShortExternalStringTag != 0); -+ __ test_b(result, Immediate(kShortExternalStringMask)); -+ __ j(not_zero, call_runtime); -+ // Check encoding. -+ STATIC_ASSERT(kTwoByteStringTag == 0); -+ __ test_b(result, Immediate(kStringEncodingMask)); -+ __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); -+ __ j(not_equal, &one_byte_external, Label::kNear); -+ // Two-byte string. -+ __ movzx_w(result, Operand(result, index, times_2, 0)); -+ __ jmp(&done, Label::kNear); -+ __ bind(&one_byte_external); -+ // One-byte string. -+ __ movzx_b(result, Operand(result, index, times_1, 0)); -+ __ jmp(&done, Label::kNear); -+ -+ // Dispatch on the encoding: one-byte or two-byte. -+ Label one_byte; -+ __ bind(&seq_string); -+ STATIC_ASSERT((kStringEncodingMask & kOneByteStringTag) != 0); -+ STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); -+ __ test(result, Immediate(kStringEncodingMask)); -+ __ j(not_zero, &one_byte, Label::kNear); -+ -+ // Two-byte string. -+ // Load the two-byte character code into the result register. -+ __ movzx_w(result, FieldOperand(string, -+ index, -+ times_2, -+ SeqTwoByteString::kHeaderSize)); -+ __ jmp(&done, Label::kNear); -+ -+ // One-byte string. -+ // Load the byte into the result register. -+ __ bind(&one_byte); -+ __ movzx_b(result, FieldOperand(string, -+ index, -+ times_1, -+ SeqOneByteString::kHeaderSize)); -+ __ bind(&done); -+} -+ -+ -+#undef __ -+ -+ -+CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { -+ USE(isolate); -+ DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); -+ CodePatcher patcher(isolate, young_sequence_.start(), -+ young_sequence_.length()); -+ patcher.masm()->push(ebp); -+ patcher.masm()->mov(ebp, esp); -+ patcher.masm()->push(esi); -+ patcher.masm()->push(edi); -+} -+ -+ -+#ifdef DEBUG -+bool CodeAgingHelper::IsOld(byte* candidate) const { -+ return *candidate == kCallOpcode; -+} -+#endif -+ -+ -+bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { -+ bool result = isolate->code_aging_helper()->IsYoung(sequence); -+ DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); -+ return result; -+} -+ -+Code::Age Code::GetCodeAge(Isolate* isolate, byte* sequence) { -+ if (IsYoungSequence(isolate, sequence)) return kNoAgeCodeAge; -+ -+ sequence++; // Skip the kCallOpcode byte -+ Address target_address = sequence + *reinterpret_cast(sequence) + -+ Assembler::kCallTargetAddressOffset; -+ Code* stub = GetCodeFromTargetAddress(target_address); -+ return GetAgeOfCodeAgeStub(stub); -+} -+ -+void Code::PatchPlatformCodeAge(Isolate* isolate, byte* sequence, -+ Code::Age age) { -+ uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); -+ if (age == kNoAgeCodeAge) { -+ isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); -+ Assembler::FlushICache(isolate, sequence, young_length); -+ } else { -+ Code* stub = GetCodeAgeStub(isolate, age); -+ CodePatcher patcher(isolate, sequence, young_length); -+ patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); -+ } -+} -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/codegen-x87.h 2018-02-18 19:00:54.195418178 +0100 -@@ -0,0 +1,33 @@ -+// Copyright 2011 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_X87_CODEGEN_X87_H_ -+#define V8_X87_CODEGEN_X87_H_ -+ -+#include "src/macro-assembler.h" -+ -+namespace v8 { -+namespace internal { -+ -+ -+class StringCharLoadGenerator : public AllStatic { -+ public: -+ // Generates the code for handling different string types and loading the -+ // indexed character into |result|. We expect |index| as untagged input and -+ // |result| as untagged output. -+ static void Generate(MacroAssembler* masm, -+ Factory* factory, -+ Register string, -+ Register index, -+ Register result, -+ Label* call_runtime); -+ -+ private: -+ DISALLOW_COPY_AND_ASSIGN(StringCharLoadGenerator); -+}; -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_CODEGEN_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.cc 2018-02-18 19:00:54.197418149 +0100 -@@ -0,0 +1,2668 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/code-stubs.h" -+#include "src/api-arguments.h" -+#include "src/base/bits.h" -+#include "src/bootstrapper.h" -+#include "src/codegen.h" -+#include "src/ic/handler-compiler.h" -+#include "src/ic/ic.h" -+#include "src/ic/stub-cache.h" -+#include "src/isolate.h" -+#include "src/regexp/jsregexp.h" -+#include "src/regexp/regexp-macro-assembler.h" -+#include "src/runtime/runtime.h" -+#include "src/x87/code-stubs-x87.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+#define __ ACCESS_MASM(masm) -+ -+void ArrayNArgumentsConstructorStub::Generate(MacroAssembler* masm) { -+ __ pop(ecx); -+ __ mov(MemOperand(esp, eax, times_4, 0), edi); -+ __ push(edi); -+ __ push(ebx); -+ __ push(ecx); -+ __ add(eax, Immediate(3)); -+ __ TailCallRuntime(Runtime::kNewArray); -+} -+ -+ -+void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { -+ // We don't allow a GC during a store buffer overflow so there is no need to -+ // store the registers in any particular way, but we do have to store and -+ // restore them. -+ __ pushad(); -+ if (save_doubles()) { -+ // Save FPU stat in m108byte. -+ __ sub(esp, Immediate(108)); -+ __ fnsave(Operand(esp, 0)); -+ } -+ const int argument_count = 1; -+ -+ AllowExternalCallThatCantCauseGC scope(masm); -+ __ PrepareCallCFunction(argument_count, ecx); -+ __ mov(Operand(esp, 0 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ __ CallCFunction( -+ ExternalReference::store_buffer_overflow_function(isolate()), -+ argument_count); -+ if (save_doubles()) { -+ // Restore FPU stat in m108byte. -+ __ frstor(Operand(esp, 0)); -+ __ add(esp, Immediate(108)); -+ } -+ __ popad(); -+ __ ret(0); -+} -+ -+ -+class FloatingPointHelper : public AllStatic { -+ public: -+ enum ArgLocation { -+ ARGS_ON_STACK, -+ ARGS_IN_REGISTERS -+ }; -+ -+ // Code pattern for loading a floating point value. Input value must -+ // be either a smi or a heap number object (fp value). Requirements: -+ // operand in register number. Returns operand as floating point number -+ // on FPU stack. -+ static void LoadFloatOperand(MacroAssembler* masm, Register number); -+ -+ // Test if operands are smi or number objects (fp). Requirements: -+ // operand_1 in eax, operand_2 in edx; falls through on float -+ // operands, jumps to the non_float label otherwise. -+ static void CheckFloatOperands(MacroAssembler* masm, -+ Label* non_float, -+ Register scratch); -+}; -+ -+ -+void DoubleToIStub::Generate(MacroAssembler* masm) { -+ Register input_reg = this->source(); -+ Register final_result_reg = this->destination(); -+ DCHECK(is_truncating()); -+ -+ Label check_negative, process_64_bits, done, done_no_stash; -+ -+ int double_offset = offset(); -+ -+ // Account for return address and saved regs if input is esp. -+ if (input_reg.is(esp)) double_offset += 3 * kPointerSize; -+ -+ MemOperand mantissa_operand(MemOperand(input_reg, double_offset)); -+ MemOperand exponent_operand(MemOperand(input_reg, -+ double_offset + kDoubleSize / 2)); -+ -+ Register scratch1; -+ { -+ Register scratch_candidates[3] = { ebx, edx, edi }; -+ for (int i = 0; i < 3; i++) { -+ scratch1 = scratch_candidates[i]; -+ if (!final_result_reg.is(scratch1) && !input_reg.is(scratch1)) break; -+ } -+ } -+ // Since we must use ecx for shifts below, use some other register (eax) -+ // to calculate the result if ecx is the requested return register. -+ Register result_reg = final_result_reg.is(ecx) ? eax : final_result_reg; -+ // Save ecx if it isn't the return register and therefore volatile, or if it -+ // is the return register, then save the temp register we use in its stead for -+ // the result. -+ Register save_reg = final_result_reg.is(ecx) ? eax : ecx; -+ __ push(scratch1); -+ __ push(save_reg); -+ -+ bool stash_exponent_copy = !input_reg.is(esp); -+ __ mov(scratch1, mantissa_operand); -+ __ mov(ecx, exponent_operand); -+ if (stash_exponent_copy) __ push(ecx); -+ -+ __ and_(ecx, HeapNumber::kExponentMask); -+ __ shr(ecx, HeapNumber::kExponentShift); -+ __ lea(result_reg, MemOperand(ecx, -HeapNumber::kExponentBias)); -+ __ cmp(result_reg, Immediate(HeapNumber::kMantissaBits)); -+ __ j(below, &process_64_bits); -+ -+ // Result is entirely in lower 32-bits of mantissa -+ int delta = HeapNumber::kExponentBias + Double::kPhysicalSignificandSize; -+ __ sub(ecx, Immediate(delta)); -+ __ xor_(result_reg, result_reg); -+ __ cmp(ecx, Immediate(31)); -+ __ j(above, &done); -+ __ shl_cl(scratch1); -+ __ jmp(&check_negative); -+ -+ __ bind(&process_64_bits); -+ // Result must be extracted from shifted 32-bit mantissa -+ __ sub(ecx, Immediate(delta)); -+ __ neg(ecx); -+ if (stash_exponent_copy) { -+ __ mov(result_reg, MemOperand(esp, 0)); -+ } else { -+ __ mov(result_reg, exponent_operand); -+ } -+ __ and_(result_reg, -+ Immediate(static_cast(Double::kSignificandMask >> 32))); -+ __ add(result_reg, -+ Immediate(static_cast(Double::kHiddenBit >> 32))); -+ __ shrd_cl(scratch1, result_reg); -+ __ shr_cl(result_reg); -+ __ test(ecx, Immediate(32)); -+ { -+ Label skip_mov; -+ __ j(equal, &skip_mov, Label::kNear); -+ __ mov(scratch1, result_reg); -+ __ bind(&skip_mov); -+ } -+ -+ // If the double was negative, negate the integer result. -+ __ bind(&check_negative); -+ __ mov(result_reg, scratch1); -+ __ neg(result_reg); -+ if (stash_exponent_copy) { -+ __ cmp(MemOperand(esp, 0), Immediate(0)); -+ } else { -+ __ cmp(exponent_operand, Immediate(0)); -+ } -+ { -+ Label skip_mov; -+ __ j(less_equal, &skip_mov, Label::kNear); -+ __ mov(result_reg, scratch1); -+ __ bind(&skip_mov); -+ } -+ -+ // Restore registers -+ __ bind(&done); -+ if (stash_exponent_copy) { -+ __ add(esp, Immediate(kDoubleSize / 2)); -+ } -+ __ bind(&done_no_stash); -+ if (!final_result_reg.is(result_reg)) { -+ DCHECK(final_result_reg.is(ecx)); -+ __ mov(final_result_reg, result_reg); -+ } -+ __ pop(save_reg); -+ __ pop(scratch1); -+ __ ret(0); -+} -+ -+ -+void FloatingPointHelper::LoadFloatOperand(MacroAssembler* masm, -+ Register number) { -+ Label load_smi, done; -+ -+ __ JumpIfSmi(number, &load_smi, Label::kNear); -+ __ fld_d(FieldOperand(number, HeapNumber::kValueOffset)); -+ __ jmp(&done, Label::kNear); -+ -+ __ bind(&load_smi); -+ __ SmiUntag(number); -+ __ push(number); -+ __ fild_s(Operand(esp, 0)); -+ __ pop(number); -+ -+ __ bind(&done); -+} -+ -+ -+void FloatingPointHelper::CheckFloatOperands(MacroAssembler* masm, -+ Label* non_float, -+ Register scratch) { -+ Label test_other, done; -+ // Test if both operands are floats or smi -> scratch=k_is_float; -+ // Otherwise scratch = k_not_float. -+ __ JumpIfSmi(edx, &test_other, Label::kNear); -+ __ mov(scratch, FieldOperand(edx, HeapObject::kMapOffset)); -+ Factory* factory = masm->isolate()->factory(); -+ __ cmp(scratch, factory->heap_number_map()); -+ __ j(not_equal, non_float); // argument in edx is not a number -> NaN -+ -+ __ bind(&test_other); -+ __ JumpIfSmi(eax, &done, Label::kNear); -+ __ mov(scratch, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ cmp(scratch, factory->heap_number_map()); -+ __ j(not_equal, non_float); // argument in eax is not a number -> NaN -+ -+ // Fall-through: Both operands are numbers. -+ __ bind(&done); -+} -+ -+ -+void MathPowStub::Generate(MacroAssembler* masm) { -+ const Register scratch = ecx; -+ -+ // Load the double_exponent into x87 FPU -+ __ fld_d(Operand(esp, 0 * kDoubleSize + 4)); -+ // Load the double_base into x87 FPU -+ __ fld_d(Operand(esp, 1 * kDoubleSize + 4)); -+ -+ // Call ieee754 runtime directly. -+ { -+ AllowExternalCallThatCantCauseGC scope(masm); -+ __ PrepareCallCFunction(4, scratch); -+ // Put the double_base parameter in call stack -+ __ fstp_d(Operand(esp, 0 * kDoubleSize)); -+ // Put the double_exponent parameter in call stack -+ __ fstp_d(Operand(esp, 1 * kDoubleSize)); -+ __ CallCFunction(ExternalReference::power_double_double_function(isolate()), -+ 4); -+ } -+ // Return value is in st(0) on ia32. -+ __ ret(0); -+} -+ -+ -+static int NegativeComparisonResult(Condition cc) { -+ DCHECK(cc != equal); -+ DCHECK((cc == less) || (cc == less_equal) -+ || (cc == greater) || (cc == greater_equal)); -+ return (cc == greater || cc == greater_equal) ? LESS : GREATER; -+} -+ -+ -+static void CheckInputType(MacroAssembler* masm, Register input, -+ CompareICState::State expected, Label* fail) { -+ Label ok; -+ if (expected == CompareICState::SMI) { -+ __ JumpIfNotSmi(input, fail); -+ } else if (expected == CompareICState::NUMBER) { -+ __ JumpIfSmi(input, &ok); -+ __ cmp(FieldOperand(input, HeapObject::kMapOffset), -+ Immediate(masm->isolate()->factory()->heap_number_map())); -+ __ j(not_equal, fail); -+ } -+ // We could be strict about internalized/non-internalized here, but as long as -+ // hydrogen doesn't care, the stub doesn't have to care either. -+ __ bind(&ok); -+} -+ -+ -+static void BranchIfNotInternalizedString(MacroAssembler* masm, -+ Label* label, -+ Register object, -+ Register scratch) { -+ __ JumpIfSmi(object, label); -+ __ mov(scratch, FieldOperand(object, HeapObject::kMapOffset)); -+ __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); -+ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); -+ __ test(scratch, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); -+ __ j(not_zero, label); -+} -+ -+ -+void CompareICStub::GenerateGeneric(MacroAssembler* masm) { -+ Label runtime_call, check_unequal_objects; -+ Condition cc = GetCondition(); -+ -+ Label miss; -+ CheckInputType(masm, edx, left(), &miss); -+ CheckInputType(masm, eax, right(), &miss); -+ -+ // Compare two smis. -+ Label non_smi, smi_done; -+ __ mov(ecx, edx); -+ __ or_(ecx, eax); -+ __ JumpIfNotSmi(ecx, &non_smi, Label::kNear); -+ __ sub(edx, eax); // Return on the result of the subtraction. -+ __ j(no_overflow, &smi_done, Label::kNear); -+ __ not_(edx); // Correct sign in case of overflow. edx is never 0 here. -+ __ bind(&smi_done); -+ __ mov(eax, edx); -+ __ ret(0); -+ __ bind(&non_smi); -+ -+ // NOTICE! This code is only reached after a smi-fast-case check, so -+ // it is certain that at least one operand isn't a smi. -+ -+ // Identical objects can be compared fast, but there are some tricky cases -+ // for NaN and undefined. -+ Label generic_heap_number_comparison; -+ { -+ Label not_identical; -+ __ cmp(eax, edx); -+ __ j(not_equal, ¬_identical); -+ -+ if (cc != equal) { -+ // Check for undefined. undefined OP undefined is false even though -+ // undefined == undefined. -+ __ cmp(edx, isolate()->factory()->undefined_value()); -+ Label check_for_nan; -+ __ j(not_equal, &check_for_nan, Label::kNear); -+ __ Move(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); -+ __ ret(0); -+ __ bind(&check_for_nan); -+ } -+ -+ // Test for NaN. Compare heap numbers in a general way, -+ // to handle NaNs correctly. -+ __ cmp(FieldOperand(edx, HeapObject::kMapOffset), -+ Immediate(isolate()->factory()->heap_number_map())); -+ __ j(equal, &generic_heap_number_comparison, Label::kNear); -+ if (cc != equal) { -+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); -+ // Call runtime on identical JSObjects. Otherwise return equal. -+ __ cmpb(ecx, Immediate(FIRST_JS_RECEIVER_TYPE)); -+ __ j(above_equal, &runtime_call, Label::kFar); -+ // Call runtime on identical symbols since we need to throw a TypeError. -+ __ cmpb(ecx, Immediate(SYMBOL_TYPE)); -+ __ j(equal, &runtime_call, Label::kFar); -+ } -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ ret(0); -+ -+ -+ __ bind(¬_identical); -+ } -+ -+ // Strict equality can quickly decide whether objects are equal. -+ // Non-strict object equality is slower, so it is handled later in the stub. -+ if (cc == equal && strict()) { -+ Label slow; // Fallthrough label. -+ Label not_smis; -+ // If we're doing a strict equality comparison, we don't have to do -+ // type conversion, so we generate code to do fast comparison for objects -+ // and oddballs. Non-smi numbers and strings still go through the usual -+ // slow-case code. -+ // If either is a Smi (we know that not both are), then they can only -+ // be equal if the other is a HeapNumber. If so, use the slow case. -+ STATIC_ASSERT(kSmiTag == 0); -+ DCHECK_EQ(static_cast(0), Smi::kZero); -+ __ mov(ecx, Immediate(kSmiTagMask)); -+ __ and_(ecx, eax); -+ __ test(ecx, edx); -+ __ j(not_zero, ¬_smis, Label::kNear); -+ // One operand is a smi. -+ -+ // Check whether the non-smi is a heap number. -+ STATIC_ASSERT(kSmiTagMask == 1); -+ // ecx still holds eax & kSmiTag, which is either zero or one. -+ __ sub(ecx, Immediate(0x01)); -+ __ mov(ebx, edx); -+ __ xor_(ebx, eax); -+ __ and_(ebx, ecx); // ebx holds either 0 or eax ^ edx. -+ __ xor_(ebx, eax); -+ // if eax was smi, ebx is now edx, else eax. -+ -+ // Check if the non-smi operand is a heap number. -+ __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), -+ Immediate(isolate()->factory()->heap_number_map())); -+ // If heap number, handle it in the slow case. -+ __ j(equal, &slow, Label::kNear); -+ // Return non-equal (ebx is not zero) -+ __ mov(eax, ebx); -+ __ ret(0); -+ -+ __ bind(¬_smis); -+ // If either operand is a JSObject or an oddball value, then they are not -+ // equal since their pointers are different -+ // There is no test for undetectability in strict equality. -+ -+ // Get the type of the first operand. -+ // If the first object is a JS object, we have done pointer comparison. -+ Label first_non_object; -+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(below, &first_non_object, Label::kNear); -+ -+ // Return non-zero (eax is not zero) -+ Label return_not_equal; -+ STATIC_ASSERT(kHeapObjectTag != 0); -+ __ bind(&return_not_equal); -+ __ ret(0); -+ -+ __ bind(&first_non_object); -+ // Check for oddballs: true, false, null, undefined. -+ __ CmpInstanceType(ecx, ODDBALL_TYPE); -+ __ j(equal, &return_not_equal); -+ -+ __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(above_equal, &return_not_equal); -+ -+ // Check for oddballs: true, false, null, undefined. -+ __ CmpInstanceType(ecx, ODDBALL_TYPE); -+ __ j(equal, &return_not_equal); -+ -+ // Fall through to the general case. -+ __ bind(&slow); -+ } -+ -+ // Generate the number comparison code. -+ Label non_number_comparison; -+ Label unordered; -+ __ bind(&generic_heap_number_comparison); -+ FloatingPointHelper::CheckFloatOperands( -+ masm, &non_number_comparison, ebx); -+ FloatingPointHelper::LoadFloatOperand(masm, eax); -+ FloatingPointHelper::LoadFloatOperand(masm, edx); -+ __ FCmp(); -+ -+ // Don't base result on EFLAGS when a NaN is involved. -+ __ j(parity_even, &unordered, Label::kNear); -+ -+ Label below_label, above_label; -+ // Return a result of -1, 0, or 1, based on EFLAGS. -+ __ j(below, &below_label, Label::kNear); -+ __ j(above, &above_label, Label::kNear); -+ -+ __ Move(eax, Immediate(0)); -+ __ ret(0); -+ -+ __ bind(&below_label); -+ __ mov(eax, Immediate(Smi::FromInt(-1))); -+ __ ret(0); -+ -+ __ bind(&above_label); -+ __ mov(eax, Immediate(Smi::FromInt(1))); -+ __ ret(0); -+ -+ // If one of the numbers was NaN, then the result is always false. -+ // The cc is never not-equal. -+ __ bind(&unordered); -+ DCHECK(cc != not_equal); -+ if (cc == less || cc == less_equal) { -+ __ mov(eax, Immediate(Smi::FromInt(1))); -+ } else { -+ __ mov(eax, Immediate(Smi::FromInt(-1))); -+ } -+ __ ret(0); -+ -+ // The number comparison code did not provide a valid result. -+ __ bind(&non_number_comparison); -+ -+ // Fast negative check for internalized-to-internalized equality. -+ Label check_for_strings; -+ if (cc == equal) { -+ BranchIfNotInternalizedString(masm, &check_for_strings, eax, ecx); -+ BranchIfNotInternalizedString(masm, &check_for_strings, edx, ecx); -+ -+ // We've already checked for object identity, so if both operands -+ // are internalized they aren't equal. Register eax already holds a -+ // non-zero value, which indicates not equal, so just return. -+ __ ret(0); -+ } -+ -+ __ bind(&check_for_strings); -+ -+ __ JumpIfNotBothSequentialOneByteStrings(edx, eax, ecx, ebx, -+ &check_unequal_objects); -+ -+ // Inline comparison of one-byte strings. -+ if (cc == equal) { -+ StringHelper::GenerateFlatOneByteStringEquals(masm, edx, eax, ecx, ebx); -+ } else { -+ StringHelper::GenerateCompareFlatOneByteStrings(masm, edx, eax, ecx, ebx, -+ edi); -+ } -+#ifdef DEBUG -+ __ Abort(kUnexpectedFallThroughFromStringComparison); -+#endif -+ -+ __ bind(&check_unequal_objects); -+ if (cc == equal && !strict()) { -+ // Non-strict equality. Objects are unequal if -+ // they are both JSObjects and not undetectable, -+ // and their pointers are different. -+ Label return_equal, return_unequal, undetectable; -+ // At most one is a smi, so we can test for smi by adding the two. -+ // A smi plus a heap object has the low bit set, a heap object plus -+ // a heap object has the low bit clear. -+ STATIC_ASSERT(kSmiTag == 0); -+ STATIC_ASSERT(kSmiTagMask == 1); -+ __ lea(ecx, Operand(eax, edx, times_1, 0)); -+ __ test(ecx, Immediate(kSmiTagMask)); -+ __ j(not_zero, &runtime_call); -+ -+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); -+ -+ __ test_b(FieldOperand(ebx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsUndetectable)); -+ __ j(not_zero, &undetectable, Label::kNear); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsUndetectable)); -+ __ j(not_zero, &return_unequal, Label::kNear); -+ -+ __ CmpInstanceType(ebx, FIRST_JS_RECEIVER_TYPE); -+ __ j(below, &runtime_call, Label::kNear); -+ __ CmpInstanceType(ecx, FIRST_JS_RECEIVER_TYPE); -+ __ j(below, &runtime_call, Label::kNear); -+ -+ __ bind(&return_unequal); -+ // Return non-equal by returning the non-zero object pointer in eax. -+ __ ret(0); // eax, edx were pushed -+ -+ __ bind(&undetectable); -+ __ test_b(FieldOperand(ecx, Map::kBitFieldOffset), -+ Immediate(1 << Map::kIsUndetectable)); -+ __ j(zero, &return_unequal, Label::kNear); -+ -+ // If both sides are JSReceivers, then the result is false according to -+ // the HTML specification, which says that only comparisons with null or -+ // undefined are affected by special casing for document.all. -+ __ CmpInstanceType(ebx, ODDBALL_TYPE); -+ __ j(zero, &return_equal, Label::kNear); -+ __ CmpInstanceType(ecx, ODDBALL_TYPE); -+ __ j(not_zero, &return_unequal, Label::kNear); -+ -+ __ bind(&return_equal); -+ __ Move(eax, Immediate(EQUAL)); -+ __ ret(0); // eax, edx were pushed -+ } -+ __ bind(&runtime_call); -+ -+ if (cc == equal) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(esi); -+ __ Call(strict() ? isolate()->builtins()->StrictEqual() -+ : isolate()->builtins()->Equal(), -+ RelocInfo::CODE_TARGET); -+ __ Pop(esi); -+ } -+ // Turn true into 0 and false into some non-zero value. -+ STATIC_ASSERT(EQUAL == 0); -+ __ sub(eax, Immediate(isolate()->factory()->true_value())); -+ __ Ret(); -+ } else { -+ // Push arguments below the return address. -+ __ pop(ecx); -+ __ push(edx); -+ __ push(eax); -+ __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); -+ -+ // Restore return address on the stack. -+ __ push(ecx); -+ // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) -+ // tagged as a small integer. -+ __ TailCallRuntime(Runtime::kCompare); -+ } -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub) { -+ // eax : number of arguments to the construct function -+ // ebx : feedback vector -+ // edx : slot in feedback vector (Smi) -+ // edi : the function to call -+ -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ -+ // Number-of-arguments register must be smi-tagged to call out. -+ __ SmiTag(eax); -+ __ push(eax); -+ __ push(edi); -+ __ push(edx); -+ __ push(ebx); -+ __ push(esi); -+ -+ __ CallStub(stub); -+ -+ __ pop(esi); -+ __ pop(ebx); -+ __ pop(edx); -+ __ pop(edi); -+ __ pop(eax); -+ __ SmiUntag(eax); -+ } -+} -+ -+ -+static void GenerateRecordCallTarget(MacroAssembler* masm) { -+ // Cache the called function in a feedback vector slot. Cache states -+ // are uninitialized, monomorphic (indicated by a JSFunction), and -+ // megamorphic. -+ // eax : number of arguments to the construct function -+ // ebx : feedback vector -+ // edx : slot in feedback vector (Smi) -+ // edi : the function to call -+ Isolate* isolate = masm->isolate(); -+ Label initialize, done, miss, megamorphic, not_array_function; -+ -+ // Load the cache state into ecx. -+ __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, -+ FixedArray::kHeaderSize)); -+ -+ // A monomorphic cache hit or an already megamorphic state: invoke the -+ // function without changing the state. -+ // We don't know if ecx is a WeakCell or a Symbol, but it's harmless to read -+ // at this position in a symbol (see static asserts in feedback-vector.h). -+ Label check_allocation_site; -+ __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); -+ __ j(equal, &done, Label::kFar); -+ __ CompareRoot(ecx, Heap::kmegamorphic_symbolRootIndex); -+ __ j(equal, &done, Label::kFar); -+ __ CompareRoot(FieldOperand(ecx, HeapObject::kMapOffset), -+ Heap::kWeakCellMapRootIndex); -+ __ j(not_equal, &check_allocation_site); -+ -+ // If the weak cell is cleared, we have a new chance to become monomorphic. -+ __ JumpIfSmi(FieldOperand(ecx, WeakCell::kValueOffset), &initialize); -+ __ jmp(&megamorphic); -+ -+ __ bind(&check_allocation_site); -+ // If we came here, we need to see if we are the array function. -+ // If we didn't have a matching function, and we didn't find the megamorph -+ // sentinel, then we have in the slot either some other function or an -+ // AllocationSite. -+ __ CompareRoot(FieldOperand(ecx, 0), Heap::kAllocationSiteMapRootIndex); -+ __ j(not_equal, &miss); -+ -+ // Make sure the function is the Array() function -+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); -+ __ cmp(edi, ecx); -+ __ j(not_equal, &megamorphic); -+ __ jmp(&done, Label::kFar); -+ -+ __ bind(&miss); -+ -+ // A monomorphic miss (i.e, here the cache is not uninitialized) goes -+ // megamorphic. -+ __ CompareRoot(ecx, Heap::kuninitialized_symbolRootIndex); -+ __ j(equal, &initialize); -+ // MegamorphicSentinel is an immortal immovable object (undefined) so no -+ // write-barrier is needed. -+ __ bind(&megamorphic); -+ __ mov( -+ FieldOperand(ebx, edx, times_half_pointer_size, FixedArray::kHeaderSize), -+ Immediate(FeedbackVector::MegamorphicSentinel(isolate))); -+ __ jmp(&done, Label::kFar); -+ -+ // An uninitialized cache is patched with the function or sentinel to -+ // indicate the ElementsKind if function is the Array constructor. -+ __ bind(&initialize); -+ // Make sure the function is the Array() function -+ __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, ecx); -+ __ cmp(edi, ecx); -+ __ j(not_equal, ¬_array_function); -+ -+ // The target function is the Array constructor, -+ // Create an AllocationSite if we don't already have it, store it in the -+ // slot. -+ CreateAllocationSiteStub create_stub(isolate); -+ CallStubInRecordCallTarget(masm, &create_stub); -+ __ jmp(&done); -+ -+ __ bind(¬_array_function); -+ CreateWeakCellStub weak_cell_stub(isolate); -+ CallStubInRecordCallTarget(masm, &weak_cell_stub); -+ -+ __ bind(&done); -+ // Increment the call count for all function calls. -+ __ add(FieldOperand(ebx, edx, times_half_pointer_size, -+ FixedArray::kHeaderSize + kPointerSize), -+ Immediate(Smi::FromInt(1))); -+} -+ -+ -+void CallConstructStub::Generate(MacroAssembler* masm) { -+ // eax : number of arguments -+ // ebx : feedback vector -+ // edx : slot in feedback vector (Smi, for RecordCallTarget) -+ // edi : constructor function -+ -+ Label non_function; -+ // Check that function is not a smi. -+ __ JumpIfSmi(edi, &non_function); -+ // Check that function is a JSFunction. -+ __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); -+ __ j(not_equal, &non_function); -+ -+ GenerateRecordCallTarget(masm); -+ -+ Label feedback_register_initialized; -+ // Put the AllocationSite from the feedback vector into ebx, or undefined. -+ __ mov(ebx, FieldOperand(ebx, edx, times_half_pointer_size, -+ FixedArray::kHeaderSize)); -+ Handle allocation_site_map = isolate()->factory()->allocation_site_map(); -+ __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); -+ __ j(equal, &feedback_register_initialized); -+ __ mov(ebx, isolate()->factory()->undefined_value()); -+ __ bind(&feedback_register_initialized); -+ -+ __ AssertUndefinedOrAllocationSite(ebx); -+ -+ // Pass new target to construct stub. -+ __ mov(edx, edi); -+ -+ // Tail call to the function-specific construct stub (still in the caller -+ // context at this point). -+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kConstructStubOffset)); -+ __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); -+ __ jmp(ecx); -+ -+ __ bind(&non_function); -+ __ mov(edx, edi); -+ __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); -+} -+ -+ -+bool CEntryStub::NeedsImmovableCode() { -+ return false; -+} -+ -+ -+void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { -+ CEntryStub::GenerateAheadOfTime(isolate); -+ StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); -+ // It is important that the store buffer overflow stubs are generated first. -+ CommonArrayConstructorStub::GenerateStubsAheadOfTime(isolate); -+ CreateAllocationSiteStub::GenerateAheadOfTime(isolate); -+ CreateWeakCellStub::GenerateAheadOfTime(isolate); -+ StoreFastElementStub::GenerateAheadOfTime(isolate); -+} -+ -+ -+void CodeStub::GenerateFPStubs(Isolate* isolate) { -+ CEntryStub save_doubles(isolate, 1, kSaveFPRegs); -+ // Stubs might already be in the snapshot, detect that and don't regenerate, -+ // which would lead to code stub initialization state being messed up. -+ Code* save_doubles_code; -+ if (!save_doubles.FindCodeInCache(&save_doubles_code)) { -+ save_doubles_code = *(save_doubles.GetCode()); -+ } -+} -+ -+ -+void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { -+ CEntryStub stub(isolate, 1, kDontSaveFPRegs); -+ stub.GetCode(); -+} -+ -+ -+void CEntryStub::Generate(MacroAssembler* masm) { -+ // eax: number of arguments including receiver -+ // ebx: pointer to C function (C callee-saved) -+ // ebp: frame pointer (restored after C call) -+ // esp: stack pointer (restored after C call) -+ // esi: current context (C callee-saved) -+ // edi: JS function of the caller (C callee-saved) -+ // -+ // If argv_in_register(): -+ // ecx: pointer to the first argument -+ -+ ProfileEntryHookStub::MaybeCallEntryHook(masm); -+ -+ // Reserve space on the stack for the three arguments passed to the call. If -+ // result size is greater than can be returned in registers, also reserve -+ // space for the hidden argument for the result location, and space for the -+ // result itself. -+ int arg_stack_space = result_size() < 3 ? 3 : 4 + result_size(); -+ -+ // Enter the exit frame that transitions from JavaScript to C++. -+ if (argv_in_register()) { -+ DCHECK(!save_doubles()); -+ DCHECK(!is_builtin_exit()); -+ __ EnterApiExitFrame(arg_stack_space); -+ -+ // Move argc and argv into the correct registers. -+ __ mov(esi, ecx); -+ __ mov(edi, eax); -+ } else { -+ __ EnterExitFrame( -+ arg_stack_space, save_doubles(), -+ is_builtin_exit() ? StackFrame::BUILTIN_EXIT : StackFrame::EXIT); -+ } -+ -+ // ebx: pointer to C function (C callee-saved) -+ // ebp: frame pointer (restored after C call) -+ // esp: stack pointer (restored after C call) -+ // edi: number of arguments including receiver (C callee-saved) -+ // esi: pointer to the first argument (C callee-saved) -+ -+ // Result returned in eax, or eax+edx if result size is 2. -+ -+ // Check stack alignment. -+ if (FLAG_debug_code) { -+ __ CheckStackAlignment(); -+ } -+ // Call C function. -+ if (result_size() <= 2) { -+ __ mov(Operand(esp, 0 * kPointerSize), edi); // argc. -+ __ mov(Operand(esp, 1 * kPointerSize), esi); // argv. -+ __ mov(Operand(esp, 2 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ } else { -+ DCHECK_EQ(3, result_size()); -+ // Pass a pointer to the result location as the first argument. -+ __ lea(eax, Operand(esp, 4 * kPointerSize)); -+ __ mov(Operand(esp, 0 * kPointerSize), eax); -+ __ mov(Operand(esp, 1 * kPointerSize), edi); // argc. -+ __ mov(Operand(esp, 2 * kPointerSize), esi); // argv. -+ __ mov(Operand(esp, 3 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ } -+ __ call(ebx); -+ -+ if (result_size() > 2) { -+ DCHECK_EQ(3, result_size()); -+#ifndef _WIN32 -+ // Restore the "hidden" argument on the stack which was popped by caller. -+ __ sub(esp, Immediate(kPointerSize)); -+#endif -+ // Read result values stored on stack. Result is stored above the arguments. -+ __ mov(kReturnRegister0, Operand(esp, 4 * kPointerSize)); -+ __ mov(kReturnRegister1, Operand(esp, 5 * kPointerSize)); -+ __ mov(kReturnRegister2, Operand(esp, 6 * kPointerSize)); -+ } -+ // Result is in eax, edx:eax or edi:edx:eax - do not destroy these registers! -+ -+ // Check result for exception sentinel. -+ Label exception_returned; -+ __ cmp(eax, isolate()->factory()->exception()); -+ __ j(equal, &exception_returned); -+ -+ // Check that there is no pending exception, otherwise we -+ // should have returned the exception sentinel. -+ if (FLAG_debug_code) { -+ __ push(edx); -+ __ mov(edx, Immediate(isolate()->factory()->the_hole_value())); -+ Label okay; -+ ExternalReference pending_exception_address( -+ IsolateAddressId::kPendingExceptionAddress, isolate()); -+ __ cmp(edx, Operand::StaticVariable(pending_exception_address)); -+ // Cannot use check here as it attempts to generate call into runtime. -+ __ j(equal, &okay, Label::kNear); -+ __ int3(); -+ __ bind(&okay); -+ __ pop(edx); -+ } -+ -+ // Exit the JavaScript to C++ exit frame. -+ __ LeaveExitFrame(save_doubles(), !argv_in_register()); -+ __ ret(0); -+ -+ // Handling of exception. -+ __ bind(&exception_returned); -+ -+ ExternalReference pending_handler_context_address( -+ IsolateAddressId::kPendingHandlerContextAddress, isolate()); -+ ExternalReference pending_handler_code_address( -+ IsolateAddressId::kPendingHandlerCodeAddress, isolate()); -+ ExternalReference pending_handler_offset_address( -+ IsolateAddressId::kPendingHandlerOffsetAddress, isolate()); -+ ExternalReference pending_handler_fp_address( -+ IsolateAddressId::kPendingHandlerFPAddress, isolate()); -+ ExternalReference pending_handler_sp_address( -+ IsolateAddressId::kPendingHandlerSPAddress, isolate()); -+ -+ // Ask the runtime for help to determine the handler. This will set eax to -+ // contain the current pending exception, don't clobber it. -+ ExternalReference find_handler(Runtime::kUnwindAndFindExceptionHandler, -+ isolate()); -+ { -+ FrameScope scope(masm, StackFrame::MANUAL); -+ __ PrepareCallCFunction(3, eax); -+ __ mov(Operand(esp, 0 * kPointerSize), Immediate(0)); // argc. -+ __ mov(Operand(esp, 1 * kPointerSize), Immediate(0)); // argv. -+ __ mov(Operand(esp, 2 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ __ CallCFunction(find_handler, 3); -+ } -+ -+ // Retrieve the handler context, SP and FP. -+ __ mov(esi, Operand::StaticVariable(pending_handler_context_address)); -+ __ mov(esp, Operand::StaticVariable(pending_handler_sp_address)); -+ __ mov(ebp, Operand::StaticVariable(pending_handler_fp_address)); -+ -+ // If the handler is a JS frame, restore the context to the frame. Note that -+ // the context will be set to (esi == 0) for non-JS frames. -+ Label skip; -+ __ test(esi, esi); -+ __ j(zero, &skip, Label::kNear); -+ __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi); -+ __ bind(&skip); -+ -+ // Compute the handler entry address and jump to it. -+ __ mov(edi, Operand::StaticVariable(pending_handler_code_address)); -+ __ mov(edx, Operand::StaticVariable(pending_handler_offset_address)); -+ // Check whether it's a turbofanned exception handler code before jump to it. -+ Label not_turbo; -+ __ push(eax); -+ __ mov(eax, Operand(edi, Code::kKindSpecificFlags1Offset - kHeapObjectTag)); -+ __ and_(eax, Immediate(1 << Code::kIsTurbofannedBit)); -+ __ j(zero, ¬_turbo); -+ __ fninit(); -+ __ fld1(); -+ __ bind(¬_turbo); -+ __ pop(eax); -+ __ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize)); -+ __ jmp(edi); -+} -+ -+ -+void JSEntryStub::Generate(MacroAssembler* masm) { -+ Label invoke, handler_entry, exit; -+ Label not_outermost_js, not_outermost_js_2; -+ -+ ProfileEntryHookStub::MaybeCallEntryHook(masm); -+ -+ // Set up frame. -+ __ push(ebp); -+ __ mov(ebp, esp); -+ -+ // Push marker in two places. -+ int marker = type(); -+ __ push(Immediate(Smi::FromInt(marker))); // marker -+ ExternalReference context_address(IsolateAddressId::kContextAddress, -+ isolate()); -+ __ push(Operand::StaticVariable(context_address)); // context -+ // Save callee-saved registers (C calling conventions). -+ __ push(edi); -+ __ push(esi); -+ __ push(ebx); -+ -+ // Save copies of the top frame descriptor on the stack. -+ ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate()); -+ __ push(Operand::StaticVariable(c_entry_fp)); -+ -+ // If this is the outermost JS call, set js_entry_sp value. -+ ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate()); -+ __ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0)); -+ __ j(not_equal, ¬_outermost_js, Label::kNear); -+ __ mov(Operand::StaticVariable(js_entry_sp), ebp); -+ __ push(Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); -+ __ jmp(&invoke, Label::kNear); -+ __ bind(¬_outermost_js); -+ __ push(Immediate(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME))); -+ -+ // Jump to a faked try block that does the invoke, with a faked catch -+ // block that sets the pending exception. -+ __ jmp(&invoke); -+ __ bind(&handler_entry); -+ handler_offset_ = handler_entry.pos(); -+ // Caught exception: Store result (exception) in the pending exception -+ // field in the JSEnv and return a failure sentinel. -+ ExternalReference pending_exception( -+ IsolateAddressId::kPendingExceptionAddress, isolate()); -+ __ mov(Operand::StaticVariable(pending_exception), eax); -+ __ mov(eax, Immediate(isolate()->factory()->exception())); -+ __ jmp(&exit); -+ -+ // Invoke: Link this frame into the handler chain. -+ __ bind(&invoke); -+ __ PushStackHandler(); -+ -+ // Fake a receiver (NULL). -+ __ push(Immediate(0)); // receiver -+ -+ // Invoke the function by calling through JS entry trampoline builtin and -+ // pop the faked function when we return. Notice that we cannot store a -+ // reference to the trampoline code directly in this stub, because the -+ // builtin stubs may not have been generated yet. -+ if (type() == StackFrame::ENTRY_CONSTRUCT) { -+ ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, -+ isolate()); -+ __ mov(edx, Immediate(construct_entry)); -+ } else { -+ ExternalReference entry(Builtins::kJSEntryTrampoline, isolate()); -+ __ mov(edx, Immediate(entry)); -+ } -+ __ mov(edx, Operand(edx, 0)); // deref address -+ __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); -+ __ call(edx); -+ -+ // Unlink this frame from the handler chain. -+ __ PopStackHandler(); -+ -+ __ bind(&exit); -+ // Check if the current stack frame is marked as the outermost JS frame. -+ __ pop(ebx); -+ __ cmp(ebx, Immediate(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); -+ __ j(not_equal, ¬_outermost_js_2); -+ __ mov(Operand::StaticVariable(js_entry_sp), Immediate(0)); -+ __ bind(¬_outermost_js_2); -+ -+ // Restore the top frame descriptor from the stack. -+ __ pop(Operand::StaticVariable( -+ ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()))); -+ -+ // Restore callee-saved registers (C calling conventions). -+ __ pop(ebx); -+ __ pop(esi); -+ __ pop(edi); -+ __ add(esp, Immediate(2 * kPointerSize)); // remove markers -+ -+ // Restore frame pointer and return. -+ __ pop(ebp); -+ __ ret(0); -+} -+ -+ -+// ------------------------------------------------------------------------- -+// StringCharCodeAtGenerator -+ -+void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { -+ // If the receiver is a smi trigger the non-string case. -+ if (check_mode_ == RECEIVER_IS_UNKNOWN) { -+ __ JumpIfSmi(object_, receiver_not_string_); -+ -+ // Fetch the instance type of the receiver into result register. -+ __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); -+ __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); -+ // If the receiver is not a string trigger the non-string case. -+ __ test(result_, Immediate(kIsNotStringMask)); -+ __ j(not_zero, receiver_not_string_); -+ } -+ -+ // If the index is non-smi trigger the non-smi case. -+ __ JumpIfNotSmi(index_, &index_not_smi_); -+ __ bind(&got_smi_index_); -+ -+ // Check for index out of range. -+ __ cmp(index_, FieldOperand(object_, String::kLengthOffset)); -+ __ j(above_equal, index_out_of_range_); -+ -+ __ SmiUntag(index_); -+ -+ Factory* factory = masm->isolate()->factory(); -+ StringCharLoadGenerator::Generate( -+ masm, factory, object_, index_, result_, &call_runtime_); -+ -+ __ SmiTag(result_); -+ __ bind(&exit_); -+} -+ -+ -+void StringCharCodeAtGenerator::GenerateSlow( -+ MacroAssembler* masm, EmbedMode embed_mode, -+ const RuntimeCallHelper& call_helper) { -+ __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); -+ -+ // Index is not a smi. -+ __ bind(&index_not_smi_); -+ // If index is a heap number, try converting it to an integer. -+ __ CheckMap(index_, -+ masm->isolate()->factory()->heap_number_map(), -+ index_not_number_, -+ DONT_DO_SMI_CHECK); -+ call_helper.BeforeCall(masm); -+ if (embed_mode == PART_OF_IC_HANDLER) { -+ __ push(LoadWithVectorDescriptor::VectorRegister()); -+ __ push(LoadDescriptor::SlotRegister()); -+ } -+ __ push(object_); -+ __ push(index_); // Consumed by runtime conversion function. -+ __ CallRuntime(Runtime::kNumberToSmi); -+ if (!index_.is(eax)) { -+ // Save the conversion result before the pop instructions below -+ // have a chance to overwrite it. -+ __ mov(index_, eax); -+ } -+ __ pop(object_); -+ if (embed_mode == PART_OF_IC_HANDLER) { -+ __ pop(LoadDescriptor::SlotRegister()); -+ __ pop(LoadWithVectorDescriptor::VectorRegister()); -+ } -+ // Reload the instance type. -+ __ mov(result_, FieldOperand(object_, HeapObject::kMapOffset)); -+ __ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset)); -+ call_helper.AfterCall(masm); -+ // If index is still not a smi, it must be out of range. -+ STATIC_ASSERT(kSmiTag == 0); -+ __ JumpIfNotSmi(index_, index_out_of_range_); -+ // Otherwise, return to the fast path. -+ __ jmp(&got_smi_index_); -+ -+ // Call runtime. We get here when the receiver is a string and the -+ // index is a number, but the code of getting the actual character -+ // is too complex (e.g., when the string needs to be flattened). -+ __ bind(&call_runtime_); -+ call_helper.BeforeCall(masm); -+ __ push(object_); -+ __ SmiTag(index_); -+ __ push(index_); -+ __ CallRuntime(Runtime::kStringCharCodeAtRT); -+ if (!result_.is(eax)) { -+ __ mov(result_, eax); -+ } -+ call_helper.AfterCall(masm); -+ __ jmp(&exit_); -+ -+ __ Abort(kUnexpectedFallthroughFromCharCodeAtSlowCase); -+} -+ -+void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, -+ Register left, -+ Register right, -+ Register scratch1, -+ Register scratch2) { -+ Register length = scratch1; -+ -+ // Compare lengths. -+ Label strings_not_equal, check_zero_length; -+ __ mov(length, FieldOperand(left, String::kLengthOffset)); -+ __ cmp(length, FieldOperand(right, String::kLengthOffset)); -+ __ j(equal, &check_zero_length, Label::kNear); -+ __ bind(&strings_not_equal); -+ __ Move(eax, Immediate(Smi::FromInt(NOT_EQUAL))); -+ __ ret(0); -+ -+ // Check if the length is zero. -+ Label compare_chars; -+ __ bind(&check_zero_length); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ test(length, length); -+ __ j(not_zero, &compare_chars, Label::kNear); -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ ret(0); -+ -+ // Compare characters. -+ __ bind(&compare_chars); -+ GenerateOneByteCharsCompareLoop(masm, left, right, length, scratch2, -+ &strings_not_equal, Label::kNear); -+ -+ // Characters are equal. -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ ret(0); -+} -+ -+ -+void StringHelper::GenerateCompareFlatOneByteStrings( -+ MacroAssembler* masm, Register left, Register right, Register scratch1, -+ Register scratch2, Register scratch3) { -+ Counters* counters = masm->isolate()->counters(); -+ __ IncrementCounter(counters->string_compare_native(), 1); -+ -+ // Find minimum length. -+ Label left_shorter; -+ __ mov(scratch1, FieldOperand(left, String::kLengthOffset)); -+ __ mov(scratch3, scratch1); -+ __ sub(scratch3, FieldOperand(right, String::kLengthOffset)); -+ -+ Register length_delta = scratch3; -+ -+ __ j(less_equal, &left_shorter, Label::kNear); -+ // Right string is shorter. Change scratch1 to be length of right string. -+ __ sub(scratch1, length_delta); -+ __ bind(&left_shorter); -+ -+ Register min_length = scratch1; -+ -+ // If either length is zero, just compare lengths. -+ Label compare_lengths; -+ __ test(min_length, min_length); -+ __ j(zero, &compare_lengths, Label::kNear); -+ -+ // Compare characters. -+ Label result_not_equal; -+ GenerateOneByteCharsCompareLoop(masm, left, right, min_length, scratch2, -+ &result_not_equal, Label::kNear); -+ -+ // Compare lengths - strings up to min-length are equal. -+ __ bind(&compare_lengths); -+ __ test(length_delta, length_delta); -+ Label length_not_equal; -+ __ j(not_zero, &length_not_equal, Label::kNear); -+ -+ // Result is EQUAL. -+ STATIC_ASSERT(EQUAL == 0); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ ret(0); -+ -+ Label result_greater; -+ Label result_less; -+ __ bind(&length_not_equal); -+ __ j(greater, &result_greater, Label::kNear); -+ __ jmp(&result_less, Label::kNear); -+ __ bind(&result_not_equal); -+ __ j(above, &result_greater, Label::kNear); -+ __ bind(&result_less); -+ -+ // Result is LESS. -+ __ Move(eax, Immediate(Smi::FromInt(LESS))); -+ __ ret(0); -+ -+ // Result is GREATER. -+ __ bind(&result_greater); -+ __ Move(eax, Immediate(Smi::FromInt(GREATER))); -+ __ ret(0); -+} -+ -+ -+void StringHelper::GenerateOneByteCharsCompareLoop( -+ MacroAssembler* masm, Register left, Register right, Register length, -+ Register scratch, Label* chars_not_equal, -+ Label::Distance chars_not_equal_near) { -+ // Change index to run from -length to -1 by adding length to string -+ // start. This means that loop ends when index reaches zero, which -+ // doesn't need an additional compare. -+ __ SmiUntag(length); -+ __ lea(left, -+ FieldOperand(left, length, times_1, SeqOneByteString::kHeaderSize)); -+ __ lea(right, -+ FieldOperand(right, length, times_1, SeqOneByteString::kHeaderSize)); -+ __ neg(length); -+ Register index = length; // index = -length; -+ -+ // Compare loop. -+ Label loop; -+ __ bind(&loop); -+ __ mov_b(scratch, Operand(left, index, times_1, 0)); -+ __ cmpb(scratch, Operand(right, index, times_1, 0)); -+ __ j(not_equal, chars_not_equal, chars_not_equal_near); -+ __ inc(index); -+ __ j(not_zero, &loop); -+} -+ -+ -+void CompareICStub::GenerateBooleans(MacroAssembler* masm) { -+ DCHECK_EQ(CompareICState::BOOLEAN, state()); -+ Label miss; -+ Label::Distance const miss_distance = -+ masm->emit_debug_code() ? Label::kFar : Label::kNear; -+ -+ __ JumpIfSmi(edx, &miss, miss_distance); -+ __ mov(ecx, FieldOperand(edx, HeapObject::kMapOffset)); -+ __ JumpIfSmi(eax, &miss, miss_distance); -+ __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ JumpIfNotRoot(ecx, Heap::kBooleanMapRootIndex, &miss, miss_distance); -+ __ JumpIfNotRoot(ebx, Heap::kBooleanMapRootIndex, &miss, miss_distance); -+ if (!Token::IsEqualityOp(op())) { -+ __ mov(eax, FieldOperand(eax, Oddball::kToNumberOffset)); -+ __ AssertSmi(eax); -+ __ mov(edx, FieldOperand(edx, Oddball::kToNumberOffset)); -+ __ AssertSmi(edx); -+ __ xchg(eax, edx); -+ } -+ __ sub(eax, edx); -+ __ Ret(); -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateSmis(MacroAssembler* masm) { -+ DCHECK(state() == CompareICState::SMI); -+ Label miss; -+ __ mov(ecx, edx); -+ __ or_(ecx, eax); -+ __ JumpIfNotSmi(ecx, &miss, Label::kNear); -+ -+ if (GetCondition() == equal) { -+ // For equality we do not care about the sign of the result. -+ __ sub(eax, edx); -+ } else { -+ Label done; -+ __ sub(edx, eax); -+ __ j(no_overflow, &done, Label::kNear); -+ // Correct sign of result in case of overflow. -+ __ not_(edx); -+ __ bind(&done); -+ __ mov(eax, edx); -+ } -+ __ ret(0); -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateNumbers(MacroAssembler* masm) { -+ DCHECK(state() == CompareICState::NUMBER); -+ -+ Label generic_stub, check_left; -+ Label unordered, maybe_undefined1, maybe_undefined2; -+ Label miss; -+ -+ if (left() == CompareICState::SMI) { -+ __ JumpIfNotSmi(edx, &miss); -+ } -+ if (right() == CompareICState::SMI) { -+ __ JumpIfNotSmi(eax, &miss); -+ } -+ -+ // Inlining the double comparison and falling back to the general compare -+ // stub if NaN is involved or SSE2 or CMOV is unsupported. -+ __ JumpIfSmi(eax, &check_left, Label::kNear); -+ __ cmp(FieldOperand(eax, HeapObject::kMapOffset), -+ isolate()->factory()->heap_number_map()); -+ __ j(not_equal, &maybe_undefined1, Label::kNear); -+ -+ __ bind(&check_left); -+ __ JumpIfSmi(edx, &generic_stub, Label::kNear); -+ __ cmp(FieldOperand(edx, HeapObject::kMapOffset), -+ isolate()->factory()->heap_number_map()); -+ __ j(not_equal, &maybe_undefined2, Label::kNear); -+ -+ __ bind(&unordered); -+ __ bind(&generic_stub); -+ CompareICStub stub(isolate(), op(), CompareICState::GENERIC, -+ CompareICState::GENERIC, CompareICState::GENERIC); -+ __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); -+ -+ __ bind(&maybe_undefined1); -+ if (Token::IsOrderedRelationalCompareOp(op())) { -+ __ cmp(eax, Immediate(isolate()->factory()->undefined_value())); -+ __ j(not_equal, &miss); -+ __ JumpIfSmi(edx, &unordered); -+ __ CmpObjectType(edx, HEAP_NUMBER_TYPE, ecx); -+ __ j(not_equal, &maybe_undefined2, Label::kNear); -+ __ jmp(&unordered); -+ } -+ -+ __ bind(&maybe_undefined2); -+ if (Token::IsOrderedRelationalCompareOp(op())) { -+ __ cmp(edx, Immediate(isolate()->factory()->undefined_value())); -+ __ j(equal, &unordered); -+ } -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) { -+ DCHECK(state() == CompareICState::INTERNALIZED_STRING); -+ DCHECK(GetCondition() == equal); -+ -+ // Registers containing left and right operands respectively. -+ Register left = edx; -+ Register right = eax; -+ Register tmp1 = ecx; -+ Register tmp2 = ebx; -+ -+ // Check that both operands are heap objects. -+ Label miss; -+ __ mov(tmp1, left); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ and_(tmp1, right); -+ __ JumpIfSmi(tmp1, &miss, Label::kNear); -+ -+ // Check that both operands are internalized strings. -+ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); -+ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); -+ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); -+ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); -+ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); -+ __ or_(tmp1, tmp2); -+ __ test(tmp1, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); -+ __ j(not_zero, &miss, Label::kNear); -+ -+ // Internalized strings are compared by identity. -+ Label done; -+ __ cmp(left, right); -+ // Make sure eax is non-zero. At this point input operands are -+ // guaranteed to be non-zero. -+ DCHECK(right.is(eax)); -+ __ j(not_equal, &done, Label::kNear); -+ STATIC_ASSERT(EQUAL == 0); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ bind(&done); -+ __ ret(0); -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) { -+ DCHECK(state() == CompareICState::UNIQUE_NAME); -+ DCHECK(GetCondition() == equal); -+ -+ // Registers containing left and right operands respectively. -+ Register left = edx; -+ Register right = eax; -+ Register tmp1 = ecx; -+ Register tmp2 = ebx; -+ -+ // Check that both operands are heap objects. -+ Label miss; -+ __ mov(tmp1, left); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ and_(tmp1, right); -+ __ JumpIfSmi(tmp1, &miss, Label::kNear); -+ -+ // Check that both operands are unique names. This leaves the instance -+ // types loaded in tmp1 and tmp2. -+ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); -+ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); -+ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); -+ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); -+ -+ __ JumpIfNotUniqueNameInstanceType(tmp1, &miss, Label::kNear); -+ __ JumpIfNotUniqueNameInstanceType(tmp2, &miss, Label::kNear); -+ -+ // Unique names are compared by identity. -+ Label done; -+ __ cmp(left, right); -+ // Make sure eax is non-zero. At this point input operands are -+ // guaranteed to be non-zero. -+ DCHECK(right.is(eax)); -+ __ j(not_equal, &done, Label::kNear); -+ STATIC_ASSERT(EQUAL == 0); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ bind(&done); -+ __ ret(0); -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateStrings(MacroAssembler* masm) { -+ DCHECK(state() == CompareICState::STRING); -+ Label miss; -+ -+ bool equality = Token::IsEqualityOp(op()); -+ -+ // Registers containing left and right operands respectively. -+ Register left = edx; -+ Register right = eax; -+ Register tmp1 = ecx; -+ Register tmp2 = ebx; -+ Register tmp3 = edi; -+ -+ // Check that both operands are heap objects. -+ __ mov(tmp1, left); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ and_(tmp1, right); -+ __ JumpIfSmi(tmp1, &miss); -+ -+ // Check that both operands are strings. This leaves the instance -+ // types loaded in tmp1 and tmp2. -+ __ mov(tmp1, FieldOperand(left, HeapObject::kMapOffset)); -+ __ mov(tmp2, FieldOperand(right, HeapObject::kMapOffset)); -+ __ movzx_b(tmp1, FieldOperand(tmp1, Map::kInstanceTypeOffset)); -+ __ movzx_b(tmp2, FieldOperand(tmp2, Map::kInstanceTypeOffset)); -+ __ mov(tmp3, tmp1); -+ STATIC_ASSERT(kNotStringTag != 0); -+ __ or_(tmp3, tmp2); -+ __ test(tmp3, Immediate(kIsNotStringMask)); -+ __ j(not_zero, &miss); -+ -+ // Fast check for identical strings. -+ Label not_same; -+ __ cmp(left, right); -+ __ j(not_equal, ¬_same, Label::kNear); -+ STATIC_ASSERT(EQUAL == 0); -+ STATIC_ASSERT(kSmiTag == 0); -+ __ Move(eax, Immediate(Smi::FromInt(EQUAL))); -+ __ ret(0); -+ -+ // Handle not identical strings. -+ __ bind(¬_same); -+ -+ // Check that both strings are internalized. If they are, we're done -+ // because we already know they are not identical. But in the case of -+ // non-equality compare, we still need to determine the order. We -+ // also know they are both strings. -+ if (equality) { -+ Label do_compare; -+ STATIC_ASSERT(kInternalizedTag == 0); -+ __ or_(tmp1, tmp2); -+ __ test(tmp1, Immediate(kIsNotInternalizedMask)); -+ __ j(not_zero, &do_compare, Label::kNear); -+ // Make sure eax is non-zero. At this point input operands are -+ // guaranteed to be non-zero. -+ DCHECK(right.is(eax)); -+ __ ret(0); -+ __ bind(&do_compare); -+ } -+ -+ // Check that both strings are sequential one-byte. -+ Label runtime; -+ __ JumpIfNotBothSequentialOneByteStrings(left, right, tmp1, tmp2, &runtime); -+ -+ // Compare flat one byte strings. Returns when done. -+ if (equality) { -+ StringHelper::GenerateFlatOneByteStringEquals(masm, left, right, tmp1, -+ tmp2); -+ } else { -+ StringHelper::GenerateCompareFlatOneByteStrings(masm, left, right, tmp1, -+ tmp2, tmp3); -+ } -+ -+ // Handle more complex cases in runtime. -+ __ bind(&runtime); -+ if (equality) { -+ { -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ Push(left); -+ __ Push(right); -+ __ CallRuntime(Runtime::kStringEqual); -+ } -+ __ sub(eax, Immediate(masm->isolate()->factory()->true_value())); -+ __ Ret(); -+ } else { -+ __ pop(tmp1); // Return address. -+ __ push(left); -+ __ push(right); -+ __ push(tmp1); -+ __ TailCallRuntime(Runtime::kStringCompare); -+ } -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateReceivers(MacroAssembler* masm) { -+ DCHECK_EQ(CompareICState::RECEIVER, state()); -+ Label miss; -+ __ mov(ecx, edx); -+ __ and_(ecx, eax); -+ __ JumpIfSmi(ecx, &miss, Label::kNear); -+ -+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); -+ __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(below, &miss, Label::kNear); -+ __ CmpObjectType(edx, FIRST_JS_RECEIVER_TYPE, ecx); -+ __ j(below, &miss, Label::kNear); -+ -+ DCHECK_EQ(equal, GetCondition()); -+ __ sub(eax, edx); -+ __ ret(0); -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateKnownReceivers(MacroAssembler* masm) { -+ Label miss; -+ Handle cell = Map::WeakCellForMap(known_map_); -+ __ mov(ecx, edx); -+ __ and_(ecx, eax); -+ __ JumpIfSmi(ecx, &miss, Label::kNear); -+ -+ __ GetWeakValue(edi, cell); -+ __ cmp(edi, FieldOperand(eax, HeapObject::kMapOffset)); -+ __ j(not_equal, &miss, Label::kNear); -+ __ cmp(edi, FieldOperand(edx, HeapObject::kMapOffset)); -+ __ j(not_equal, &miss, Label::kNear); -+ -+ if (Token::IsEqualityOp(op())) { -+ __ sub(eax, edx); -+ __ ret(0); -+ } else { -+ __ PopReturnAddressTo(ecx); -+ __ Push(edx); -+ __ Push(eax); -+ __ Push(Immediate(Smi::FromInt(NegativeComparisonResult(GetCondition())))); -+ __ PushReturnAddressFrom(ecx); -+ __ TailCallRuntime(Runtime::kCompare); -+ } -+ -+ __ bind(&miss); -+ GenerateMiss(masm); -+} -+ -+ -+void CompareICStub::GenerateMiss(MacroAssembler* masm) { -+ { -+ // Call the runtime system in a fresh internal frame. -+ FrameScope scope(masm, StackFrame::INTERNAL); -+ __ push(edx); // Preserve edx and eax. -+ __ push(eax); -+ __ push(edx); // And also use them as the arguments. -+ __ push(eax); -+ __ push(Immediate(Smi::FromInt(op()))); -+ __ CallRuntime(Runtime::kCompareIC_Miss); -+ // Compute the entry point of the rewritten stub. -+ __ lea(edi, FieldOperand(eax, Code::kHeaderSize)); -+ __ pop(eax); -+ __ pop(edx); -+ } -+ -+ // Do a tail call to the rewritten stub. -+ __ jmp(edi); -+} -+ -+ -+// Helper function used to check that the dictionary doesn't contain -+// the property. This function may return false negatives, so miss_label -+// must always call a backup property check that is complete. -+// This function is safe to call if the receiver has fast properties. -+// Name must be a unique name and receiver must be a heap object. -+void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, -+ Label* miss, -+ Label* done, -+ Register properties, -+ Handle name, -+ Register r0) { -+ DCHECK(name->IsUniqueName()); -+ -+ // If names of slots in range from 1 to kProbes - 1 for the hash value are -+ // not equal to the name and kProbes-th slot is not used (its name is the -+ // undefined value), it guarantees the hash table doesn't contain the -+ // property. It's true even if some slots represent deleted properties -+ // (their names are the hole value). -+ for (int i = 0; i < kInlinedProbes; i++) { -+ // Compute the masked index: (hash + i + i * i) & mask. -+ Register index = r0; -+ // Capacity is smi 2^n. -+ __ mov(index, FieldOperand(properties, kCapacityOffset)); -+ __ dec(index); -+ __ and_(index, -+ Immediate(Smi::FromInt(name->Hash() + -+ NameDictionary::GetProbeOffset(i)))); -+ -+ // Scale the index by multiplying by the entry size. -+ STATIC_ASSERT(NameDictionary::kEntrySize == 3); -+ __ lea(index, Operand(index, index, times_2, 0)); // index *= 3. -+ Register entity_name = r0; -+ // Having undefined at this place means the name is not contained. -+ STATIC_ASSERT(kSmiTagSize == 1); -+ __ mov(entity_name, Operand(properties, index, times_half_pointer_size, -+ kElementsStartOffset - kHeapObjectTag)); -+ __ cmp(entity_name, masm->isolate()->factory()->undefined_value()); -+ __ j(equal, done); -+ -+ // Stop if found the property. -+ __ cmp(entity_name, Handle(name)); -+ __ j(equal, miss); -+ -+ Label good; -+ // Check for the hole and skip. -+ __ cmp(entity_name, masm->isolate()->factory()->the_hole_value()); -+ __ j(equal, &good, Label::kNear); -+ -+ // Check if the entry name is not a unique name. -+ __ mov(entity_name, FieldOperand(entity_name, HeapObject::kMapOffset)); -+ __ JumpIfNotUniqueNameInstanceType( -+ FieldOperand(entity_name, Map::kInstanceTypeOffset), miss); -+ __ bind(&good); -+ } -+ -+ NameDictionaryLookupStub stub(masm->isolate(), properties, r0, r0, -+ NEGATIVE_LOOKUP); -+ __ push(Immediate(name)); -+ __ push(Immediate(name->Hash())); -+ __ CallStub(&stub); -+ __ test(r0, r0); -+ __ j(not_zero, miss); -+ __ jmp(done); -+} -+ -+void NameDictionaryLookupStub::Generate(MacroAssembler* masm) { -+ // This stub overrides SometimesSetsUpAFrame() to return false. That means -+ // we cannot call anything that could cause a GC from this stub. -+ // Stack frame on entry: -+ // esp[0 * kPointerSize]: return address. -+ // esp[1 * kPointerSize]: key's hash. -+ // esp[2 * kPointerSize]: key. -+ // Registers: -+ // dictionary_: NameDictionary to probe. -+ // result_: used as scratch. -+ // index_: will hold an index of entry if lookup is successful. -+ // might alias with result_. -+ // Returns: -+ // result_ is zero if lookup failed, non zero otherwise. -+ -+ Label in_dictionary, maybe_in_dictionary, not_in_dictionary; -+ -+ Register scratch = result(); -+ -+ __ mov(scratch, FieldOperand(dictionary(), kCapacityOffset)); -+ __ dec(scratch); -+ __ SmiUntag(scratch); -+ __ push(scratch); -+ -+ // If names of slots in range from 1 to kProbes - 1 for the hash value are -+ // not equal to the name and kProbes-th slot is not used (its name is the -+ // undefined value), it guarantees the hash table doesn't contain the -+ // property. It's true even if some slots represent deleted properties -+ // (their names are the null value). -+ for (int i = kInlinedProbes; i < kTotalProbes; i++) { -+ // Compute the masked index: (hash + i + i * i) & mask. -+ __ mov(scratch, Operand(esp, 2 * kPointerSize)); -+ if (i > 0) { -+ __ add(scratch, Immediate(NameDictionary::GetProbeOffset(i))); -+ } -+ __ and_(scratch, Operand(esp, 0)); -+ -+ // Scale the index by multiplying by the entry size. -+ STATIC_ASSERT(NameDictionary::kEntrySize == 3); -+ __ lea(index(), Operand(scratch, scratch, times_2, 0)); // index *= 3. -+ -+ // Having undefined at this place means the name is not contained. -+ STATIC_ASSERT(kSmiTagSize == 1); -+ __ mov(scratch, Operand(dictionary(), index(), times_pointer_size, -+ kElementsStartOffset - kHeapObjectTag)); -+ __ cmp(scratch, isolate()->factory()->undefined_value()); -+ __ j(equal, ¬_in_dictionary); -+ -+ // Stop if found the property. -+ __ cmp(scratch, Operand(esp, 3 * kPointerSize)); -+ __ j(equal, &in_dictionary); -+ -+ if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { -+ // If we hit a key that is not a unique name during negative -+ // lookup we have to bailout as this key might be equal to the -+ // key we are looking for. -+ -+ // Check if the entry name is not a unique name. -+ __ mov(scratch, FieldOperand(scratch, HeapObject::kMapOffset)); -+ __ JumpIfNotUniqueNameInstanceType( -+ FieldOperand(scratch, Map::kInstanceTypeOffset), -+ &maybe_in_dictionary); -+ } -+ } -+ -+ __ bind(&maybe_in_dictionary); -+ // If we are doing negative lookup then probing failure should be -+ // treated as a lookup success. For positive lookup probing failure -+ // should be treated as lookup failure. -+ if (mode() == POSITIVE_LOOKUP) { -+ __ mov(result(), Immediate(0)); -+ __ Drop(1); -+ __ ret(2 * kPointerSize); -+ } -+ -+ __ bind(&in_dictionary); -+ __ mov(result(), Immediate(1)); -+ __ Drop(1); -+ __ ret(2 * kPointerSize); -+ -+ __ bind(¬_in_dictionary); -+ __ mov(result(), Immediate(0)); -+ __ Drop(1); -+ __ ret(2 * kPointerSize); -+} -+ -+ -+void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( -+ Isolate* isolate) { -+ StoreBufferOverflowStub stub(isolate, kDontSaveFPRegs); -+ stub.GetCode(); -+ StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); -+ stub2.GetCode(); -+} -+ -+ -+// Takes the input in 3 registers: address_ value_ and object_. A pointer to -+// the value has just been written into the object, now this stub makes sure -+// we keep the GC informed. The word in the object where the value has been -+// written is in the address register. -+void RecordWriteStub::Generate(MacroAssembler* masm) { -+ Label skip_to_incremental_noncompacting; -+ Label skip_to_incremental_compacting; -+ -+ // The first two instructions are generated with labels so as to get the -+ // offset fixed up correctly by the bind(Label*) call. We patch it back and -+ // forth between a compare instructions (a nop in this position) and the -+ // real branch when we start and stop incremental heap marking. -+ __ jmp(&skip_to_incremental_noncompacting, Label::kNear); -+ __ jmp(&skip_to_incremental_compacting, Label::kFar); -+ -+ if (remembered_set_action() == EMIT_REMEMBERED_SET) { -+ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), -+ MacroAssembler::kReturnAtEnd); -+ } else { -+ __ ret(0); -+ } -+ -+ __ bind(&skip_to_incremental_noncompacting); -+ GenerateIncremental(masm, INCREMENTAL); -+ -+ __ bind(&skip_to_incremental_compacting); -+ GenerateIncremental(masm, INCREMENTAL_COMPACTION); -+ -+ // Initial mode of the stub is expected to be STORE_BUFFER_ONLY. -+ // Will be checked in IncrementalMarking::ActivateGeneratedStub. -+ masm->set_byte_at(0, kTwoByteNopInstruction); -+ masm->set_byte_at(2, kFiveByteNopInstruction); -+} -+ -+ -+void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) { -+ regs_.Save(masm); -+ -+ if (remembered_set_action() == EMIT_REMEMBERED_SET) { -+ Label dont_need_remembered_set; -+ -+ __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); -+ __ JumpIfNotInNewSpace(regs_.scratch0(), // Value. -+ regs_.scratch0(), -+ &dont_need_remembered_set); -+ -+ __ JumpIfInNewSpace(regs_.object(), regs_.scratch0(), -+ &dont_need_remembered_set); -+ -+ // First notify the incremental marker if necessary, then update the -+ // remembered set. -+ CheckNeedsToInformIncrementalMarker( -+ masm, -+ kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, -+ mode); -+ InformIncrementalMarker(masm); -+ regs_.Restore(masm); -+ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), -+ MacroAssembler::kReturnAtEnd); -+ -+ __ bind(&dont_need_remembered_set); -+ } -+ -+ CheckNeedsToInformIncrementalMarker( -+ masm, -+ kReturnOnNoNeedToInformIncrementalMarker, -+ mode); -+ InformIncrementalMarker(masm); -+ regs_.Restore(masm); -+ __ ret(0); -+} -+ -+ -+void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) { -+ regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode()); -+ int argument_count = 3; -+ __ PrepareCallCFunction(argument_count, regs_.scratch0()); -+ __ mov(Operand(esp, 0 * kPointerSize), regs_.object()); -+ __ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot. -+ __ mov(Operand(esp, 2 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ -+ AllowExternalCallThatCantCauseGC scope(masm); -+ __ CallCFunction( -+ ExternalReference::incremental_marking_record_write_function(isolate()), -+ argument_count); -+ -+ regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode()); -+} -+ -+ -+void RecordWriteStub::CheckNeedsToInformIncrementalMarker( -+ MacroAssembler* masm, -+ OnNoNeedToInformIncrementalMarker on_no_need, -+ Mode mode) { -+ Label need_incremental, need_incremental_pop_object; -+ -+#ifndef V8_CONCURRENT_MARKING -+ Label object_is_black; -+ // Let's look at the color of the object: If it is not black we don't have -+ // to inform the incremental marker. -+ __ JumpIfBlack(regs_.object(), -+ regs_.scratch0(), -+ regs_.scratch1(), -+ &object_is_black, -+ Label::kNear); -+ -+ regs_.Restore(masm); -+ if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { -+ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), -+ MacroAssembler::kReturnAtEnd); -+ } else { -+ __ ret(0); -+ } -+ -+ __ bind(&object_is_black); -+#endif -+ -+ // Get the value from the slot. -+ __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); -+ -+ if (mode == INCREMENTAL_COMPACTION) { -+ Label ensure_not_white; -+ -+ __ CheckPageFlag(regs_.scratch0(), // Contains value. -+ regs_.scratch1(), // Scratch. -+ MemoryChunk::kEvacuationCandidateMask, -+ zero, -+ &ensure_not_white, -+ Label::kNear); -+ -+ __ CheckPageFlag(regs_.object(), -+ regs_.scratch1(), // Scratch. -+ MemoryChunk::kSkipEvacuationSlotsRecordingMask, -+ not_zero, -+ &ensure_not_white, -+ Label::kNear); -+ -+ __ jmp(&need_incremental); -+ -+ __ bind(&ensure_not_white); -+ } -+ -+ // We need an extra register for this, so we push the object register -+ // temporarily. -+ __ push(regs_.object()); -+ __ JumpIfWhite(regs_.scratch0(), // The value. -+ regs_.scratch1(), // Scratch. -+ regs_.object(), // Scratch. -+ &need_incremental_pop_object, Label::kNear); -+ __ pop(regs_.object()); -+ -+ regs_.Restore(masm); -+ if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { -+ __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), -+ MacroAssembler::kReturnAtEnd); -+ } else { -+ __ ret(0); -+ } -+ -+ __ bind(&need_incremental_pop_object); -+ __ pop(regs_.object()); -+ -+ __ bind(&need_incremental); -+ -+ // Fall through when we need to inform the incremental marker. -+} -+ -+ -+void ProfileEntryHookStub::MaybeCallEntryHookDelayed(TurboAssembler* tasm, -+ Zone* zone) { -+ if (tasm->isolate()->function_entry_hook() != NULL) { -+ tasm->CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr)); -+ } -+} -+ -+void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { -+ if (masm->isolate()->function_entry_hook() != NULL) { -+ ProfileEntryHookStub stub(masm->isolate()); -+ masm->CallStub(&stub); -+ } -+} -+ -+void ProfileEntryHookStub::Generate(MacroAssembler* masm) { -+ // Save volatile registers. -+ const int kNumSavedRegisters = 3; -+ __ push(eax); -+ __ push(ecx); -+ __ push(edx); -+ -+ // Calculate and push the original stack pointer. -+ __ lea(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); -+ __ push(eax); -+ -+ // Retrieve our return address and use it to calculate the calling -+ // function's address. -+ __ mov(eax, Operand(esp, (kNumSavedRegisters + 1) * kPointerSize)); -+ __ sub(eax, Immediate(Assembler::kCallInstructionLength)); -+ __ push(eax); -+ -+ // Call the entry hook. -+ DCHECK(isolate()->function_entry_hook() != NULL); -+ __ call(FUNCTION_ADDR(isolate()->function_entry_hook()), -+ RelocInfo::RUNTIME_ENTRY); -+ __ add(esp, Immediate(2 * kPointerSize)); -+ -+ // Restore ecx. -+ __ pop(edx); -+ __ pop(ecx); -+ __ pop(eax); -+ -+ __ ret(0); -+} -+ -+template -+static void CreateArrayDispatch(MacroAssembler* masm, -+ AllocationSiteOverrideMode mode) { -+ if (mode == DISABLE_ALLOCATION_SITES) { -+ T stub(masm->isolate(), GetInitialFastElementsKind(), mode); -+ __ TailCallStub(&stub); -+ } else if (mode == DONT_OVERRIDE) { -+ int last_index = -+ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); -+ for (int i = 0; i <= last_index; ++i) { -+ Label next; -+ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); -+ __ cmp(edx, kind); -+ __ j(not_equal, &next); -+ T stub(masm->isolate(), kind); -+ __ TailCallStub(&stub); -+ __ bind(&next); -+ } -+ -+ // If we reached this point there is a problem. -+ __ Abort(kUnexpectedElementsKindInArrayConstructor); -+ } else { -+ UNREACHABLE(); -+ } -+} -+ -+static void CreateArrayDispatchOneArgument(MacroAssembler* masm, -+ AllocationSiteOverrideMode mode) { -+ // ebx - allocation site (if mode != DISABLE_ALLOCATION_SITES) -+ // edx - kind (if mode != DISABLE_ALLOCATION_SITES) -+ // eax - number of arguments -+ // edi - constructor? -+ // esp[0] - return address -+ // esp[4] - last argument -+ STATIC_ASSERT(PACKED_SMI_ELEMENTS == 0); -+ STATIC_ASSERT(HOLEY_SMI_ELEMENTS == 1); -+ STATIC_ASSERT(PACKED_ELEMENTS == 2); -+ STATIC_ASSERT(HOLEY_ELEMENTS == 3); -+ STATIC_ASSERT(PACKED_DOUBLE_ELEMENTS == 4); -+ STATIC_ASSERT(HOLEY_DOUBLE_ELEMENTS == 5); -+ -+ if (mode == DISABLE_ALLOCATION_SITES) { -+ ElementsKind initial = GetInitialFastElementsKind(); -+ ElementsKind holey_initial = GetHoleyElementsKind(initial); -+ -+ ArraySingleArgumentConstructorStub stub_holey( -+ masm->isolate(), holey_initial, DISABLE_ALLOCATION_SITES); -+ __ TailCallStub(&stub_holey); -+ } else if (mode == DONT_OVERRIDE) { -+ // is the low bit set? If so, we are holey and that is good. -+ Label normal_sequence; -+ __ test_b(edx, Immediate(1)); -+ __ j(not_zero, &normal_sequence); -+ -+ // We are going to create a holey array, but our kind is non-holey. -+ // Fix kind and retry. -+ __ inc(edx); -+ -+ if (FLAG_debug_code) { -+ Handle allocation_site_map = -+ masm->isolate()->factory()->allocation_site_map(); -+ __ cmp(FieldOperand(ebx, 0), Immediate(allocation_site_map)); -+ __ Assert(equal, kExpectedAllocationSite); -+ } -+ -+ // Save the resulting elements kind in type info. We can't just store r3 -+ // in the AllocationSite::transition_info field because elements kind is -+ // restricted to a portion of the field...upper bits need to be left alone. -+ STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); -+ __ add( -+ FieldOperand(ebx, AllocationSite::kTransitionInfoOrBoilerplateOffset), -+ Immediate(Smi::FromInt(kFastElementsKindPackedToHoley))); -+ -+ __ bind(&normal_sequence); -+ int last_index = -+ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); -+ for (int i = 0; i <= last_index; ++i) { -+ Label next; -+ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); -+ __ cmp(edx, kind); -+ __ j(not_equal, &next); -+ ArraySingleArgumentConstructorStub stub(masm->isolate(), kind); -+ __ TailCallStub(&stub); -+ __ bind(&next); -+ } -+ -+ // If we reached this point there is a problem. -+ __ Abort(kUnexpectedElementsKindInArrayConstructor); -+ } else { -+ UNREACHABLE(); -+ } -+} -+ -+template -+static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { -+ int to_index = -+ GetSequenceIndexFromFastElementsKind(TERMINAL_FAST_ELEMENTS_KIND); -+ for (int i = 0; i <= to_index; ++i) { -+ ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); -+ T stub(isolate, kind); -+ stub.GetCode(); -+ if (AllocationSite::ShouldTrack(kind)) { -+ T stub1(isolate, kind, DISABLE_ALLOCATION_SITES); -+ stub1.GetCode(); -+ } -+ } -+} -+ -+void CommonArrayConstructorStub::GenerateStubsAheadOfTime(Isolate* isolate) { -+ ArrayConstructorStubAheadOfTimeHelper( -+ isolate); -+ ArrayConstructorStubAheadOfTimeHelper( -+ isolate); -+ ArrayNArgumentsConstructorStub stub(isolate); -+ stub.GetCode(); -+ -+ ElementsKind kinds[2] = {PACKED_ELEMENTS, HOLEY_ELEMENTS}; -+ for (int i = 0; i < 2; i++) { -+ // For internal arrays we only need a few things -+ InternalArrayNoArgumentConstructorStub stubh1(isolate, kinds[i]); -+ stubh1.GetCode(); -+ InternalArraySingleArgumentConstructorStub stubh2(isolate, kinds[i]); -+ stubh2.GetCode(); -+ } -+} -+ -+void ArrayConstructorStub::GenerateDispatchToArrayStub( -+ MacroAssembler* masm, AllocationSiteOverrideMode mode) { -+ Label not_zero_case, not_one_case; -+ __ test(eax, eax); -+ __ j(not_zero, ¬_zero_case); -+ CreateArrayDispatch(masm, mode); -+ -+ __ bind(¬_zero_case); -+ __ cmp(eax, 1); -+ __ j(greater, ¬_one_case); -+ CreateArrayDispatchOneArgument(masm, mode); -+ -+ __ bind(¬_one_case); -+ ArrayNArgumentsConstructorStub stub(masm->isolate()); -+ __ TailCallStub(&stub); -+} -+ -+void ArrayConstructorStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc (only if argument_count() is ANY or MORE_THAN_ONE) -+ // -- ebx : AllocationSite or undefined -+ // -- edi : constructor -+ // -- edx : Original constructor -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // ----------------------------------- -+ if (FLAG_debug_code) { -+ // The array construct code is only set for the global and natives -+ // builtin Array functions which always have maps. -+ -+ // Initial map for the builtin Array function should be a map. -+ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); -+ // Will both indicate a NULL and a Smi. -+ __ test(ecx, Immediate(kSmiTagMask)); -+ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); -+ __ CmpObjectType(ecx, MAP_TYPE, ecx); -+ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); -+ -+ // We should either have undefined in ebx or a valid AllocationSite -+ __ AssertUndefinedOrAllocationSite(ebx); -+ } -+ -+ Label subclassing; -+ -+ // Enter the context of the Array function. -+ __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ __ cmp(edx, edi); -+ __ j(not_equal, &subclassing); -+ -+ Label no_info; -+ // If the feedback vector is the undefined value call an array constructor -+ // that doesn't use AllocationSites. -+ __ cmp(ebx, isolate()->factory()->undefined_value()); -+ __ j(equal, &no_info); -+ -+ // Only look at the lower 16 bits of the transition info. -+ __ mov(edx, -+ FieldOperand(ebx, AllocationSite::kTransitionInfoOrBoilerplateOffset)); -+ __ SmiUntag(edx); -+ STATIC_ASSERT(AllocationSite::ElementsKindBits::kShift == 0); -+ __ and_(edx, Immediate(AllocationSite::ElementsKindBits::kMask)); -+ GenerateDispatchToArrayStub(masm, DONT_OVERRIDE); -+ -+ __ bind(&no_info); -+ GenerateDispatchToArrayStub(masm, DISABLE_ALLOCATION_SITES); -+ -+ // Subclassing. -+ __ bind(&subclassing); -+ __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), edi); -+ __ add(eax, Immediate(3)); -+ __ PopReturnAddressTo(ecx); -+ __ Push(edx); -+ __ Push(ebx); -+ __ PushReturnAddressFrom(ecx); -+ __ JumpToExternalReference(ExternalReference(Runtime::kNewArray, isolate())); -+} -+ -+void InternalArrayConstructorStub::GenerateCase(MacroAssembler* masm, -+ ElementsKind kind) { -+ Label not_zero_case, not_one_case; -+ Label normal_sequence; -+ -+ __ test(eax, eax); -+ __ j(not_zero, ¬_zero_case); -+ InternalArrayNoArgumentConstructorStub stub0(isolate(), kind); -+ __ TailCallStub(&stub0); -+ -+ __ bind(¬_zero_case); -+ __ cmp(eax, 1); -+ __ j(greater, ¬_one_case); -+ -+ if (IsFastPackedElementsKind(kind)) { -+ // We might need to create a holey array -+ // look at the first argument -+ __ mov(ecx, Operand(esp, kPointerSize)); -+ __ test(ecx, ecx); -+ __ j(zero, &normal_sequence); -+ -+ InternalArraySingleArgumentConstructorStub stub1_holey( -+ isolate(), GetHoleyElementsKind(kind)); -+ __ TailCallStub(&stub1_holey); -+ } -+ -+ __ bind(&normal_sequence); -+ InternalArraySingleArgumentConstructorStub stub1(isolate(), kind); -+ __ TailCallStub(&stub1); -+ -+ __ bind(¬_one_case); -+ ArrayNArgumentsConstructorStub stubN(isolate()); -+ __ TailCallStub(&stubN); -+} -+ -+void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- eax : argc -+ // -- edi : constructor -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // ----------------------------------- -+ -+ if (FLAG_debug_code) { -+ // The array construct code is only set for the global and natives -+ // builtin Array functions which always have maps. -+ -+ // Initial map for the builtin Array function should be a map. -+ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); -+ // Will both indicate a NULL and a Smi. -+ __ test(ecx, Immediate(kSmiTagMask)); -+ __ Assert(not_zero, kUnexpectedInitialMapForArrayFunction); -+ __ CmpObjectType(ecx, MAP_TYPE, ecx); -+ __ Assert(equal, kUnexpectedInitialMapForArrayFunction); -+ } -+ -+ // Figure out the right elements kind -+ __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); -+ -+ // Load the map's "bit field 2" into |result|. We only need the first byte, -+ // but the following masking takes care of that anyway. -+ __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); -+ // Retrieve elements_kind from bit field 2. -+ __ DecodeField(ecx); -+ -+ if (FLAG_debug_code) { -+ Label done; -+ __ cmp(ecx, Immediate(PACKED_ELEMENTS)); -+ __ j(equal, &done); -+ __ cmp(ecx, Immediate(HOLEY_ELEMENTS)); -+ __ Assert(equal, kInvalidElementsKindForInternalArrayOrInternalPackedArray); -+ __ bind(&done); -+ } -+ -+ Label fast_elements_case; -+ __ cmp(ecx, Immediate(PACKED_ELEMENTS)); -+ __ j(equal, &fast_elements_case); -+ GenerateCase(masm, HOLEY_ELEMENTS); -+ -+ __ bind(&fast_elements_case); -+ GenerateCase(masm, PACKED_ELEMENTS); -+} -+ -+// Generates an Operand for saving parameters after PrepareCallApiFunction. -+static Operand ApiParameterOperand(int index) { -+ return Operand(esp, index * kPointerSize); -+} -+ -+ -+// Prepares stack to put arguments (aligns and so on). Reserves -+// space for return value if needed (assumes the return value is a handle). -+// Arguments must be stored in ApiParameterOperand(0), ApiParameterOperand(1) -+// etc. Saves context (esi). If space was reserved for return value then -+// stores the pointer to the reserved slot into esi. -+static void PrepareCallApiFunction(MacroAssembler* masm, int argc) { -+ __ EnterApiExitFrame(argc); -+ if (__ emit_debug_code()) { -+ __ mov(esi, Immediate(bit_cast(kZapValue))); -+ } -+} -+ -+ -+// Calls an API function. Allocates HandleScope, extracts returned value -+// from handle and propagates exceptions. Clobbers ebx, edi and -+// caller-save registers. Restores context. On return removes -+// stack_space * kPointerSize (GCed). -+static void CallApiFunctionAndReturn(MacroAssembler* masm, -+ Register function_address, -+ ExternalReference thunk_ref, -+ Operand thunk_last_arg, int stack_space, -+ Operand* stack_space_operand, -+ Operand return_value_operand, -+ Operand* context_restore_operand) { -+ Isolate* isolate = masm->isolate(); -+ -+ ExternalReference next_address = -+ ExternalReference::handle_scope_next_address(isolate); -+ ExternalReference limit_address = -+ ExternalReference::handle_scope_limit_address(isolate); -+ ExternalReference level_address = -+ ExternalReference::handle_scope_level_address(isolate); -+ -+ DCHECK(edx.is(function_address)); -+ // Allocate HandleScope in callee-save registers. -+ __ mov(ebx, Operand::StaticVariable(next_address)); -+ __ mov(edi, Operand::StaticVariable(limit_address)); -+ __ add(Operand::StaticVariable(level_address), Immediate(1)); -+ -+ if (FLAG_log_timer_events) { -+ FrameScope frame(masm, StackFrame::MANUAL); -+ __ PushSafepointRegisters(); -+ __ PrepareCallCFunction(1, eax); -+ __ mov(Operand(esp, 0), -+ Immediate(ExternalReference::isolate_address(isolate))); -+ __ CallCFunction(ExternalReference::log_enter_external_function(isolate), -+ 1); -+ __ PopSafepointRegisters(); -+ } -+ -+ -+ Label profiler_disabled; -+ Label end_profiler_check; -+ __ mov(eax, Immediate(ExternalReference::is_profiling_address(isolate))); -+ __ cmpb(Operand(eax, 0), Immediate(0)); -+ __ j(zero, &profiler_disabled); -+ -+ // Additional parameter is the address of the actual getter function. -+ __ mov(thunk_last_arg, function_address); -+ // Call the api function. -+ __ mov(eax, Immediate(thunk_ref)); -+ __ call(eax); -+ __ jmp(&end_profiler_check); -+ -+ __ bind(&profiler_disabled); -+ // Call the api function. -+ __ call(function_address); -+ __ bind(&end_profiler_check); -+ -+ if (FLAG_log_timer_events) { -+ FrameScope frame(masm, StackFrame::MANUAL); -+ __ PushSafepointRegisters(); -+ __ PrepareCallCFunction(1, eax); -+ __ mov(Operand(esp, 0), -+ Immediate(ExternalReference::isolate_address(isolate))); -+ __ CallCFunction(ExternalReference::log_leave_external_function(isolate), -+ 1); -+ __ PopSafepointRegisters(); -+ } -+ -+ Label prologue; -+ // Load the value from ReturnValue -+ __ mov(eax, return_value_operand); -+ -+ Label promote_scheduled_exception; -+ Label delete_allocated_handles; -+ Label leave_exit_frame; -+ -+ __ bind(&prologue); -+ // No more valid handles (the result handle was the last one). Restore -+ // previous handle scope. -+ __ mov(Operand::StaticVariable(next_address), ebx); -+ __ sub(Operand::StaticVariable(level_address), Immediate(1)); -+ __ Assert(above_equal, kInvalidHandleScopeLevel); -+ __ cmp(edi, Operand::StaticVariable(limit_address)); -+ __ j(not_equal, &delete_allocated_handles); -+ -+ // Leave the API exit frame. -+ __ bind(&leave_exit_frame); -+ bool restore_context = context_restore_operand != NULL; -+ if (restore_context) { -+ __ mov(esi, *context_restore_operand); -+ } -+ if (stack_space_operand != nullptr) { -+ __ mov(ebx, *stack_space_operand); -+ } -+ __ LeaveApiExitFrame(!restore_context); -+ -+ // Check if the function scheduled an exception. -+ ExternalReference scheduled_exception_address = -+ ExternalReference::scheduled_exception_address(isolate); -+ __ cmp(Operand::StaticVariable(scheduled_exception_address), -+ Immediate(isolate->factory()->the_hole_value())); -+ __ j(not_equal, &promote_scheduled_exception); -+ -+#if DEBUG -+ // Check if the function returned a valid JavaScript value. -+ Label ok; -+ Register return_value = eax; -+ Register map = ecx; -+ -+ __ JumpIfSmi(return_value, &ok, Label::kNear); -+ __ mov(map, FieldOperand(return_value, HeapObject::kMapOffset)); -+ -+ __ CmpInstanceType(map, LAST_NAME_TYPE); -+ __ j(below_equal, &ok, Label::kNear); -+ -+ __ CmpInstanceType(map, FIRST_JS_RECEIVER_TYPE); -+ __ j(above_equal, &ok, Label::kNear); -+ -+ __ cmp(map, isolate->factory()->heap_number_map()); -+ __ j(equal, &ok, Label::kNear); -+ -+ __ cmp(return_value, isolate->factory()->undefined_value()); -+ __ j(equal, &ok, Label::kNear); -+ -+ __ cmp(return_value, isolate->factory()->true_value()); -+ __ j(equal, &ok, Label::kNear); -+ -+ __ cmp(return_value, isolate->factory()->false_value()); -+ __ j(equal, &ok, Label::kNear); -+ -+ __ cmp(return_value, isolate->factory()->null_value()); -+ __ j(equal, &ok, Label::kNear); -+ -+ __ Abort(kAPICallReturnedInvalidObject); -+ -+ __ bind(&ok); -+#endif -+ -+ if (stack_space_operand != nullptr) { -+ DCHECK_EQ(0, stack_space); -+ __ pop(ecx); -+ __ add(esp, ebx); -+ __ jmp(ecx); -+ } else { -+ __ ret(stack_space * kPointerSize); -+ } -+ -+ // Re-throw by promoting a scheduled exception. -+ __ bind(&promote_scheduled_exception); -+ __ TailCallRuntime(Runtime::kPromoteScheduledException); -+ -+ // HandleScope limit has changed. Delete allocated extensions. -+ ExternalReference delete_extensions = -+ ExternalReference::delete_handle_scope_extensions(isolate); -+ __ bind(&delete_allocated_handles); -+ __ mov(Operand::StaticVariable(limit_address), edi); -+ __ mov(edi, eax); -+ __ mov(Operand(esp, 0), -+ Immediate(ExternalReference::isolate_address(isolate))); -+ __ mov(eax, Immediate(delete_extensions)); -+ __ call(eax); -+ __ mov(eax, edi); -+ __ jmp(&leave_exit_frame); -+} -+ -+void CallApiCallbackStub::Generate(MacroAssembler* masm) { -+ // ----------- S t a t e ------------- -+ // -- edi : callee -+ // -- ebx : call_data -+ // -- ecx : holder -+ // -- edx : api_function_address -+ // -- esi : context -+ // -- -+ // -- esp[0] : return address -+ // -- esp[4] : last argument -+ // -- ... -+ // -- esp[argc * 4] : first argument -+ // -- esp[(argc + 1) * 4] : receiver -+ // ----------------------------------- -+ -+ Register callee = edi; -+ Register call_data = ebx; -+ Register holder = ecx; -+ Register api_function_address = edx; -+ Register context = esi; -+ Register return_address = eax; -+ -+ typedef FunctionCallbackArguments FCA; -+ -+ STATIC_ASSERT(FCA::kContextSaveIndex == 6); -+ STATIC_ASSERT(FCA::kCalleeIndex == 5); -+ STATIC_ASSERT(FCA::kDataIndex == 4); -+ STATIC_ASSERT(FCA::kReturnValueOffset == 3); -+ STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); -+ STATIC_ASSERT(FCA::kIsolateIndex == 1); -+ STATIC_ASSERT(FCA::kHolderIndex == 0); -+ STATIC_ASSERT(FCA::kNewTargetIndex == 7); -+ STATIC_ASSERT(FCA::kArgsLength == 8); -+ -+ __ pop(return_address); -+ -+ // new target -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ -+ // context save. -+ __ push(context); -+ -+ // callee -+ __ push(callee); -+ -+ // call data -+ __ push(call_data); -+ -+ // return value -+ __ push(Immediate(masm->isolate()->factory()->undefined_value())); -+ // return value default -+ __ push(Immediate(masm->isolate()->factory()->undefined_value())); -+ // isolate -+ __ push(Immediate(reinterpret_cast(masm->isolate()))); -+ // holder -+ __ push(holder); -+ -+ Register scratch = call_data; -+ __ mov(scratch, esp); -+ -+ // push return address -+ __ push(return_address); -+ -+ if (!is_lazy()) { -+ // load context from callee -+ __ mov(context, FieldOperand(callee, JSFunction::kContextOffset)); -+ } -+ -+ // API function gets reference to the v8::Arguments. If CPU profiler -+ // is enabled wrapper function will be called and we need to pass -+ // address of the callback as additional parameter, always allocate -+ // space for it. -+ const int kApiArgc = 1 + 1; -+ -+ // Allocate the v8::Arguments structure in the arguments' space since -+ // it's not controlled by GC. -+ const int kApiStackSpace = 3; -+ -+ PrepareCallApiFunction(masm, kApiArgc + kApiStackSpace); -+ -+ // FunctionCallbackInfo::implicit_args_. -+ __ mov(ApiParameterOperand(2), scratch); -+ __ add(scratch, Immediate((argc() + FCA::kArgsLength - 1) * kPointerSize)); -+ // FunctionCallbackInfo::values_. -+ __ mov(ApiParameterOperand(3), scratch); -+ // FunctionCallbackInfo::length_. -+ __ Move(ApiParameterOperand(4), Immediate(argc())); -+ -+ // v8::InvocationCallback's argument. -+ __ lea(scratch, ApiParameterOperand(2)); -+ __ mov(ApiParameterOperand(0), scratch); -+ -+ ExternalReference thunk_ref = -+ ExternalReference::invoke_function_callback(masm->isolate()); -+ -+ Operand context_restore_operand(ebp, -+ (2 + FCA::kContextSaveIndex) * kPointerSize); -+ // Stores return the first js argument -+ int return_value_offset = 0; -+ if (is_store()) { -+ return_value_offset = 2 + FCA::kArgsLength; -+ } else { -+ return_value_offset = 2 + FCA::kReturnValueOffset; -+ } -+ Operand return_value_operand(ebp, return_value_offset * kPointerSize); -+ int stack_space = 0; -+ Operand length_operand = ApiParameterOperand(4); -+ Operand* stack_space_operand = &length_operand; -+ stack_space = argc() + FCA::kArgsLength + 1; -+ stack_space_operand = nullptr; -+ CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, -+ ApiParameterOperand(1), stack_space, -+ stack_space_operand, return_value_operand, -+ &context_restore_operand); -+} -+ -+ -+void CallApiGetterStub::Generate(MacroAssembler* masm) { -+ // Build v8::PropertyCallbackInfo::args_ array on the stack and push property -+ // name below the exit frame to make GC aware of them. -+ STATIC_ASSERT(PropertyCallbackArguments::kShouldThrowOnErrorIndex == 0); -+ STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 1); -+ STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 2); -+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 3); -+ STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 4); -+ STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 5); -+ STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 6); -+ STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 7); -+ -+ Register receiver = ApiGetterDescriptor::ReceiverRegister(); -+ Register holder = ApiGetterDescriptor::HolderRegister(); -+ Register callback = ApiGetterDescriptor::CallbackRegister(); -+ Register scratch = ebx; -+ DCHECK(!AreAliased(receiver, holder, callback, scratch)); -+ -+ __ pop(scratch); // Pop return address to extend the frame. -+ __ push(receiver); -+ __ push(FieldOperand(callback, AccessorInfo::kDataOffset)); -+ __ PushRoot(Heap::kUndefinedValueRootIndex); // ReturnValue -+ // ReturnValue default value -+ __ PushRoot(Heap::kUndefinedValueRootIndex); -+ __ push(Immediate(ExternalReference::isolate_address(isolate()))); -+ __ push(holder); -+ __ push(Immediate(Smi::kZero)); // should_throw_on_error -> false -+ __ push(FieldOperand(callback, AccessorInfo::kNameOffset)); -+ __ push(scratch); // Restore return address. -+ -+ // v8::PropertyCallbackInfo::args_ array and name handle. -+ const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; -+ -+ // Allocate v8::PropertyCallbackInfo object, arguments for callback and -+ // space for optional callback address parameter (in case CPU profiler is -+ // active) in non-GCed stack space. -+ const int kApiArgc = 3 + 1; -+ -+ // Load address of v8::PropertyAccessorInfo::args_ array. -+ __ lea(scratch, Operand(esp, 2 * kPointerSize)); -+ -+ PrepareCallApiFunction(masm, kApiArgc); -+ // Create v8::PropertyCallbackInfo object on the stack and initialize -+ // it's args_ field. -+ Operand info_object = ApiParameterOperand(3); -+ __ mov(info_object, scratch); -+ -+ // Name as handle. -+ __ sub(scratch, Immediate(kPointerSize)); -+ __ mov(ApiParameterOperand(0), scratch); -+ // Arguments pointer. -+ __ lea(scratch, info_object); -+ __ mov(ApiParameterOperand(1), scratch); -+ // Reserve space for optional callback address parameter. -+ Operand thunk_last_arg = ApiParameterOperand(2); -+ -+ ExternalReference thunk_ref = -+ ExternalReference::invoke_accessor_getter_callback(isolate()); -+ -+ __ mov(scratch, FieldOperand(callback, AccessorInfo::kJsGetterOffset)); -+ Register function_address = edx; -+ __ mov(function_address, -+ FieldOperand(scratch, Foreign::kForeignAddressOffset)); -+ // +3 is to skip prolog, return address and name handle. -+ Operand return_value_operand( -+ ebp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); -+ CallApiFunctionAndReturn(masm, function_address, thunk_ref, thunk_last_arg, -+ kStackUnwindSpace, nullptr, return_value_operand, -+ NULL); -+} -+ -+#undef __ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/code-stubs-x87.h 2018-02-18 19:00:54.197418149 +0100 -@@ -0,0 +1,351 @@ -+// Copyright 2011 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_X87_CODE_STUBS_X87_H_ -+#define V8_X87_CODE_STUBS_X87_H_ -+ -+namespace v8 { -+namespace internal { -+ -+ -+void ArrayNativeCode(MacroAssembler* masm, -+ bool construct_call, -+ Label* call_generic_code); -+ -+ -+class StringHelper : public AllStatic { -+ public: -+ // Compares two flat one byte strings and returns result in eax. -+ static void GenerateCompareFlatOneByteStrings(MacroAssembler* masm, -+ Register left, Register right, -+ Register scratch1, -+ Register scratch2, -+ Register scratch3); -+ -+ // Compares two flat one byte strings for equality and returns result in eax. -+ static void GenerateFlatOneByteStringEquals(MacroAssembler* masm, -+ Register left, Register right, -+ Register scratch1, -+ Register scratch2); -+ -+ private: -+ static void GenerateOneByteCharsCompareLoop( -+ MacroAssembler* masm, Register left, Register right, Register length, -+ Register scratch, Label* chars_not_equal, -+ Label::Distance chars_not_equal_near = Label::kFar); -+ -+ DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); -+}; -+ -+ -+class NameDictionaryLookupStub: public PlatformCodeStub { -+ public: -+ enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; -+ -+ NameDictionaryLookupStub(Isolate* isolate, Register dictionary, -+ Register result, Register index, LookupMode mode) -+ : PlatformCodeStub(isolate) { -+ minor_key_ = DictionaryBits::encode(dictionary.code()) | -+ ResultBits::encode(result.code()) | -+ IndexBits::encode(index.code()) | LookupModeBits::encode(mode); -+ } -+ -+ static void GenerateNegativeLookup(MacroAssembler* masm, -+ Label* miss, -+ Label* done, -+ Register properties, -+ Handle name, -+ Register r0); -+ -+ bool SometimesSetsUpAFrame() override { return false; } -+ -+ private: -+ static const int kInlinedProbes = 4; -+ static const int kTotalProbes = 20; -+ -+ static const int kCapacityOffset = -+ NameDictionary::kHeaderSize + -+ NameDictionary::kCapacityIndex * kPointerSize; -+ -+ static const int kElementsStartOffset = -+ NameDictionary::kHeaderSize + -+ NameDictionary::kElementsStartIndex * kPointerSize; -+ -+ Register dictionary() const { -+ return Register::from_code(DictionaryBits::decode(minor_key_)); -+ } -+ -+ Register result() const { -+ return Register::from_code(ResultBits::decode(minor_key_)); -+ } -+ -+ Register index() const { -+ return Register::from_code(IndexBits::decode(minor_key_)); -+ } -+ -+ LookupMode mode() const { return LookupModeBits::decode(minor_key_); } -+ -+ class DictionaryBits: public BitField {}; -+ class ResultBits: public BitField {}; -+ class IndexBits: public BitField {}; -+ class LookupModeBits: public BitField {}; -+ -+ DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); -+ DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); -+}; -+ -+ -+class RecordWriteStub: public PlatformCodeStub { -+ public: -+ RecordWriteStub(Isolate* isolate, Register object, Register value, -+ Register address, RememberedSetAction remembered_set_action, -+ SaveFPRegsMode fp_mode) -+ : PlatformCodeStub(isolate), -+ regs_(object, // An input reg. -+ address, // An input reg. -+ value) { // One scratch reg. -+ minor_key_ = ObjectBits::encode(object.code()) | -+ ValueBits::encode(value.code()) | -+ AddressBits::encode(address.code()) | -+ RememberedSetActionBits::encode(remembered_set_action) | -+ SaveFPRegsModeBits::encode(fp_mode); -+ } -+ -+ RecordWriteStub(uint32_t key, Isolate* isolate) -+ : PlatformCodeStub(key, isolate), regs_(object(), address(), value()) {} -+ -+ enum Mode { -+ STORE_BUFFER_ONLY, -+ INCREMENTAL, -+ INCREMENTAL_COMPACTION -+ }; -+ -+ bool SometimesSetsUpAFrame() override { return false; } -+ -+ static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. -+ static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8. -+ -+ static const byte kFiveByteNopInstruction = 0x3d; // Cmpl eax, #imm32. -+ static const byte kFiveByteJumpInstruction = 0xe9; // Jmp #imm32. -+ -+ static Mode GetMode(Code* stub) { -+ byte first_instruction = stub->instruction_start()[0]; -+ byte second_instruction = stub->instruction_start()[2]; -+ -+ if (first_instruction == kTwoByteJumpInstruction) { -+ return INCREMENTAL; -+ } -+ -+ DCHECK(first_instruction == kTwoByteNopInstruction); -+ -+ if (second_instruction == kFiveByteJumpInstruction) { -+ return INCREMENTAL_COMPACTION; -+ } -+ -+ DCHECK(second_instruction == kFiveByteNopInstruction); -+ -+ return STORE_BUFFER_ONLY; -+ } -+ -+ static void Patch(Code* stub, Mode mode) { -+ switch (mode) { -+ case STORE_BUFFER_ONLY: -+ DCHECK(GetMode(stub) == INCREMENTAL || -+ GetMode(stub) == INCREMENTAL_COMPACTION); -+ stub->instruction_start()[0] = kTwoByteNopInstruction; -+ stub->instruction_start()[2] = kFiveByteNopInstruction; -+ break; -+ case INCREMENTAL: -+ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); -+ stub->instruction_start()[0] = kTwoByteJumpInstruction; -+ break; -+ case INCREMENTAL_COMPACTION: -+ DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); -+ stub->instruction_start()[0] = kTwoByteNopInstruction; -+ stub->instruction_start()[2] = kFiveByteJumpInstruction; -+ break; -+ } -+ DCHECK(GetMode(stub) == mode); -+ Assembler::FlushICache(stub->GetIsolate(), stub->instruction_start(), 7); -+ } -+ -+ DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); -+ -+ private: -+ // This is a helper class for freeing up 3 scratch registers, where the third -+ // is always ecx (needed for shift operations). The input is two registers -+ // that must be preserved and one scratch register provided by the caller. -+ class RegisterAllocation { -+ public: -+ RegisterAllocation(Register object, -+ Register address, -+ Register scratch0) -+ : object_orig_(object), -+ address_orig_(address), -+ scratch0_orig_(scratch0), -+ object_(object), -+ address_(address), -+ scratch0_(scratch0) { -+ DCHECK(!AreAliased(scratch0, object, address, no_reg)); -+ scratch1_ = GetRegThatIsNotEcxOr(object_, address_, scratch0_); -+ if (scratch0.is(ecx)) { -+ scratch0_ = GetRegThatIsNotEcxOr(object_, address_, scratch1_); -+ } -+ if (object.is(ecx)) { -+ object_ = GetRegThatIsNotEcxOr(address_, scratch0_, scratch1_); -+ } -+ if (address.is(ecx)) { -+ address_ = GetRegThatIsNotEcxOr(object_, scratch0_, scratch1_); -+ } -+ DCHECK(!AreAliased(scratch0_, object_, address_, ecx)); -+ } -+ -+ void Save(MacroAssembler* masm) { -+ DCHECK(!address_orig_.is(object_)); -+ DCHECK(object_.is(object_orig_) || address_.is(address_orig_)); -+ DCHECK(!AreAliased(object_, address_, scratch1_, scratch0_)); -+ DCHECK(!AreAliased(object_orig_, address_, scratch1_, scratch0_)); -+ DCHECK(!AreAliased(object_, address_orig_, scratch1_, scratch0_)); -+ // We don't have to save scratch0_orig_ because it was given to us as -+ // a scratch register. But if we had to switch to a different reg then -+ // we should save the new scratch0_. -+ if (!scratch0_.is(scratch0_orig_)) masm->push(scratch0_); -+ if (!ecx.is(scratch0_orig_) && -+ !ecx.is(object_orig_) && -+ !ecx.is(address_orig_)) { -+ masm->push(ecx); -+ } -+ masm->push(scratch1_); -+ if (!address_.is(address_orig_)) { -+ masm->push(address_); -+ masm->mov(address_, address_orig_); -+ } -+ if (!object_.is(object_orig_)) { -+ masm->push(object_); -+ masm->mov(object_, object_orig_); -+ } -+ } -+ -+ void Restore(MacroAssembler* masm) { -+ // These will have been preserved the entire time, so we just need to move -+ // them back. Only in one case is the orig_ reg different from the plain -+ // one, since only one of them can alias with ecx. -+ if (!object_.is(object_orig_)) { -+ masm->mov(object_orig_, object_); -+ masm->pop(object_); -+ } -+ if (!address_.is(address_orig_)) { -+ masm->mov(address_orig_, address_); -+ masm->pop(address_); -+ } -+ masm->pop(scratch1_); -+ if (!ecx.is(scratch0_orig_) && -+ !ecx.is(object_orig_) && -+ !ecx.is(address_orig_)) { -+ masm->pop(ecx); -+ } -+ if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); -+ } -+ -+ // If we have to call into C then we need to save and restore all caller- -+ // saved registers that were not already preserved. The caller saved -+ // registers are eax, ecx and edx. The three scratch registers (incl. ecx) -+ // will be restored by other means so we don't bother pushing them here. -+ void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { -+ masm->PushCallerSaved(mode, ecx, scratch0_, scratch1_); -+ } -+ -+ inline void RestoreCallerSaveRegisters(MacroAssembler* masm, -+ SaveFPRegsMode mode) { -+ masm->PopCallerSaved(mode, ecx, scratch0_, scratch1_); -+ } -+ -+ inline Register object() { return object_; } -+ inline Register address() { return address_; } -+ inline Register scratch0() { return scratch0_; } -+ inline Register scratch1() { return scratch1_; } -+ -+ private: -+ Register object_orig_; -+ Register address_orig_; -+ Register scratch0_orig_; -+ Register object_; -+ Register address_; -+ Register scratch0_; -+ Register scratch1_; -+ // Third scratch register is always ecx. -+ -+ Register GetRegThatIsNotEcxOr(Register r1, -+ Register r2, -+ Register r3) { -+ for (int i = 0; i < Register::kNumRegisters; i++) { -+ if (RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(i)) { -+ Register candidate = Register::from_code(i); -+ if (candidate.is(ecx)) continue; -+ if (candidate.is(r1)) continue; -+ if (candidate.is(r2)) continue; -+ if (candidate.is(r3)) continue; -+ return candidate; -+ } -+ } -+ UNREACHABLE(); -+ } -+ friend class RecordWriteStub; -+ }; -+ -+ enum OnNoNeedToInformIncrementalMarker { -+ kReturnOnNoNeedToInformIncrementalMarker, -+ kUpdateRememberedSetOnNoNeedToInformIncrementalMarker -+ }; -+ -+ inline Major MajorKey() const final { return RecordWrite; } -+ -+ void Generate(MacroAssembler* masm) override; -+ void GenerateIncremental(MacroAssembler* masm, Mode mode); -+ void CheckNeedsToInformIncrementalMarker( -+ MacroAssembler* masm, -+ OnNoNeedToInformIncrementalMarker on_no_need, -+ Mode mode); -+ void InformIncrementalMarker(MacroAssembler* masm); -+ -+ void Activate(Code* code) override { -+ code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); -+ } -+ -+ Register object() const { -+ return Register::from_code(ObjectBits::decode(minor_key_)); -+ } -+ -+ Register value() const { -+ return Register::from_code(ValueBits::decode(minor_key_)); -+ } -+ -+ Register address() const { -+ return Register::from_code(AddressBits::decode(minor_key_)); -+ } -+ -+ RememberedSetAction remembered_set_action() const { -+ return RememberedSetActionBits::decode(minor_key_); -+ } -+ -+ SaveFPRegsMode save_fp_regs_mode() const { -+ return SaveFPRegsModeBits::decode(minor_key_); -+ } -+ -+ class ObjectBits: public BitField {}; -+ class ValueBits: public BitField {}; -+ class AddressBits: public BitField {}; -+ class RememberedSetActionBits: public BitField {}; -+ class SaveFPRegsModeBits : public BitField {}; -+ -+ RegisterAllocation regs_; -+ -+ DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); -+}; -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_CODE_STUBS_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/cpu-x87.cc 2018-02-18 19:00:54.197418149 +0100 -@@ -0,0 +1,43 @@ -+// Copyright 2011 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+// CPU specific code for ia32 independent of OS goes here. -+ -+#ifdef __GNUC__ -+#include "src/third_party/valgrind/valgrind.h" -+#endif -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/assembler.h" -+#include "src/macro-assembler.h" -+ -+namespace v8 { -+namespace internal { -+ -+void CpuFeatures::FlushICache(void* start, size_t size) { -+ // No need to flush the instruction cache on Intel. On Intel instruction -+ // cache flushing is only necessary when multiple cores running the same -+ // code simultaneously. V8 (and JavaScript) is single threaded and when code -+ // is patched on an intel CPU the core performing the patching will have its -+ // own instruction cache updated automatically. -+ -+ // If flushing of the instruction cache becomes necessary Windows has the -+ // API function FlushInstructionCache. -+ -+ // By default, valgrind only checks the stack for writes that might need to -+ // invalidate already cached translated code. This leads to random -+ // instability when code patches or moves are sometimes unnoticed. One -+ // solution is to run valgrind with --smc-check=all, but this comes at a big -+ // performance cost. We can notify valgrind to invalidate its cache. -+#ifdef VALGRIND_DISCARD_TRANSLATIONS -+ unsigned res = VALGRIND_DISCARD_TRANSLATIONS(start, size); -+ USE(res); -+#endif -+} -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/deoptimizer-x87.cc 2018-02-18 19:00:54.198418134 +0100 -@@ -0,0 +1,412 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/codegen.h" -+#include "src/deoptimizer.h" -+#include "src/full-codegen/full-codegen.h" -+#include "src/register-configuration.h" -+#include "src/safepoint-table.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+const int Deoptimizer::table_entry_size_ = 10; -+ -+ -+int Deoptimizer::patch_size() { -+ return Assembler::kCallInstructionLength; -+} -+ -+ -+void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle code) { -+ Isolate* isolate = code->GetIsolate(); -+ HandleScope scope(isolate); -+ -+ // Compute the size of relocation information needed for the code -+ // patching in Deoptimizer::PatchCodeForDeoptimization below. -+ int min_reloc_size = 0; -+ int prev_pc_offset = 0; -+ DeoptimizationInputData* deopt_data = -+ DeoptimizationInputData::cast(code->deoptimization_data()); -+ for (int i = 0; i < deopt_data->DeoptCount(); i++) { -+ int pc_offset = deopt_data->Pc(i)->value(); -+ if (pc_offset == -1) continue; -+ pc_offset = pc_offset + 1; // We will encode the pc offset after the call. -+ DCHECK_GE(pc_offset, prev_pc_offset); -+ int pc_delta = pc_offset - prev_pc_offset; -+ // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes -+ // if encodable with small pc delta encoding and up to 6 bytes -+ // otherwise. -+ if (pc_delta <= RelocInfo::kMaxSmallPCDelta) { -+ min_reloc_size += 2; -+ } else { -+ min_reloc_size += 6; -+ } -+ prev_pc_offset = pc_offset; -+ } -+ -+ // If the relocation information is not big enough we create a new -+ // relocation info object that is padded with comments to make it -+ // big enough for lazy doptimization. -+ int reloc_length = code->relocation_info()->length(); -+ if (min_reloc_size > reloc_length) { -+ int comment_reloc_size = RelocInfo::kMinRelocCommentSize; -+ // Padding needed. -+ int min_padding = min_reloc_size - reloc_length; -+ // Number of comments needed to take up at least that much space. -+ int additional_comments = -+ (min_padding + comment_reloc_size - 1) / comment_reloc_size; -+ // Actual padding size. -+ int padding = additional_comments * comment_reloc_size; -+ // Allocate new relocation info and copy old relocation to the end -+ // of the new relocation info array because relocation info is -+ // written and read backwards. -+ Factory* factory = isolate->factory(); -+ Handle new_reloc = -+ factory->NewByteArray(reloc_length + padding, TENURED); -+ MemCopy(new_reloc->GetDataStartAddress() + padding, -+ code->relocation_info()->GetDataStartAddress(), reloc_length); -+ // Create a relocation writer to write the comments in the padding -+ // space. Use position 0 for everything to ensure short encoding. -+ RelocInfoWriter reloc_info_writer( -+ new_reloc->GetDataStartAddress() + padding, 0); -+ intptr_t comment_string -+ = reinterpret_cast(RelocInfo::kFillerCommentString); -+ RelocInfo rinfo(0, RelocInfo::COMMENT, comment_string, NULL); -+ for (int i = 0; i < additional_comments; ++i) { -+#ifdef DEBUG -+ byte* pos_before = reloc_info_writer.pos(); -+#endif -+ reloc_info_writer.Write(&rinfo); -+ DCHECK(RelocInfo::kMinRelocCommentSize == -+ pos_before - reloc_info_writer.pos()); -+ } -+ // Replace relocation information on the code object. -+ code->set_relocation_info(*new_reloc); -+ } -+} -+ -+ -+void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { -+ Address code_start_address = code->instruction_start(); -+ -+ // Fail hard and early if we enter this code object again. -+ byte* pointer = code->FindCodeAgeSequence(); -+ if (pointer != NULL) { -+ pointer += kNoCodeAgeSequenceLength; -+ } else { -+ pointer = code->instruction_start(); -+ } -+ CodePatcher patcher(isolate, pointer, 1); -+ patcher.masm()->int3(); -+ -+ DeoptimizationInputData* data = -+ DeoptimizationInputData::cast(code->deoptimization_data()); -+ int osr_offset = data->OsrPcOffset()->value(); -+ if (osr_offset > 0) { -+ CodePatcher osr_patcher(isolate, code_start_address + osr_offset, 1); -+ osr_patcher.masm()->int3(); -+ } -+ -+ // We will overwrite the code's relocation info in-place. Relocation info -+ // is written backward. The relocation info is the payload of a byte -+ // array. Later on we will slide this to the start of the byte array and -+ // create a filler object in the remaining space. -+ ByteArray* reloc_info = code->relocation_info(); -+ Address reloc_end_address = reloc_info->address() + reloc_info->Size(); -+ RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address); -+ -+ // Since the call is a relative encoding, write new -+ // reloc info. We do not need any of the existing reloc info because the -+ // existing code will not be used again (we zap it in debug builds). -+ // -+ // Emit call to lazy deoptimization at all lazy deopt points. -+ DeoptimizationInputData* deopt_data = -+ DeoptimizationInputData::cast(code->deoptimization_data()); -+#ifdef DEBUG -+ Address prev_call_address = NULL; -+#endif -+ // For each LLazyBailout instruction insert a call to the corresponding -+ // deoptimization entry. -+ for (int i = 0; i < deopt_data->DeoptCount(); i++) { -+ if (deopt_data->Pc(i)->value() == -1) continue; -+ // Patch lazy deoptimization entry. -+ Address call_address = code_start_address + deopt_data->Pc(i)->value(); -+ CodePatcher patcher(isolate, call_address, patch_size()); -+ Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); -+ patcher.masm()->call(deopt_entry, RelocInfo::NONE32); -+ // We use RUNTIME_ENTRY for deoptimization bailouts. -+ RelocInfo rinfo(call_address + 1, // 1 after the call opcode. -+ RelocInfo::RUNTIME_ENTRY, -+ reinterpret_cast(deopt_entry), NULL); -+ reloc_info_writer.Write(&rinfo); -+ DCHECK_GE(reloc_info_writer.pos(), -+ reloc_info->address() + ByteArray::kHeaderSize); -+ DCHECK(prev_call_address == NULL || -+ call_address >= prev_call_address + patch_size()); -+ DCHECK(call_address + patch_size() <= code->instruction_end()); -+#ifdef DEBUG -+ prev_call_address = call_address; -+#endif -+ } -+ -+ // Move the relocation info to the beginning of the byte array. -+ const int new_reloc_length = reloc_end_address - reloc_info_writer.pos(); -+ MemMove(code->relocation_start(), reloc_info_writer.pos(), new_reloc_length); -+ -+ // Right trim the relocation info to free up remaining space. -+ const int delta = reloc_info->length() - new_reloc_length; -+ if (delta > 0) { -+ isolate->heap()->RightTrimFixedArray(reloc_info, delta); -+ } -+} -+ -+ -+#define __ masm()-> -+ -+void Deoptimizer::TableEntryGenerator::Generate() { -+ GeneratePrologue(); -+ -+ // Save all general purpose registers before messing with them. -+ const int kNumberOfRegisters = Register::kNumRegisters; -+ -+ const int kDoubleRegsSize = kDoubleSize * X87Register::kMaxNumRegisters; -+ -+ // Reserve space for x87 fp registers. -+ __ sub(esp, Immediate(kDoubleRegsSize)); -+ -+ __ pushad(); -+ -+ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, -+ isolate()); -+ __ mov(Operand::StaticVariable(c_entry_fp_address), ebp); -+ -+ // GP registers are safe to use now. -+ // Save used x87 fp registers in correct position of previous reserve space. -+ Label loop, done; -+ // Get the layout of x87 stack. -+ __ sub(esp, Immediate(kPointerSize)); -+ __ fistp_s(MemOperand(esp, 0)); -+ __ pop(eax); -+ // Preserve stack layout in edi -+ __ mov(edi, eax); -+ // Get the x87 stack depth, the first 3 bits. -+ __ mov(ecx, eax); -+ __ and_(ecx, 0x7); -+ __ j(zero, &done, Label::kNear); -+ -+ __ bind(&loop); -+ __ shr(eax, 0x3); -+ __ mov(ebx, eax); -+ __ and_(ebx, 0x7); // Extract the st_x index into ebx. -+ // Pop TOS to the correct position. The disp(0x20) is due to pushad. -+ // The st_i should be saved to (esp + ebx * kDoubleSize + 0x20). -+ __ fstp_d(Operand(esp, ebx, times_8, 0x20)); -+ __ dec(ecx); // Decrease stack depth. -+ __ j(not_zero, &loop, Label::kNear); -+ __ bind(&done); -+ -+ const int kSavedRegistersAreaSize = -+ kNumberOfRegisters * kPointerSize + kDoubleRegsSize; -+ -+ // Get the bailout id from the stack. -+ __ mov(ebx, Operand(esp, kSavedRegistersAreaSize)); -+ -+ // Get the address of the location in the code object -+ // and compute the fp-to-sp delta in register edx. -+ __ mov(ecx, Operand(esp, kSavedRegistersAreaSize + 1 * kPointerSize)); -+ __ lea(edx, Operand(esp, kSavedRegistersAreaSize + 2 * kPointerSize)); -+ -+ __ sub(edx, ebp); -+ __ neg(edx); -+ -+ __ push(edi); -+ // Allocate a new deoptimizer object. -+ __ PrepareCallCFunction(6, eax); -+ __ mov(eax, Immediate(0)); -+ Label context_check; -+ __ mov(edi, Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset)); -+ __ JumpIfSmi(edi, &context_check); -+ __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ __ bind(&context_check); -+ __ mov(Operand(esp, 0 * kPointerSize), eax); // Function. -+ __ mov(Operand(esp, 1 * kPointerSize), Immediate(type())); // Bailout type. -+ __ mov(Operand(esp, 2 * kPointerSize), ebx); // Bailout id. -+ __ mov(Operand(esp, 3 * kPointerSize), ecx); // Code address or 0. -+ __ mov(Operand(esp, 4 * kPointerSize), edx); // Fp-to-sp delta. -+ __ mov(Operand(esp, 5 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ { -+ AllowExternalCallThatCantCauseGC scope(masm()); -+ __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); -+ } -+ -+ __ pop(edi); -+ -+ // Preserve deoptimizer object in register eax and get the input -+ // frame descriptor pointer. -+ __ mov(ebx, Operand(eax, Deoptimizer::input_offset())); -+ -+ // Fill in the input registers. -+ for (int i = kNumberOfRegisters - 1; i >= 0; i--) { -+ int offset = (i * kPointerSize) + FrameDescription::registers_offset(); -+ __ pop(Operand(ebx, offset)); -+ } -+ -+ int double_regs_offset = FrameDescription::double_registers_offset(); -+ const RegisterConfiguration* config = RegisterConfiguration::Crankshaft(); -+ // Fill in the double input registers. -+ for (int i = 0; i < X87Register::kMaxNumAllocatableRegisters; ++i) { -+ int code = config->GetAllocatableDoubleCode(i); -+ int dst_offset = code * kDoubleSize + double_regs_offset; -+ int src_offset = code * kDoubleSize; -+ __ fld_d(Operand(esp, src_offset)); -+ __ fstp_d(Operand(ebx, dst_offset)); -+ } -+ -+ // Clear FPU all exceptions. -+ // TODO(ulan): Find out why the TOP register is not zero here in some cases, -+ // and check that the generated code never deoptimizes with unbalanced stack. -+ __ fnclex(); -+ -+ // Remove the bailout id, return address and the double registers. -+ __ add(esp, Immediate(kDoubleRegsSize + 2 * kPointerSize)); -+ -+ // Compute a pointer to the unwinding limit in register ecx; that is -+ // the first stack slot not part of the input frame. -+ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset())); -+ __ add(ecx, esp); -+ -+ // Unwind the stack down to - but not including - the unwinding -+ // limit and copy the contents of the activation frame to the input -+ // frame description. -+ __ lea(edx, Operand(ebx, FrameDescription::frame_content_offset())); -+ Label pop_loop_header; -+ __ jmp(&pop_loop_header); -+ Label pop_loop; -+ __ bind(&pop_loop); -+ __ pop(Operand(edx, 0)); -+ __ add(edx, Immediate(sizeof(uint32_t))); -+ __ bind(&pop_loop_header); -+ __ cmp(ecx, esp); -+ __ j(not_equal, &pop_loop); -+ -+ // Compute the output frame in the deoptimizer. -+ __ push(edi); -+ __ push(eax); -+ __ PrepareCallCFunction(1, ebx); -+ __ mov(Operand(esp, 0 * kPointerSize), eax); -+ { -+ AllowExternalCallThatCantCauseGC scope(masm()); -+ __ CallCFunction( -+ ExternalReference::compute_output_frames_function(isolate()), 1); -+ } -+ __ pop(eax); -+ __ pop(edi); -+ __ mov(esp, Operand(eax, Deoptimizer::caller_frame_top_offset())); -+ -+ // Replace the current (input) frame with the output frames. -+ Label outer_push_loop, inner_push_loop, -+ outer_loop_header, inner_loop_header; -+ // Outer loop state: eax = current FrameDescription**, edx = one past the -+ // last FrameDescription**. -+ __ mov(edx, Operand(eax, Deoptimizer::output_count_offset())); -+ __ mov(eax, Operand(eax, Deoptimizer::output_offset())); -+ __ lea(edx, Operand(eax, edx, times_4, 0)); -+ __ jmp(&outer_loop_header); -+ __ bind(&outer_push_loop); -+ // Inner loop state: ebx = current FrameDescription*, ecx = loop index. -+ __ mov(ebx, Operand(eax, 0)); -+ __ mov(ecx, Operand(ebx, FrameDescription::frame_size_offset())); -+ __ jmp(&inner_loop_header); -+ __ bind(&inner_push_loop); -+ __ sub(ecx, Immediate(sizeof(uint32_t))); -+ __ push(Operand(ebx, ecx, times_1, FrameDescription::frame_content_offset())); -+ __ bind(&inner_loop_header); -+ __ test(ecx, ecx); -+ __ j(not_zero, &inner_push_loop); -+ __ add(eax, Immediate(kPointerSize)); -+ __ bind(&outer_loop_header); -+ __ cmp(eax, edx); -+ __ j(below, &outer_push_loop); -+ -+ -+ // In case of a failed STUB, we have to restore the x87 stack. -+ // x87 stack layout is in edi. -+ Label loop2, done2; -+ // Get the x87 stack depth, the first 3 bits. -+ __ mov(ecx, edi); -+ __ and_(ecx, 0x7); -+ __ j(zero, &done2, Label::kNear); -+ -+ __ lea(ecx, Operand(ecx, ecx, times_2, 0)); -+ __ bind(&loop2); -+ __ mov(eax, edi); -+ __ shr_cl(eax); -+ __ and_(eax, 0x7); -+ __ fld_d(Operand(ebx, eax, times_8, double_regs_offset)); -+ __ sub(ecx, Immediate(0x3)); -+ __ j(not_zero, &loop2, Label::kNear); -+ __ bind(&done2); -+ -+ // Push state, pc, and continuation from the last output frame. -+ __ push(Operand(ebx, FrameDescription::state_offset())); -+ __ push(Operand(ebx, FrameDescription::pc_offset())); -+ __ push(Operand(ebx, FrameDescription::continuation_offset())); -+ -+ -+ // Push the registers from the last output frame. -+ for (int i = 0; i < kNumberOfRegisters; i++) { -+ int offset = (i * kPointerSize) + FrameDescription::registers_offset(); -+ __ push(Operand(ebx, offset)); -+ } -+ -+ // Restore the registers from the stack. -+ __ popad(); -+ -+ // Return to the continuation point. -+ __ ret(0); -+} -+ -+ -+void Deoptimizer::TableEntryGenerator::GeneratePrologue() { -+ // Create a sequence of deoptimization entries. -+ Label done; -+ for (int i = 0; i < count(); i++) { -+ int start = masm()->pc_offset(); -+ USE(start); -+ __ push_imm32(i); -+ __ jmp(&done); -+ DCHECK(masm()->pc_offset() - start == table_entry_size_); -+ } -+ __ bind(&done); -+} -+ -+ -+void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { -+ SetFrameSlot(offset, value); -+} -+ -+ -+void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { -+ SetFrameSlot(offset, value); -+} -+ -+ -+void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { -+ // No embedded constant pool support. -+ UNREACHABLE(); -+} -+ -+ -+#undef __ -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/disasm-x87.cc 2018-02-18 19:00:54.199418119 +0100 -@@ -0,0 +1,1874 @@ -+// Copyright 2011 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include -+#include -+#include -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/base/compiler-specific.h" -+#include "src/disasm.h" -+ -+namespace disasm { -+ -+enum OperandOrder { -+ UNSET_OP_ORDER = 0, -+ REG_OPER_OP_ORDER, -+ OPER_REG_OP_ORDER -+}; -+ -+ -+//------------------------------------------------------------------ -+// Tables -+//------------------------------------------------------------------ -+struct ByteMnemonic { -+ int b; // -1 terminates, otherwise must be in range (0..255) -+ const char* mnem; -+ OperandOrder op_order_; -+}; -+ -+static const ByteMnemonic two_operands_instr[] = { -+ {0x01, "add", OPER_REG_OP_ORDER}, {0x03, "add", REG_OPER_OP_ORDER}, -+ {0x09, "or", OPER_REG_OP_ORDER}, {0x0B, "or", REG_OPER_OP_ORDER}, -+ {0x13, "adc", REG_OPER_OP_ORDER}, {0x1B, "sbb", REG_OPER_OP_ORDER}, -+ {0x21, "and", OPER_REG_OP_ORDER}, {0x23, "and", REG_OPER_OP_ORDER}, -+ {0x29, "sub", OPER_REG_OP_ORDER}, {0x2A, "subb", REG_OPER_OP_ORDER}, -+ {0x2B, "sub", REG_OPER_OP_ORDER}, {0x31, "xor", OPER_REG_OP_ORDER}, -+ {0x33, "xor", REG_OPER_OP_ORDER}, {0x38, "cmpb", OPER_REG_OP_ORDER}, -+ {0x39, "cmp", OPER_REG_OP_ORDER}, {0x3A, "cmpb", REG_OPER_OP_ORDER}, -+ {0x3B, "cmp", REG_OPER_OP_ORDER}, {0x84, "test_b", REG_OPER_OP_ORDER}, -+ {0x85, "test", REG_OPER_OP_ORDER}, {0x86, "xchg_b", REG_OPER_OP_ORDER}, -+ {0x87, "xchg", REG_OPER_OP_ORDER}, {0x8A, "mov_b", REG_OPER_OP_ORDER}, -+ {0x8B, "mov", REG_OPER_OP_ORDER}, {0x8D, "lea", REG_OPER_OP_ORDER}, -+ {-1, "", UNSET_OP_ORDER}}; -+ -+static const ByteMnemonic zero_operands_instr[] = { -+ {0xC3, "ret", UNSET_OP_ORDER}, -+ {0xC9, "leave", UNSET_OP_ORDER}, -+ {0x90, "nop", UNSET_OP_ORDER}, -+ {0xF4, "hlt", UNSET_OP_ORDER}, -+ {0xCC, "int3", UNSET_OP_ORDER}, -+ {0x60, "pushad", UNSET_OP_ORDER}, -+ {0x61, "popad", UNSET_OP_ORDER}, -+ {0x9C, "pushfd", UNSET_OP_ORDER}, -+ {0x9D, "popfd", UNSET_OP_ORDER}, -+ {0x9E, "sahf", UNSET_OP_ORDER}, -+ {0x99, "cdq", UNSET_OP_ORDER}, -+ {0x9B, "fwait", UNSET_OP_ORDER}, -+ {0xFC, "cld", UNSET_OP_ORDER}, -+ {0xAB, "stos", UNSET_OP_ORDER}, -+ {-1, "", UNSET_OP_ORDER} -+}; -+ -+ -+static const ByteMnemonic call_jump_instr[] = { -+ {0xE8, "call", UNSET_OP_ORDER}, -+ {0xE9, "jmp", UNSET_OP_ORDER}, -+ {-1, "", UNSET_OP_ORDER} -+}; -+ -+ -+static const ByteMnemonic short_immediate_instr[] = { -+ {0x05, "add", UNSET_OP_ORDER}, -+ {0x0D, "or", UNSET_OP_ORDER}, -+ {0x15, "adc", UNSET_OP_ORDER}, -+ {0x25, "and", UNSET_OP_ORDER}, -+ {0x2D, "sub", UNSET_OP_ORDER}, -+ {0x35, "xor", UNSET_OP_ORDER}, -+ {0x3D, "cmp", UNSET_OP_ORDER}, -+ {-1, "", UNSET_OP_ORDER} -+}; -+ -+ -+// Generally we don't want to generate these because they are subject to partial -+// register stalls. They are included for completeness and because the cmp -+// variant is used by the RecordWrite stub. Because it does not update the -+// register it is not subject to partial register stalls. -+static ByteMnemonic byte_immediate_instr[] = { -+ {0x0c, "or", UNSET_OP_ORDER}, -+ {0x24, "and", UNSET_OP_ORDER}, -+ {0x34, "xor", UNSET_OP_ORDER}, -+ {0x3c, "cmp", UNSET_OP_ORDER}, -+ {-1, "", UNSET_OP_ORDER} -+}; -+ -+ -+static const char* const jump_conditional_mnem[] = { -+ /*0*/ "jo", "jno", "jc", "jnc", -+ /*4*/ "jz", "jnz", "jna", "ja", -+ /*8*/ "js", "jns", "jpe", "jpo", -+ /*12*/ "jl", "jnl", "jng", "jg" -+}; -+ -+ -+static const char* const set_conditional_mnem[] = { -+ /*0*/ "seto", "setno", "setc", "setnc", -+ /*4*/ "setz", "setnz", "setna", "seta", -+ /*8*/ "sets", "setns", "setpe", "setpo", -+ /*12*/ "setl", "setnl", "setng", "setg" -+}; -+ -+ -+static const char* const conditional_move_mnem[] = { -+ /*0*/ "cmovo", "cmovno", "cmovc", "cmovnc", -+ /*4*/ "cmovz", "cmovnz", "cmovna", "cmova", -+ /*8*/ "cmovs", "cmovns", "cmovpe", "cmovpo", -+ /*12*/ "cmovl", "cmovnl", "cmovng", "cmovg" -+}; -+ -+ -+enum InstructionType { -+ NO_INSTR, -+ ZERO_OPERANDS_INSTR, -+ TWO_OPERANDS_INSTR, -+ JUMP_CONDITIONAL_SHORT_INSTR, -+ REGISTER_INSTR, -+ MOVE_REG_INSTR, -+ CALL_JUMP_INSTR, -+ SHORT_IMMEDIATE_INSTR, -+ BYTE_IMMEDIATE_INSTR -+}; -+ -+ -+struct InstructionDesc { -+ const char* mnem; -+ InstructionType type; -+ OperandOrder op_order_; -+}; -+ -+ -+class InstructionTable { -+ public: -+ InstructionTable(); -+ const InstructionDesc& Get(byte x) const { return instructions_[x]; } -+ static InstructionTable* get_instance() { -+ static InstructionTable table; -+ return &table; -+ } -+ -+ private: -+ InstructionDesc instructions_[256]; -+ void Clear(); -+ void Init(); -+ void CopyTable(const ByteMnemonic bm[], InstructionType type); -+ void SetTableRange(InstructionType type, -+ byte start, -+ byte end, -+ const char* mnem); -+ void AddJumpConditionalShort(); -+}; -+ -+ -+InstructionTable::InstructionTable() { -+ Clear(); -+ Init(); -+} -+ -+ -+void InstructionTable::Clear() { -+ for (int i = 0; i < 256; i++) { -+ instructions_[i].mnem = ""; -+ instructions_[i].type = NO_INSTR; -+ instructions_[i].op_order_ = UNSET_OP_ORDER; -+ } -+} -+ -+ -+void InstructionTable::Init() { -+ CopyTable(two_operands_instr, TWO_OPERANDS_INSTR); -+ CopyTable(zero_operands_instr, ZERO_OPERANDS_INSTR); -+ CopyTable(call_jump_instr, CALL_JUMP_INSTR); -+ CopyTable(short_immediate_instr, SHORT_IMMEDIATE_INSTR); -+ CopyTable(byte_immediate_instr, BYTE_IMMEDIATE_INSTR); -+ AddJumpConditionalShort(); -+ SetTableRange(REGISTER_INSTR, 0x40, 0x47, "inc"); -+ SetTableRange(REGISTER_INSTR, 0x48, 0x4F, "dec"); -+ SetTableRange(REGISTER_INSTR, 0x50, 0x57, "push"); -+ SetTableRange(REGISTER_INSTR, 0x58, 0x5F, "pop"); -+ SetTableRange(REGISTER_INSTR, 0x91, 0x97, "xchg eax,"); // 0x90 is nop. -+ SetTableRange(MOVE_REG_INSTR, 0xB8, 0xBF, "mov"); -+} -+ -+ -+void InstructionTable::CopyTable(const ByteMnemonic bm[], -+ InstructionType type) { -+ for (int i = 0; bm[i].b >= 0; i++) { -+ InstructionDesc* id = &instructions_[bm[i].b]; -+ id->mnem = bm[i].mnem; -+ id->op_order_ = bm[i].op_order_; -+ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. -+ id->type = type; -+ } -+} -+ -+ -+void InstructionTable::SetTableRange(InstructionType type, -+ byte start, -+ byte end, -+ const char* mnem) { -+ for (byte b = start; b <= end; b++) { -+ InstructionDesc* id = &instructions_[b]; -+ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. -+ id->mnem = mnem; -+ id->type = type; -+ } -+} -+ -+ -+void InstructionTable::AddJumpConditionalShort() { -+ for (byte b = 0x70; b <= 0x7F; b++) { -+ InstructionDesc* id = &instructions_[b]; -+ DCHECK_EQ(NO_INSTR, id->type); // Information not already entered. -+ id->mnem = jump_conditional_mnem[b & 0x0F]; -+ id->type = JUMP_CONDITIONAL_SHORT_INSTR; -+ } -+} -+ -+ -+// The X87 disassembler implementation. -+class DisassemblerX87 { -+ public: -+ DisassemblerX87(const NameConverter& converter, -+ bool abort_on_unimplemented = true) -+ : converter_(converter), -+ instruction_table_(InstructionTable::get_instance()), -+ tmp_buffer_pos_(0), -+ abort_on_unimplemented_(abort_on_unimplemented) { -+ tmp_buffer_[0] = '\0'; -+ } -+ -+ virtual ~DisassemblerX87() {} -+ -+ // Writes one disassembled instruction into 'buffer' (0-terminated). -+ // Returns the length of the disassembled machine instruction in bytes. -+ int InstructionDecode(v8::internal::Vector buffer, byte* instruction); -+ -+ private: -+ const NameConverter& converter_; -+ InstructionTable* instruction_table_; -+ v8::internal::EmbeddedVector tmp_buffer_; -+ unsigned int tmp_buffer_pos_; -+ bool abort_on_unimplemented_; -+ -+ enum { -+ eax = 0, -+ ecx = 1, -+ edx = 2, -+ ebx = 3, -+ esp = 4, -+ ebp = 5, -+ esi = 6, -+ edi = 7 -+ }; -+ -+ -+ enum ShiftOpcodeExtension { -+ kROL = 0, -+ kROR = 1, -+ kRCL = 2, -+ kRCR = 3, -+ kSHL = 4, -+ KSHR = 5, -+ kSAR = 7 -+ }; -+ -+ -+ const char* NameOfCPURegister(int reg) const { -+ return converter_.NameOfCPURegister(reg); -+ } -+ -+ -+ const char* NameOfByteCPURegister(int reg) const { -+ return converter_.NameOfByteCPURegister(reg); -+ } -+ -+ -+ const char* NameOfXMMRegister(int reg) const { -+ return converter_.NameOfXMMRegister(reg); -+ } -+ -+ -+ const char* NameOfAddress(byte* addr) const { -+ return converter_.NameOfAddress(addr); -+ } -+ -+ -+ // Disassembler helper functions. -+ static void get_modrm(byte data, int* mod, int* regop, int* rm) { -+ *mod = (data >> 6) & 3; -+ *regop = (data & 0x38) >> 3; -+ *rm = data & 7; -+ } -+ -+ -+ static void get_sib(byte data, int* scale, int* index, int* base) { -+ *scale = (data >> 6) & 3; -+ *index = (data >> 3) & 7; -+ *base = data & 7; -+ } -+ -+ typedef const char* (DisassemblerX87::*RegisterNameMapping)(int reg) const; -+ -+ int PrintRightOperandHelper(byte* modrmp, RegisterNameMapping register_name); -+ int PrintRightOperand(byte* modrmp); -+ int PrintRightByteOperand(byte* modrmp); -+ int PrintRightXMMOperand(byte* modrmp); -+ int PrintOperands(const char* mnem, OperandOrder op_order, byte* data); -+ int PrintImmediateOp(byte* data); -+ int F7Instruction(byte* data); -+ int D1D3C1Instruction(byte* data); -+ int JumpShort(byte* data); -+ int JumpConditional(byte* data, const char* comment); -+ int JumpConditionalShort(byte* data, const char* comment); -+ int SetCC(byte* data); -+ int CMov(byte* data); -+ int FPUInstruction(byte* data); -+ int MemoryFPUInstruction(int escape_opcode, int regop, byte* modrm_start); -+ int RegisterFPUInstruction(int escape_opcode, byte modrm_byte); -+ PRINTF_FORMAT(2, 3) void AppendToBuffer(const char* format, ...); -+ -+ void UnimplementedInstruction() { -+ if (abort_on_unimplemented_) { -+ UNIMPLEMENTED(); -+ } else { -+ AppendToBuffer("'Unimplemented Instruction'"); -+ } -+ } -+}; -+ -+ -+void DisassemblerX87::AppendToBuffer(const char* format, ...) { -+ v8::internal::Vector buf = tmp_buffer_ + tmp_buffer_pos_; -+ va_list args; -+ va_start(args, format); -+ int result = v8::internal::VSNPrintF(buf, format, args); -+ va_end(args); -+ tmp_buffer_pos_ += result; -+} -+ -+int DisassemblerX87::PrintRightOperandHelper( -+ byte* modrmp, -+ RegisterNameMapping direct_register_name) { -+ int mod, regop, rm; -+ get_modrm(*modrmp, &mod, ®op, &rm); -+ RegisterNameMapping register_name = (mod == 3) ? direct_register_name : -+ &DisassemblerX87::NameOfCPURegister; -+ switch (mod) { -+ case 0: -+ if (rm == ebp) { -+ int32_t disp = *reinterpret_cast(modrmp+1); -+ AppendToBuffer("[0x%x]", disp); -+ return 5; -+ } else if (rm == esp) { -+ byte sib = *(modrmp + 1); -+ int scale, index, base; -+ get_sib(sib, &scale, &index, &base); -+ if (index == esp && base == esp && scale == 0 /*times_1*/) { -+ AppendToBuffer("[%s]", (this->*register_name)(rm)); -+ return 2; -+ } else if (base == ebp) { -+ int32_t disp = *reinterpret_cast(modrmp + 2); -+ AppendToBuffer("[%s*%d%s0x%x]", -+ (this->*register_name)(index), -+ 1 << scale, -+ disp < 0 ? "-" : "+", -+ disp < 0 ? -disp : disp); -+ return 6; -+ } else if (index != esp && base != ebp) { -+ // [base+index*scale] -+ AppendToBuffer("[%s+%s*%d]", -+ (this->*register_name)(base), -+ (this->*register_name)(index), -+ 1 << scale); -+ return 2; -+ } else { -+ UnimplementedInstruction(); -+ return 1; -+ } -+ } else { -+ AppendToBuffer("[%s]", (this->*register_name)(rm)); -+ return 1; -+ } -+ break; -+ case 1: // fall through -+ case 2: -+ if (rm == esp) { -+ byte sib = *(modrmp + 1); -+ int scale, index, base; -+ get_sib(sib, &scale, &index, &base); -+ int disp = mod == 2 ? *reinterpret_cast(modrmp + 2) -+ : *reinterpret_cast(modrmp + 2); -+ if (index == base && index == rm /*esp*/ && scale == 0 /*times_1*/) { -+ AppendToBuffer("[%s%s0x%x]", -+ (this->*register_name)(rm), -+ disp < 0 ? "-" : "+", -+ disp < 0 ? -disp : disp); -+ } else { -+ AppendToBuffer("[%s+%s*%d%s0x%x]", -+ (this->*register_name)(base), -+ (this->*register_name)(index), -+ 1 << scale, -+ disp < 0 ? "-" : "+", -+ disp < 0 ? -disp : disp); -+ } -+ return mod == 2 ? 6 : 3; -+ } else { -+ // No sib. -+ int disp = mod == 2 ? *reinterpret_cast(modrmp + 1) -+ : *reinterpret_cast(modrmp + 1); -+ AppendToBuffer("[%s%s0x%x]", -+ (this->*register_name)(rm), -+ disp < 0 ? "-" : "+", -+ disp < 0 ? -disp : disp); -+ return mod == 2 ? 5 : 2; -+ } -+ break; -+ case 3: -+ AppendToBuffer("%s", (this->*register_name)(rm)); -+ return 1; -+ default: -+ UnimplementedInstruction(); -+ return 1; -+ } -+ UNREACHABLE(); -+} -+ -+ -+int DisassemblerX87::PrintRightOperand(byte* modrmp) { -+ return PrintRightOperandHelper(modrmp, &DisassemblerX87::NameOfCPURegister); -+} -+ -+ -+int DisassemblerX87::PrintRightByteOperand(byte* modrmp) { -+ return PrintRightOperandHelper(modrmp, -+ &DisassemblerX87::NameOfByteCPURegister); -+} -+ -+ -+int DisassemblerX87::PrintRightXMMOperand(byte* modrmp) { -+ return PrintRightOperandHelper(modrmp, -+ &DisassemblerX87::NameOfXMMRegister); -+} -+ -+ -+// Returns number of bytes used including the current *data. -+// Writes instruction's mnemonic, left and right operands to 'tmp_buffer_'. -+int DisassemblerX87::PrintOperands(const char* mnem, -+ OperandOrder op_order, -+ byte* data) { -+ byte modrm = *data; -+ int mod, regop, rm; -+ get_modrm(modrm, &mod, ®op, &rm); -+ int advance = 0; -+ switch (op_order) { -+ case REG_OPER_OP_ORDER: { -+ AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); -+ advance = PrintRightOperand(data); -+ break; -+ } -+ case OPER_REG_OP_ORDER: { -+ AppendToBuffer("%s ", mnem); -+ advance = PrintRightOperand(data); -+ AppendToBuffer(",%s", NameOfCPURegister(regop)); -+ break; -+ } -+ default: -+ UNREACHABLE(); -+ break; -+ } -+ return advance; -+} -+ -+ -+// Returns number of bytes used by machine instruction, including *data byte. -+// Writes immediate instructions to 'tmp_buffer_'. -+int DisassemblerX87::PrintImmediateOp(byte* data) { -+ bool sign_extension_bit = (*data & 0x02) != 0; -+ byte modrm = *(data+1); -+ int mod, regop, rm; -+ get_modrm(modrm, &mod, ®op, &rm); -+ const char* mnem = "Imm???"; -+ switch (regop) { -+ case 0: mnem = "add"; break; -+ case 1: mnem = "or"; break; -+ case 2: mnem = "adc"; break; -+ case 4: mnem = "and"; break; -+ case 5: mnem = "sub"; break; -+ case 6: mnem = "xor"; break; -+ case 7: mnem = "cmp"; break; -+ default: UnimplementedInstruction(); -+ } -+ AppendToBuffer("%s ", mnem); -+ int count = PrintRightOperand(data+1); -+ if (sign_extension_bit) { -+ AppendToBuffer(",0x%x", *(data + 1 + count)); -+ return 1 + count + 1 /*int8*/; -+ } else { -+ AppendToBuffer(",0x%x", *reinterpret_cast(data + 1 + count)); -+ return 1 + count + 4 /*int32_t*/; -+ } -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::F7Instruction(byte* data) { -+ DCHECK_EQ(0xF7, *data); -+ byte modrm = *++data; -+ int mod, regop, rm; -+ get_modrm(modrm, &mod, ®op, &rm); -+ const char* mnem = NULL; -+ switch (regop) { -+ case 0: -+ mnem = "test"; -+ break; -+ case 2: -+ mnem = "not"; -+ break; -+ case 3: -+ mnem = "neg"; -+ break; -+ case 4: -+ mnem = "mul"; -+ break; -+ case 5: -+ mnem = "imul"; -+ break; -+ case 6: -+ mnem = "div"; -+ break; -+ case 7: -+ mnem = "idiv"; -+ break; -+ default: -+ UnimplementedInstruction(); -+ } -+ AppendToBuffer("%s ", mnem); -+ int count = PrintRightOperand(data); -+ if (regop == 0) { -+ AppendToBuffer(",0x%x", *reinterpret_cast(data + count)); -+ count += 4; -+ } -+ return 1 + count; -+} -+ -+ -+int DisassemblerX87::D1D3C1Instruction(byte* data) { -+ byte op = *data; -+ DCHECK(op == 0xD1 || op == 0xD3 || op == 0xC1); -+ byte modrm = *++data; -+ int mod, regop, rm; -+ get_modrm(modrm, &mod, ®op, &rm); -+ int imm8 = -1; -+ const char* mnem = NULL; -+ switch (regop) { -+ case kROL: -+ mnem = "rol"; -+ break; -+ case kROR: -+ mnem = "ror"; -+ break; -+ case kRCL: -+ mnem = "rcl"; -+ break; -+ case kRCR: -+ mnem = "rcr"; -+ break; -+ case kSHL: -+ mnem = "shl"; -+ break; -+ case KSHR: -+ mnem = "shr"; -+ break; -+ case kSAR: -+ mnem = "sar"; -+ break; -+ default: -+ UnimplementedInstruction(); -+ } -+ AppendToBuffer("%s ", mnem); -+ int count = PrintRightOperand(data); -+ if (op == 0xD1) { -+ imm8 = 1; -+ } else if (op == 0xC1) { -+ imm8 = *(data + 1); -+ count++; -+ } else if (op == 0xD3) { -+ // Shift/rotate by cl. -+ } -+ if (imm8 >= 0) { -+ AppendToBuffer(",%d", imm8); -+ } else { -+ AppendToBuffer(",cl"); -+ } -+ return 1 + count; -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::JumpShort(byte* data) { -+ DCHECK_EQ(0xEB, *data); -+ byte b = *(data+1); -+ byte* dest = data + static_cast(b) + 2; -+ AppendToBuffer("jmp %s", NameOfAddress(dest)); -+ return 2; -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::JumpConditional(byte* data, const char* comment) { -+ DCHECK_EQ(0x0F, *data); -+ byte cond = *(data+1) & 0x0F; -+ byte* dest = data + *reinterpret_cast(data+2) + 6; -+ const char* mnem = jump_conditional_mnem[cond]; -+ AppendToBuffer("%s %s", mnem, NameOfAddress(dest)); -+ if (comment != NULL) { -+ AppendToBuffer(", %s", comment); -+ } -+ return 6; // includes 0x0F -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::JumpConditionalShort(byte* data, const char* comment) { -+ byte cond = *data & 0x0F; -+ byte b = *(data+1); -+ byte* dest = data + static_cast(b) + 2; -+ const char* mnem = jump_conditional_mnem[cond]; -+ AppendToBuffer("%s %s", mnem, NameOfAddress(dest)); -+ if (comment != NULL) { -+ AppendToBuffer(", %s", comment); -+ } -+ return 2; -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::SetCC(byte* data) { -+ DCHECK_EQ(0x0F, *data); -+ byte cond = *(data+1) & 0x0F; -+ const char* mnem = set_conditional_mnem[cond]; -+ AppendToBuffer("%s ", mnem); -+ PrintRightByteOperand(data+2); -+ return 3; // Includes 0x0F. -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::CMov(byte* data) { -+ DCHECK_EQ(0x0F, *data); -+ byte cond = *(data + 1) & 0x0F; -+ const char* mnem = conditional_move_mnem[cond]; -+ int op_size = PrintOperands(mnem, REG_OPER_OP_ORDER, data + 2); -+ return 2 + op_size; // includes 0x0F -+} -+ -+ -+// Returns number of bytes used, including *data. -+int DisassemblerX87::FPUInstruction(byte* data) { -+ byte escape_opcode = *data; -+ DCHECK_EQ(0xD8, escape_opcode & 0xF8); -+ byte modrm_byte = *(data+1); -+ -+ if (modrm_byte >= 0xC0) { -+ return RegisterFPUInstruction(escape_opcode, modrm_byte); -+ } else { -+ return MemoryFPUInstruction(escape_opcode, modrm_byte, data+1); -+ } -+} -+ -+int DisassemblerX87::MemoryFPUInstruction(int escape_opcode, -+ int modrm_byte, -+ byte* modrm_start) { -+ const char* mnem = "?"; -+ int regop = (modrm_byte >> 3) & 0x7; // reg/op field of modrm byte. -+ switch (escape_opcode) { -+ case 0xD9: switch (regop) { -+ case 0: mnem = "fld_s"; break; -+ case 2: mnem = "fst_s"; break; -+ case 3: mnem = "fstp_s"; break; -+ case 5: -+ mnem = "fldcw"; -+ break; -+ case 7: -+ mnem = "fnstcw"; -+ break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDB: switch (regop) { -+ case 0: mnem = "fild_s"; break; -+ case 1: mnem = "fisttp_s"; break; -+ case 2: mnem = "fist_s"; break; -+ case 3: mnem = "fistp_s"; break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDC: -+ switch (regop) { -+ case 0: -+ mnem = "fadd_d"; -+ break; -+ case 1: -+ mnem = "fmul_d"; -+ break; -+ case 4: -+ mnem = "fsub_d"; -+ break; -+ case 5: -+ mnem = "fsubr_d"; -+ break; -+ case 6: -+ mnem = "fdiv_d"; -+ break; -+ case 7: -+ mnem = "fdivr_d"; -+ break; -+ default: -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDD: switch (regop) { -+ case 0: mnem = "fld_d"; break; -+ case 1: mnem = "fisttp_d"; break; -+ case 2: mnem = "fst_d"; break; -+ case 3: mnem = "fstp_d"; break; -+ case 4: -+ mnem = "frstor"; -+ break; -+ case 6: -+ mnem = "fnsave"; -+ break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDF: switch (regop) { -+ case 5: mnem = "fild_d"; break; -+ case 7: mnem = "fistp_d"; break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ default: UnimplementedInstruction(); -+ } -+ AppendToBuffer("%s ", mnem); -+ int count = PrintRightOperand(modrm_start); -+ return count + 1; -+} -+ -+int DisassemblerX87::RegisterFPUInstruction(int escape_opcode, -+ byte modrm_byte) { -+ bool has_register = false; // Is the FPU register encoded in modrm_byte? -+ const char* mnem = "?"; -+ -+ switch (escape_opcode) { -+ case 0xD8: -+ has_register = true; -+ switch (modrm_byte & 0xF8) { -+ case 0xC0: mnem = "fadd_i"; break; -+ case 0xE0: mnem = "fsub_i"; break; -+ case 0xC8: mnem = "fmul_i"; break; -+ case 0xF0: mnem = "fdiv_i"; break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xD9: -+ switch (modrm_byte & 0xF8) { -+ case 0xC0: -+ mnem = "fld"; -+ has_register = true; -+ break; -+ case 0xC8: -+ mnem = "fxch"; -+ has_register = true; -+ break; -+ default: -+ switch (modrm_byte) { -+ case 0xE0: mnem = "fchs"; break; -+ case 0xE1: mnem = "fabs"; break; -+ case 0xE4: mnem = "ftst"; break; -+ case 0xE8: mnem = "fld1"; break; -+ case 0xEB: mnem = "fldpi"; break; -+ case 0xED: mnem = "fldln2"; break; -+ case 0xEE: mnem = "fldz"; break; -+ case 0xF0: mnem = "f2xm1"; break; -+ case 0xF1: mnem = "fyl2x"; break; -+ case 0xF4: mnem = "fxtract"; break; -+ case 0xF5: mnem = "fprem1"; break; -+ case 0xF7: mnem = "fincstp"; break; -+ case 0xF8: mnem = "fprem"; break; -+ case 0xFC: mnem = "frndint"; break; -+ case 0xFD: mnem = "fscale"; break; -+ case 0xFE: mnem = "fsin"; break; -+ case 0xFF: mnem = "fcos"; break; -+ default: UnimplementedInstruction(); -+ } -+ } -+ break; -+ -+ case 0xDA: -+ if (modrm_byte == 0xE9) { -+ mnem = "fucompp"; -+ } else { -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDB: -+ if ((modrm_byte & 0xF8) == 0xE8) { -+ mnem = "fucomi"; -+ has_register = true; -+ } else if (modrm_byte == 0xE2) { -+ mnem = "fclex"; -+ } else if (modrm_byte == 0xE3) { -+ mnem = "fninit"; -+ } else { -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDC: -+ has_register = true; -+ switch (modrm_byte & 0xF8) { -+ case 0xC0: mnem = "fadd"; break; -+ case 0xE8: mnem = "fsub"; break; -+ case 0xC8: mnem = "fmul"; break; -+ case 0xF8: mnem = "fdiv"; break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDD: -+ has_register = true; -+ switch (modrm_byte & 0xF8) { -+ case 0xC0: mnem = "ffree"; break; -+ case 0xD0: mnem = "fst"; break; -+ case 0xD8: mnem = "fstp"; break; -+ default: UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xDE: -+ if (modrm_byte == 0xD9) { -+ mnem = "fcompp"; -+ } else { -+ has_register = true; -+ switch (modrm_byte & 0xF8) { -+ case 0xC0: mnem = "faddp"; break; -+ case 0xE8: mnem = "fsubp"; break; -+ case 0xC8: mnem = "fmulp"; break; -+ case 0xF8: mnem = "fdivp"; break; -+ default: UnimplementedInstruction(); -+ } -+ } -+ break; -+ -+ case 0xDF: -+ if (modrm_byte == 0xE0) { -+ mnem = "fnstsw_ax"; -+ } else if ((modrm_byte & 0xF8) == 0xE8) { -+ mnem = "fucomip"; -+ has_register = true; -+ } -+ break; -+ -+ default: UnimplementedInstruction(); -+ } -+ -+ if (has_register) { -+ AppendToBuffer("%s st%d", mnem, modrm_byte & 0x7); -+ } else { -+ AppendToBuffer("%s", mnem); -+ } -+ return 2; -+} -+ -+ -+// Mnemonics for instructions 0xF0 byte. -+// Returns NULL if the instruction is not handled here. -+static const char* F0Mnem(byte f0byte) { -+ switch (f0byte) { -+ case 0x0B: -+ return "ud2"; -+ case 0x18: -+ return "prefetch"; -+ case 0xA2: -+ return "cpuid"; -+ case 0xBE: -+ return "movsx_b"; -+ case 0xBF: -+ return "movsx_w"; -+ case 0xB6: -+ return "movzx_b"; -+ case 0xB7: -+ return "movzx_w"; -+ case 0xAF: -+ return "imul"; -+ case 0xA4: -+ return "shld"; -+ case 0xA5: -+ return "shld"; -+ case 0xAD: -+ return "shrd"; -+ case 0xAC: -+ return "shrd"; // 3-operand version. -+ case 0xAB: -+ return "bts"; -+ case 0xB0: -+ return "cmpxchg_b"; -+ case 0xB1: -+ return "cmpxchg"; -+ case 0xBC: -+ return "bsf"; -+ case 0xBD: -+ return "bsr"; -+ default: return NULL; -+ } -+} -+ -+ -+// Disassembled instruction '*instr' and writes it into 'out_buffer'. -+int DisassemblerX87::InstructionDecode(v8::internal::Vector out_buffer, -+ byte* instr) { -+ tmp_buffer_pos_ = 0; // starting to write as position 0 -+ byte* data = instr; -+ // Check for hints. -+ const char* branch_hint = NULL; -+ // We use these two prefixes only with branch prediction -+ if (*data == 0x3E /*ds*/) { -+ branch_hint = "predicted taken"; -+ data++; -+ } else if (*data == 0x2E /*cs*/) { -+ branch_hint = "predicted not taken"; -+ data++; -+ } else if (*data == 0xF0 /*lock*/) { -+ AppendToBuffer("lock "); -+ data++; -+ } -+ -+ bool processed = true; // Will be set to false if the current instruction -+ // is not in 'instructions' table. -+ const InstructionDesc& idesc = instruction_table_->Get(*data); -+ switch (idesc.type) { -+ case ZERO_OPERANDS_INSTR: -+ AppendToBuffer("%s", idesc.mnem); -+ data++; -+ break; -+ -+ case TWO_OPERANDS_INSTR: -+ data++; -+ data += PrintOperands(idesc.mnem, idesc.op_order_, data); -+ break; -+ -+ case JUMP_CONDITIONAL_SHORT_INSTR: -+ data += JumpConditionalShort(data, branch_hint); -+ break; -+ -+ case REGISTER_INSTR: -+ AppendToBuffer("%s %s", idesc.mnem, NameOfCPURegister(*data & 0x07)); -+ data++; -+ break; -+ -+ case MOVE_REG_INSTR: { -+ byte* addr = reinterpret_cast(*reinterpret_cast(data+1)); -+ AppendToBuffer("mov %s,%s", -+ NameOfCPURegister(*data & 0x07), -+ NameOfAddress(addr)); -+ data += 5; -+ break; -+ } -+ -+ case CALL_JUMP_INSTR: { -+ byte* addr = data + *reinterpret_cast(data+1) + 5; -+ AppendToBuffer("%s %s", idesc.mnem, NameOfAddress(addr)); -+ data += 5; -+ break; -+ } -+ -+ case SHORT_IMMEDIATE_INSTR: { -+ byte* addr = reinterpret_cast(*reinterpret_cast(data+1)); -+ AppendToBuffer("%s eax,%s", idesc.mnem, NameOfAddress(addr)); -+ data += 5; -+ break; -+ } -+ -+ case BYTE_IMMEDIATE_INSTR: { -+ AppendToBuffer("%s al,0x%x", idesc.mnem, data[1]); -+ data += 2; -+ break; -+ } -+ -+ case NO_INSTR: -+ processed = false; -+ break; -+ -+ default: -+ UNIMPLEMENTED(); // This type is not implemented. -+ } -+ //---------------------------- -+ if (!processed) { -+ switch (*data) { -+ case 0xC2: -+ AppendToBuffer("ret 0x%x", *reinterpret_cast(data+1)); -+ data += 3; -+ break; -+ -+ case 0x6B: { -+ data++; -+ data += PrintOperands("imul", REG_OPER_OP_ORDER, data); -+ AppendToBuffer(",%d", *data); -+ data++; -+ } break; -+ -+ case 0x69: { -+ data++; -+ data += PrintOperands("imul", REG_OPER_OP_ORDER, data); -+ AppendToBuffer(",%d", *reinterpret_cast(data)); -+ data += 4; -+ } -+ break; -+ -+ case 0xF6: -+ { data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (regop == eax) { -+ AppendToBuffer("test_b "); -+ data += PrintRightByteOperand(data); -+ int32_t imm = *data; -+ AppendToBuffer(",0x%x", imm); -+ data++; -+ } else { -+ UnimplementedInstruction(); -+ } -+ } -+ break; -+ -+ case 0x81: // fall through -+ case 0x83: // 0x81 with sign extension bit set -+ data += PrintImmediateOp(data); -+ break; -+ -+ case 0x0F: -+ { byte f0byte = data[1]; -+ const char* f0mnem = F0Mnem(f0byte); -+ if (f0byte == 0x18) { -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ const char* suffix[] = {"nta", "1", "2", "3"}; -+ AppendToBuffer("%s%s ", f0mnem, suffix[regop & 0x03]); -+ data += PrintRightOperand(data); -+ } else if (f0byte == 0x1F && data[2] == 0) { -+ AppendToBuffer("nop"); // 3 byte nop. -+ data += 3; -+ } else if (f0byte == 0x1F && data[2] == 0x40 && data[3] == 0) { -+ AppendToBuffer("nop"); // 4 byte nop. -+ data += 4; -+ } else if (f0byte == 0x1F && data[2] == 0x44 && data[3] == 0 && -+ data[4] == 0) { -+ AppendToBuffer("nop"); // 5 byte nop. -+ data += 5; -+ } else if (f0byte == 0x1F && data[2] == 0x80 && data[3] == 0 && -+ data[4] == 0 && data[5] == 0 && data[6] == 0) { -+ AppendToBuffer("nop"); // 7 byte nop. -+ data += 7; -+ } else if (f0byte == 0x1F && data[2] == 0x84 && data[3] == 0 && -+ data[4] == 0 && data[5] == 0 && data[6] == 0 && -+ data[7] == 0) { -+ AppendToBuffer("nop"); // 8 byte nop. -+ data += 8; -+ } else if (f0byte == 0x0B || f0byte == 0xA2 || f0byte == 0x31) { -+ AppendToBuffer("%s", f0mnem); -+ data += 2; -+ } else if (f0byte == 0x28) { -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movaps %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (f0byte >= 0x53 && f0byte <= 0x5F) { -+ const char* const pseudo_op[] = { -+ "rcpps", -+ "andps", -+ "andnps", -+ "orps", -+ "xorps", -+ "addps", -+ "mulps", -+ "cvtps2pd", -+ "cvtdq2ps", -+ "subps", -+ "minps", -+ "divps", -+ "maxps", -+ }; -+ -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("%s %s,", -+ pseudo_op[f0byte - 0x53], -+ NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (f0byte == 0x50) { -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movmskps %s,%s", -+ NameOfCPURegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (f0byte== 0xC6) { -+ // shufps xmm, xmm/m128, imm8 -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("shufps %s,%s,%d", -+ NameOfXMMRegister(rm), -+ NameOfXMMRegister(regop), -+ static_cast(imm8)); -+ data += 2; -+ } else if ((f0byte & 0xF0) == 0x80) { -+ data += JumpConditional(data, branch_hint); -+ } else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || -+ f0byte == 0xB7 || f0byte == 0xAF) { -+ data += 2; -+ data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data); -+ } else if ((f0byte & 0xF0) == 0x90) { -+ data += SetCC(data); -+ } else if ((f0byte & 0xF0) == 0x40) { -+ data += CMov(data); -+ } else if (f0byte == 0xA4 || f0byte == 0xAC) { -+ // shld, shrd -+ data += 2; -+ AppendToBuffer("%s ", f0mnem); -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ data += 2; -+ AppendToBuffer("%s,%s,%d", NameOfCPURegister(rm), -+ NameOfCPURegister(regop), static_cast(imm8)); -+ } else if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) { -+ // shrd_cl, shld_cl, bts -+ data += 2; -+ AppendToBuffer("%s ", f0mnem); -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightOperand(data); -+ if (f0byte == 0xAB) { -+ AppendToBuffer(",%s", NameOfCPURegister(regop)); -+ } else { -+ AppendToBuffer(",%s,cl", NameOfCPURegister(regop)); -+ } -+ } else if (f0byte == 0xB0) { -+ // cmpxchg_b -+ data += 2; -+ AppendToBuffer("%s ", f0mnem); -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightOperand(data); -+ AppendToBuffer(",%s", NameOfByteCPURegister(regop)); -+ } else if (f0byte == 0xB1) { -+ // cmpxchg -+ data += 2; -+ data += PrintOperands(f0mnem, OPER_REG_OP_ORDER, data); -+ } else if (f0byte == 0xBC) { -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop)); -+ data += PrintRightOperand(data); -+ } else if (f0byte == 0xBD) { -+ data += 2; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("%s %s,", f0mnem, NameOfCPURegister(regop)); -+ data += PrintRightOperand(data); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } -+ break; -+ -+ case 0x8F: -+ { data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (regop == eax) { -+ AppendToBuffer("pop "); -+ data += PrintRightOperand(data); -+ } -+ } -+ break; -+ -+ case 0xFF: -+ { data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ const char* mnem = NULL; -+ switch (regop) { -+ case esi: mnem = "push"; break; -+ case eax: mnem = "inc"; break; -+ case ecx: mnem = "dec"; break; -+ case edx: mnem = "call"; break; -+ case esp: mnem = "jmp"; break; -+ default: mnem = "???"; -+ } -+ AppendToBuffer("%s ", mnem); -+ data += PrintRightOperand(data); -+ } -+ break; -+ -+ case 0xC7: // imm32, fall through -+ case 0xC6: // imm8 -+ { bool is_byte = *data == 0xC6; -+ data++; -+ if (is_byte) { -+ AppendToBuffer("%s ", "mov_b"); -+ data += PrintRightByteOperand(data); -+ int32_t imm = *data; -+ AppendToBuffer(",0x%x", imm); -+ data++; -+ } else { -+ AppendToBuffer("%s ", "mov"); -+ data += PrintRightOperand(data); -+ int32_t imm = *reinterpret_cast(data); -+ AppendToBuffer(",0x%x", imm); -+ data += 4; -+ } -+ } -+ break; -+ -+ case 0x80: -+ { data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ const char* mnem = NULL; -+ switch (regop) { -+ case 5: mnem = "subb"; break; -+ case 7: mnem = "cmpb"; break; -+ default: UnimplementedInstruction(); -+ } -+ AppendToBuffer("%s ", mnem); -+ data += PrintRightByteOperand(data); -+ int32_t imm = *data; -+ AppendToBuffer(",0x%x", imm); -+ data++; -+ } -+ break; -+ -+ case 0x88: // 8bit, fall through -+ case 0x89: // 32bit -+ { bool is_byte = *data == 0x88; -+ int mod, regop, rm; -+ data++; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (is_byte) { -+ AppendToBuffer("%s ", "mov_b"); -+ data += PrintRightByteOperand(data); -+ AppendToBuffer(",%s", NameOfByteCPURegister(regop)); -+ } else { -+ AppendToBuffer("%s ", "mov"); -+ data += PrintRightOperand(data); -+ AppendToBuffer(",%s", NameOfCPURegister(regop)); -+ } -+ } -+ break; -+ -+ case 0x66: // prefix -+ while (*data == 0x66) data++; -+ if (*data == 0xf && data[1] == 0x1f) { -+ AppendToBuffer("nop"); // 0x66 prefix -+ } else if (*data == 0x39) { -+ data++; -+ data += PrintOperands("cmpw", OPER_REG_OP_ORDER, data); -+ } else if (*data == 0x3B) { -+ data++; -+ data += PrintOperands("cmpw", REG_OPER_OP_ORDER, data); -+ } else if (*data == 0x81) { -+ data++; -+ AppendToBuffer("cmpw "); -+ data += PrintRightOperand(data); -+ int imm = *reinterpret_cast(data); -+ AppendToBuffer(",0x%x", imm); -+ data += 2; -+ } else if (*data == 0x87) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("xchg_w %s,", NameOfCPURegister(regop)); -+ data += PrintRightOperand(data); -+ } else if (*data == 0x89) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("mov_w "); -+ data += PrintRightOperand(data); -+ AppendToBuffer(",%s", NameOfCPURegister(regop)); -+ } else if (*data == 0x8B) { -+ data++; -+ data += PrintOperands("mov_w", REG_OPER_OP_ORDER, data); -+ } else if (*data == 0x90) { -+ AppendToBuffer("nop"); // 0x66 prefix -+ } else if (*data == 0xC7) { -+ data++; -+ AppendToBuffer("%s ", "mov_w"); -+ data += PrintRightOperand(data); -+ int imm = *reinterpret_cast(data); -+ AppendToBuffer(",0x%x", imm); -+ data += 2; -+ } else if (*data == 0xF7) { -+ data++; -+ AppendToBuffer("%s ", "test_w"); -+ data += PrintRightOperand(data); -+ int imm = *reinterpret_cast(data); -+ AppendToBuffer(",0x%x", imm); -+ data += 2; -+ } else if (*data == 0x0F) { -+ data++; -+ if (*data == 0x38) { -+ data++; -+ if (*data == 0x17) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("ptest %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x2A) { -+ // movntdqa -+ UnimplementedInstruction(); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } else if (*data == 0x3A) { -+ data++; -+ if (*data == 0x0B) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("roundsd %s,%s,%d", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm), -+ static_cast(imm8)); -+ data += 2; -+ } else if (*data == 0x16) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, &rm, ®op); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("pextrd %s,%s,%d", -+ NameOfCPURegister(regop), -+ NameOfXMMRegister(rm), -+ static_cast(imm8)); -+ data += 2; -+ } else if (*data == 0x17) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("extractps %s,%s,%d", -+ NameOfCPURegister(rm), -+ NameOfXMMRegister(regop), -+ static_cast(imm8)); -+ data += 2; -+ } else if (*data == 0x22) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("pinsrd %s,%s,%d", -+ NameOfXMMRegister(regop), -+ NameOfCPURegister(rm), -+ static_cast(imm8)); -+ data += 2; -+ } else { -+ UnimplementedInstruction(); -+ } -+ } else if (*data == 0x2E || *data == 0x2F) { -+ const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd"; -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (mod == 0x3) { -+ AppendToBuffer("%s %s,%s", mnem, -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else { -+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); -+ data += PrintRightOperand(data); -+ } -+ } else if (*data == 0x50) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movmskpd %s,%s", -+ NameOfCPURegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x54) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("andpd %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x56) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("orpd %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x57) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("xorpd %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x6E) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movd %s,", NameOfXMMRegister(regop)); -+ data += PrintRightOperand(data); -+ } else if (*data == 0x6F) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movdqa %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (*data == 0x70) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ AppendToBuffer("pshufd %s,%s,%d", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm), -+ static_cast(imm8)); -+ data += 2; -+ } else if (*data == 0x76) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("pcmpeqd %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x90) { -+ data++; -+ AppendToBuffer("nop"); // 2 byte nop. -+ } else if (*data == 0xF3) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("psllq %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x73) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ int8_t imm8 = static_cast(data[1]); -+ DCHECK(regop == esi || regop == edx); -+ AppendToBuffer("%s %s,%d", -+ (regop == esi) ? "psllq" : "psrlq", -+ NameOfXMMRegister(rm), -+ static_cast(imm8)); -+ data += 2; -+ } else if (*data == 0xD3) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("psrlq %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0x7F) { -+ AppendToBuffer("movdqa "); -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightXMMOperand(data); -+ AppendToBuffer(",%s", NameOfXMMRegister(regop)); -+ } else if (*data == 0x7E) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movd "); -+ data += PrintRightOperand(data); -+ AppendToBuffer(",%s", NameOfXMMRegister(regop)); -+ } else if (*data == 0xDB) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("pand %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0xE7) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (mod == 3) { -+ // movntdq -+ UnimplementedInstruction(); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } else if (*data == 0xEF) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("pxor %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0xEB) { -+ data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("por %s,%s", -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data++; -+ } else if (*data == 0xB1) { -+ data++; -+ data += PrintOperands("cmpxchg_w", OPER_REG_OP_ORDER, data); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } else { -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xFE: -+ { data++; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (regop == ecx) { -+ AppendToBuffer("dec_b "); -+ data += PrintRightOperand(data); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } -+ break; -+ -+ case 0x68: -+ AppendToBuffer("push 0x%x", *reinterpret_cast(data+1)); -+ data += 5; -+ break; -+ -+ case 0x6A: -+ AppendToBuffer("push 0x%x", *reinterpret_cast(data + 1)); -+ data += 2; -+ break; -+ -+ case 0xA8: -+ AppendToBuffer("test al,0x%x", *reinterpret_cast(data+1)); -+ data += 2; -+ break; -+ -+ case 0xA9: -+ AppendToBuffer("test eax,0x%x", *reinterpret_cast(data+1)); -+ data += 5; -+ break; -+ -+ case 0xD1: // fall through -+ case 0xD3: // fall through -+ case 0xC1: -+ data += D1D3C1Instruction(data); -+ break; -+ -+ case 0xD8: // fall through -+ case 0xD9: // fall through -+ case 0xDA: // fall through -+ case 0xDB: // fall through -+ case 0xDC: // fall through -+ case 0xDD: // fall through -+ case 0xDE: // fall through -+ case 0xDF: -+ data += FPUInstruction(data); -+ break; -+ -+ case 0xEB: -+ data += JumpShort(data); -+ break; -+ -+ case 0xF2: -+ if (*(data+1) == 0x0F) { -+ byte b2 = *(data+2); -+ if (b2 == 0x11) { -+ AppendToBuffer("movsd "); -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightXMMOperand(data); -+ AppendToBuffer(",%s", NameOfXMMRegister(regop)); -+ } else if (b2 == 0x10) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movsd %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0x5A) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("cvtsd2ss %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else { -+ const char* mnem = "?"; -+ switch (b2) { -+ case 0x2A: mnem = "cvtsi2sd"; break; -+ case 0x2C: mnem = "cvttsd2si"; break; -+ case 0x2D: mnem = "cvtsd2si"; break; -+ case 0x51: mnem = "sqrtsd"; break; -+ case 0x58: mnem = "addsd"; break; -+ case 0x59: mnem = "mulsd"; break; -+ case 0x5C: mnem = "subsd"; break; -+ case 0x5E: mnem = "divsd"; break; -+ } -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ if (b2 == 0x2A) { -+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); -+ data += PrintRightOperand(data); -+ } else if (b2 == 0x2C || b2 == 0x2D) { -+ AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0xC2) { -+ // Intel manual 2A, Table 3-18. -+ const char* const pseudo_op[] = { -+ "cmpeqsd", -+ "cmpltsd", -+ "cmplesd", -+ "cmpunordsd", -+ "cmpneqsd", -+ "cmpnltsd", -+ "cmpnlesd", -+ "cmpordsd" -+ }; -+ AppendToBuffer("%s %s,%s", -+ pseudo_op[data[1]], -+ NameOfXMMRegister(regop), -+ NameOfXMMRegister(rm)); -+ data += 2; -+ } else { -+ AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } -+ } -+ } else { -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xF3: -+ if (*(data+1) == 0x0F) { -+ byte b2 = *(data+2); -+ if (b2 == 0x11) { -+ AppendToBuffer("movss "); -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightXMMOperand(data); -+ AppendToBuffer(",%s", NameOfXMMRegister(regop)); -+ } else if (b2 == 0x10) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movss %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0x2C) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("cvttss2si %s,", NameOfCPURegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0x5A) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("cvtss2sd %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0x6F) { -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop)); -+ data += PrintRightXMMOperand(data); -+ } else if (b2 == 0x7F) { -+ AppendToBuffer("movdqu "); -+ data += 3; -+ int mod, regop, rm; -+ get_modrm(*data, &mod, ®op, &rm); -+ data += PrintRightXMMOperand(data); -+ AppendToBuffer(",%s", NameOfXMMRegister(regop)); -+ } else { -+ UnimplementedInstruction(); -+ } -+ } else if (*(data+1) == 0xA5) { -+ data += 2; -+ AppendToBuffer("rep_movs"); -+ } else if (*(data+1) == 0xAB) { -+ data += 2; -+ AppendToBuffer("rep_stos"); -+ } else { -+ UnimplementedInstruction(); -+ } -+ break; -+ -+ case 0xF7: -+ data += F7Instruction(data); -+ break; -+ -+ default: -+ UnimplementedInstruction(); -+ } -+ } -+ -+ if (tmp_buffer_pos_ < sizeof tmp_buffer_) { -+ tmp_buffer_[tmp_buffer_pos_] = '\0'; -+ } -+ -+ int instr_len = data - instr; -+ if (instr_len == 0) { -+ printf("%02x", *data); -+ } -+ DCHECK(instr_len > 0); // Ensure progress. -+ -+ int outp = 0; -+ // Instruction bytes. -+ for (byte* bp = instr; bp < data; bp++) { -+ outp += v8::internal::SNPrintF(out_buffer + outp, "%02x", *bp); -+ } -+ for (int i = 6 - instr_len; i >= 0; i--) { -+ outp += v8::internal::SNPrintF(out_buffer + outp, " "); -+ } -+ -+ outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.start()); -+ return instr_len; -+} // NOLINT (function is too long) -+ -+ -+//------------------------------------------------------------------------------ -+ -+ -+static const char* const cpu_regs[8] = { -+ "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" -+}; -+ -+ -+static const char* const byte_cpu_regs[8] = { -+ "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" -+}; -+ -+ -+static const char* const xmm_regs[8] = { -+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" -+}; -+ -+ -+const char* NameConverter::NameOfAddress(byte* addr) const { -+ v8::internal::SNPrintF(tmp_buffer_, "%p", static_cast(addr)); -+ return tmp_buffer_.start(); -+} -+ -+ -+const char* NameConverter::NameOfConstant(byte* addr) const { -+ return NameOfAddress(addr); -+} -+ -+ -+const char* NameConverter::NameOfCPURegister(int reg) const { -+ if (0 <= reg && reg < 8) return cpu_regs[reg]; -+ return "noreg"; -+} -+ -+ -+const char* NameConverter::NameOfByteCPURegister(int reg) const { -+ if (0 <= reg && reg < 8) return byte_cpu_regs[reg]; -+ return "noreg"; -+} -+ -+ -+const char* NameConverter::NameOfXMMRegister(int reg) const { -+ if (0 <= reg && reg < 8) return xmm_regs[reg]; -+ return "noxmmreg"; -+} -+ -+ -+const char* NameConverter::NameInCode(byte* addr) const { -+ // X87 does not embed debug strings at the moment. -+ UNREACHABLE(); -+} -+ -+ -+//------------------------------------------------------------------------------ -+ -+Disassembler::Disassembler(const NameConverter& converter) -+ : converter_(converter) {} -+ -+ -+Disassembler::~Disassembler() {} -+ -+ -+int Disassembler::InstructionDecode(v8::internal::Vector buffer, -+ byte* instruction) { -+ DisassemblerX87 d(converter_, false /*do not crash if unimplemented*/); -+ return d.InstructionDecode(buffer, instruction); -+} -+ -+ -+// The IA-32 assembler does not currently use constant pools. -+int Disassembler::ConstantPoolSizeAt(byte* instruction) { return -1; } -+ -+ -+/*static*/ void Disassembler::Disassemble(FILE* f, byte* begin, byte* end) { -+ NameConverter converter; -+ Disassembler d(converter); -+ for (byte* pc = begin; pc < end;) { -+ v8::internal::EmbeddedVector buffer; -+ buffer[0] = '\0'; -+ byte* prev_pc = pc; -+ pc += d.InstructionDecode(buffer, pc); -+ fprintf(f, "%p", static_cast(prev_pc)); -+ fprintf(f, " "); -+ -+ for (byte* bp = prev_pc; bp < pc; bp++) { -+ fprintf(f, "%02x", *bp); -+ } -+ for (int i = 6 - (pc - prev_pc); i >= 0; i--) { -+ fprintf(f, " "); -+ } -+ fprintf(f, " %s\n", buffer.start()); -+ } -+} -+ -+ -+} // namespace disasm -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.cc 2018-02-18 19:00:54.199418119 +0100 -@@ -0,0 +1,27 @@ -+// Copyright 2006-2008 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/assembler.h" -+#include "src/frames.h" -+#include "src/x87/assembler-x87-inl.h" -+#include "src/x87/assembler-x87.h" -+#include "src/x87/frames-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+ -+Register JavaScriptFrame::fp_register() { return ebp; } -+Register JavaScriptFrame::context_register() { return esi; } -+Register JavaScriptFrame::constant_pool_pointer_register() { -+ UNREACHABLE(); -+} -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/frames-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/frames-x87.h 2018-02-18 19:00:54.199418119 +0100 -@@ -0,0 +1,78 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_X87_FRAMES_X87_H_ -+#define V8_X87_FRAMES_X87_H_ -+ -+namespace v8 { -+namespace internal { -+ -+ -+// Register lists -+// Note that the bit values must match those used in actual instruction encoding -+const int kNumRegs = 8; -+ -+ -+// Caller-saved registers -+const RegList kJSCallerSaved = -+ 1 << 0 | // eax -+ 1 << 1 | // ecx -+ 1 << 2 | // edx -+ 1 << 3 | // ebx - used as a caller-saved register in JavaScript code -+ 1 << 7; // edi - callee function -+ -+const int kNumJSCallerSaved = 5; -+ -+ -+// Number of registers for which space is reserved in safepoints. -+const int kNumSafepointRegisters = 8; -+ -+// ---------------------------------------------------- -+ -+ -+class EntryFrameConstants : public AllStatic { -+ public: -+ static const int kCallerFPOffset = -6 * kPointerSize; -+ -+ static const int kNewTargetArgOffset = +2 * kPointerSize; -+ static const int kFunctionArgOffset = +3 * kPointerSize; -+ static const int kReceiverArgOffset = +4 * kPointerSize; -+ static const int kArgcOffset = +5 * kPointerSize; -+ static const int kArgvOffset = +6 * kPointerSize; -+}; -+ -+class ExitFrameConstants : public TypedFrameConstants { -+ public: -+ static const int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0); -+ static const int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1); -+ DEFINE_TYPED_FRAME_SIZES(2); -+ -+ static const int kCallerFPOffset = 0 * kPointerSize; -+ static const int kCallerPCOffset = +1 * kPointerSize; -+ -+ // FP-relative displacement of the caller's SP. It points just -+ // below the saved PC. -+ static const int kCallerSPDisplacement = +2 * kPointerSize; -+ -+ static const int kConstantPoolOffset = 0; // Not used -+}; -+ -+ -+class JavaScriptFrameConstants : public AllStatic { -+ public: -+ // FP-relative. -+ static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; -+ static const int kLastParameterOffset = +2 * kPointerSize; -+ static const int kFunctionOffset = StandardFrameConstants::kFunctionOffset; -+ -+ // Caller SP-relative. -+ static const int kParam0Offset = -2 * kPointerSize; -+ static const int kReceiverOffset = -1 * kPointerSize; -+}; -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_FRAMES_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/interface-descriptors-x87.cc 2018-02-18 19:00:54.199418119 +0100 -@@ -0,0 +1,450 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/interface-descriptors.h" -+ -+namespace v8 { -+namespace internal { -+ -+const Register CallInterfaceDescriptor::ContextRegister() { return esi; } -+ -+void CallInterfaceDescriptor::DefaultInitializePlatformSpecific( -+ CallInterfaceDescriptorData* data, int register_parameter_count) { -+ const Register default_stub_registers[] = {eax, ebx, ecx, edx, edi}; -+ CHECK_LE(static_cast(register_parameter_count), -+ arraysize(default_stub_registers)); -+ data->InitializePlatformSpecific(register_parameter_count, -+ default_stub_registers); -+} -+ -+const Register FastNewFunctionContextDescriptor::FunctionRegister() { -+ return edi; -+} -+const Register FastNewFunctionContextDescriptor::SlotsRegister() { return eax; } -+ -+const Register LoadDescriptor::ReceiverRegister() { return edx; } -+const Register LoadDescriptor::NameRegister() { return ecx; } -+const Register LoadDescriptor::SlotRegister() { return eax; } -+ -+const Register LoadWithVectorDescriptor::VectorRegister() { return ebx; } -+ -+const Register LoadICProtoArrayDescriptor::HandlerRegister() { return edi; } -+ -+const Register StoreDescriptor::ReceiverRegister() { return edx; } -+const Register StoreDescriptor::NameRegister() { return ecx; } -+const Register StoreDescriptor::ValueRegister() { return eax; } -+const Register StoreDescriptor::SlotRegister() { return edi; } -+ -+const Register StoreWithVectorDescriptor::VectorRegister() { return ebx; } -+ -+const Register StoreTransitionDescriptor::SlotRegister() { return no_reg; } -+const Register StoreTransitionDescriptor::VectorRegister() { return ebx; } -+const Register StoreTransitionDescriptor::MapRegister() { return edi; } -+ -+const Register StringCompareDescriptor::LeftRegister() { return edx; } -+const Register StringCompareDescriptor::RightRegister() { return eax; } -+ -+const Register StringConcatDescriptor::ArgumentsCountRegister() { return eax; } -+ -+const Register ApiGetterDescriptor::HolderRegister() { return ecx; } -+const Register ApiGetterDescriptor::CallbackRegister() { return eax; } -+ -+const Register MathPowTaggedDescriptor::exponent() { return eax; } -+ -+const Register MathPowIntegerDescriptor::exponent() { -+ return MathPowTaggedDescriptor::exponent(); -+} -+ -+ -+const Register GrowArrayElementsDescriptor::ObjectRegister() { return eax; } -+const Register GrowArrayElementsDescriptor::KeyRegister() { return ebx; } -+ -+ -+void FastNewClosureDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // SharedFunctionInfo, vector, slot index. -+ Register registers[] = {ebx, ecx, edx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+// static -+const Register TypeConversionDescriptor::ArgumentRegister() { return eax; } -+ -+void TypeofDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void FastCloneRegExpDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi, eax, ecx, edx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void FastCloneShallowArrayDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {eax, ebx, ecx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void FastCloneShallowObjectDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {eax, ebx, ecx, edx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void CreateAllocationSiteDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {ebx, edx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void CreateWeakCellDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {ebx, edx, edi}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void CallFunctionDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void CallICTrampolineDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi, eax, edx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CallICDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edi, eax, edx, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void CallConstructDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // ebx : feedback vector -+ // ecx : new target (for IsSuperConstructorCall) -+ // edx : slot in feedback vector (Smi, for RecordCallTarget) -+ // edi : constructor function -+ // TODO(turbofan): So far we don't gather type feedback and hence skip the -+ // slot parameter, but ArrayConstructStub needs the vector to be undefined. -+ Register registers[] = {eax, edi, ecx, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void CallTrampolineDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // edi : the target to call -+ Register registers[] = {edi, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CallVarargsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments (on the stack, not including receiver) -+ // edi : the target to call -+ // ebx : arguments list (FixedArray) -+ // ecx : arguments list length (untagged) -+ Register registers[] = {edi, eax, ebx, ecx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CallForwardVarargsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // ecx : start index (to support rest parameters) -+ // edi : the target to call -+ Register registers[] = {edi, eax, ecx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CallWithSpreadDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments (on the stack, not including receiver) -+ // edi : the target to call -+ // ebx : the object to spread -+ Register registers[] = {edi, eax, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CallWithArrayLikeDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // edi : the target to call -+ // ebx : the arguments list -+ Register registers[] = {edi, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ConstructVarargsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments (on the stack, not including receiver) -+ // edi : the target to call -+ // edx : the new target -+ // ebx : arguments list (FixedArray) -+ // ecx : arguments list length (untagged) -+ Register registers[] = {edi, edx, eax, ebx, ecx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ConstructForwardVarargsDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // edx : the new target -+ // ecx : start index (to support rest parameters) -+ // edi : the target to call -+ Register registers[] = {edi, edx, eax, ecx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ConstructWithSpreadDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments (on the stack, not including receiver) -+ // edi : the target to call -+ // edx : the new target -+ // ebx : the object to spread -+ Register registers[] = {edi, edx, eax, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ConstructWithArrayLikeDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // edi : the target to call -+ // edx : the new target -+ // ebx : the arguments list -+ Register registers[] = {edi, edx, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ConstructStubDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // edx : the new target -+ // edi : the target to call -+ // ebx : allocation site or undefined -+ Register registers[] = {edi, edx, eax, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void ConstructTrampolineDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // eax : number of arguments -+ // edx : the new target -+ // edi : the target to call -+ Register registers[] = {edi, edx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+ -+void TransitionElementsKindDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {eax, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void AllocateHeapNumberDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // register state -+ data->InitializePlatformSpecific(0, nullptr, nullptr); -+} -+ -+void ArrayConstructorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite -+ Register registers[] = {edi, edx, eax, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void ArrayNoArgumentConstructorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // register state -+ // eax -- number of arguments -+ // edi -- function -+ // ebx -- allocation site with elements kind -+ Register registers[] = {edi, ebx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void ArraySingleArgumentConstructorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // register state -+ // eax -- number of arguments -+ // edi -- function -+ // ebx -- allocation site with elements kind -+ Register registers[] = {edi, ebx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void ArrayNArgumentsConstructorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // register state -+ // eax -- number of arguments -+ // edi -- function -+ // ebx -- allocation site with elements kind -+ Register registers[] = {edi, ebx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void VarArgFunctionDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // stack param count needs (arg count) -+ Register registers[] = {eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CompareDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void BinaryOpDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+ -+void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {ecx, edx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void BinaryOpWithVectorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ // register state -+ // edx -- lhs -+ // eax -- rhs -+ // edi -- slot id -+ // ebx -- vector -+ Register registers[] = {edx, eax, edi, ebx}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void CountOpDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void StringAddDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = {edx, eax}; -+ data->InitializePlatformSpecific(arraysize(registers), registers, NULL); -+} -+ -+void ArgumentAdaptorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ edi, // JSFunction -+ edx, // the new target -+ eax, // actual number of arguments -+ ebx, // expected number of arguments -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ApiCallbackDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ edi, // callee -+ ebx, // call_data -+ ecx, // holder -+ edx, // api_function_address -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void InterpreterDispatchDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ kInterpreterAccumulatorRegister, kInterpreterBytecodeOffsetRegister, -+ kInterpreterBytecodeArrayRegister, kInterpreterDispatchTableRegister}; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void InterpreterPushArgsThenCallDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ eax, // argument count (not including receiver) -+ ebx, // address of first argument -+ edi // the target callable to be call -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void InterpreterPushArgsThenConstructDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ eax, // argument count (not including receiver) -+ edx, // new target -+ edi, // constructor -+ ebx, // allocation site feedback -+ ecx, // address of first argument -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void InterpreterPushArgsThenConstructArrayDescriptor:: -+ InitializePlatformSpecific(CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ eax, // argument count (not including receiver) -+ edx, // target to the call. It is checked to be Array function. -+ ebx, // allocation site feedback -+ ecx, // address of first argument -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void InterpreterCEntryDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ eax, // argument count (argc) -+ ecx, // address of first argument (argv) -+ ebx // the runtime function to call -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void ResumeGeneratorDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ eax, // the value to pass to the generator -+ ebx, // the JSGeneratorObject to resume -+ edx // the resume mode (tagged) -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+void FrameDropperTrampolineDescriptor::InitializePlatformSpecific( -+ CallInterfaceDescriptorData* data) { -+ Register registers[] = { -+ ebx, // loaded new FP -+ }; -+ data->InitializePlatformSpecific(arraysize(registers), registers); -+} -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.cc 2018-02-18 19:00:54.200418105 +0100 -@@ -0,0 +1,2584 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#if V8_TARGET_ARCH_X87 -+ -+#include "src/base/bits.h" -+#include "src/base/division-by-constant.h" -+#include "src/base/utils/random-number-generator.h" -+#include "src/bootstrapper.h" -+#include "src/codegen.h" -+#include "src/debug/debug.h" -+#include "src/runtime/runtime.h" -+#include "src/x87/frames-x87.h" -+#include "src/x87/macro-assembler-x87.h" -+ -+namespace v8 { -+namespace internal { -+ -+// ------------------------------------------------------------------------- -+// MacroAssembler implementation. -+ -+MacroAssembler::MacroAssembler(Isolate* isolate, void* buffer, int size, -+ CodeObjectRequired create_code_object) -+ : TurboAssembler(isolate, buffer, size, create_code_object), -+ jit_cookie_(0) { -+ if (FLAG_mask_constants_with_cookie) { -+ jit_cookie_ = isolate->random_number_generator()->NextInt(); -+ } -+} -+ -+ -+void MacroAssembler::Load(Register dst, const Operand& src, Representation r) { -+ DCHECK(!r.IsDouble()); -+ if (r.IsInteger8()) { -+ movsx_b(dst, src); -+ } else if (r.IsUInteger8()) { -+ movzx_b(dst, src); -+ } else if (r.IsInteger16()) { -+ movsx_w(dst, src); -+ } else if (r.IsUInteger16()) { -+ movzx_w(dst, src); -+ } else { -+ mov(dst, src); -+ } -+} -+ -+ -+void MacroAssembler::Store(Register src, const Operand& dst, Representation r) { -+ DCHECK(!r.IsDouble()); -+ if (r.IsInteger8() || r.IsUInteger8()) { -+ mov_b(dst, src); -+ } else if (r.IsInteger16() || r.IsUInteger16()) { -+ mov_w(dst, src); -+ } else { -+ if (r.IsHeapObject()) { -+ AssertNotSmi(src); -+ } else if (r.IsSmi()) { -+ AssertSmi(src); -+ } -+ mov(dst, src); -+ } -+} -+ -+ -+void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { -+ if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) { -+ Handle object = isolate()->heap()->root_handle(index); -+ if (object->IsHeapObject()) { -+ mov(destination, Handle::cast(object)); -+ } else { -+ mov(destination, Immediate(Smi::cast(*object))); -+ } -+ return; -+ } -+ ExternalReference roots_array_start = -+ ExternalReference::roots_array_start(isolate()); -+ mov(destination, Immediate(index)); -+ mov(destination, Operand::StaticArray(destination, -+ times_pointer_size, -+ roots_array_start)); -+} -+ -+ -+void MacroAssembler::StoreRoot(Register source, -+ Register scratch, -+ Heap::RootListIndex index) { -+ DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); -+ ExternalReference roots_array_start = -+ ExternalReference::roots_array_start(isolate()); -+ mov(scratch, Immediate(index)); -+ mov(Operand::StaticArray(scratch, times_pointer_size, roots_array_start), -+ source); -+} -+ -+ -+void MacroAssembler::CompareRoot(Register with, -+ Register scratch, -+ Heap::RootListIndex index) { -+ ExternalReference roots_array_start = -+ ExternalReference::roots_array_start(isolate()); -+ mov(scratch, Immediate(index)); -+ cmp(with, Operand::StaticArray(scratch, -+ times_pointer_size, -+ roots_array_start)); -+} -+ -+ -+void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { -+ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ Handle object = isolate()->heap()->root_handle(index); -+ if (object->IsHeapObject()) { -+ cmp(with, Handle::cast(object)); -+ } else { -+ cmp(with, Immediate(Smi::cast(*object))); -+ } -+} -+ -+ -+void MacroAssembler::CompareRoot(const Operand& with, -+ Heap::RootListIndex index) { -+ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ Handle object = isolate()->heap()->root_handle(index); -+ if (object->IsHeapObject()) { -+ cmp(with, Handle::cast(object)); -+ } else { -+ cmp(with, Immediate(Smi::cast(*object))); -+ } -+} -+ -+ -+void MacroAssembler::PushRoot(Heap::RootListIndex index) { -+ DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index)); -+ PushObject(isolate()->heap()->root_handle(index)); -+} -+ -+#define REG(Name) \ -+ { Register::kCode_##Name } -+ -+static const Register saved_regs[] = {REG(eax), REG(ecx), REG(edx)}; -+ -+#undef REG -+ -+static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register); -+ -+void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, -+ Register exclusion1, Register exclusion2, -+ Register exclusion3) { -+ // We don't allow a GC during a store buffer overflow so there is no need to -+ // store the registers in any particular way, but we do have to store and -+ // restore them. -+ for (int i = 0; i < kNumberOfSavedRegs; i++) { -+ Register reg = saved_regs[i]; -+ if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { -+ push(reg); -+ } -+ } -+ if (fp_mode == kSaveFPRegs) { -+ // Save FPU state in m108byte. -+ sub(esp, Immediate(108)); -+ fnsave(Operand(esp, 0)); -+ } -+} -+ -+void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1, -+ Register exclusion2, Register exclusion3) { -+ if (fp_mode == kSaveFPRegs) { -+ // Restore FPU state in m108byte. -+ frstor(Operand(esp, 0)); -+ add(esp, Immediate(108)); -+ } -+ -+ for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { -+ Register reg = saved_regs[i]; -+ if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { -+ pop(reg); -+ } -+ } -+} -+ -+void MacroAssembler::InNewSpace(Register object, Register scratch, Condition cc, -+ Label* condition_met, -+ Label::Distance distance) { -+ CheckPageFlag(object, scratch, MemoryChunk::kIsInNewSpaceMask, cc, -+ condition_met, distance); -+} -+ -+ -+void MacroAssembler::RememberedSetHelper( -+ Register object, // Only used for debug checks. -+ Register addr, Register scratch, SaveFPRegsMode save_fp, -+ MacroAssembler::RememberedSetFinalAction and_then) { -+ Label done; -+ if (emit_debug_code()) { -+ Label ok; -+ JumpIfNotInNewSpace(object, scratch, &ok, Label::kNear); -+ int3(); -+ bind(&ok); -+ } -+ // Load store buffer top. -+ ExternalReference store_buffer = -+ ExternalReference::store_buffer_top(isolate()); -+ mov(scratch, Operand::StaticVariable(store_buffer)); -+ // Store pointer to buffer. -+ mov(Operand(scratch, 0), addr); -+ // Increment buffer top. -+ add(scratch, Immediate(kPointerSize)); -+ // Write back new top of buffer. -+ mov(Operand::StaticVariable(store_buffer), scratch); -+ // Call stub on end of buffer. -+ // Check for end of buffer. -+ test(scratch, Immediate(StoreBuffer::kStoreBufferMask)); -+ if (and_then == kReturnAtEnd) { -+ Label buffer_overflowed; -+ j(equal, &buffer_overflowed, Label::kNear); -+ ret(0); -+ bind(&buffer_overflowed); -+ } else { -+ DCHECK(and_then == kFallThroughAtEnd); -+ j(not_equal, &done, Label::kNear); -+ } -+ StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); -+ CallStub(&store_buffer_overflow); -+ if (and_then == kReturnAtEnd) { -+ ret(0); -+ } else { -+ DCHECK(and_then == kFallThroughAtEnd); -+ bind(&done); -+ } -+} -+ -+ -+void MacroAssembler::ClampTOSToUint8(Register result_reg) { -+ Label done, conv_failure; -+ sub(esp, Immediate(kPointerSize)); -+ fnclex(); -+ fist_s(Operand(esp, 0)); -+ pop(result_reg); -+ X87CheckIA(); -+ j(equal, &conv_failure, Label::kNear); -+ test(result_reg, Immediate(0xFFFFFF00)); -+ j(zero, &done, Label::kNear); -+ setcc(sign, result_reg); -+ sub(result_reg, Immediate(1)); -+ and_(result_reg, Immediate(255)); -+ jmp(&done, Label::kNear); -+ bind(&conv_failure); -+ fnclex(); -+ fldz(); -+ fld(1); -+ FCmp(); -+ setcc(below, result_reg); // 1 if negative, 0 if positive. -+ dec_b(result_reg); // 0 if negative, 255 if positive. -+ bind(&done); -+} -+ -+ -+void MacroAssembler::ClampUint8(Register reg) { -+ Label done; -+ test(reg, Immediate(0xFFFFFF00)); -+ j(zero, &done, Label::kNear); -+ setcc(negative, reg); // 1 if negative, 0 if positive. -+ dec_b(reg); // 0 if negative, 255 if positive. -+ bind(&done); -+} -+ -+ -+void TurboAssembler::SlowTruncateToIDelayed(Zone* zone, Register result_reg, -+ Register input_reg, int offset) { -+ CallStubDelayed( -+ new (zone) DoubleToIStub(nullptr, input_reg, result_reg, offset, true)); -+} -+ -+void MacroAssembler::SlowTruncateToI(Register result_reg, -+ Register input_reg, -+ int offset) { -+ DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true); -+ CallStub(&stub); -+} -+ -+ -+void TurboAssembler::TruncateX87TOSToI(Zone* zone, Register result_reg) { -+ sub(esp, Immediate(kDoubleSize)); -+ fst_d(MemOperand(esp, 0)); -+ SlowTruncateToIDelayed(zone, result_reg, esp, 0); -+ add(esp, Immediate(kDoubleSize)); -+} -+ -+ -+void MacroAssembler::X87TOSToI(Register result_reg, -+ MinusZeroMode minus_zero_mode, -+ Label* lost_precision, Label* is_nan, -+ Label* minus_zero, Label::Distance dst) { -+ Label done; -+ sub(esp, Immediate(kPointerSize)); -+ fld(0); -+ fist_s(MemOperand(esp, 0)); -+ fild_s(MemOperand(esp, 0)); -+ pop(result_reg); -+ FCmp(); -+ j(not_equal, lost_precision, dst); -+ j(parity_even, is_nan, dst); -+ if (minus_zero_mode == FAIL_ON_MINUS_ZERO) { -+ test(result_reg, Operand(result_reg)); -+ j(not_zero, &done, Label::kNear); -+ // To check for minus zero, we load the value again as float, and check -+ // if that is still 0. -+ sub(esp, Immediate(kPointerSize)); -+ fst_s(MemOperand(esp, 0)); -+ pop(result_reg); -+ test(result_reg, Operand(result_reg)); -+ j(not_zero, minus_zero, dst); -+ } -+ bind(&done); -+} -+ -+ -+void MacroAssembler::TruncateHeapNumberToI(Register result_reg, -+ Register input_reg) { -+ Label done, slow_case; -+ -+ SlowTruncateToI(result_reg, input_reg); -+ bind(&done); -+} -+ -+ -+void TurboAssembler::LoadUint32NoSSE2(const Operand& src) { -+ Label done; -+ push(src); -+ fild_s(Operand(esp, 0)); -+ cmp(src, Immediate(0)); -+ j(not_sign, &done, Label::kNear); -+ ExternalReference uint32_bias = -+ ExternalReference::address_of_uint32_bias(); -+ fld_d(Operand::StaticVariable(uint32_bias)); -+ faddp(1); -+ bind(&done); -+ add(esp, Immediate(kPointerSize)); -+} -+ -+ -+void MacroAssembler::RecordWriteField( -+ Register object, int offset, Register value, Register dst, -+ SaveFPRegsMode save_fp, RememberedSetAction remembered_set_action, -+ SmiCheck smi_check, PointersToHereCheck pointers_to_here_check_for_value) { -+ // First, check if a write barrier is even needed. The tests below -+ // catch stores of Smis. -+ Label done; -+ -+ // Skip barrier if writing a smi. -+ if (smi_check == INLINE_SMI_CHECK) { -+ JumpIfSmi(value, &done, Label::kNear); -+ } -+ -+ // Although the object register is tagged, the offset is relative to the start -+ // of the object, so so offset must be a multiple of kPointerSize. -+ DCHECK(IsAligned(offset, kPointerSize)); -+ -+ lea(dst, FieldOperand(object, offset)); -+ if (emit_debug_code()) { -+ Label ok; -+ test_b(dst, Immediate(kPointerSize - 1)); -+ j(zero, &ok, Label::kNear); -+ int3(); -+ bind(&ok); -+ } -+ -+ RecordWrite(object, dst, value, save_fp, remembered_set_action, -+ OMIT_SMI_CHECK, pointers_to_here_check_for_value); -+ -+ bind(&done); -+ -+ // Clobber clobbered input registers when running with the debug-code flag -+ // turned on to provoke errors. -+ if (emit_debug_code()) { -+ mov(value, Immediate(bit_cast(kZapValue))); -+ mov(dst, Immediate(bit_cast(kZapValue))); -+ } -+} -+ -+ -+void MacroAssembler::RecordWriteForMap(Register object, Handle map, -+ Register scratch1, Register scratch2, -+ SaveFPRegsMode save_fp) { -+ Label done; -+ -+ Register address = scratch1; -+ Register value = scratch2; -+ if (emit_debug_code()) { -+ Label ok; -+ lea(address, FieldOperand(object, HeapObject::kMapOffset)); -+ test_b(address, Immediate(kPointerSize - 1)); -+ j(zero, &ok, Label::kNear); -+ int3(); -+ bind(&ok); -+ } -+ -+ DCHECK(!object.is(value)); -+ DCHECK(!object.is(address)); -+ DCHECK(!value.is(address)); -+ AssertNotSmi(object); -+ -+ if (!FLAG_incremental_marking) { -+ return; -+ } -+ -+ // Compute the address. -+ lea(address, FieldOperand(object, HeapObject::kMapOffset)); -+ -+ // A single check of the map's pages interesting flag suffices, since it is -+ // only set during incremental collection, and then it's also guaranteed that -+ // the from object's page's interesting flag is also set. This optimization -+ // relies on the fact that maps can never be in new space. -+ DCHECK(!isolate()->heap()->InNewSpace(*map)); -+ CheckPageFlagForMap(map, -+ MemoryChunk::kPointersToHereAreInterestingMask, -+ zero, -+ &done, -+ Label::kNear); -+ -+ RecordWriteStub stub(isolate(), object, value, address, OMIT_REMEMBERED_SET, -+ save_fp); -+ CallStub(&stub); -+ -+ bind(&done); -+ -+ // Count number of write barriers in generated code. -+ isolate()->counters()->write_barriers_static()->Increment(); -+ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); -+ -+ // Clobber clobbered input registers when running with the debug-code flag -+ // turned on to provoke errors. -+ if (emit_debug_code()) { -+ mov(value, Immediate(bit_cast(kZapValue))); -+ mov(scratch1, Immediate(bit_cast(kZapValue))); -+ mov(scratch2, Immediate(bit_cast(kZapValue))); -+ } -+} -+ -+ -+void MacroAssembler::RecordWrite( -+ Register object, Register address, Register value, SaveFPRegsMode fp_mode, -+ RememberedSetAction remembered_set_action, SmiCheck smi_check, -+ PointersToHereCheck pointers_to_here_check_for_value) { -+ DCHECK(!object.is(value)); -+ DCHECK(!object.is(address)); -+ DCHECK(!value.is(address)); -+ AssertNotSmi(object); -+ -+ if (remembered_set_action == OMIT_REMEMBERED_SET && -+ !FLAG_incremental_marking) { -+ return; -+ } -+ -+ if (emit_debug_code()) { -+ Label ok; -+ cmp(value, Operand(address, 0)); -+ j(equal, &ok, Label::kNear); -+ int3(); -+ bind(&ok); -+ } -+ -+ // First, check if a write barrier is even needed. The tests below -+ // catch stores of Smis and stores into young gen. -+ Label done; -+ -+ if (smi_check == INLINE_SMI_CHECK) { -+ // Skip barrier if writing a smi. -+ JumpIfSmi(value, &done, Label::kNear); -+ } -+ -+ if (pointers_to_here_check_for_value != kPointersToHereAreAlwaysInteresting) { -+ CheckPageFlag(value, -+ value, // Used as scratch. -+ MemoryChunk::kPointersToHereAreInterestingMask, -+ zero, -+ &done, -+ Label::kNear); -+ } -+ CheckPageFlag(object, -+ value, // Used as scratch. -+ MemoryChunk::kPointersFromHereAreInterestingMask, -+ zero, -+ &done, -+ Label::kNear); -+ -+ RecordWriteStub stub(isolate(), object, value, address, remembered_set_action, -+ fp_mode); -+ CallStub(&stub); -+ -+ bind(&done); -+ -+ // Count number of write barriers in generated code. -+ isolate()->counters()->write_barriers_static()->Increment(); -+ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); -+ -+ // Clobber clobbered registers when running with the debug-code flag -+ // turned on to provoke errors. -+ if (emit_debug_code()) { -+ mov(address, Immediate(bit_cast(kZapValue))); -+ mov(value, Immediate(bit_cast(kZapValue))); -+ } -+} -+ -+void MacroAssembler::RecordWriteCodeEntryField(Register js_function, -+ Register code_entry, -+ Register scratch) { -+ const int offset = JSFunction::kCodeEntryOffset; -+ -+ // Since a code entry (value) is always in old space, we don't need to update -+ // remembered set. If incremental marking is off, there is nothing for us to -+ // do. -+ if (!FLAG_incremental_marking) return; -+ -+ DCHECK(!js_function.is(code_entry)); -+ DCHECK(!js_function.is(scratch)); -+ DCHECK(!code_entry.is(scratch)); -+ AssertNotSmi(js_function); -+ -+ if (emit_debug_code()) { -+ Label ok; -+ lea(scratch, FieldOperand(js_function, offset)); -+ cmp(code_entry, Operand(scratch, 0)); -+ j(equal, &ok, Label::kNear); -+ int3(); -+ bind(&ok); -+ } -+ -+ // First, check if a write barrier is even needed. The tests below -+ // catch stores of Smis and stores into young gen. -+ Label done; -+ -+ CheckPageFlag(code_entry, scratch, -+ MemoryChunk::kPointersToHereAreInterestingMask, zero, &done, -+ Label::kNear); -+ CheckPageFlag(js_function, scratch, -+ MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done, -+ Label::kNear); -+ -+ // Save input registers. -+ push(js_function); -+ push(code_entry); -+ -+ const Register dst = scratch; -+ lea(dst, FieldOperand(js_function, offset)); -+ -+ // Save caller-saved registers. -+ PushCallerSaved(kDontSaveFPRegs, js_function, code_entry); -+ -+ int argument_count = 3; -+ PrepareCallCFunction(argument_count, code_entry); -+ mov(Operand(esp, 0 * kPointerSize), js_function); -+ mov(Operand(esp, 1 * kPointerSize), dst); // Slot. -+ mov(Operand(esp, 2 * kPointerSize), -+ Immediate(ExternalReference::isolate_address(isolate()))); -+ -+ { -+ AllowExternalCallThatCantCauseGC scope(this); -+ CallCFunction( -+ ExternalReference::incremental_marking_record_write_code_entry_function( -+ isolate()), -+ argument_count); -+ } -+ -+ // Restore caller-saved registers. -+ PopCallerSaved(kDontSaveFPRegs, js_function, code_entry); -+ -+ // Restore input registers. -+ pop(code_entry); -+ pop(js_function); -+ -+ bind(&done); -+} -+ -+void MacroAssembler::MaybeDropFrames() { -+ // Check whether we need to drop frames to restart a function on the stack. -+ ExternalReference restart_fp = -+ ExternalReference::debug_restart_fp_address(isolate()); -+ mov(ebx, Operand::StaticVariable(restart_fp)); -+ test(ebx, ebx); -+ j(not_zero, isolate()->builtins()->FrameDropperTrampoline(), -+ RelocInfo::CODE_TARGET); -+} -+ -+void TurboAssembler::ShlPair(Register high, Register low, uint8_t shift) { -+ if (shift >= 32) { -+ mov(high, low); -+ shl(high, shift - 32); -+ xor_(low, low); -+ } else { -+ shld(high, low, shift); -+ shl(low, shift); -+ } -+} -+ -+void TurboAssembler::ShlPair_cl(Register high, Register low) { -+ shld_cl(high, low); -+ shl_cl(low); -+ Label done; -+ test(ecx, Immediate(0x20)); -+ j(equal, &done, Label::kNear); -+ mov(high, low); -+ xor_(low, low); -+ bind(&done); -+} -+ -+void TurboAssembler::ShrPair(Register high, Register low, uint8_t shift) { -+ if (shift >= 32) { -+ mov(low, high); -+ shr(low, shift - 32); -+ xor_(high, high); -+ } else { -+ shrd(high, low, shift); -+ shr(high, shift); -+ } -+} -+ -+void TurboAssembler::ShrPair_cl(Register high, Register low) { -+ shrd_cl(low, high); -+ shr_cl(high); -+ Label done; -+ test(ecx, Immediate(0x20)); -+ j(equal, &done, Label::kNear); -+ mov(low, high); -+ xor_(high, high); -+ bind(&done); -+} -+ -+void TurboAssembler::SarPair(Register high, Register low, uint8_t shift) { -+ if (shift >= 32) { -+ mov(low, high); -+ sar(low, shift - 32); -+ sar(high, 31); -+ } else { -+ shrd(high, low, shift); -+ sar(high, shift); -+ } -+} -+ -+void TurboAssembler::SarPair_cl(Register high, Register low) { -+ shrd_cl(low, high); -+ sar_cl(high); -+ Label done; -+ test(ecx, Immediate(0x20)); -+ j(equal, &done, Label::kNear); -+ mov(low, high); -+ sar(high, 31); -+ bind(&done); -+} -+ -+bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { -+ static const int kMaxImmediateBits = 17; -+ if (!RelocInfo::IsNone(x.rmode_)) return false; -+ return !is_intn(x.immediate(), kMaxImmediateBits); -+} -+ -+ -+void MacroAssembler::SafeMove(Register dst, const Immediate& x) { -+ if (IsUnsafeImmediate(x) && jit_cookie() != 0) { -+ Move(dst, Immediate(x.immediate() ^ jit_cookie())); -+ xor_(dst, jit_cookie()); -+ } else { -+ Move(dst, x); -+ } -+} -+ -+ -+void MacroAssembler::SafePush(const Immediate& x) { -+ if (IsUnsafeImmediate(x) && jit_cookie() != 0) { -+ push(Immediate(x.immediate() ^ jit_cookie())); -+ xor_(Operand(esp, 0), Immediate(jit_cookie())); -+ } else { -+ push(x); -+ } -+} -+ -+ -+void MacroAssembler::CmpObjectType(Register heap_object, -+ InstanceType type, -+ Register map) { -+ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); -+ CmpInstanceType(map, type); -+} -+ -+ -+void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { -+ cmpb(FieldOperand(map, Map::kInstanceTypeOffset), Immediate(type)); -+} -+ -+void MacroAssembler::CompareMap(Register obj, Handle map) { -+ cmp(FieldOperand(obj, HeapObject::kMapOffset), map); -+} -+ -+ -+void MacroAssembler::CheckMap(Register obj, -+ Handle map, -+ Label* fail, -+ SmiCheckType smi_check_type) { -+ if (smi_check_type == DO_SMI_CHECK) { -+ JumpIfSmi(obj, fail); -+ } -+ -+ CompareMap(obj, map); -+ j(not_equal, fail); -+} -+ -+ -+Condition MacroAssembler::IsObjectStringType(Register heap_object, -+ Register map, -+ Register instance_type) { -+ mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); -+ movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); -+ STATIC_ASSERT(kNotStringTag != 0); -+ test(instance_type, Immediate(kIsNotStringMask)); -+ return zero; -+} -+ -+ -+void TurboAssembler::FCmp() { -+ fucompp(); -+ push(eax); -+ fnstsw_ax(); -+ sahf(); -+ pop(eax); -+} -+ -+ -+void MacroAssembler::FXamMinusZero() { -+ fxam(); -+ push(eax); -+ fnstsw_ax(); -+ and_(eax, Immediate(0x4700)); -+ // For minus zero, C3 == 1 && C1 == 1. -+ cmp(eax, Immediate(0x4200)); -+ pop(eax); -+ fstp(0); -+} -+ -+ -+void MacroAssembler::FXamSign() { -+ fxam(); -+ push(eax); -+ fnstsw_ax(); -+ // For negative value (including -0.0), C1 == 1. -+ and_(eax, Immediate(0x0200)); -+ pop(eax); -+ fstp(0); -+} -+ -+ -+void MacroAssembler::X87CheckIA() { -+ push(eax); -+ fnstsw_ax(); -+ // For #IA, IE == 1 && SF == 0. -+ and_(eax, Immediate(0x0041)); -+ cmp(eax, Immediate(0x0001)); -+ pop(eax); -+} -+ -+ -+// rc=00B, round to nearest. -+// rc=01B, round down. -+// rc=10B, round up. -+// rc=11B, round toward zero. -+void TurboAssembler::X87SetRC(int rc) { -+ sub(esp, Immediate(kPointerSize)); -+ fnstcw(MemOperand(esp, 0)); -+ and_(MemOperand(esp, 0), Immediate(0xF3FF)); -+ or_(MemOperand(esp, 0), Immediate(rc)); -+ fldcw(MemOperand(esp, 0)); -+ add(esp, Immediate(kPointerSize)); -+} -+ -+ -+void TurboAssembler::X87SetFPUCW(int cw) { -+ RecordComment("-- X87SetFPUCW start --"); -+ push(Immediate(cw)); -+ fldcw(MemOperand(esp, 0)); -+ add(esp, Immediate(kPointerSize)); -+ RecordComment("-- X87SetFPUCW end--"); -+} -+ -+ -+void MacroAssembler::AssertSmi(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(equal, kOperandIsNotASmi); -+ } -+} -+ -+ -+void MacroAssembler::AssertFixedArray(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(not_equal, kOperandIsASmiAndNotAFixedArray); -+ Push(object); -+ CmpObjectType(object, FIXED_ARRAY_TYPE, object); -+ Pop(object); -+ Check(equal, kOperandIsNotAFixedArray); -+ } -+} -+ -+ -+void MacroAssembler::AssertFunction(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(not_equal, kOperandIsASmiAndNotAFunction); -+ Push(object); -+ CmpObjectType(object, JS_FUNCTION_TYPE, object); -+ Pop(object); -+ Check(equal, kOperandIsNotAFunction); -+ } -+} -+ -+ -+void MacroAssembler::AssertBoundFunction(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(not_equal, kOperandIsASmiAndNotABoundFunction); -+ Push(object); -+ CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object); -+ Pop(object); -+ Check(equal, kOperandIsNotABoundFunction); -+ } -+} -+ -+void MacroAssembler::AssertGeneratorObject(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); -+ Push(object); -+ CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); -+ Pop(object); -+ Check(equal, kOperandIsNotAGeneratorObject); -+ } -+} -+ -+void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { -+ if (emit_debug_code()) { -+ Label done_checking; -+ AssertNotSmi(object); -+ cmp(object, isolate()->factory()->undefined_value()); -+ j(equal, &done_checking); -+ cmp(FieldOperand(object, 0), -+ Immediate(isolate()->factory()->allocation_site_map())); -+ Assert(equal, kExpectedUndefinedOrCell); -+ bind(&done_checking); -+ } -+} -+ -+ -+void MacroAssembler::AssertNotSmi(Register object) { -+ if (emit_debug_code()) { -+ test(object, Immediate(kSmiTagMask)); -+ Check(not_equal, kOperandIsASmi); -+ } -+} -+ -+void TurboAssembler::StubPrologue(StackFrame::Type type) { -+ push(ebp); // Caller's frame pointer. -+ mov(ebp, esp); -+ push(Immediate(Smi::FromInt(type))); -+} -+ -+ -+void TurboAssembler::Prologue(bool code_pre_aging) { -+ PredictableCodeSizeScope predictible_code_size_scope(this, -+ kNoCodeAgeSequenceLength); -+ if (code_pre_aging) { -+ // Pre-age the code. -+ call(isolate()->builtins()->MarkCodeAsExecutedOnce(), -+ RelocInfo::CODE_AGE_SEQUENCE); -+ Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); -+ } else { -+ push(ebp); // Caller's frame pointer. -+ mov(ebp, esp); -+ push(esi); // Callee's context. -+ push(edi); // Callee's JS function. -+ } -+} -+ -+void MacroAssembler::EmitLoadFeedbackVector(Register vector) { -+ mov(vector, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); -+ mov(vector, FieldOperand(vector, JSFunction::kFeedbackVectorOffset)); -+ mov(vector, FieldOperand(vector, Cell::kValueOffset)); -+} -+ -+ -+void TurboAssembler::EnterFrame(StackFrame::Type type) { -+ push(ebp); -+ mov(ebp, esp); -+ push(Immediate(Smi::FromInt(type))); -+ if (type == StackFrame::INTERNAL) { -+ push(Immediate(CodeObject())); -+ } -+ if (emit_debug_code()) { -+ cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value())); -+ Check(not_equal, kCodeObjectNotProperlyPatched); -+ } -+} -+ -+ -+void TurboAssembler::LeaveFrame(StackFrame::Type type) { -+ if (emit_debug_code()) { -+ cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), -+ Immediate(Smi::FromInt(type))); -+ Check(equal, kStackFrameTypesMustMatch); -+ } -+ leave(); -+} -+ -+void MacroAssembler::EnterBuiltinFrame(Register context, Register target, -+ Register argc) { -+ Push(ebp); -+ Move(ebp, esp); -+ Push(context); -+ Push(target); -+ Push(argc); -+} -+ -+void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, -+ Register argc) { -+ Pop(argc); -+ Pop(target); -+ Pop(context); -+ leave(); -+} -+ -+void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { -+ DCHECK(frame_type == StackFrame::EXIT || -+ frame_type == StackFrame::BUILTIN_EXIT); -+ -+ // Set up the frame structure on the stack. -+ DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); -+ DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); -+ DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); -+ push(ebp); -+ mov(ebp, esp); -+ -+ // Reserve room for entry stack pointer and push the code object. -+ push(Immediate(Smi::FromInt(frame_type))); -+ DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset); -+ push(Immediate(0)); // Saved entry sp, patched before call. -+ DCHECK_EQ(-3 * kPointerSize, ExitFrameConstants::kCodeOffset); -+ push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot. -+ -+ // Save the frame pointer and the context in top. -+ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, -+ isolate()); -+ ExternalReference context_address(IsolateAddressId::kContextAddress, -+ isolate()); -+ ExternalReference c_function_address(IsolateAddressId::kCFunctionAddress, -+ isolate()); -+ mov(Operand::StaticVariable(c_entry_fp_address), ebp); -+ mov(Operand::StaticVariable(context_address), esi); -+ mov(Operand::StaticVariable(c_function_address), ebx); -+} -+ -+ -+void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { -+ // Optionally save FPU state. -+ if (save_doubles) { -+ // Store FPU state to m108byte. -+ int space = 108 + argc * kPointerSize; -+ sub(esp, Immediate(space)); -+ const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp; -+ fnsave(MemOperand(ebp, offset - 108)); -+ } else { -+ sub(esp, Immediate(argc * kPointerSize)); -+ } -+ -+ // Get the required frame alignment for the OS. -+ const int kFrameAlignment = base::OS::ActivationFrameAlignment(); -+ if (kFrameAlignment > 0) { -+ DCHECK(base::bits::IsPowerOfTwo(kFrameAlignment)); -+ and_(esp, -kFrameAlignment); -+ } -+ -+ // Patch the saved entry sp. -+ mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); -+} -+ -+void MacroAssembler::EnterExitFrame(int argc, bool save_doubles, -+ StackFrame::Type frame_type) { -+ EnterExitFramePrologue(frame_type); -+ -+ // Set up argc and argv in callee-saved registers. -+ int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; -+ mov(edi, eax); -+ lea(esi, Operand(ebp, eax, times_4, offset)); -+ -+ // Reserve space for argc, argv and isolate. -+ EnterExitFrameEpilogue(argc, save_doubles); -+} -+ -+ -+void MacroAssembler::EnterApiExitFrame(int argc) { -+ EnterExitFramePrologue(StackFrame::EXIT); -+ EnterExitFrameEpilogue(argc, false); -+} -+ -+ -+void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { -+ // Optionally restore FPU state. -+ if (save_doubles) { -+ const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp; -+ frstor(MemOperand(ebp, offset - 108)); -+ } -+ -+ if (pop_arguments) { -+ // Get the return address from the stack and restore the frame pointer. -+ mov(ecx, Operand(ebp, 1 * kPointerSize)); -+ mov(ebp, Operand(ebp, 0 * kPointerSize)); -+ -+ // Pop the arguments and the receiver from the caller stack. -+ lea(esp, Operand(esi, 1 * kPointerSize)); -+ -+ // Push the return address to get ready to return. -+ push(ecx); -+ } else { -+ // Otherwise just leave the exit frame. -+ leave(); -+ } -+ -+ LeaveExitFrameEpilogue(true); -+} -+ -+ -+void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) { -+ // Restore current context from top and clear it in debug mode. -+ ExternalReference context_address(IsolateAddressId::kContextAddress, -+ isolate()); -+ if (restore_context) { -+ mov(esi, Operand::StaticVariable(context_address)); -+ } -+#ifdef DEBUG -+ mov(Operand::StaticVariable(context_address), Immediate(0)); -+#endif -+ -+ // Clear the top frame. -+ ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress, -+ isolate()); -+ mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0)); -+} -+ -+ -+void MacroAssembler::LeaveApiExitFrame(bool restore_context) { -+ mov(esp, ebp); -+ pop(ebp); -+ -+ LeaveExitFrameEpilogue(restore_context); -+} -+ -+ -+void MacroAssembler::PushStackHandler() { -+ // Adjust this code if not the case. -+ STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); -+ STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); -+ -+ // Link the current handler as the next handler. -+ ExternalReference handler_address(IsolateAddressId::kHandlerAddress, -+ isolate()); -+ push(Operand::StaticVariable(handler_address)); -+ -+ // Set this new handler as the current one. -+ mov(Operand::StaticVariable(handler_address), esp); -+} -+ -+ -+void MacroAssembler::PopStackHandler() { -+ STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); -+ ExternalReference handler_address(IsolateAddressId::kHandlerAddress, -+ isolate()); -+ pop(Operand::StaticVariable(handler_address)); -+ add(esp, Immediate(StackHandlerConstants::kSize - kPointerSize)); -+} -+ -+ -+// Compute the hash code from the untagged key. This must be kept in sync with -+// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in -+// code-stub-hydrogen.cc -+// -+// Note: r0 will contain hash code -+void MacroAssembler::GetNumberHash(Register r0, Register scratch) { -+ // Xor original key with a seed. -+ if (serializer_enabled()) { -+ ExternalReference roots_array_start = -+ ExternalReference::roots_array_start(isolate()); -+ mov(scratch, Immediate(Heap::kHashSeedRootIndex)); -+ mov(scratch, -+ Operand::StaticArray(scratch, times_pointer_size, roots_array_start)); -+ SmiUntag(scratch); -+ xor_(r0, scratch); -+ } else { -+ int32_t seed = isolate()->heap()->HashSeed(); -+ xor_(r0, Immediate(seed)); -+ } -+ -+ // hash = ~hash + (hash << 15); -+ mov(scratch, r0); -+ not_(r0); -+ shl(scratch, 15); -+ add(r0, scratch); -+ // hash = hash ^ (hash >> 12); -+ mov(scratch, r0); -+ shr(scratch, 12); -+ xor_(r0, scratch); -+ // hash = hash + (hash << 2); -+ lea(r0, Operand(r0, r0, times_4, 0)); -+ // hash = hash ^ (hash >> 4); -+ mov(scratch, r0); -+ shr(scratch, 4); -+ xor_(r0, scratch); -+ // hash = hash * 2057; -+ imul(r0, r0, 2057); -+ // hash = hash ^ (hash >> 16); -+ mov(scratch, r0); -+ shr(scratch, 16); -+ xor_(r0, scratch); -+ and_(r0, 0x3fffffff); -+} -+ -+void MacroAssembler::LoadAllocationTopHelper(Register result, -+ Register scratch, -+ AllocationFlags flags) { -+ ExternalReference allocation_top = -+ AllocationUtils::GetAllocationTopReference(isolate(), flags); -+ -+ // Just return if allocation top is already known. -+ if ((flags & RESULT_CONTAINS_TOP) != 0) { -+ // No use of scratch if allocation top is provided. -+ DCHECK(scratch.is(no_reg)); -+#ifdef DEBUG -+ // Assert that result actually contains top on entry. -+ cmp(result, Operand::StaticVariable(allocation_top)); -+ Check(equal, kUnexpectedAllocationTop); -+#endif -+ return; -+ } -+ -+ // Move address of new object to result. Use scratch register if available. -+ if (scratch.is(no_reg)) { -+ mov(result, Operand::StaticVariable(allocation_top)); -+ } else { -+ mov(scratch, Immediate(allocation_top)); -+ mov(result, Operand(scratch, 0)); -+ } -+} -+ -+ -+void MacroAssembler::UpdateAllocationTopHelper(Register result_end, -+ Register scratch, -+ AllocationFlags flags) { -+ if (emit_debug_code()) { -+ test(result_end, Immediate(kObjectAlignmentMask)); -+ Check(zero, kUnalignedAllocationInNewSpace); -+ } -+ -+ ExternalReference allocation_top = -+ AllocationUtils::GetAllocationTopReference(isolate(), flags); -+ -+ // Update new top. Use scratch if available. -+ if (scratch.is(no_reg)) { -+ mov(Operand::StaticVariable(allocation_top), result_end); -+ } else { -+ mov(Operand(scratch, 0), result_end); -+ } -+} -+ -+ -+void MacroAssembler::Allocate(int object_size, -+ Register result, -+ Register result_end, -+ Register scratch, -+ Label* gc_required, -+ AllocationFlags flags) { -+ DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); -+ DCHECK(object_size <= kMaxRegularHeapObjectSize); -+ if (!FLAG_inline_new) { -+ if (emit_debug_code()) { -+ // Trash the registers to simulate an allocation failure. -+ mov(result, Immediate(0x7091)); -+ if (result_end.is_valid()) { -+ mov(result_end, Immediate(0x7191)); -+ } -+ if (scratch.is_valid()) { -+ mov(scratch, Immediate(0x7291)); -+ } -+ } -+ jmp(gc_required); -+ return; -+ } -+ DCHECK(!result.is(result_end)); -+ -+ // Load address of new object into result. -+ LoadAllocationTopHelper(result, scratch, flags); -+ -+ ExternalReference allocation_limit = -+ AllocationUtils::GetAllocationLimitReference(isolate(), flags); -+ -+ // Align the next allocation. Storing the filler map without checking top is -+ // safe in new-space because the limit of the heap is aligned there. -+ if ((flags & DOUBLE_ALIGNMENT) != 0) { -+ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); -+ Label aligned; -+ test(result, Immediate(kDoubleAlignmentMask)); -+ j(zero, &aligned, Label::kNear); -+ if ((flags & PRETENURE) != 0) { -+ cmp(result, Operand::StaticVariable(allocation_limit)); -+ j(above_equal, gc_required); -+ } -+ mov(Operand(result, 0), -+ Immediate(isolate()->factory()->one_pointer_filler_map())); -+ add(result, Immediate(kDoubleSize / 2)); -+ bind(&aligned); -+ } -+ -+ // Calculate new top and bail out if space is exhausted. -+ Register top_reg = result_end.is_valid() ? result_end : result; -+ -+ if (!top_reg.is(result)) { -+ mov(top_reg, result); -+ } -+ add(top_reg, Immediate(object_size)); -+ cmp(top_reg, Operand::StaticVariable(allocation_limit)); -+ j(above, gc_required); -+ -+ UpdateAllocationTopHelper(top_reg, scratch, flags); -+ -+ if (top_reg.is(result)) { -+ sub(result, Immediate(object_size - kHeapObjectTag)); -+ } else { -+ // Tag the result. -+ DCHECK(kHeapObjectTag == 1); -+ inc(result); -+ } -+} -+ -+ -+void MacroAssembler::Allocate(int header_size, -+ ScaleFactor element_size, -+ Register element_count, -+ RegisterValueType element_count_type, -+ Register result, -+ Register result_end, -+ Register scratch, -+ Label* gc_required, -+ AllocationFlags flags) { -+ DCHECK((flags & SIZE_IN_WORDS) == 0); -+ if (!FLAG_inline_new) { -+ if (emit_debug_code()) { -+ // Trash the registers to simulate an allocation failure. -+ mov(result, Immediate(0x7091)); -+ mov(result_end, Immediate(0x7191)); -+ if (scratch.is_valid()) { -+ mov(scratch, Immediate(0x7291)); -+ } -+ // Register element_count is not modified by the function. -+ } -+ jmp(gc_required); -+ return; -+ } -+ DCHECK(!result.is(result_end)); -+ -+ // Load address of new object into result. -+ LoadAllocationTopHelper(result, scratch, flags); -+ -+ ExternalReference allocation_limit = -+ AllocationUtils::GetAllocationLimitReference(isolate(), flags); -+ -+ // Align the next allocation. Storing the filler map without checking top is -+ // safe in new-space because the limit of the heap is aligned there. -+ if ((flags & DOUBLE_ALIGNMENT) != 0) { -+ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); -+ Label aligned; -+ test(result, Immediate(kDoubleAlignmentMask)); -+ j(zero, &aligned, Label::kNear); -+ if ((flags & PRETENURE) != 0) { -+ cmp(result, Operand::StaticVariable(allocation_limit)); -+ j(above_equal, gc_required); -+ } -+ mov(Operand(result, 0), -+ Immediate(isolate()->factory()->one_pointer_filler_map())); -+ add(result, Immediate(kDoubleSize / 2)); -+ bind(&aligned); -+ } -+ -+ // Calculate new top and bail out if space is exhausted. -+ // We assume that element_count*element_size + header_size does not -+ // overflow. -+ if (element_count_type == REGISTER_VALUE_IS_SMI) { -+ STATIC_ASSERT(static_cast(times_2 - 1) == times_1); -+ STATIC_ASSERT(static_cast(times_4 - 1) == times_2); -+ STATIC_ASSERT(static_cast(times_8 - 1) == times_4); -+ DCHECK(element_size >= times_2); -+ DCHECK(kSmiTagSize == 1); -+ element_size = static_cast(element_size - 1); -+ } else { -+ DCHECK(element_count_type == REGISTER_VALUE_IS_INT32); -+ } -+ lea(result_end, Operand(element_count, element_size, header_size)); -+ add(result_end, result); -+ j(carry, gc_required); -+ cmp(result_end, Operand::StaticVariable(allocation_limit)); -+ j(above, gc_required); -+ -+ // Tag result. -+ DCHECK(kHeapObjectTag == 1); -+ inc(result); -+ -+ // Update allocation top. -+ UpdateAllocationTopHelper(result_end, scratch, flags); -+} -+ -+void MacroAssembler::Allocate(Register object_size, -+ Register result, -+ Register result_end, -+ Register scratch, -+ Label* gc_required, -+ AllocationFlags flags) { -+ DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); -+ if (!FLAG_inline_new) { -+ if (emit_debug_code()) { -+ // Trash the registers to simulate an allocation failure. -+ mov(result, Immediate(0x7091)); -+ mov(result_end, Immediate(0x7191)); -+ if (scratch.is_valid()) { -+ mov(scratch, Immediate(0x7291)); -+ } -+ // object_size is left unchanged by this function. -+ } -+ jmp(gc_required); -+ return; -+ } -+ DCHECK(!result.is(result_end)); -+ -+ // Load address of new object into result. -+ LoadAllocationTopHelper(result, scratch, flags); -+ -+ ExternalReference allocation_limit = -+ AllocationUtils::GetAllocationLimitReference(isolate(), flags); -+ -+ // Align the next allocation. Storing the filler map without checking top is -+ // safe in new-space because the limit of the heap is aligned there. -+ if ((flags & DOUBLE_ALIGNMENT) != 0) { -+ DCHECK(kPointerAlignment * 2 == kDoubleAlignment); -+ Label aligned; -+ test(result, Immediate(kDoubleAlignmentMask)); -+ j(zero, &aligned, Label::kNear); -+ if ((flags & PRETENURE) != 0) { -+ cmp(result, Operand::StaticVariable(allocation_limit)); -+ j(above_equal, gc_required); -+ } -+ mov(Operand(result, 0), -+ Immediate(isolate()->factory()->one_pointer_filler_map())); -+ add(result, Immediate(kDoubleSize / 2)); -+ bind(&aligned); -+ } -+ -+ // Calculate new top and bail out if space is exhausted. -+ if (!object_size.is(result_end)) { -+ mov(result_end, object_size); -+ } -+ add(result_end, result); -+ cmp(result_end, Operand::StaticVariable(allocation_limit)); -+ j(above, gc_required); -+ -+ // Tag result. -+ DCHECK(kHeapObjectTag == 1); -+ inc(result); -+ -+ UpdateAllocationTopHelper(result_end, scratch, flags); -+} -+ -+void MacroAssembler::AllocateHeapNumber(Register result, -+ Register scratch1, -+ Register scratch2, -+ Label* gc_required, -+ MutableMode mode) { -+ // Allocate heap number in new space. -+ Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, -+ NO_ALLOCATION_FLAGS); -+ -+ Handle map = mode == MUTABLE -+ ? isolate()->factory()->mutable_heap_number_map() -+ : isolate()->factory()->heap_number_map(); -+ -+ // Set the map. -+ mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map)); -+} -+ -+void MacroAssembler::AllocateJSValue(Register result, Register constructor, -+ Register value, Register scratch, -+ Label* gc_required) { -+ DCHECK(!result.is(constructor)); -+ DCHECK(!result.is(scratch)); -+ DCHECK(!result.is(value)); -+ -+ // Allocate JSValue in new space. -+ Allocate(JSValue::kSize, result, scratch, no_reg, gc_required, -+ NO_ALLOCATION_FLAGS); -+ -+ // Initialize the JSValue. -+ LoadGlobalFunctionInitialMap(constructor, scratch); -+ mov(FieldOperand(result, HeapObject::kMapOffset), scratch); -+ LoadRoot(scratch, Heap::kEmptyFixedArrayRootIndex); -+ mov(FieldOperand(result, JSObject::kPropertiesOrHashOffset), scratch); -+ mov(FieldOperand(result, JSObject::kElementsOffset), scratch); -+ mov(FieldOperand(result, JSValue::kValueOffset), value); -+ STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize); -+} -+ -+void MacroAssembler::InitializeFieldsWithFiller(Register current_address, -+ Register end_address, -+ Register filler) { -+ Label loop, entry; -+ jmp(&entry, Label::kNear); -+ bind(&loop); -+ mov(Operand(current_address, 0), filler); -+ add(current_address, Immediate(kPointerSize)); -+ bind(&entry); -+ cmp(current_address, end_address); -+ j(below, &loop, Label::kNear); -+} -+ -+ -+void MacroAssembler::BooleanBitTest(Register object, -+ int field_offset, -+ int bit_index) { -+ bit_index += kSmiTagSize + kSmiShiftSize; -+ DCHECK(base::bits::IsPowerOfTwo(kBitsPerByte)); -+ int byte_index = bit_index / kBitsPerByte; -+ int byte_bit_index = bit_index & (kBitsPerByte - 1); -+ test_b(FieldOperand(object, field_offset + byte_index), -+ Immediate(1 << byte_bit_index)); -+} -+ -+void MacroAssembler::GetMapConstructor(Register result, Register map, -+ Register temp) { -+ Label done, loop; -+ mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset)); -+ bind(&loop); -+ JumpIfSmi(result, &done, Label::kNear); -+ CmpObjectType(result, MAP_TYPE, temp); -+ j(not_equal, &done, Label::kNear); -+ mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset)); -+ jmp(&loop); -+ bind(&done); -+} -+ -+void MacroAssembler::CallStub(CodeStub* stub) { -+ DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. -+ call(stub->GetCode(), RelocInfo::CODE_TARGET); -+} -+ -+void TurboAssembler::CallStubDelayed(CodeStub* stub) { -+ DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs. -+ call(stub); -+} -+ -+void MacroAssembler::TailCallStub(CodeStub* stub) { -+ jmp(stub->GetCode(), RelocInfo::CODE_TARGET); -+} -+ -+bool TurboAssembler::AllowThisStubCall(CodeStub* stub) { -+ return has_frame() || !stub->SometimesSetsUpAFrame(); -+} -+ -+void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments, -+ SaveFPRegsMode save_doubles) { -+ // If the expected number of arguments of the runtime function is -+ // constant, we check that the actual number of arguments match the -+ // expectation. -+ CHECK(f->nargs < 0 || f->nargs == num_arguments); -+ -+ // TODO(1236192): Most runtime routines don't need the number of -+ // arguments passed in because it is constant. At some point we -+ // should remove this need and make the runtime routine entry code -+ // smarter. -+ Move(eax, Immediate(num_arguments)); -+ mov(ebx, Immediate(ExternalReference(f, isolate()))); -+ CEntryStub ces(isolate(), 1, save_doubles); -+ CallStub(&ces); -+} -+ -+void TurboAssembler::CallRuntimeDelayed(Zone* zone, Runtime::FunctionId fid, -+ SaveFPRegsMode save_doubles) { -+ const Runtime::Function* f = Runtime::FunctionForId(fid); -+ // TODO(1236192): Most runtime routines don't need the number of -+ // arguments passed in because it is constant. At some point we -+ // should remove this need and make the runtime routine entry code -+ // smarter. -+ Move(eax, Immediate(f->nargs)); -+ mov(ebx, Immediate(ExternalReference(f, isolate()))); -+ CallStubDelayed(new (zone) CEntryStub(nullptr, 1, save_doubles)); -+} -+ -+void MacroAssembler::CallExternalReference(ExternalReference ref, -+ int num_arguments) { -+ mov(eax, Immediate(num_arguments)); -+ mov(ebx, Immediate(ref)); -+ -+ CEntryStub stub(isolate(), 1); -+ CallStub(&stub); -+} -+ -+ -+void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { -+ // ----------- S t a t e ------------- -+ // -- esp[0] : return address -+ // -- esp[8] : argument num_arguments - 1 -+ // ... -+ // -- esp[8 * num_arguments] : argument 0 (receiver) -+ // -+ // For runtime functions with variable arguments: -+ // -- eax : number of arguments -+ // ----------------------------------- -+ -+ const Runtime::Function* function = Runtime::FunctionForId(fid); -+ DCHECK_EQ(1, function->result_size); -+ if (function->nargs >= 0) { -+ // TODO(1236192): Most runtime routines don't need the number of -+ // arguments passed in because it is constant. At some point we -+ // should remove this need and make the runtime routine entry code -+ // smarter. -+ mov(eax, Immediate(function->nargs)); -+ } -+ JumpToExternalReference(ExternalReference(fid, isolate())); -+} -+ -+void MacroAssembler::JumpToExternalReference(const ExternalReference& ext, -+ bool builtin_exit_frame) { -+ // Set the entry point and jump to the C entry runtime stub. -+ mov(ebx, Immediate(ext)); -+ CEntryStub ces(isolate(), 1, kDontSaveFPRegs, kArgvOnStack, -+ builtin_exit_frame); -+ jmp(ces.GetCode(), RelocInfo::CODE_TARGET); -+} -+ -+void TurboAssembler::PrepareForTailCall( -+ const ParameterCount& callee_args_count, Register caller_args_count_reg, -+ Register scratch0, Register scratch1, ReturnAddressState ra_state, -+ int number_of_temp_values_after_return_address) { -+#if DEBUG -+ if (callee_args_count.is_reg()) { -+ DCHECK(!AreAliased(callee_args_count.reg(), caller_args_count_reg, scratch0, -+ scratch1)); -+ } else { -+ DCHECK(!AreAliased(caller_args_count_reg, scratch0, scratch1)); -+ } -+ DCHECK(ra_state != ReturnAddressState::kNotOnStack || -+ number_of_temp_values_after_return_address == 0); -+#endif -+ -+ // Calculate the destination address where we will put the return address -+ // after we drop current frame. -+ Register new_sp_reg = scratch0; -+ if (callee_args_count.is_reg()) { -+ sub(caller_args_count_reg, callee_args_count.reg()); -+ lea(new_sp_reg, -+ Operand(ebp, caller_args_count_reg, times_pointer_size, -+ StandardFrameConstants::kCallerPCOffset - -+ number_of_temp_values_after_return_address * kPointerSize)); -+ } else { -+ lea(new_sp_reg, Operand(ebp, caller_args_count_reg, times_pointer_size, -+ StandardFrameConstants::kCallerPCOffset - -+ (callee_args_count.immediate() + -+ number_of_temp_values_after_return_address) * -+ kPointerSize)); -+ } -+ -+ if (FLAG_debug_code) { -+ cmp(esp, new_sp_reg); -+ Check(below, kStackAccessBelowStackPointer); -+ } -+ -+ // Copy return address from caller's frame to current frame's return address -+ // to avoid its trashing and let the following loop copy it to the right -+ // place. -+ Register tmp_reg = scratch1; -+ if (ra_state == ReturnAddressState::kOnStack) { -+ mov(tmp_reg, Operand(ebp, StandardFrameConstants::kCallerPCOffset)); -+ mov(Operand(esp, number_of_temp_values_after_return_address * kPointerSize), -+ tmp_reg); -+ } else { -+ DCHECK(ReturnAddressState::kNotOnStack == ra_state); -+ DCHECK_EQ(0, number_of_temp_values_after_return_address); -+ Push(Operand(ebp, StandardFrameConstants::kCallerPCOffset)); -+ } -+ -+ // Restore caller's frame pointer now as it could be overwritten by -+ // the copying loop. -+ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); -+ -+ // +2 here is to copy both receiver and return address. -+ Register count_reg = caller_args_count_reg; -+ if (callee_args_count.is_reg()) { -+ lea(count_reg, Operand(callee_args_count.reg(), -+ 2 + number_of_temp_values_after_return_address)); -+ } else { -+ mov(count_reg, Immediate(callee_args_count.immediate() + 2 + -+ number_of_temp_values_after_return_address)); -+ // TODO(ishell): Unroll copying loop for small immediate values. -+ } -+ -+ // Now copy callee arguments to the caller frame going backwards to avoid -+ // callee arguments corruption (source and destination areas could overlap). -+ Label loop, entry; -+ jmp(&entry, Label::kNear); -+ bind(&loop); -+ dec(count_reg); -+ mov(tmp_reg, Operand(esp, count_reg, times_pointer_size, 0)); -+ mov(Operand(new_sp_reg, count_reg, times_pointer_size, 0), tmp_reg); -+ bind(&entry); -+ cmp(count_reg, Immediate(0)); -+ j(not_equal, &loop, Label::kNear); -+ -+ // Leave current frame. -+ mov(esp, new_sp_reg); -+} -+ -+void MacroAssembler::InvokePrologue(const ParameterCount& expected, -+ const ParameterCount& actual, -+ Label* done, -+ bool* definitely_mismatches, -+ InvokeFlag flag, -+ Label::Distance done_near, -+ const CallWrapper& call_wrapper) { -+ bool definitely_matches = false; -+ *definitely_mismatches = false; -+ Label invoke; -+ if (expected.is_immediate()) { -+ DCHECK(actual.is_immediate()); -+ mov(eax, actual.immediate()); -+ if (expected.immediate() == actual.immediate()) { -+ definitely_matches = true; -+ } else { -+ const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel; -+ if (expected.immediate() == sentinel) { -+ // Don't worry about adapting arguments for builtins that -+ // don't want that done. Skip adaption code by making it look -+ // like we have a match between expected and actual number of -+ // arguments. -+ definitely_matches = true; -+ } else { -+ *definitely_mismatches = true; -+ mov(ebx, expected.immediate()); -+ } -+ } -+ } else { -+ if (actual.is_immediate()) { -+ // Expected is in register, actual is immediate. This is the -+ // case when we invoke function values without going through the -+ // IC mechanism. -+ mov(eax, actual.immediate()); -+ cmp(expected.reg(), actual.immediate()); -+ j(equal, &invoke); -+ DCHECK(expected.reg().is(ebx)); -+ } else if (!expected.reg().is(actual.reg())) { -+ // Both expected and actual are in (different) registers. This -+ // is the case when we invoke functions using call and apply. -+ cmp(expected.reg(), actual.reg()); -+ j(equal, &invoke); -+ DCHECK(actual.reg().is(eax)); -+ DCHECK(expected.reg().is(ebx)); -+ } else { -+ definitely_matches = true; -+ Move(eax, actual.reg()); -+ } -+ } -+ -+ if (!definitely_matches) { -+ Handle adaptor = -+ isolate()->builtins()->ArgumentsAdaptorTrampoline(); -+ if (flag == CALL_FUNCTION) { -+ call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET)); -+ call(adaptor, RelocInfo::CODE_TARGET); -+ call_wrapper.AfterCall(); -+ if (!*definitely_mismatches) { -+ jmp(done, done_near); -+ } -+ } else { -+ jmp(adaptor, RelocInfo::CODE_TARGET); -+ } -+ bind(&invoke); -+ } -+} -+ -+void MacroAssembler::CheckDebugHook(Register fun, Register new_target, -+ const ParameterCount& expected, -+ const ParameterCount& actual) { -+ Label skip_hook; -+ ExternalReference debug_hook_active = -+ ExternalReference::debug_hook_on_function_call_address(isolate()); -+ cmpb(Operand::StaticVariable(debug_hook_active), Immediate(0)); -+ j(equal, &skip_hook); -+ { -+ FrameScope frame(this, -+ has_frame() ? StackFrame::NONE : StackFrame::INTERNAL); -+ if (expected.is_reg()) { -+ SmiTag(expected.reg()); -+ Push(expected.reg()); -+ } -+ if (actual.is_reg()) { -+ SmiTag(actual.reg()); -+ Push(actual.reg()); -+ } -+ if (new_target.is_valid()) { -+ Push(new_target); -+ } -+ Push(fun); -+ Push(fun); -+ CallRuntime(Runtime::kDebugOnFunctionCall); -+ Pop(fun); -+ if (new_target.is_valid()) { -+ Pop(new_target); -+ } -+ if (actual.is_reg()) { -+ Pop(actual.reg()); -+ SmiUntag(actual.reg()); -+ } -+ if (expected.is_reg()) { -+ Pop(expected.reg()); -+ SmiUntag(expected.reg()); -+ } -+ } -+ bind(&skip_hook); -+} -+ -+ -+void MacroAssembler::InvokeFunctionCode(Register function, Register new_target, -+ const ParameterCount& expected, -+ const ParameterCount& actual, -+ InvokeFlag flag, -+ const CallWrapper& call_wrapper) { -+ // You can't call a function without a valid frame. -+ DCHECK(flag == JUMP_FUNCTION || has_frame()); -+ DCHECK(function.is(edi)); -+ DCHECK_IMPLIES(new_target.is_valid(), new_target.is(edx)); -+ -+ if (call_wrapper.NeedsDebugHookCheck()) { -+ CheckDebugHook(function, new_target, expected, actual); -+ } -+ -+ // Clear the new.target register if not given. -+ if (!new_target.is_valid()) { -+ mov(edx, isolate()->factory()->undefined_value()); -+ } -+ -+ Label done; -+ bool definitely_mismatches = false; -+ InvokePrologue(expected, actual, &done, &definitely_mismatches, flag, -+ Label::kNear, call_wrapper); -+ if (!definitely_mismatches) { -+ // We call indirectly through the code field in the function to -+ // allow recompilation to take effect without changing any of the -+ // call sites. -+ Operand code = FieldOperand(function, JSFunction::kCodeEntryOffset); -+ if (flag == CALL_FUNCTION) { -+ call_wrapper.BeforeCall(CallSize(code)); -+ call(code); -+ call_wrapper.AfterCall(); -+ } else { -+ DCHECK(flag == JUMP_FUNCTION); -+ jmp(code); -+ } -+ bind(&done); -+ } -+} -+ -+ -+void MacroAssembler::InvokeFunction(Register fun, Register new_target, -+ const ParameterCount& actual, -+ InvokeFlag flag, -+ const CallWrapper& call_wrapper) { -+ // You can't call a function without a valid frame. -+ DCHECK(flag == JUMP_FUNCTION || has_frame()); -+ -+ DCHECK(fun.is(edi)); -+ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); -+ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset)); -+ -+ ParameterCount expected(ebx); -+ InvokeFunctionCode(edi, new_target, expected, actual, flag, call_wrapper); -+} -+ -+ -+void MacroAssembler::InvokeFunction(Register fun, -+ const ParameterCount& expected, -+ const ParameterCount& actual, -+ InvokeFlag flag, -+ const CallWrapper& call_wrapper) { -+ // You can't call a function without a valid frame. -+ DCHECK(flag == JUMP_FUNCTION || has_frame()); -+ -+ DCHECK(fun.is(edi)); -+ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); -+ -+ InvokeFunctionCode(edi, no_reg, expected, actual, flag, call_wrapper); -+} -+ -+ -+void MacroAssembler::InvokeFunction(Handle function, -+ const ParameterCount& expected, -+ const ParameterCount& actual, -+ InvokeFlag flag, -+ const CallWrapper& call_wrapper) { -+ Move(edi, function); -+ InvokeFunction(edi, expected, actual, flag, call_wrapper); -+} -+ -+ -+void MacroAssembler::LoadContext(Register dst, int context_chain_length) { -+ if (context_chain_length > 0) { -+ // Move up the chain of contexts to the context containing the slot. -+ mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX))); -+ for (int i = 1; i < context_chain_length; i++) { -+ mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); -+ } -+ } else { -+ // Slot is in the current function context. Move it into the -+ // destination register in case we store into it (the write barrier -+ // cannot be allowed to destroy the context in esi). -+ mov(dst, esi); -+ } -+ -+ // We should not have found a with context by walking the context chain -+ // (i.e., the static scope chain and runtime context chain do not agree). -+ // A variable occurring in such a scope should have slot type LOOKUP and -+ // not CONTEXT. -+ if (emit_debug_code()) { -+ cmp(FieldOperand(dst, HeapObject::kMapOffset), -+ isolate()->factory()->with_context_map()); -+ Check(not_equal, kVariableResolvedToWithContext); -+ } -+} -+ -+ -+void MacroAssembler::LoadGlobalProxy(Register dst) { -+ mov(dst, NativeContextOperand()); -+ mov(dst, ContextOperand(dst, Context::GLOBAL_PROXY_INDEX)); -+} -+ -+void MacroAssembler::LoadGlobalFunction(int index, Register function) { -+ // Load the native context from the current context. -+ mov(function, NativeContextOperand()); -+ // Load the function from the native context. -+ mov(function, ContextOperand(function, index)); -+} -+ -+ -+void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, -+ Register map) { -+ // Load the initial map. The global functions all have initial maps. -+ mov(map, FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); -+ if (emit_debug_code()) { -+ Label ok, fail; -+ CheckMap(map, isolate()->factory()->meta_map(), &fail, DO_SMI_CHECK); -+ jmp(&ok); -+ bind(&fail); -+ Abort(kGlobalFunctionsMustHaveInitialMap); -+ bind(&ok); -+ } -+} -+ -+ -+// Store the value in register src in the safepoint register stack -+// slot for register dst. -+void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Register src) { -+ mov(SafepointRegisterSlot(dst), src); -+} -+ -+ -+void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Immediate src) { -+ mov(SafepointRegisterSlot(dst), src); -+} -+ -+ -+void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) { -+ mov(dst, SafepointRegisterSlot(src)); -+} -+ -+ -+Operand MacroAssembler::SafepointRegisterSlot(Register reg) { -+ return Operand(esp, SafepointRegisterStackIndex(reg.code()) * kPointerSize); -+} -+ -+ -+int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { -+ // The registers are pushed starting with the lowest encoding, -+ // which means that lowest encodings are furthest away from -+ // the stack pointer. -+ DCHECK(reg_code >= 0 && reg_code < kNumSafepointRegisters); -+ return kNumSafepointRegisters - reg_code - 1; -+} -+ -+ -+void MacroAssembler::CmpHeapObject(Register reg, Handle object) { -+ cmp(reg, object); -+} -+ -+void MacroAssembler::PushObject(Handle object) { -+ if (object->IsHeapObject()) { -+ Push(Handle::cast(object)); -+ } else { -+ Push(Smi::cast(*object)); -+ } -+} -+ -+void MacroAssembler::GetWeakValue(Register value, Handle cell) { -+ mov(value, cell); -+ mov(value, FieldOperand(value, WeakCell::kValueOffset)); -+} -+ -+ -+void MacroAssembler::LoadWeakValue(Register value, Handle cell, -+ Label* miss) { -+ GetWeakValue(value, cell); -+ JumpIfSmi(value, miss); -+} -+ -+void TurboAssembler::Ret() { ret(0); } -+ -+void TurboAssembler::Ret(int bytes_dropped, Register scratch) { -+ if (is_uint16(bytes_dropped)) { -+ ret(bytes_dropped); -+ } else { -+ pop(scratch); -+ add(esp, Immediate(bytes_dropped)); -+ push(scratch); -+ ret(0); -+ } -+} -+ -+ -+void TurboAssembler::VerifyX87StackDepth(uint32_t depth) { -+ // Turn off the stack depth check when serializer is enabled to reduce the -+ // code size. -+ if (serializer_enabled()) return; -+ // Make sure the floating point stack is either empty or has depth items. -+ DCHECK(depth <= 7); -+ // This is very expensive. -+ DCHECK(FLAG_debug_code && FLAG_enable_slow_asserts); -+ -+ // The top-of-stack (tos) is 7 if there is one item pushed. -+ int tos = (8 - depth) % 8; -+ const int kTopMask = 0x3800; -+ push(eax); -+ fwait(); -+ fnstsw_ax(); -+ and_(eax, kTopMask); -+ shr(eax, 11); -+ cmp(eax, Immediate(tos)); -+ Check(equal, kUnexpectedFPUStackDepthAfterInstruction); -+ fnclex(); -+ pop(eax); -+} -+ -+ -+void MacroAssembler::Drop(int stack_elements) { -+ if (stack_elements > 0) { -+ add(esp, Immediate(stack_elements * kPointerSize)); -+ } -+} -+ -+ -+void TurboAssembler::Move(Register dst, Register src) { -+ if (!dst.is(src)) { -+ mov(dst, src); -+ } -+} -+ -+ -+void TurboAssembler::Move(Register dst, const Immediate& x) { -+ if (!x.is_heap_object_request() && x.is_zero() && -+ RelocInfo::IsNone(x.rmode())) { -+ xor_(dst, dst); // Shorter than mov of 32-bit immediate 0. -+ } else { -+ mov(dst, x); -+ } -+} -+ -+ -+void TurboAssembler::Move(const Operand& dst, const Immediate& x) { -+ mov(dst, x); -+} -+ -+ -+void TurboAssembler::Move(Register dst, Handle object) { -+ mov(dst, object); -+} -+ -+ -+void TurboAssembler::Lzcnt(Register dst, const Operand& src) { -+ // TODO(intel): Add support for LZCNT (with ABM/BMI1). -+ Label not_zero_src; -+ bsr(dst, src); -+ j(not_zero, ¬_zero_src, Label::kNear); -+ Move(dst, Immediate(63)); // 63^31 == 32 -+ bind(¬_zero_src); -+ xor_(dst, Immediate(31)); // for x in [0..31], 31^x == 31-x. -+} -+ -+ -+void TurboAssembler::Tzcnt(Register dst, const Operand& src) { -+ // TODO(intel): Add support for TZCNT (with ABM/BMI1). -+ Label not_zero_src; -+ bsf(dst, src); -+ j(not_zero, ¬_zero_src, Label::kNear); -+ Move(dst, Immediate(32)); // The result of tzcnt is 32 if src = 0. -+ bind(¬_zero_src); -+} -+ -+ -+void TurboAssembler::Popcnt(Register dst, const Operand& src) { -+ // TODO(intel): Add support for POPCNT (with POPCNT) -+ // if (CpuFeatures::IsSupported(POPCNT)) { -+ // CpuFeatureScope scope(this, POPCNT); -+ // popcnt(dst, src); -+ // return; -+ // } -+ UNREACHABLE(); -+} -+ -+ -+void MacroAssembler::SetCounter(StatsCounter* counter, int value) { -+ if (FLAG_native_code_counters && counter->Enabled()) { -+ mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); -+ } -+} -+ -+ -+void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { -+ DCHECK(value > 0); -+ if (FLAG_native_code_counters && counter->Enabled()) { -+ Operand operand = Operand::StaticVariable(ExternalReference(counter)); -+ if (value == 1) { -+ inc(operand); -+ } else { -+ add(operand, Immediate(value)); -+ } -+ } -+} -+ -+ -+void MacroAssembler::DecrementCounter(StatsCounter* counter, int value) { -+ DCHECK(value > 0); -+ if (FLAG_native_code_counters && counter->Enabled()) { -+ Operand operand = Operand::StaticVariable(ExternalReference(counter)); -+ if (value == 1) { -+ dec(operand); -+ } else { -+ sub(operand, Immediate(value)); -+ } -+ } -+} -+ -+ -+void MacroAssembler::IncrementCounter(Condition cc, -+ StatsCounter* counter, -+ int value) { -+ DCHECK(value > 0); -+ if (FLAG_native_code_counters && counter->Enabled()) { -+ Label skip; -+ j(NegateCondition(cc), &skip); -+ pushfd(); -+ IncrementCounter(counter, value); -+ popfd(); -+ bind(&skip); -+ } -+} -+ -+ -+void MacroAssembler::DecrementCounter(Condition cc, -+ StatsCounter* counter, -+ int value) { -+ DCHECK(value > 0); -+ if (FLAG_native_code_counters && counter->Enabled()) { -+ Label skip; -+ j(NegateCondition(cc), &skip); -+ pushfd(); -+ DecrementCounter(counter, value); -+ popfd(); -+ bind(&skip); -+ } -+} -+ -+ -+void TurboAssembler::Assert(Condition cc, BailoutReason reason) { -+ if (emit_debug_code()) Check(cc, reason); -+} -+ -+void TurboAssembler::AssertUnreachable(BailoutReason reason) { -+ if (emit_debug_code()) Abort(reason); -+} -+ -+ -+ -+void TurboAssembler::Check(Condition cc, BailoutReason reason) { -+ Label L; -+ j(cc, &L); -+ Abort(reason); -+ // will not return here -+ bind(&L); -+} -+ -+ -+void TurboAssembler::CheckStackAlignment() { -+ int frame_alignment = base::OS::ActivationFrameAlignment(); -+ int frame_alignment_mask = frame_alignment - 1; -+ if (frame_alignment > kPointerSize) { -+ DCHECK(base::bits::IsPowerOfTwo(frame_alignment)); -+ Label alignment_as_expected; -+ test(esp, Immediate(frame_alignment_mask)); -+ j(zero, &alignment_as_expected); -+ // Abort if stack is not aligned. -+ int3(); -+ bind(&alignment_as_expected); -+ } -+} -+ -+ -+void TurboAssembler::Abort(BailoutReason reason) { -+#ifdef DEBUG -+ const char* msg = GetBailoutReason(reason); -+ if (msg != NULL) { -+ RecordComment("Abort message: "); -+ RecordComment(msg); -+ } -+ -+ if (FLAG_trap_on_abort) { -+ int3(); -+ return; -+ } -+#endif -+ -+ Move(edx, Smi::FromInt(static_cast(reason))); -+ -+ // Disable stub call restrictions to always allow calls to abort. -+ if (!has_frame()) { -+ // We don't actually want to generate a pile of code for this, so just -+ // claim there is a stack frame, without generating one. -+ FrameScope scope(this, StackFrame::NONE); -+ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); -+ } else { -+ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); -+ } -+ // will not return here -+ int3(); -+} -+ -+ -+void MacroAssembler::LoadInstanceDescriptors(Register map, -+ Register descriptors) { -+ mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); -+} -+ -+ -+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { -+ mov(dst, FieldOperand(map, Map::kBitField3Offset)); -+ DecodeField(dst); -+} -+ -+ -+void MacroAssembler::LoadAccessor(Register dst, Register holder, -+ int accessor_index, -+ AccessorComponent accessor) { -+ mov(dst, FieldOperand(holder, HeapObject::kMapOffset)); -+ LoadInstanceDescriptors(dst, dst); -+ mov(dst, FieldOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); -+ int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset -+ : AccessorPair::kSetterOffset; -+ mov(dst, FieldOperand(dst, offset)); -+} -+ -+void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1, -+ Register object2, -+ Register scratch1, -+ Register scratch2, -+ Label* failure) { -+ // Check that both objects are not smis. -+ STATIC_ASSERT(kSmiTag == 0); -+ mov(scratch1, object1); -+ and_(scratch1, object2); -+ JumpIfSmi(scratch1, failure); -+ -+ // Load instance type for both strings. -+ mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset)); -+ mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset)); -+ movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); -+ movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); -+ -+ // Check that both are flat one-byte strings. -+ const int kFlatOneByteStringMask = -+ kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; -+ const int kFlatOneByteStringTag = -+ kStringTag | kOneByteStringTag | kSeqStringTag; -+ // Interleave bits from both instance types and compare them in one check. -+ const int kShift = 8; -+ DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << kShift)); -+ and_(scratch1, kFlatOneByteStringMask); -+ and_(scratch2, kFlatOneByteStringMask); -+ shl(scratch2, kShift); -+ or_(scratch1, scratch2); -+ cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << kShift)); -+ j(not_equal, failure); -+} -+ -+ -+void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand, -+ Label* not_unique_name, -+ Label::Distance distance) { -+ STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); -+ Label succeed; -+ test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask)); -+ j(zero, &succeed); -+ cmpb(operand, Immediate(SYMBOL_TYPE)); -+ j(not_equal, not_unique_name, distance); -+ -+ bind(&succeed); -+} -+ -+ -+void MacroAssembler::EmitSeqStringSetCharCheck(Register string, -+ Register index, -+ Register value, -+ uint32_t encoding_mask) { -+ Label is_object; -+ JumpIfNotSmi(string, &is_object, Label::kNear); -+ Abort(kNonObject); -+ bind(&is_object); -+ -+ push(value); -+ mov(value, FieldOperand(string, HeapObject::kMapOffset)); -+ movzx_b(value, FieldOperand(value, Map::kInstanceTypeOffset)); -+ -+ and_(value, Immediate(kStringRepresentationMask | kStringEncodingMask)); -+ cmp(value, Immediate(encoding_mask)); -+ pop(value); -+ Check(equal, kUnexpectedStringType); -+ -+ // The index is assumed to be untagged coming in, tag it to compare with the -+ // string length without using a temp register, it is restored at the end of -+ // this function. -+ SmiTag(index); -+ Check(no_overflow, kIndexIsTooLarge); -+ -+ cmp(index, FieldOperand(string, String::kLengthOffset)); -+ Check(less, kIndexIsTooLarge); -+ -+ cmp(index, Immediate(Smi::kZero)); -+ Check(greater_equal, kIndexIsNegative); -+ -+ // Restore the index -+ SmiUntag(index); -+} -+ -+ -+void TurboAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { -+ int frame_alignment = base::OS::ActivationFrameAlignment(); -+ if (frame_alignment != 0) { -+ // Make stack end at alignment and make room for num_arguments words -+ // and the original value of esp. -+ mov(scratch, esp); -+ sub(esp, Immediate((num_arguments + 1) * kPointerSize)); -+ DCHECK(base::bits::IsPowerOfTwo(frame_alignment)); -+ and_(esp, -frame_alignment); -+ mov(Operand(esp, num_arguments * kPointerSize), scratch); -+ } else { -+ sub(esp, Immediate(num_arguments * kPointerSize)); -+ } -+} -+ -+ -+void TurboAssembler::CallCFunction(ExternalReference function, -+ int num_arguments) { -+ // Trashing eax is ok as it will be the return value. -+ mov(eax, Immediate(function)); -+ CallCFunction(eax, num_arguments); -+} -+ -+ -+void TurboAssembler::CallCFunction(Register function, int num_arguments) { -+ DCHECK(has_frame()); -+ // Check stack alignment. -+ if (emit_debug_code()) { -+ CheckStackAlignment(); -+ } -+ -+ call(function); -+ if (base::OS::ActivationFrameAlignment() != 0) { -+ mov(esp, Operand(esp, num_arguments * kPointerSize)); -+ } else { -+ add(esp, Immediate(num_arguments * kPointerSize)); -+ } -+} -+ -+ -+#ifdef DEBUG -+bool AreAliased(Register reg1, -+ Register reg2, -+ Register reg3, -+ Register reg4, -+ Register reg5, -+ Register reg6, -+ Register reg7, -+ Register reg8) { -+ int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() + -+ reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid() + -+ reg7.is_valid() + reg8.is_valid(); -+ -+ RegList regs = 0; -+ if (reg1.is_valid()) regs |= reg1.bit(); -+ if (reg2.is_valid()) regs |= reg2.bit(); -+ if (reg3.is_valid()) regs |= reg3.bit(); -+ if (reg4.is_valid()) regs |= reg4.bit(); -+ if (reg5.is_valid()) regs |= reg5.bit(); -+ if (reg6.is_valid()) regs |= reg6.bit(); -+ if (reg7.is_valid()) regs |= reg7.bit(); -+ if (reg8.is_valid()) regs |= reg8.bit(); -+ int n_of_non_aliasing_regs = NumRegs(regs); -+ -+ return n_of_valid_regs != n_of_non_aliasing_regs; -+} -+#endif -+ -+ -+CodePatcher::CodePatcher(Isolate* isolate, byte* address, int size) -+ : address_(address), -+ size_(size), -+ masm_(isolate, address, size + Assembler::kGap, CodeObjectRequired::kNo) { -+ // Create a new macro assembler pointing to the address of the code to patch. -+ // The size is adjusted with kGap on order for the assembler to generate size -+ // bytes of instructions without failing with buffer size constraints. -+ DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); -+} -+ -+ -+CodePatcher::~CodePatcher() { -+ // Indicate that code has changed. -+ Assembler::FlushICache(masm_.isolate(), address_, size_); -+ -+ // Check that the code was patched as expected. -+ DCHECK(masm_.pc_ == address_ + size_); -+ DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); -+} -+ -+ -+void TurboAssembler::CheckPageFlag(Register object, Register scratch, int mask, -+ Condition cc, Label* condition_met, -+ Label::Distance condition_met_distance) { -+ DCHECK(cc == zero || cc == not_zero); -+ if (scratch.is(object)) { -+ and_(scratch, Immediate(~Page::kPageAlignmentMask)); -+ } else { -+ mov(scratch, Immediate(~Page::kPageAlignmentMask)); -+ and_(scratch, object); -+ } -+ if (mask < (1 << kBitsPerByte)) { -+ test_b(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); -+ } else { -+ test(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask)); -+ } -+ j(cc, condition_met, condition_met_distance); -+} -+ -+ -+void MacroAssembler::CheckPageFlagForMap( -+ Handle map, -+ int mask, -+ Condition cc, -+ Label* condition_met, -+ Label::Distance condition_met_distance) { -+ DCHECK(cc == zero || cc == not_zero); -+ Page* page = Page::FromAddress(map->address()); -+ DCHECK(!serializer_enabled()); // Serializer cannot match page_flags. -+ ExternalReference reference(ExternalReference::page_flags(page)); -+ // The inlined static address check of the page's flags relies -+ // on maps never being compacted. -+ DCHECK(!isolate()->heap()->mark_compact_collector()-> -+ IsOnEvacuationCandidate(*map)); -+ if (mask < (1 << kBitsPerByte)) { -+ test_b(Operand::StaticVariable(reference), Immediate(mask)); -+ } else { -+ test(Operand::StaticVariable(reference), Immediate(mask)); -+ } -+ j(cc, condition_met, condition_met_distance); -+} -+ -+ -+void MacroAssembler::JumpIfBlack(Register object, -+ Register scratch0, -+ Register scratch1, -+ Label* on_black, -+ Label::Distance on_black_near) { -+ HasColor(object, scratch0, scratch1, on_black, on_black_near, 1, -+ 1); // kBlackBitPattern. -+ DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0); -+} -+ -+ -+void MacroAssembler::HasColor(Register object, -+ Register bitmap_scratch, -+ Register mask_scratch, -+ Label* has_color, -+ Label::Distance has_color_distance, -+ int first_bit, -+ int second_bit) { -+ DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, ecx)); -+ -+ GetMarkBits(object, bitmap_scratch, mask_scratch); -+ -+ Label other_color, word_boundary; -+ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); -+ j(first_bit == 1 ? zero : not_zero, &other_color, Label::kNear); -+ add(mask_scratch, mask_scratch); // Shift left 1 by adding. -+ j(zero, &word_boundary, Label::kNear); -+ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); -+ j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance); -+ jmp(&other_color, Label::kNear); -+ -+ bind(&word_boundary); -+ test_b(Operand(bitmap_scratch, MemoryChunk::kHeaderSize + kPointerSize), -+ Immediate(1)); -+ -+ j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance); -+ bind(&other_color); -+} -+ -+ -+void MacroAssembler::GetMarkBits(Register addr_reg, -+ Register bitmap_reg, -+ Register mask_reg) { -+ DCHECK(!AreAliased(addr_reg, mask_reg, bitmap_reg, ecx)); -+ mov(bitmap_reg, Immediate(~Page::kPageAlignmentMask)); -+ and_(bitmap_reg, addr_reg); -+ mov(ecx, addr_reg); -+ int shift = -+ Bitmap::kBitsPerCellLog2 + kPointerSizeLog2 - Bitmap::kBytesPerCellLog2; -+ shr(ecx, shift); -+ and_(ecx, -+ (Page::kPageAlignmentMask >> shift) & ~(Bitmap::kBytesPerCell - 1)); -+ -+ add(bitmap_reg, ecx); -+ mov(ecx, addr_reg); -+ shr(ecx, kPointerSizeLog2); -+ and_(ecx, (1 << Bitmap::kBitsPerCellLog2) - 1); -+ mov(mask_reg, Immediate(1)); -+ shl_cl(mask_reg); -+} -+ -+ -+void MacroAssembler::JumpIfWhite(Register value, Register bitmap_scratch, -+ Register mask_scratch, Label* value_is_white, -+ Label::Distance distance) { -+ DCHECK(!AreAliased(value, bitmap_scratch, mask_scratch, ecx)); -+ GetMarkBits(value, bitmap_scratch, mask_scratch); -+ -+ // If the value is black or grey we don't need to do anything. -+ DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0); -+ DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0); -+ DCHECK(strcmp(Marking::kGreyBitPattern, "10") == 0); -+ DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); -+ -+ // Since both black and grey have a 1 in the first position and white does -+ // not have a 1 there we only need to check one bit. -+ test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize)); -+ j(zero, value_is_white, Label::kNear); -+} -+ -+ -+void MacroAssembler::EnumLength(Register dst, Register map) { -+ STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); -+ mov(dst, FieldOperand(map, Map::kBitField3Offset)); -+ and_(dst, Immediate(Map::EnumLengthBits::kMask)); -+ SmiTag(dst); -+} -+ -+ -+void MacroAssembler::CheckEnumCache(Label* call_runtime) { -+ Label next, start; -+ mov(ecx, eax); -+ -+ // Check if the enum length field is properly initialized, indicating that -+ // there is an enum cache. -+ mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); -+ -+ EnumLength(edx, ebx); -+ cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel))); -+ j(equal, call_runtime); -+ -+ jmp(&start); -+ -+ bind(&next); -+ mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); -+ -+ // For all objects but the receiver, check that the cache is empty. -+ EnumLength(edx, ebx); -+ cmp(edx, Immediate(Smi::kZero)); -+ j(not_equal, call_runtime); -+ -+ bind(&start); -+ -+ // Check that there are no elements. Register rcx contains the current JS -+ // object we've reached through the prototype chain. -+ Label no_elements; -+ mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset)); -+ cmp(ecx, isolate()->factory()->empty_fixed_array()); -+ j(equal, &no_elements); -+ -+ // Second chance, the object may be using the empty slow element dictionary. -+ cmp(ecx, isolate()->factory()->empty_slow_element_dictionary()); -+ j(not_equal, call_runtime); -+ -+ bind(&no_elements); -+ mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); -+ cmp(ecx, isolate()->factory()->null_value()); -+ j(not_equal, &next); -+} -+ -+ -+void MacroAssembler::TestJSArrayForAllocationMemento( -+ Register receiver_reg, -+ Register scratch_reg, -+ Label* no_memento_found) { -+ Label map_check; -+ Label top_check; -+ ExternalReference new_space_allocation_top = -+ ExternalReference::new_space_allocation_top_address(isolate()); -+ const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; -+ const int kMementoLastWordOffset = -+ kMementoMapOffset + AllocationMemento::kSize - kPointerSize; -+ -+ // Bail out if the object is not in new space. -+ JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found); -+ // If the object is in new space, we need to check whether it is on the same -+ // page as the current top. -+ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); -+ xor_(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); -+ test(scratch_reg, Immediate(~Page::kPageAlignmentMask)); -+ j(zero, &top_check); -+ // The object is on a different page than allocation top. Bail out if the -+ // object sits on the page boundary as no memento can follow and we cannot -+ // touch the memory following it. -+ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); -+ xor_(scratch_reg, receiver_reg); -+ test(scratch_reg, Immediate(~Page::kPageAlignmentMask)); -+ j(not_zero, no_memento_found); -+ // Continue with the actual map check. -+ jmp(&map_check); -+ // If top is on the same page as the current object, we need to check whether -+ // we are below top. -+ bind(&top_check); -+ lea(scratch_reg, Operand(receiver_reg, kMementoLastWordOffset)); -+ cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); -+ j(greater_equal, no_memento_found); -+ // Memento map check. -+ bind(&map_check); -+ mov(scratch_reg, Operand(receiver_reg, kMementoMapOffset)); -+ cmp(scratch_reg, Immediate(isolate()->factory()->allocation_memento_map())); -+} -+ -+void MacroAssembler::TruncatingDiv(Register dividend, int32_t divisor) { -+ DCHECK(!dividend.is(eax)); -+ DCHECK(!dividend.is(edx)); -+ base::MagicNumbersForDivision mag = -+ base::SignedDivisionByConstant(static_cast(divisor)); -+ mov(eax, Immediate(mag.multiplier)); -+ imul(dividend); -+ bool neg = (mag.multiplier & (static_cast(1) << 31)) != 0; -+ if (divisor > 0 && neg) add(edx, dividend); -+ if (divisor < 0 && !neg && mag.multiplier > 0) sub(edx, dividend); -+ if (mag.shift > 0) sar(edx, mag.shift); -+ mov(eax, dividend); -+ shr(eax, 31); -+ add(edx, eax); -+} -+ -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_TARGET_ARCH_X87 -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/macro-assembler-x87.h 2018-02-18 19:00:54.200418105 +0100 -@@ -0,0 +1,923 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ -+#define V8_X87_MACRO_ASSEMBLER_X87_H_ -+ -+#include "src/assembler.h" -+#include "src/bailout-reason.h" -+#include "src/frames.h" -+#include "src/globals.h" -+ -+namespace v8 { -+namespace internal { -+ -+// Give alias names to registers for calling conventions. -+const Register kReturnRegister0 = {Register::kCode_eax}; -+const Register kReturnRegister1 = {Register::kCode_edx}; -+const Register kReturnRegister2 = {Register::kCode_edi}; -+const Register kJSFunctionRegister = {Register::kCode_edi}; -+const Register kContextRegister = {Register::kCode_esi}; -+const Register kAllocateSizeRegister = {Register::kCode_edx}; -+const Register kInterpreterAccumulatorRegister = {Register::kCode_eax}; -+const Register kInterpreterBytecodeOffsetRegister = {Register::kCode_ecx}; -+const Register kInterpreterBytecodeArrayRegister = {Register::kCode_edi}; -+const Register kInterpreterDispatchTableRegister = {Register::kCode_esi}; -+const Register kJavaScriptCallArgCountRegister = {Register::kCode_eax}; -+const Register kJavaScriptCallNewTargetRegister = {Register::kCode_edx}; -+const Register kRuntimeCallFunctionRegister = {Register::kCode_ebx}; -+const Register kRuntimeCallArgCountRegister = {Register::kCode_eax}; -+ -+// Spill slots used by interpreter dispatch calling convention. -+const int kInterpreterDispatchTableSpillSlot = -1; -+ -+// Convenience for platform-independent signatures. We do not normally -+// distinguish memory operands from other operands on ia32. -+typedef Operand MemOperand; -+ -+enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; -+enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; -+enum PointersToHereCheck { -+ kPointersToHereMaybeInteresting, -+ kPointersToHereAreAlwaysInteresting -+}; -+ -+enum RegisterValueType { REGISTER_VALUE_IS_SMI, REGISTER_VALUE_IS_INT32 }; -+ -+enum class ReturnAddressState { kOnStack, kNotOnStack }; -+ -+#ifdef DEBUG -+bool AreAliased(Register reg1, Register reg2, Register reg3 = no_reg, -+ Register reg4 = no_reg, Register reg5 = no_reg, -+ Register reg6 = no_reg, Register reg7 = no_reg, -+ Register reg8 = no_reg); -+#endif -+ -+class TurboAssembler: public Assembler { -+ public: -+ TurboAssembler(Isolate* isolate, void* buffer, int buffer_size, -+ CodeObjectRequired create_code_object) -+ : Assembler(isolate, buffer, buffer_size), isolate_(isolate) { -+ if (create_code_object == CodeObjectRequired::kYes) { -+ code_object_ = -+ Handle::New(isolate->heap()->undefined_value(), isolate); -+ } -+ } -+ -+ void set_has_frame(bool value) { has_frame_ = value; } -+ bool has_frame() { return has_frame_; } -+ -+ Isolate* isolate() const { return isolate_; } -+ -+ Handle CodeObject() { -+ DCHECK(!code_object_.is_null()); -+ return code_object_; -+ } -+ -+ void CheckPageFlag(Register object, Register scratch, int mask, Condition cc, -+ Label* condition_met, -+ Label::Distance condition_met_distance = Label::kFar); -+ -+ // Activation support. -+ void EnterFrame(StackFrame::Type type); -+ void EnterFrame(StackFrame::Type type, bool load_constant_pool_pointer_reg) { -+ // Out-of-line constant pool not implemented on x87. -+ UNREACHABLE(); -+ } -+ void LeaveFrame(StackFrame::Type type); -+ -+ // Print a message to stdout and abort execution. -+ void Abort(BailoutReason reason); -+ -+ // Calls Abort(msg) if the condition cc is not satisfied. -+ // Use --debug_code to enable. -+ void Assert(Condition cc, BailoutReason reason); -+ -+ // Like Assert(), but without condition. -+ // Use --debug_code to enable. -+ void AssertUnreachable(BailoutReason reason); -+ -+ // Like Assert(), but always enabled. -+ void Check(Condition cc, BailoutReason reason); -+ -+ // Check that the stack is aligned. -+ void CheckStackAlignment(); -+ -+ // Nop, because x87 does not have a root register. -+ void InitializeRootRegister() {} -+ -+ // Move a constant into a destination using the most efficient encoding. -+ void Move(Register dst, const Immediate& x); -+ -+ void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } -+ -+ // Move if the registers are not identical. -+ void Move(Register target, Register source); -+ -+ void Move(const Operand& dst, const Immediate& x); -+ -+ void Move(Register dst, Handle handle); -+ -+ void Call(Handle target, RelocInfo::Mode rmode) { call(target, rmode); } -+ void Call(Label* target) { call(target); } -+ -+ inline bool AllowThisStubCall(CodeStub* stub); -+ void CallStubDelayed(CodeStub* stub); -+ -+ void CallRuntimeDelayed(Zone* zone, Runtime::FunctionId fid, -+ SaveFPRegsMode save_doubles = kDontSaveFPRegs); -+ -+ // Jump the register contains a smi. -+ inline void JumpIfSmi(Register value, Label* smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(zero, smi_label, distance); -+ } -+ // Jump if the operand is a smi. -+ inline void JumpIfSmi(Operand value, Label* smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(zero, smi_label, distance); -+ } -+ -+ void SmiUntag(Register reg) { sar(reg, kSmiTagSize); } -+ -+ // Removes current frame and its arguments from the stack preserving -+ // the arguments and a return address pushed to the stack for the next call. -+ // |ra_state| defines whether return address is already pushed to stack or -+ // not. Both |callee_args_count| and |caller_args_count_reg| do not include -+ // receiver. |callee_args_count| is not modified, |caller_args_count_reg| -+ // is trashed. |number_of_temp_values_after_return_address| specifies -+ // the number of words pushed to the stack after the return address. This is -+ // to allow "allocation" of scratch registers that this function requires -+ // by saving their values on the stack. -+ void PrepareForTailCall(const ParameterCount& callee_args_count, -+ Register caller_args_count_reg, Register scratch0, -+ Register scratch1, ReturnAddressState ra_state, -+ int number_of_temp_values_after_return_address); -+ -+ // Before calling a C-function from generated code, align arguments on stack. -+ // After aligning the frame, arguments must be stored in esp[0], esp[4], -+ // etc., not pushed. The argument count assumes all arguments are word sized. -+ // Some compilers/platforms require the stack to be aligned when calling -+ // C++ code. -+ // Needs a scratch register to do some arithmetic. This register will be -+ // trashed. -+ void PrepareCallCFunction(int num_arguments, Register scratch); -+ -+ // Calls a C function and cleans up the space for arguments allocated -+ // by PrepareCallCFunction. The called function is not allowed to trigger a -+ // garbage collection, since that might move the code and invalidate the -+ // return address (unless this is somehow accounted for by the called -+ // function). -+ void CallCFunction(ExternalReference function, int num_arguments); -+ void CallCFunction(Register function, int num_arguments); -+ -+ void ShlPair(Register high, Register low, uint8_t imm8); -+ void ShlPair_cl(Register high, Register low); -+ void ShrPair(Register high, Register low, uint8_t imm8); -+ void ShrPair_cl(Register high, Register src); -+ void SarPair(Register high, Register low, uint8_t imm8); -+ void SarPair_cl(Register high, Register low); -+ -+ // Generates function and stub prologue code. -+ void StubPrologue(StackFrame::Type type); -+ void Prologue(bool code_pre_aging); -+ -+ void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); } -+ void Lzcnt(Register dst, const Operand& src); -+ -+ void Tzcnt(Register dst, Register src) { Tzcnt(dst, Operand(src)); } -+ void Tzcnt(Register dst, const Operand& src); -+ -+ void Popcnt(Register dst, Register src) { Popcnt(dst, Operand(src)); } -+ void Popcnt(Register dst, const Operand& src); -+ -+ void Ret(); -+ -+ // Return and drop arguments from stack, where the number of arguments -+ // may be bigger than 2^16 - 1. Requires a scratch register. -+ void Ret(int bytes_dropped, Register scratch); -+ -+ // Insert code to verify that the x87 stack has the specified depth (0-7) -+ void VerifyX87StackDepth(uint32_t depth); -+ -+ void LoadUint32NoSSE2(Register src) { -+ LoadUint32NoSSE2(Operand(src)); -+ } -+ void LoadUint32NoSSE2(const Operand& src); -+ -+ // FCmp is similar to integer cmp, but requires unsigned -+ // jcc instructions (je, ja, jae, jb, jbe, je, and jz). -+ void FCmp(); -+ void X87SetRC(int rc); -+ void X87SetFPUCW(int cw); -+ -+ void SlowTruncateToIDelayed(Zone* zone, Register result_reg, -+ Register input_reg, -+ int offset = HeapNumber::kValueOffset - -+ kHeapObjectTag); -+ void TruncateX87TOSToI(Zone* zone, Register result_reg); -+ -+ void Push(Register src) { push(src); } -+ void Push(const Operand& src) { push(src); } -+ void Push(Immediate value) { push(value); } -+ void Push(Handle handle) { push(Immediate(handle)); } -+ void Push(Smi* smi) { Push(Immediate(smi)); } -+ -+ private: -+ bool has_frame_; -+ Isolate* isolate_; -+ // This handle will be patched with the code object on installation. -+ Handle code_object_; -+}; -+ -+// MacroAssembler implements a collection of frequently used macros. -+class MacroAssembler: public TurboAssembler { -+ public: -+ MacroAssembler(Isolate* isolate, void* buffer, int size, -+ CodeObjectRequired create_code_object); -+ -+ int jit_cookie() const { return jit_cookie_; } -+ -+ void Load(Register dst, const Operand& src, Representation r); -+ void Store(Register src, const Operand& dst, Representation r); -+ -+ // Load a register with a long value as efficiently as possible. -+ void Set(Register dst, int32_t x) { -+ if (x == 0) { -+ xor_(dst, dst); -+ } else { -+ mov(dst, Immediate(x)); -+ } -+ } -+ void Set(const Operand& dst, int32_t x) { mov(dst, Immediate(x)); } -+ -+ // Operations on roots in the root-array. -+ void LoadRoot(Register destination, Heap::RootListIndex index); -+ void StoreRoot(Register source, Register scratch, Heap::RootListIndex index); -+ void CompareRoot(Register with, Register scratch, Heap::RootListIndex index); -+ // These methods can only be used with constant roots (i.e. non-writable -+ // and not in new space). -+ void CompareRoot(Register with, Heap::RootListIndex index); -+ void CompareRoot(const Operand& with, Heap::RootListIndex index); -+ void PushRoot(Heap::RootListIndex index); -+ -+ // Compare the object in a register to a value and jump if they are equal. -+ void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal, -+ Label::Distance if_equal_distance = Label::kFar) { -+ CompareRoot(with, index); -+ j(equal, if_equal, if_equal_distance); -+ } -+ void JumpIfRoot(const Operand& with, Heap::RootListIndex index, -+ Label* if_equal, -+ Label::Distance if_equal_distance = Label::kFar) { -+ CompareRoot(with, index); -+ j(equal, if_equal, if_equal_distance); -+ } -+ -+ // Compare the object in a register to a value and jump if they are not equal. -+ void JumpIfNotRoot(Register with, Heap::RootListIndex index, -+ Label* if_not_equal, -+ Label::Distance if_not_equal_distance = Label::kFar) { -+ CompareRoot(with, index); -+ j(not_equal, if_not_equal, if_not_equal_distance); -+ } -+ void JumpIfNotRoot(const Operand& with, Heap::RootListIndex index, -+ Label* if_not_equal, -+ Label::Distance if_not_equal_distance = Label::kFar) { -+ CompareRoot(with, index); -+ j(not_equal, if_not_equal, if_not_equal_distance); -+ } -+ -+ // These functions do not arrange the registers in any particular order so -+ // they are not useful for calls that can cause a GC. The caller can -+ // exclude up to 3 registers that do not need to be saved and restored. -+ void PushCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, -+ Register exclusion2 = no_reg, -+ Register exclusion3 = no_reg); -+ void PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1 = no_reg, -+ Register exclusion2 = no_reg, -+ Register exclusion3 = no_reg); -+ -+ // --------------------------------------------------------------------------- -+ // GC Support -+ enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; -+ -+ // Record in the remembered set the fact that we have a pointer to new space -+ // at the address pointed to by the addr register. Only works if addr is not -+ // in new space. -+ void RememberedSetHelper(Register object, // Used for debug code. -+ Register addr, Register scratch, -+ SaveFPRegsMode save_fp, -+ RememberedSetFinalAction and_then); -+ -+ void CheckPageFlagForMap( -+ Handle map, int mask, Condition cc, Label* condition_met, -+ Label::Distance condition_met_distance = Label::kFar); -+ -+ // Check if object is in new space. Jumps if the object is not in new space. -+ // The register scratch can be object itself, but scratch will be clobbered. -+ void JumpIfNotInNewSpace(Register object, Register scratch, Label* branch, -+ Label::Distance distance = Label::kFar) { -+ InNewSpace(object, scratch, zero, branch, distance); -+ } -+ -+ // Check if object is in new space. Jumps if the object is in new space. -+ // The register scratch can be object itself, but it will be clobbered. -+ void JumpIfInNewSpace(Register object, Register scratch, Label* branch, -+ Label::Distance distance = Label::kFar) { -+ InNewSpace(object, scratch, not_zero, branch, distance); -+ } -+ -+ // Check if an object has a given incremental marking color. Also uses ecx! -+ void HasColor(Register object, Register scratch0, Register scratch1, -+ Label* has_color, Label::Distance has_color_distance, -+ int first_bit, int second_bit); -+ -+ void JumpIfBlack(Register object, Register scratch0, Register scratch1, -+ Label* on_black, -+ Label::Distance on_black_distance = Label::kFar); -+ -+ // Checks the color of an object. If the object is white we jump to the -+ // incremental marker. -+ void JumpIfWhite(Register value, Register scratch1, Register scratch2, -+ Label* value_is_white, Label::Distance distance); -+ -+ // Notify the garbage collector that we wrote a pointer into an object. -+ // |object| is the object being stored into, |value| is the object being -+ // stored. value and scratch registers are clobbered by the operation. -+ // The offset is the offset from the start of the object, not the offset from -+ // the tagged HeapObject pointer. For use with FieldOperand(reg, off). -+ void RecordWriteField( -+ Register object, int offset, Register value, Register scratch, -+ SaveFPRegsMode save_fp, -+ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, -+ SmiCheck smi_check = INLINE_SMI_CHECK, -+ PointersToHereCheck pointers_to_here_check_for_value = -+ kPointersToHereMaybeInteresting); -+ -+ // As above, but the offset has the tag presubtracted. For use with -+ // Operand(reg, off). -+ void RecordWriteContextSlot( -+ Register context, int offset, Register value, Register scratch, -+ SaveFPRegsMode save_fp, -+ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, -+ SmiCheck smi_check = INLINE_SMI_CHECK, -+ PointersToHereCheck pointers_to_here_check_for_value = -+ kPointersToHereMaybeInteresting) { -+ RecordWriteField(context, offset + kHeapObjectTag, value, scratch, save_fp, -+ remembered_set_action, smi_check, -+ pointers_to_here_check_for_value); -+ } -+ -+ // For page containing |object| mark region covering |address| -+ // dirty. |object| is the object being stored into, |value| is the -+ // object being stored. The address and value registers are clobbered by the -+ // operation. RecordWrite filters out smis so it does not update the -+ // write barrier if the value is a smi. -+ void RecordWrite( -+ Register object, Register address, Register value, SaveFPRegsMode save_fp, -+ RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, -+ SmiCheck smi_check = INLINE_SMI_CHECK, -+ PointersToHereCheck pointers_to_here_check_for_value = -+ kPointersToHereMaybeInteresting); -+ -+ // Notify the garbage collector that we wrote a code entry into a -+ // JSFunction. Only scratch is clobbered by the operation. -+ void RecordWriteCodeEntryField(Register js_function, Register code_entry, -+ Register scratch); -+ -+ // For page containing |object| mark the region covering the object's map -+ // dirty. |object| is the object being stored into, |map| is the Map object -+ // that was stored. -+ void RecordWriteForMap(Register object, Handle map, Register scratch1, -+ Register scratch2, SaveFPRegsMode save_fp); -+ -+ // Frame restart support -+ void MaybeDropFrames(); -+ -+ // Enter specific kind of exit frame. Expects the number of -+ // arguments in register eax and sets up the number of arguments in -+ // register edi and the pointer to the first argument in register -+ // esi. -+ void EnterExitFrame(int argc, bool save_doubles, StackFrame::Type frame_type); -+ -+ void EnterApiExitFrame(int argc); -+ -+ // Leave the current exit frame. Expects the return value in -+ // register eax:edx (untouched) and the pointer to the first -+ // argument in register esi (if pop_arguments == true). -+ void LeaveExitFrame(bool save_doubles, bool pop_arguments = true); -+ -+ // Leave the current exit frame. Expects the return value in -+ // register eax (untouched). -+ void LeaveApiExitFrame(bool restore_context); -+ -+ // Find the function context up the context chain. -+ void LoadContext(Register dst, int context_chain_length); -+ -+ // Load the global proxy from the current context. -+ void LoadGlobalProxy(Register dst); -+ -+ // Load the global function with the given index. -+ void LoadGlobalFunction(int index, Register function); -+ -+ // Load the initial map from the global function. The registers -+ // function and map can be the same. -+ void LoadGlobalFunctionInitialMap(Register function, Register map); -+ -+ // Push and pop the registers that can hold pointers. -+ void PushSafepointRegisters() { pushad(); } -+ void PopSafepointRegisters() { popad(); } -+ // Store the value in register/immediate src in the safepoint -+ // register stack slot for register dst. -+ void StoreToSafepointRegisterSlot(Register dst, Register src); -+ void StoreToSafepointRegisterSlot(Register dst, Immediate src); -+ void LoadFromSafepointRegisterSlot(Register dst, Register src); -+ -+ void CmpHeapObject(Register reg, Handle object); -+ void PushObject(Handle object); -+ -+ void CmpObject(Register reg, Handle object) { -+ AllowDeferredHandleDereference heap_object_check; -+ if (object->IsHeapObject()) { -+ CmpHeapObject(reg, Handle::cast(object)); -+ } else { -+ cmp(reg, Immediate(Smi::cast(*object))); -+ } -+ } -+ -+ void GetWeakValue(Register value, Handle cell); -+ void LoadWeakValue(Register value, Handle cell, Label* miss); -+ -+ // --------------------------------------------------------------------------- -+ // JavaScript invokes -+ -+ // Invoke the JavaScript function code by either calling or jumping. -+ -+ void InvokeFunctionCode(Register function, Register new_target, -+ const ParameterCount& expected, -+ const ParameterCount& actual, InvokeFlag flag, -+ const CallWrapper& call_wrapper); -+ -+ // On function call, call into the debugger if necessary. -+ void CheckDebugHook(Register fun, Register new_target, -+ const ParameterCount& expected, -+ const ParameterCount& actual); -+ -+ // Invoke the JavaScript function in the given register. Changes the -+ // current context to the context in the function before invoking. -+ void InvokeFunction(Register function, Register new_target, -+ const ParameterCount& actual, InvokeFlag flag, -+ const CallWrapper& call_wrapper); -+ -+ void InvokeFunction(Register function, const ParameterCount& expected, -+ const ParameterCount& actual, InvokeFlag flag, -+ const CallWrapper& call_wrapper); -+ -+ void InvokeFunction(Handle function, -+ const ParameterCount& expected, -+ const ParameterCount& actual, InvokeFlag flag, -+ const CallWrapper& call_wrapper); -+ -+ // Support for constant splitting. -+ bool IsUnsafeImmediate(const Immediate& x); -+ void SafeMove(Register dst, const Immediate& x); -+ void SafePush(const Immediate& x); -+ -+ // Compare object type for heap object. -+ // Incoming register is heap_object and outgoing register is map. -+ void CmpObjectType(Register heap_object, InstanceType type, Register map); -+ -+ // Compare instance type for map. -+ void CmpInstanceType(Register map, InstanceType type); -+ -+ // Compare an object's map with the specified map. -+ void CompareMap(Register obj, Handle map); -+ -+ // Check if the map of an object is equal to a specified map and branch to -+ // label if not. Skip the smi check if not required (object is known to be a -+ // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match -+ // against maps that are ElementsKind transition maps of the specified map. -+ void CheckMap(Register obj, Handle map, Label* fail, -+ SmiCheckType smi_check_type); -+ -+ // Check if the object in register heap_object is a string. Afterwards the -+ // register map contains the object map and the register instance_type -+ // contains the instance_type. The registers map and instance_type can be the -+ // same in which case it contains the instance type afterwards. Either of the -+ // registers map and instance_type can be the same as heap_object. -+ Condition IsObjectStringType(Register heap_object, Register map, -+ Register instance_type); -+ -+ void FXamMinusZero(); -+ void FXamSign(); -+ void X87CheckIA(); -+ -+ void ClampUint8(Register reg); -+ void ClampTOSToUint8(Register result_reg); -+ -+ void SlowTruncateToI(Register result_reg, Register input_reg, -+ int offset = HeapNumber::kValueOffset - kHeapObjectTag); -+ -+ void TruncateHeapNumberToI(Register result_reg, Register input_reg); -+ -+ void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode, -+ Label* lost_precision, Label* is_nan, Label* minus_zero, -+ Label::Distance dst = Label::kFar); -+ -+ // Smi tagging support. -+ void SmiTag(Register reg) { -+ STATIC_ASSERT(kSmiTag == 0); -+ STATIC_ASSERT(kSmiTagSize == 1); -+ add(reg, reg); -+ } -+ -+ // Modifies the register even if it does not contain a Smi! -+ void UntagSmi(Register reg, Label* is_smi) { -+ STATIC_ASSERT(kSmiTagSize == 1); -+ sar(reg, kSmiTagSize); -+ STATIC_ASSERT(kSmiTag == 0); -+ j(not_carry, is_smi); -+ } -+ -+ // Jump if register contain a non-smi. -+ inline void JumpIfNotSmi(Register value, Label* not_smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(not_zero, not_smi_label, distance); -+ } -+ // Jump if the operand is not a smi. -+ inline void JumpIfNotSmi(Operand value, Label* smi_label, -+ Label::Distance distance = Label::kFar) { -+ test(value, Immediate(kSmiTagMask)); -+ j(not_zero, smi_label, distance); -+ } -+ // Jump if the value cannot be represented by a smi. -+ inline void JumpIfNotValidSmiValue(Register value, Register scratch, -+ Label* on_invalid, -+ Label::Distance distance = Label::kFar) { -+ mov(scratch, value); -+ add(scratch, Immediate(0x40000000U)); -+ j(sign, on_invalid, distance); -+ } -+ -+ // Jump if the unsigned integer value cannot be represented by a smi. -+ inline void JumpIfUIntNotValidSmiValue( -+ Register value, Label* on_invalid, -+ Label::Distance distance = Label::kFar) { -+ cmp(value, Immediate(0x40000000U)); -+ j(above_equal, on_invalid, distance); -+ } -+ -+ void LoadInstanceDescriptors(Register map, Register descriptors); -+ void EnumLength(Register dst, Register map); -+ void NumberOfOwnDescriptors(Register dst, Register map); -+ void LoadAccessor(Register dst, Register holder, int accessor_index, -+ AccessorComponent accessor); -+ -+ template -+ void DecodeField(Register reg) { -+ static const int shift = Field::kShift; -+ static const int mask = Field::kMask >> Field::kShift; -+ if (shift != 0) { -+ sar(reg, shift); -+ } -+ and_(reg, Immediate(mask)); -+ } -+ -+ template -+ void DecodeFieldToSmi(Register reg) { -+ static const int shift = Field::kShift; -+ static const int mask = (Field::kMask >> Field::kShift) << kSmiTagSize; -+ STATIC_ASSERT((mask & (0x80000000u >> (kSmiTagSize - 1))) == 0); -+ STATIC_ASSERT(kSmiTag == 0); -+ if (shift < kSmiTagSize) { -+ shl(reg, kSmiTagSize - shift); -+ } else if (shift > kSmiTagSize) { -+ sar(reg, shift - kSmiTagSize); -+ } -+ and_(reg, Immediate(mask)); -+ } -+ -+ // Abort execution if argument is not a smi, enabled via --debug-code. -+ void AssertSmi(Register object); -+ -+ // Abort execution if argument is a smi, enabled via --debug-code. -+ void AssertNotSmi(Register object); -+ -+ // Abort execution if argument is not a FixedArray, enabled via --debug-code. -+ void AssertFixedArray(Register object); -+ -+ // Abort execution if argument is not a JSFunction, enabled via --debug-code. -+ void AssertFunction(Register object); -+ -+ // Abort execution if argument is not a JSBoundFunction, -+ // enabled via --debug-code. -+ void AssertBoundFunction(Register object); -+ -+ // Abort execution if argument is not a JSGeneratorObject (or subclass), -+ // enabled via --debug-code. -+ void AssertGeneratorObject(Register object); -+ -+ // Abort execution if argument is not undefined or an AllocationSite, enabled -+ // via --debug-code. -+ void AssertUndefinedOrAllocationSite(Register object); -+ -+ // --------------------------------------------------------------------------- -+ // Exception handling -+ -+ // Push a new stack handler and link it into stack handler chain. -+ void PushStackHandler(); -+ -+ // Unlink the stack handler on top of the stack from the stack handler chain. -+ void PopStackHandler(); -+ -+ // --------------------------------------------------------------------------- -+ // Inline caching support -+ -+ void GetNumberHash(Register r0, Register scratch); -+ -+ // --------------------------------------------------------------------------- -+ // Allocation support -+ -+ // Allocate an object in new space or old space. If the given space -+ // is exhausted control continues at the gc_required label. The allocated -+ // object is returned in result and end of the new object is returned in -+ // result_end. The register scratch can be passed as no_reg in which case -+ // an additional object reference will be added to the reloc info. The -+ // returned pointers in result and result_end have not yet been tagged as -+ // heap objects. If result_contains_top_on_entry is true the content of -+ // result is known to be the allocation top on entry (could be result_end -+ // from a previous call). If result_contains_top_on_entry is true scratch -+ // should be no_reg as it is never used. -+ void Allocate(int object_size, Register result, Register result_end, -+ Register scratch, Label* gc_required, AllocationFlags flags); -+ -+ void Allocate(int header_size, ScaleFactor element_size, -+ Register element_count, RegisterValueType element_count_type, -+ Register result, Register result_end, Register scratch, -+ Label* gc_required, AllocationFlags flags); -+ -+ void Allocate(Register object_size, Register result, Register result_end, -+ Register scratch, Label* gc_required, AllocationFlags flags); -+ -+ // Allocate a heap number in new space with undefined value. The -+ // register scratch2 can be passed as no_reg; the others must be -+ // valid registers. Returns tagged pointer in result register, or -+ // jumps to gc_required if new space is full. -+ void AllocateHeapNumber(Register result, Register scratch1, Register scratch2, -+ Label* gc_required, MutableMode mode = IMMUTABLE); -+ -+ // Allocate and initialize a JSValue wrapper with the specified {constructor} -+ // and {value}. -+ void AllocateJSValue(Register result, Register constructor, Register value, -+ Register scratch, Label* gc_required); -+ -+ // Initialize fields with filler values. Fields starting at |current_address| -+ // not including |end_address| are overwritten with the value in |filler|. At -+ // the end the loop, |current_address| takes the value of |end_address|. -+ void InitializeFieldsWithFiller(Register current_address, -+ Register end_address, Register filler); -+ -+ // --------------------------------------------------------------------------- -+ // Support functions. -+ -+ // Check a boolean-bit of a Smi field. -+ void BooleanBitTest(Register object, int field_offset, int bit_index); -+ -+ // Machine code version of Map::GetConstructor(). -+ // |temp| holds |result|'s map when done. -+ void GetMapConstructor(Register result, Register map, Register temp); -+ -+ // --------------------------------------------------------------------------- -+ // Runtime calls -+ -+ // Call a code stub. Generate the code if necessary. -+ void CallStub(CodeStub* stub); -+ -+ // Tail call a code stub (jump). Generate the code if necessary. -+ void TailCallStub(CodeStub* stub); -+ -+ // Call a runtime routine. -+ void CallRuntime(const Runtime::Function* f, int num_arguments, -+ SaveFPRegsMode save_doubles = kDontSaveFPRegs); -+ void CallRuntimeSaveDoubles(Runtime::FunctionId fid) { -+ const Runtime::Function* function = Runtime::FunctionForId(fid); -+ CallRuntime(function, function->nargs, kSaveFPRegs); -+ } -+ -+ // Convenience function: Same as above, but takes the fid instead. -+ void CallRuntime(Runtime::FunctionId fid, -+ SaveFPRegsMode save_doubles = kDontSaveFPRegs) { -+ const Runtime::Function* function = Runtime::FunctionForId(fid); -+ CallRuntime(function, function->nargs, save_doubles); -+ } -+ -+ // Convenience function: Same as above, but takes the fid instead. -+ void CallRuntime(Runtime::FunctionId fid, int num_arguments, -+ SaveFPRegsMode save_doubles = kDontSaveFPRegs) { -+ CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles); -+ } -+ -+ // Convenience function: call an external reference. -+ void CallExternalReference(ExternalReference ref, int num_arguments); -+ -+ // Convenience function: tail call a runtime routine (jump). -+ void TailCallRuntime(Runtime::FunctionId fid); -+ -+ // Jump to a runtime routine. -+ void JumpToExternalReference(const ExternalReference& ext, -+ bool builtin_exit_frame = false); -+ -+ // --------------------------------------------------------------------------- -+ // Utilities -+ -+ // Emit code that loads |parameter_index|'th parameter from the stack to -+ // the register according to the CallInterfaceDescriptor definition. -+ // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed -+ // below the caller's sp (on x87 it's at least return address). -+ template -+ void LoadParameterFromStack( -+ Register reg, typename Descriptor::ParameterIndices parameter_index, -+ int sp_to_ra_offset_in_words = 1) { -+ DCHECK(Descriptor::kPassLastArgsOnStack); -+ DCHECK_LT(parameter_index, Descriptor::kParameterCount); -+ DCHECK_LE(Descriptor::kParameterCount - Descriptor::kStackArgumentsCount, -+ parameter_index); -+ int offset = (Descriptor::kParameterCount - parameter_index - 1 + -+ sp_to_ra_offset_in_words) * -+ kPointerSize; -+ mov(reg, Operand(esp, offset)); -+ } -+ -+ // Emit code to discard a non-negative number of pointer-sized elements -+ // from the stack, clobbering only the esp register. -+ void Drop(int element_count); -+ -+ void Jump(Handle target, RelocInfo::Mode rmode) { jmp(target, rmode); } -+ void Pop(Register dst) { pop(dst); } -+ void Pop(const Operand& dst) { pop(dst); } -+ void PushReturnAddressFrom(Register src) { push(src); } -+ void PopReturnAddressTo(Register dst) { pop(dst); } -+ -+ // Emit code for a truncating division by a constant. The dividend register is -+ // unchanged, the result is in edx, and eax gets clobbered. -+ void TruncatingDiv(Register dividend, int32_t divisor); -+ -+ // --------------------------------------------------------------------------- -+ // StatsCounter support -+ -+ void SetCounter(StatsCounter* counter, int value); -+ void IncrementCounter(StatsCounter* counter, int value); -+ void DecrementCounter(StatsCounter* counter, int value); -+ void IncrementCounter(Condition cc, StatsCounter* counter, int value); -+ void DecrementCounter(Condition cc, StatsCounter* counter, int value); -+ -+ // --------------------------------------------------------------------------- -+ // String utilities. -+ -+ // Checks if both objects are sequential one-byte strings, and jumps to label -+ // if either is not. -+ void JumpIfNotBothSequentialOneByteStrings( -+ Register object1, Register object2, Register scratch1, Register scratch2, -+ Label* on_not_flat_one_byte_strings); -+ -+ // Checks if the given register or operand is a unique name -+ void JumpIfNotUniqueNameInstanceType(Register reg, Label* not_unique_name, -+ Label::Distance distance = Label::kFar) { -+ JumpIfNotUniqueNameInstanceType(Operand(reg), not_unique_name, distance); -+ } -+ -+ void JumpIfNotUniqueNameInstanceType(Operand operand, Label* not_unique_name, -+ Label::Distance distance = Label::kFar); -+ -+ void EmitSeqStringSetCharCheck(Register string, Register index, -+ Register value, uint32_t encoding_mask); -+ -+ static int SafepointRegisterStackIndex(Register reg) { -+ return SafepointRegisterStackIndex(reg.code()); -+ } -+ -+ // Load the type feedback vector from a JavaScript frame. -+ void EmitLoadFeedbackVector(Register vector); -+ -+ void EnterBuiltinFrame(Register context, Register target, Register argc); -+ void LeaveBuiltinFrame(Register context, Register target, Register argc); -+ -+ // Expects object in eax and returns map with validated enum cache -+ // in eax. Assumes that any other register can be used as a scratch. -+ void CheckEnumCache(Label* call_runtime); -+ -+ // AllocationMemento support. Arrays may have an associated -+ // AllocationMemento object that can be checked for in order to pretransition -+ // to another type. -+ // On entry, receiver_reg should point to the array object. -+ // scratch_reg gets clobbered. -+ // If allocation info is present, conditional code is set to equal. -+ void TestJSArrayForAllocationMemento(Register receiver_reg, -+ Register scratch_reg, -+ Label* no_memento_found); -+ -+ private: -+ int jit_cookie_; -+ -+ // Helper functions for generating invokes. -+ void InvokePrologue(const ParameterCount& expected, -+ const ParameterCount& actual, Label* done, -+ bool* definitely_mismatches, InvokeFlag flag, -+ Label::Distance done_distance, -+ const CallWrapper& call_wrapper); -+ -+ void EnterExitFramePrologue(StackFrame::Type frame_type); -+ void EnterExitFrameEpilogue(int argc, bool save_doubles); -+ -+ void LeaveExitFrameEpilogue(bool restore_context); -+ -+ // Allocation support helpers. -+ void LoadAllocationTopHelper(Register result, Register scratch, -+ AllocationFlags flags); -+ -+ void UpdateAllocationTopHelper(Register result_end, Register scratch, -+ AllocationFlags flags); -+ -+ // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. -+ void InNewSpace(Register object, Register scratch, Condition cc, -+ Label* condition_met, -+ Label::Distance condition_met_distance = Label::kFar); -+ -+ // Helper for finding the mark bits for an address. Afterwards, the -+ // bitmap register points at the word with the mark bits and the mask -+ // the position of the first bit. Uses ecx as scratch and leaves addr_reg -+ // unchanged. -+ inline void GetMarkBits(Register addr_reg, Register bitmap_reg, -+ Register mask_reg); -+ -+ // Compute memory operands for safepoint stack slots. -+ Operand SafepointRegisterSlot(Register reg); -+ static int SafepointRegisterStackIndex(int reg_code); -+ -+ // Needs access to SafepointRegisterStackIndex for compiled frame -+ // traversal. -+ friend class StandardFrame; -+}; -+ -+// The code patcher is used to patch (typically) small parts of code e.g. for -+// debugging and other types of instrumentation. When using the code patcher -+// the exact number of bytes specified must be emitted. Is not legal to emit -+// relocation information. If any of these constraints are violated it causes -+// an assertion. -+class CodePatcher { -+ public: -+ CodePatcher(Isolate* isolate, byte* address, int size); -+ ~CodePatcher(); -+ -+ // Macro assembler to emit code. -+ MacroAssembler* masm() { return &masm_; } -+ -+ private: -+ byte* address_; // The address of the code being patched. -+ int size_; // Number of bytes of the expected patch size. -+ MacroAssembler masm_; // Macro assembler used to generate the code. -+}; -+ -+// ----------------------------------------------------------------------------- -+// Static helper functions. -+ -+// Generate an Operand for loading a field from an object. -+inline Operand FieldOperand(Register object, int offset) { -+ return Operand(object, offset - kHeapObjectTag); -+} -+ -+// Generate an Operand for loading an indexed field from an object. -+inline Operand FieldOperand(Register object, Register index, ScaleFactor scale, -+ int offset) { -+ return Operand(object, index, scale, offset - kHeapObjectTag); -+} -+ -+inline Operand FixedArrayElementOperand(Register array, Register index_as_smi, -+ int additional_offset = 0) { -+ int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; -+ return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); -+} -+ -+inline Operand ContextOperand(Register context, int index) { -+ return Operand(context, Context::SlotOffset(index)); -+} -+ -+inline Operand ContextOperand(Register context, Register index) { -+ return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); -+} -+ -+inline Operand NativeContextOperand() { -+ return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); -+} -+ -+#define ACCESS_MASM(masm) masm-> -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_MACRO_ASSEMBLER_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/OWNERS qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/OWNERS 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/OWNERS 2018-02-18 19:00:54.200418105 +0100 -@@ -0,0 +1,2 @@ -+weiliang.lin@intel.com -+chunyang.dai@intel.com -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.cc 2018-02-18 19:00:54.200418105 +0100 -@@ -0,0 +1,7 @@ -+// Copyright 2008 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "src/x87/simulator-x87.h" -+ -+// Since there is no simulator for the ia32 architecture this file is empty. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.h qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 1970-01-01 01:00:00.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/src/x87/simulator-x87.h 2018-02-18 19:00:54.200418105 +0100 -@@ -0,0 +1,52 @@ -+// Copyright 2012 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_X87_SIMULATOR_X87_H_ -+#define V8_X87_SIMULATOR_X87_H_ -+ -+#include "src/allocation.h" -+ -+namespace v8 { -+namespace internal { -+ -+// Since there is no simulator for the ia32 architecture the only thing we can -+// do is to call the entry directly. -+#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ -+ (entry(p0, p1, p2, p3, p4)) -+ -+ -+typedef int (*regexp_matcher)(String*, int, const byte*, -+ const byte*, int*, int, Address, int, Isolate*); -+ -+// Call the generated regexp code directly. The code at the entry address should -+// expect eight int/pointer sized arguments and return an int. -+#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ -+ p7, p8) \ -+ (FUNCTION_CAST(entry)(p0, p1, p2, p3, p4, p5, p6, p7, p8)) -+ -+ -+// The stack limit beyond which we will throw stack overflow errors in -+// generated code. Because generated code on ia32 uses the C stack, we -+// just use the C stack limit. -+class SimulatorStack : public v8::internal::AllStatic { -+ public: -+ static inline uintptr_t JsLimitFromCLimit(Isolate* isolate, -+ uintptr_t c_limit) { -+ USE(isolate); -+ return c_limit; -+ } -+ -+ static inline uintptr_t RegisterCTryCatch(Isolate* isolate, -+ uintptr_t try_catch_address) { -+ USE(isolate); -+ return try_catch_address; -+ } -+ -+ static inline void UnregisterCTryCatch(Isolate* isolate) { USE(isolate); } -+}; -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_X87_SIMULATOR_X87_H_ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/BUILD.gn 2018-02-18 19:00:54.200418105 +0100 -@@ -287,6 +287,17 @@ - "test-macro-assembler-x64.cc", - "test-run-wasm-relocation-x64.cc", - ] -+ } else if (v8_current_cpu == "x87") { -+ sources += [ ### gcmole(arch:x87) ### -+ "test-assembler-x87.cc", -+ "test-code-stubs-x87.cc", -+ "test-code-stubs.cc", -+ "test-code-stubs.h", -+ "test-disasm-x87.cc", -+ "test-log-stack-tracer.cc", -+ "test-macro-assembler-x87.cc", -+ "test-run-wasm-relocation-x87.cc", -+ ] - } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { - sources += [ ### gcmole(arch:ppc) ### - "test-assembler-ppc.cc", -@@ -332,7 +343,7 @@ - - defines = [] - -- if (is_component_build) { -+ if (is_component_build || v8_build_shared) { - # cctest can't be built against a shared library, so we - # need to depend on the underlying static target in that case. - deps += [ "../..:v8_maybe_snapshot" ] -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/cctest.gyp qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/test/cctest/cctest.gyp 2018-02-18 19:00:54.289416795 +0100 -@@ -308,6 +308,16 @@ - 'test-disasm-mips64.cc', - 'test-macro-assembler-mips64.cc', - ], -+ 'cctest_sources_x87': [ ### gcmole(arch:x87) ### -+ 'test-assembler-x87.cc', -+ 'test-code-stubs.cc', -+ 'test-code-stubs.h', -+ 'test-code-stubs-x87.cc', -+ 'test-disasm-x87.cc', -+ 'test-macro-assembler-x87.cc', -+ 'test-log-stack-tracer.cc', -+ 'test-run-wasm-relocation-x87.cc', -+ ], - }, - 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'], - 'targets': [ -@@ -392,6 +402,11 @@ - '<@(cctest_sources_mips64el)', - ], - }], -+ ['v8_target_arch=="x87"', { -+ 'sources': [ -+ '<@(cctest_sources_x87)', -+ ], -+ }], - [ 'OS=="linux" or OS=="qnx"', { - 'sources': [ - 'test-platform-linux.cc', -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gen-tags.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gen-tags.py 2018-02-18 19:00:54.289416795 +0100 -@@ -20,7 +20,7 @@ - import sys - - # All arches that this script understands. --ARCHES = ["ia32", "x64", "arm", "arm64", "mips", "mips64", "ppc", "s390"] -+ARCHES = ["ia32", "x64", "arm", "arm64", "mips", "mips64", "ppc", "s390", "x87"] - - def PrintHelpAndExit(): - print(__doc__) -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gm.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/dev/gm.py 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/dev/gm.py 2018-02-18 19:00:54.366415663 +0100 -@@ -33,7 +33,7 @@ - - # All arches that this script understands. - ARCHES = ["ia32", "x64", "arm", "arm64", "mipsel", "mips64el", "ppc", "ppc64", -- "s390", "s390x"] -+ "s390", "s390x", "x87"] - # Arches that get built/run when you don't specify any. - DEFAULT_ARCHES = ["ia32", "x64", "arm", "arm64"] - # Modes that this script understands. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/run-tests.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/run-tests.py 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/run-tests.py 2018-02-18 19:00:54.366415663 +0100 -@@ -187,6 +187,7 @@ - "android_x64", - "arm", - "ia32", -+ "x87", - "mips", - "mipsel", - "mips64", -@@ -210,6 +211,7 @@ - "mips64el", - "s390", - "s390x", -+ "x87", - "arm64"] - - -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/testrunner/local/statusfile.py 2018-02-18 19:00:54.443414530 +0100 -@@ -59,10 +59,10 @@ - # Support arches, modes to be written as keywords instead of strings. - VARIABLES = {ALWAYS: True} - for var in ["debug", "release", "big", "little", -- "android_arm", "android_arm64", "android_ia32", "android_x64", -- "arm", "arm64", "ia32", "mips", "mipsel", "mips64", "mips64el", -- "x64", "ppc", "ppc64", "s390", "s390x", "macos", "windows", -- "linux", "aix"]: -+ "android_arm", "android_arm64", "android_ia32", "android_x87", -+ "android_x64", "arm", "arm64", "ia32", "mips", "mipsel", "mips64", -+ "mips64el", "x64", "x87", "ppc", "ppc64", "s390", "s390x", "macos", -+ "windows", "linux", "aix"]: - VARIABLES[var] = var - - # Allow using variants as keywords. -diff -Nur qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/verify_source_deps.py qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py ---- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2018-02-02 11:39:52.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/3rdparty/chromium/v8/tools/verify_source_deps.py 2018-02-18 19:00:54.514413486 +0100 -@@ -82,6 +82,7 @@ - 'solaris', - 'vtune', - 'v8-version.h', -+ 'x87', - ] - - ALL_GN_PREFIXES = [ -diff -Nur qtwebengine-everywhere-src-5.10.1/src/core/core_module.pro qtwebengine-everywhere-src-5.10.1-no-sse2/src/core/core_module.pro ---- qtwebengine-everywhere-src-5.10.1/src/core/core_module.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/core/core_module.pro 2018-02-18 19:00:54.514413486 +0100 -@@ -53,6 +53,31 @@ - - POST_TARGETDEPS += $$NINJA_TARGETDEPS - -+# go through the shared libraries that GN wants to link to -+# ignore the dummy convert_dict shared library used only to get a .pri file -+# add the ones NOT in lib/sse2 to LIBS_PRIVATE -+# don't add those in lib/sse2 that are only replacements for the normal ones -+# collect all shared libraries, non-SSE2 and SSE2, so they can be installed -+for(shlib, NINJA_SOLIBS) { -+ !contains(shlib, .*convert_dict.*) { -+ contains(shlib, .*/lib/sse2/.*) { -+ shlibs_sse2 += $$shlib -+ } else { -+ LIBS_PRIVATE += $$shlib -+ shlibs += $$shlib -+ } -+ } -+} -+ -+# set the shared libraries to be installed -+# add an rpath to their installation location -+shlib_install_path = $$[QT_INSTALL_LIBS]/qtwebengine -+!isEmpty(shlibs) { -+ shlibs.files += $$shlibs -+ shlibs_sse2.files += $$shlibs_sse2 -+ LIBS_PRIVATE += -Wl,--rpath,$$shlib_install_path -+} -+ - - LIBS_PRIVATE += -L$$api_library_path - CONFIG *= no_smart_library_merge -@@ -122,7 +147,12 @@ - locales.path = $$[QT_INSTALL_TRANSLATIONS]/qtwebengine_locales - resources.CONFIG += no_check_exist - resources.path = $$[QT_INSTALL_DATA]/resources -- INSTALLS += locales resources -+ # install the shared libraries -+ shlibs.CONFIG += no_check_exist -+ shlibs.path = $$shlib_install_path -+ shlibs_sse2.CONFIG += no_check_exist -+ shlibs_sse2.path = $$shlib_install_path/sse2 -+ INSTALLS += locales resources shlibs shlibs_sse2 - - !qtConfig(webengine-system-icu) { - icu.CONFIG += no_check_exist -diff -Nur qtwebengine-everywhere-src-5.10.1/src/process/process.pro qtwebengine-everywhere-src-5.10.1-no-sse2/src/process/process.pro ---- qtwebengine-everywhere-src-5.10.1/src/process/process.pro 2018-02-09 05:07:39.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.1-no-sse2/src/process/process.pro 2018-02-18 19:00:54.515413471 +0100 -@@ -9,6 +9,8 @@ - - SOURCES = main.cpp - -+QMAKE_LFLAGS += -Wl,-rpath-link,$$OUT_PWD/../core/release -+ - win32 { - SOURCES += \ - support_win.cpp diff --git a/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch new file mode 100644 index 0000000..9d4cadb --- /dev/null +++ b/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro.gn-bootstrap-verbose qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro +--- qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro.gn-bootstrap-verbose 2018-12-07 09:53:18.262171677 -0600 ++++ qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro 2018-12-07 09:57:53.246646133 -0600 +@@ -18,7 +18,7 @@ build_pass|!debug_and_release { + src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") + gn_bootstrap = $$system_path($$absolute_path(gn/build/gen.py, $$src_3rd_party_dir)) + +- gn_configure = $$system_quote($$gn_bootstrap) --no-last-commit-position --out-path $$out_path ++ gn_configure = $$system_quote($$gn_bootstrap) --verbose --no-last-commit-position --out-path $$out_path + !system("$$pythonPathForSystem() $$gn_configure") { + error("GN generation error!") + } diff --git a/qtwebengine-everywhere-src-5.12.1-python2.patch b/qtwebengine-everywhere-src-5.12.1-python2.patch new file mode 100644 index 0000000..259952d --- /dev/null +++ b/qtwebengine-everywhere-src-5.12.1-python2.patch @@ -0,0 +1,11 @@ +diff -up qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri.python2 qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri +--- qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri.python2 2019-02-01 09:30:19.194657298 -0600 ++++ qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri 2019-02-01 10:53:16.756357279 -0600 +@@ -205,5 +205,5 @@ gn_args += linux_link_libpci=true + CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" + R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" + R_G_F_PY_ARGS = "--system-libraries yasm" +-log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") +-!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") ++log("Running python2 $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python2 $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch b/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch new file mode 100644 index 0000000..3f047c2 --- /dev/null +++ b/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf.fix-extractcflag qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf +--- qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf.fix-extractcflag 2019-02-01 09:25:44.950965875 -0600 ++++ qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf 2019-02-01 09:28:39.290041131 -0600 +@@ -11,7 +11,7 @@ defineReplace(getChromiumSrcDir) { + } + + defineReplace(extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + PARAM = $$member(OPTION, 1) diff --git a/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch b/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch deleted file mode 100644 index 4fcd592..0000000 --- a/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf ---- qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf 2017-06-08 00:36:16.303520106 +0200 -@@ -302,7 +302,7 @@ - } - - defineReplace(extractCFlag) { -- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS -+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE - OPTION = $$find(CFLAGS, $$1) - OPTION = $$split(OPTION, =) - return ($$member(OPTION, 1)) diff --git a/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch deleted file mode 100644 index a21802a..0000000 --- a/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-06-10 13:20:14.959007488 +0200 -@@ -93,9 +93,7 @@ - if (is_linux) { - defines += [ "WEBRTC_THREAD_RR" ] - -- if (!build_with_chromium) { -- deps += [ ":cpu_features_linux" ] -- } -+ deps += [ ":cpu_features_linux" ] - - libs += [ "rt" ] - } diff --git a/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch deleted file mode 100644 index a475199..0000000 --- a/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-13 14:51:26.986633933 +0200 -@@ -64,6 +64,7 @@ - gn_args += arm_use_neon=true - } else { - MFPU = $$extractCFlag("-mfpu=.*") -+ !isEmpty(MFPU): gn_args += arm_fpu=\"$$MFPU\" - !isEmpty(MFPU):contains(MFPU, ".*neon.*") { - gn_args += arm_use_neon=true - } else { diff --git a/sources b/sources index 965905d..135d182 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.11.3-clean.tar.xz) = 02b787df5a79eaa9c30a2ecfaee899291dd5033078c356313d580d86284a78d86aa13de1dd67968b9c1e214662adbb1623ea0afb7289f0eb3c0b99d8d2a53a2e +SHA512 (qtwebengine-everywhere-src-5.12.1-clean.tar.xz) = 779d63b93849a6a5b8ecea1c1480ce80c01cc678929947ba64ea5003f9de51e76b49f06d9f0dee89afb28a7713f11d2a7412b55acb3203c548ca8ebf564b30cb From 6df43488ca17cd03b6d1a82151a93021b568fa40 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 13 Feb 2019 16:34:16 -0600 Subject: [PATCH 290/437] update linux-pri.patch for python2 ...instead of fixing it seperately --- qt5-qtwebengine.spec | 2 -- qtwebengine-everywhere-src-5.10.0-linux-pri.patch | 4 ++-- qtwebengine-everywhere-src-5.12.1-python2.patch | 11 ----------- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.12.1-python2.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1152ff3..0018e2f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -77,8 +77,6 @@ Patch2: qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch # disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch -# python -> python2 -Patch7: qtwebengine-everywhere-src-5.12.1-python2.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # Force verbose output from the GN bootstrap process diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch index 162f63e..4bcd376 100644 --- a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -19,5 +19,5 @@ diff -ur qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri qtwebengine +CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" +R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" +R_G_F_PY_ARGS = "--system-libraries yasm" -+log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") ++log("Running python2 $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") ++!system("python2 $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") diff --git a/qtwebengine-everywhere-src-5.12.1-python2.patch b/qtwebengine-everywhere-src-5.12.1-python2.patch deleted file mode 100644 index 259952d..0000000 --- a/qtwebengine-everywhere-src-5.12.1-python2.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri.python2 qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri ---- qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri.python2 2019-02-01 09:30:19.194657298 -0600 -+++ qtwebengine-everywhere-src-5.12.1/src/core/config/linux.pri 2019-02-01 10:53:16.756357279 -0600 -@@ -205,5 +205,5 @@ gn_args += linux_link_libpci=true - CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" - R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" - R_G_F_PY_ARGS = "--system-libraries yasm" --log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") --!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") -+log("Running python2 $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python2 $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") From 9086983e50231ee512c8bdff466b7180e997353d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 24 Feb 2019 22:54:05 -0600 Subject: [PATCH 291/437] enable kerberos support and fix build (remove reference to old python2.patch) --- qt5-qtwebengine.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0018e2f..8503dd1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -109,6 +109,7 @@ BuildRequires: gcc-c++ BuildRequires: libstdc++-static BuildRequires: git-core BuildRequires: gperf +BuildRequires: krb5-devel BuildRequires: libicu-devel BuildRequires: libjpeg-devel BuildRequires: re2-devel @@ -343,7 +344,6 @@ BuildArch: noarch ## upstream patches -%patch7 -p1 -b .python2 %patch10 -p1 -b .openmax-dl-neon ## NEEDSWORK #patch21 -p1 -b .gn-bootstrap-verbose @@ -403,7 +403,9 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} \ CONFIG+="%{debug_config}" \ - QMAKE_EXTRA_ARGS+="-system-webengine-icu" . + QMAKE_EXTRA_ARGS+="-system-webengine-icu" \ + QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ + . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja make %{?_smp_mflags} @@ -565,8 +567,9 @@ done %changelog -* Wed Feb 13 2019 Rex Dieter - 5.12.1-1 +* Sun Feb 24 2019 Rex Dieter - 5.12.1-1 - 5.12.1 +- enable kerberos support * Tue Feb 05 2019 Björn Esser - 5.11.3-5 - rebuilt (libvpx) From 021ded1dacee519cf4c29720fd9ac9d1ed33bdd3 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 25 Mar 2019 12:59:42 -0500 Subject: [PATCH 292/437] 5.12.2 --- .gitignore | 1 + qt5-qtwebengine.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9b1512e..ea7e16c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /qtwebengine-everywhere-src-5.11.2-clean.tar.xz /qtwebengine-everywhere-src-5.11.3-clean.tar.xz /qtwebengine-everywhere-src-5.12.1-clean.tar.xz +/qtwebengine-everywhere-src-5.12.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8503dd1..9f4d304 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,7 +46,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.1 +Version: 5.12.2 Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details @@ -55,8 +55,8 @@ Release: 1%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.11/5.11.1/submodules/qtwebengine-everywhere-src-5.11.1.tar.xz -# ./clean_qtwebengine.sh 5.11.1 +# wget http://download.qt.io/official_releases/qt/5.12/5.12.2/submodules/qtwebengine-everywhere-src-5.12.2.tar.xz +# ./clean_qtwebengine.sh 5.12.2 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -567,6 +567,9 @@ done %changelog +* Mon Mar 25 2019 Rex Dieter - 5.12.2-1 +- 5.12.2 + * Sun Feb 24 2019 Rex Dieter - 5.12.1-1 - 5.12.1 - enable kerberos support diff --git a/sources b/sources index 135d182..5cf1218 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.12.1-clean.tar.xz) = 779d63b93849a6a5b8ecea1c1480ce80c01cc678929947ba64ea5003f9de51e76b49f06d9f0dee89afb28a7713f11d2a7412b55acb3203c548ca8ebf564b30cb +SHA512 (qtwebengine-everywhere-src-5.12.2-clean.tar.xz) = 96afcc0ea36d4d06da1b64bd67cbc52394653d8c4700f7c166a5a8f2159517d0f9036b90949f97182c4e55603405576c87d200a512ae80931ff0ed502e72db6c From b597268292347faae47aee429f93ba2a50b0482a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 25 Mar 2019 13:25:53 -0500 Subject: [PATCH 293/437] use system libxslt/libxml2 --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9f4d304..40cbcfe 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -159,6 +159,7 @@ BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) BuildRequires: perl-interpreter BuildRequires: python2-devel %if 0%{?use_system_libvpx} @@ -228,7 +229,7 @@ Provides: bundled(libwebp) = 0.6.0 %endif # bundled as "libxml" # see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h -Provides: bundled(libxml2) = 2.9.4 +#Provides: bundled(libxml2) = 2.9.4 # see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version Provides: bundled(libxslt) = 1.1.29 Provides: bundled(libXNVCtrl) = 302.17 From ef6768f9d68dffbf0b361d0e60ae5393be4c1373 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 25 Mar 2019 13:26:27 -0500 Subject: [PATCH 294/437] +changelog wrt libxslt --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 40cbcfe..300b6ba 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -570,6 +570,7 @@ done %changelog * Mon Mar 25 2019 Rex Dieter - 5.12.2-1 - 5.12.2 +- use system libxml2/libxslt * Sun Feb 24 2019 Rex Dieter - 5.12.1-1 - 5.12.1 From 67986a15d66d889f8f1998e88bc72675b9598532 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 25 Mar 2019 15:29:53 -0500 Subject: [PATCH 295/437] revert bundled libxml2/libxslt --- qt5-qtwebengine.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 300b6ba..a920577 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -159,7 +159,8 @@ BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) -BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) +## https://bugreports.qt.io/browse/QTBUG-59094 +#BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) BuildRequires: perl-interpreter BuildRequires: python2-devel %if 0%{?use_system_libvpx} @@ -229,7 +230,7 @@ Provides: bundled(libwebp) = 0.6.0 %endif # bundled as "libxml" # see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h -#Provides: bundled(libxml2) = 2.9.4 +Provides: bundled(libxml2) = 2.9.4 # see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version Provides: bundled(libxslt) = 1.1.29 Provides: bundled(libXNVCtrl) = 302.17 @@ -568,6 +569,9 @@ done %changelog +* Mon Mar 25 2019 Rex Dieter - 5.12.2-2 +- revert bundled libxml2/libxslt + * Mon Mar 25 2019 Rex Dieter - 5.12.2-1 - 5.12.2 - use system libxml2/libxslt From 5e773a7e82a515dbc0094b8a102ccba13417e5ac Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 22 Apr 2019 11:56:05 -0500 Subject: [PATCH 296/437] 5.12.3 --- .gitignore | 1 + qt5-qtwebengine.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ea7e16c..5fbfc0a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /qtwebengine-everywhere-src-5.11.3-clean.tar.xz /qtwebengine-everywhere-src-5.12.1-clean.tar.xz /qtwebengine-everywhere-src-5.12.2-clean.tar.xz +/qtwebengine-everywhere-src-5.12.3-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a920577..5e99f33 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,8 +46,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.2 -Release: 2%{?dist} +Version: 5.12.3 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -55,7 +55,7 @@ Release: 2%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.12/5.12.2/submodules/qtwebengine-everywhere-src-5.12.2.tar.xz +# wget http://download.qt.io/official_releases/qt/5.12/5.12.3/submodules/qtwebengine-everywhere-src-5.12.3.tar.xz # ./clean_qtwebengine.sh 5.12.2 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above @@ -569,6 +569,9 @@ done %changelog +* Thu Apr 18 2019 Rex Dieter - 5.12.3-1 +- 5.12.3 + * Mon Mar 25 2019 Rex Dieter - 5.12.2-2 - revert bundled libxml2/libxslt diff --git a/sources b/sources index 5cf1218..feaa7df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.12.2-clean.tar.xz) = 96afcc0ea36d4d06da1b64bd67cbc52394653d8c4700f7c166a5a8f2159517d0f9036b90949f97182c4e55603405576c87d200a512ae80931ff0ed502e72db6c +SHA512 (qtwebengine-everywhere-src-5.12.3-clean.tar.xz) = 155a36fd1329d608bd5e95b715b6a301e7f823750e0229e2b4533133f30be129935fbb352230303b0ac9cc6063a8a4c128700a5ecb0be57133bfb4b32f2d0a3a From dded5ef3b796a45a84ad906c6b65e3ef5c1513d2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 12 May 2019 08:50:37 -0500 Subject: [PATCH 297/437] rebuild (icu) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5e99f33..0e12a11 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.3 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -569,6 +569,9 @@ done %changelog +* Sun May 12 2019 Rex Dieter - 5.12.3-2 +- rebuild (icu) + * Thu Apr 18 2019 Rex Dieter - 5.12.3-1 - 5.12.3 From 271668811523d773d68af22ce9c89067443510c4 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 4 Jun 2019 11:54:12 +0200 Subject: [PATCH 298/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0e12a11..19ad01b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.3 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -569,6 +569,9 @@ done %changelog +* Tue Jun 04 2019 Jan Grulich - 5.12.3-3 +- rebuild (qt5) + * Sun May 12 2019 Rex Dieter - 5.12.3-2 - rebuild (icu) From 0a8735c2ce960975f7fdf914eb06db87cae89ab7 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 4 Jun 2019 16:22:45 -0500 Subject: [PATCH 299/437] workaround FTBFS against kernel-headers-5.2.0+ --- qt5-qtwebengine.spec | 3 +++ qtwebengine-SIOCGSTAMP.patch | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 qtwebengine-SIOCGSTAMP.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 19ad01b..5de3210 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -77,6 +77,8 @@ Patch2: qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch # disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch +# workaround FTBFS against kernel-headers-5.2.0+ +Patch4: qtwebengine-SIOCGSTAMP.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # Force verbose output from the GN bootstrap process @@ -343,6 +345,7 @@ BuildArch: noarch %if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif +%patch4 -p1 -b .SIOCGSTAMP ## upstream patches diff --git a/qtwebengine-SIOCGSTAMP.patch b/qtwebengine-SIOCGSTAMP.patch new file mode 100644 index 0000000..7bd0eb4 --- /dev/null +++ b/qtwebengine-SIOCGSTAMP.patch @@ -0,0 +1,11 @@ +diff -up qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.socket qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc +--- qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.socket 2019-04-04 10:55:59.000000000 -0500 ++++ qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc 2019-06-04 16:21:09.120555044 -0500 +@@ -69,6 +69,7 @@ typedef void* SockOptArg; + + #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) + ++#include + int64_t GetSocketRecvTimestamp(int socket) { + struct timeval tv_ioctl; + int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl); From ffd94d200eb444a420544fc4e69cf4ab777d426c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 5 Jun 2019 08:03:36 +0200 Subject: [PATCH 300/437] Define SIOCGSTAMP if not defined --- qtwebengine-SIOCGSTAMP.patch | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/qtwebengine-SIOCGSTAMP.patch b/qtwebengine-SIOCGSTAMP.patch index 7bd0eb4..0b9df9b 100644 --- a/qtwebengine-SIOCGSTAMP.patch +++ b/qtwebengine-SIOCGSTAMP.patch @@ -1,11 +1,16 @@ -diff -up qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.socket qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc ---- qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc.socket 2019-04-04 10:55:59.000000000 -0500 -+++ qtwebengine-everywhere-src-5.12.3/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc 2019-06-04 16:21:09.120555044 -0500 -@@ -69,6 +69,7 @@ typedef void* SockOptArg; - +diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc +index ca7849917..31c5f7697 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc +@@ -69,6 +69,11 @@ typedef void* SockOptArg; + #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) - -+#include + ++// Seems that kernel 5.2.0 renames this define to SIOCGSTAMP_OLD ++#ifndef SIOCGSTAMP ++#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ ++#endif ++ int64_t GetSocketRecvTimestamp(int socket) { struct timeval tv_ioctl; int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl); From 3a228be591ca9058b817437947ae856f9431eca1 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 14 Jun 2019 15:09:04 +0200 Subject: [PATCH 301/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5de3210..73c3ad9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.3 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Tue Jun 11 2019 Jan Grulich - 5.12.3-4 +- rebuild (qt5) + * Tue Jun 04 2019 Jan Grulich - 5.12.3-3 - rebuild (qt5) From 3c2a0609fa49fe0ce8cf677331155de0bdc46230 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 17 Jun 2019 12:25:11 -0500 Subject: [PATCH 302/437] 5.12.4 --- .gitignore | 1 + qt5-qtwebengine.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5fbfc0a..6a1e5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /qtwebengine-everywhere-src-5.12.1-clean.tar.xz /qtwebengine-everywhere-src-5.12.2-clean.tar.xz /qtwebengine-everywhere-src-5.12.3-clean.tar.xz +/qtwebengine-everywhere-src-5.12.4-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 73c3ad9..3843d40 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,8 +46,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.3 -Release: 4%{?dist} +Version: 5.12.4 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -341,7 +341,8 @@ BuildArch: noarch %setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat -%patch2 -p1 -b .fix-extractcflag +## FIXME? no longer applies, relevant code very different now, hopefuly no longer needed -- rex +#patch2 -p1 -b .fix-extractcflag %if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif @@ -572,6 +573,9 @@ done %changelog +* Mon Jun 17 2019 Rex Dieter - 5.12.4-1 +- 5.12.4 + * Tue Jun 11 2019 Jan Grulich - 5.12.3-4 - rebuild (qt5) diff --git a/sources b/sources index feaa7df..c8b47cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.12.3-clean.tar.xz) = 155a36fd1329d608bd5e95b715b6a301e7f823750e0229e2b4533133f30be129935fbb352230303b0ac9cc6063a8a4c128700a5ecb0be57133bfb4b32f2d0a3a +SHA512 (qtwebengine-everywhere-src-5.12.4-clean.tar.xz) = 6ac76ef0fde00763a407363e1ce79d883d827020580c0ec712ae1b2f1262d9daf2a1039c44f271ac4b498acaa9af1c1dcdb7367bcf3a6b97acdc9d8973b3cd18 From 0648d785cad7a1d8c703019f93fb1dd971bcdf6d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 17 Jun 2019 14:35:32 -0500 Subject: [PATCH 303/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3843d40..7f7316d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -573,6 +573,9 @@ done %changelog +* Mon Jun 17 2019 Rex Dieter - 5.12.4-2 +- rebuild (qt5) + * Mon Jun 17 2019 Rex Dieter - 5.12.4-1 - 5.12.4 From 65c9f227b2cda7a607efb28e4930d86e60520fb1 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 18 Jun 2019 08:36:05 +0200 Subject: [PATCH 304/437] Rebase extractcflag patch Not sure if it's needed, it seems to build anyway --- qt5-qtwebengine.spec | 5 ++--- ...gine-opensource-src-5.12.1-fix-extractcflag.patch | 12 ------------ ...gine-opensource-src-5.12.4-fix-extractcflag.patch | 11 +++++++++++ 3 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch create mode 100644 qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7f7316d..684d029 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -73,7 +73,7 @@ Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch Patch1: qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch -Patch2: qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch +Patch2: qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch # disable NEON vector instructions on ARM where the NEON code FTBFS due to # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch @@ -341,8 +341,7 @@ BuildArch: noarch %setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat -## FIXME? no longer applies, relevant code very different now, hopefuly no longer needed -- rex -#patch2 -p1 -b .fix-extractcflag +%patch2 -p1 -b .fix-extractcflag %if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif diff --git a/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch b/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch deleted file mode 100644 index 3f047c2..0000000 --- a/qtwebengine-opensource-src-5.12.1-fix-extractcflag.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf.fix-extractcflag qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf ---- qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf.fix-extractcflag 2019-02-01 09:25:44.950965875 -0600 -+++ qtwebengine-everywhere-src-5.12.1/mkspecs/features/functions.prf 2019-02-01 09:28:39.290041131 -0600 -@@ -11,7 +11,7 @@ defineReplace(getChromiumSrcDir) { - } - - defineReplace(extractCFlag) { -- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS -+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE - OPTION = $$find(CFLAGS, $$1) - OPTION = $$split(OPTION, =) - PARAM = $$member(OPTION, 1) diff --git a/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch b/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch new file mode 100644 index 0000000..fbbf6fc --- /dev/null +++ b/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch @@ -0,0 +1,11 @@ +diff --git a/src/core/config/functions.pri b/src/core/config/functions.pri +index 8c11faa16..191d3d623 100644 +--- a/src/core/config/functions.pri ++++ b/src/core/config/functions.pri +@@ -1,5 +1,5 @@ + defineReplace(qtwebengine_extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + PARAM = $$member(OPTION, 1) From 658f74e8ef507a429fc6d5db27563f38516e7570 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 18 Jun 2019 08:47:46 -0500 Subject: [PATCH 305/437] fix-extractcflag.patch rebased --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 684d029..bac1a4b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Tue Jun 18 2019 Rex Dieter - 5.12.4-3 +- fix-extractcflag.patch rebased + * Mon Jun 17 2019 Rex Dieter - 5.12.4-2 - rebuild (qt5) From 5381faffaa1315547f9587c4a78ab77c7363fb93 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 25 Jun 2019 13:35:41 -0500 Subject: [PATCH 306/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bac1a4b..1cf7b6b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -572,6 +572,9 @@ done %changelog +* Tue Jun 25 2019 Rex Dieter - 5.12.4-4 +- rebuild (qt5) + * Tue Jun 18 2019 Rex Dieter - 5.12.4-3 - fix-extractcflag.patch rebased From 7b4cf50c2b0e9326158af1cf7709eee95854ed16 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 26 Jun 2019 11:55:29 -0500 Subject: [PATCH 307/437] pull in some upstream fixes --- ...uld_override_user_agent_in_new_tabs_.patch | 34 +++++++++++++++++++ 0002-Bump-V8-patch-level.patch | 30 ++++++++++++++++ ...-segfaults-with-arm-32bit-on-metrics.patch | 31 +++++++++++++++++ qt5-qtwebengine.spec | 18 +++++++++- 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch create mode 100644 0002-Bump-V8-patch-level.patch create mode 100644 0003-Fix-segfaults-with-arm-32bit-on-metrics.patch diff --git a/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch b/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch new file mode 100644 index 0000000..92b8a73 --- /dev/null +++ b/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch @@ -0,0 +1,34 @@ +From e8eec84aac0dc626770a483d503f7b16ab0dbe70 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Fri, 7 Jun 2019 14:18:23 +0200 +Subject: [PATCH 1/3] Fix changing should_override_user_agent_in_new_tabs_ + +It wouldn't be updated if the custom user-agent didn't change. + +Change-Id: Ic31ef485e2cb84903f9b48cb9ad5f9f1a723eb92 +Reviewed-by: Michal Klocek +--- + chromium/content/browser/web_contents/web_contents_impl.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc +index a2659263737..4c127f835d6 100644 +--- a/chromium/content/browser/web_contents/web_contents_impl.cc ++++ b/chromium/content/browser/web_contents/web_contents_impl.cc +@@ -1230,11 +1230,11 @@ WebUI* WebContentsImpl::GetCommittedWebUI() const { + + void WebContentsImpl::SetUserAgentOverride(const std::string& override, + bool override_in_new_tabs) { ++ should_override_user_agent_in_new_tabs_ = override_in_new_tabs; ++ + if (GetUserAgentOverride() == override) + return; + +- should_override_user_agent_in_new_tabs_ = override_in_new_tabs; +- + renderer_preferences_.user_agent_override = override; + + // Send the new override string to the renderer. +-- +2.21.0 + diff --git a/0002-Bump-V8-patch-level.patch b/0002-Bump-V8-patch-level.patch new file mode 100644 index 0000000..768c923 --- /dev/null +++ b/0002-Bump-V8-patch-level.patch @@ -0,0 +1,30 @@ +From 6f3c15d2319ca11c2e31076292f5733baf64d991 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Tue, 18 Jun 2019 10:29:48 +0200 +Subject: [PATCH 2/3] Bump V8 patch level + +Otherwise it might use outdated script caches. + +Change-Id: I839c6a11c3e1991f232972ad2d87fe6318256307 +Fixes: QTBUG-72532 +Reviewed-by: Michal Klocek +--- + chromium/v8/include/v8-version.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h +index 3e703039517..8dacc30c340 100644 +--- a/chromium/v8/include/v8-version.h ++++ b/chromium/v8/include/v8-version.h +@@ -11,7 +11,7 @@ + #define V8_MAJOR_VERSION 6 + #define V8_MINOR_VERSION 9 + #define V8_BUILD_NUMBER 427 +-#define V8_PATCH_LEVEL 31 ++#define V8_PATCH_LEVEL 32 + + // Use 1 for candidates and 0 otherwise. + // (Boolean macro values are not supported by all preprocessors.) +-- +2.21.0 + diff --git a/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch b/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch new file mode 100644 index 0000000..793efb2 --- /dev/null +++ b/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch @@ -0,0 +1,31 @@ +From 2323dc924a3b107647f9e5f0bdbcfc44b9713195 Mon Sep 17 00:00:00 2001 +From: Michal Klocek +Date: Thu, 20 Jun 2019 09:09:53 +0200 +Subject: [PATCH 3/3] Fix segfaults with arm 32bit on metrics + +Gcc 6 seems to misscompile pair's template constructor +in std::map emplace, use converting move constructor instead. + +Fixes: QTBUG-75097 +Change-Id: Ia50dc9eadb58f713432c0228a4a5aed73b275f32 +Reviewed-by: Allan Sandfeld Jensen +--- + chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc b/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc +index 6685a5816db..5c5380e007e 100644 +--- a/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc ++++ b/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc +@@ -23,7 +23,7 @@ UkmEntryBuilderBase::~UkmEntryBuilderBase() = default; + + void UkmEntryBuilderBase::SetMetricInternal(uint64_t metric_hash, + int64_t value) { +- entry_->metrics.emplace(metric_hash, value); ++ entry_->metrics.emplace(std::make_pair(metric_hash, value)); + } + + void UkmEntryBuilderBase::Record(UkmRecorder* recorder) { +-- +2.21.0 + diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1cf7b6b..ffd0dfd 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -64,6 +64,7 @@ Source2: clean_ffmpeg.sh Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine + # some tweaks to linux.pri (system yasm, link libpci, run unbundling script) Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the @@ -85,7 +86,12 @@ Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch + ## Upstream patches: +# qtwebengine-chromium +Patch101: 0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch +Patch102: 0002-Bump-V8-patch-level.patch +Patch103: 0003-Fix-segfaults-with-arm-32bit-on-metrics.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -339,6 +345,13 @@ BuildArch: noarch %prep %setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} + +pushd src/3rdparty/chromium +%patch101 -p2 -b .0001 +%patch102 -p2 -b .0002 +%patch103 -p2 -b .0003 +popd + %patch0 -p1 -b .linux-pri %patch1 -p1 -b .no-icudtl-dat %patch2 -p1 -b .fix-extractcflag @@ -572,6 +585,9 @@ done %changelog +* Wed Jun 26 2019 Rex Dieter - 5.12.4-5 +- pull in some upstream fixes + * Tue Jun 25 2019 Rex Dieter - 5.12.4-4 - rebuild (qt5) From f1ad736e1e3b069910cee62764b68a2136972d33 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 17:52:49 +0000 Subject: [PATCH 308/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ffd0dfd..39ccd72 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -585,6 +585,9 @@ done %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 5.12.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Jun 26 2019 Rex Dieter - 5.12.4-5 - pull in some upstream fixes From 699cae7fdb21d39cb6f3bac6754e74f5947386bf Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 7 Aug 2019 13:11:07 -0500 Subject: [PATCH 309/437] rebuild (re2, #1672014#c10) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 39ccd72..e043191 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -585,6 +585,9 @@ done %changelog +* Wed Aug 07 2019 Rex Dieter - 5.12.4-7 +- rebuild (re2, #1672014#c10) + * Fri Jul 26 2019 Fedora Release Engineering - 5.12.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 4be2cf030b67b001b3fc7b733723ea12143f5c2a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 9 Aug 2019 14:02:09 -0500 Subject: [PATCH 310/437] build using bundled pulse headers, workaround FTBFS bug #1729806 --- .gitignore | 1 + qt5-qtwebengine.spec | 8 +++++++- sources | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6a1e5fa..1ceb264 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /qtwebengine-everywhere-src-5.12.2-clean.tar.xz /qtwebengine-everywhere-src-5.12.3-clean.tar.xz /qtwebengine-everywhere-src-5.12.4-clean.tar.xz +/pulseaudio-12.2-headers.tar.gz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e043191..2d5c817 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -65,6 +65,9 @@ Source3: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine +# pulseaudio headers +Source20: pulseaudio-12.2-headers.tar.gz + # some tweaks to linux.pri (system yasm, link libpci, run unbundling script) Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the @@ -344,7 +347,9 @@ BuildArch: noarch %prep -%setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} +%setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} -a20 + +mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium %patch101 -p2 -b .0001 @@ -587,6 +592,7 @@ done %changelog * Wed Aug 07 2019 Rex Dieter - 5.12.4-7 - rebuild (re2, #1672014#c10) +- build using bundled pulse headers, workaround FTBFS bug #1729806 * Fri Jul 26 2019 Fedora Release Engineering - 5.12.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index c8b47cf..39eb9c0 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (qtwebengine-everywhere-src-5.12.4-clean.tar.xz) = 6ac76ef0fde00763a407363e1ce79d883d827020580c0ec712ae1b2f1262d9daf2a1039c44f271ac4b498acaa9af1c1dcdb7367bcf3a6b97acdc9d8973b3cd18 +SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be From d26d4f2572e5db0b5462d8cb5feba2221d420f10 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 12 Aug 2019 10:51:10 -0500 Subject: [PATCH 311/437] CONFIG+=link_pulseaudio --- qt5-qtwebengine.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2d5c817..57abaa2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -425,7 +425,8 @@ export NINJAFLAGS="%{__ninja_common_opts}" export NINJA_PATH=%{__ninja} %{qmake_qt5} \ - CONFIG+="%{debug_config}" \ + %{?debug_config:CONFIG+="%{debug_config}}" \ + CONFIG+="link_pulseaudio" \ QMAKE_EXTRA_ARGS+="-system-webengine-icu" \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ . @@ -590,6 +591,9 @@ done %changelog +* Mon Aug 12 2019 Rex Dieter - 5.12.4-8 +- CONFIG+=link_pulseaudio + * Wed Aug 07 2019 Rex Dieter - 5.12.4-7 - rebuild (re2, #1672014#c10) - build using bundled pulse headers, workaround FTBFS bug #1729806 From e328399f3c5a22587464b6314bfc58e320147b88 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 14 Aug 2019 11:01:03 -0500 Subject: [PATCH 312/437] rebuild (re2) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 57abaa2..e3ff163 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 8%{?dist} +Release: 9%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -591,6 +591,9 @@ done %changelog +* Wed Aug 14 2019 Rex Dieter - 5.12.4-9 +- rebuild (re2) + * Mon Aug 12 2019 Rex Dieter - 5.12.4-8 - CONFIG+=link_pulseaudio From c7d8f26d987cfc2f1ab86908cf456693d1192e2f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 21 Aug 2019 10:45:09 -0500 Subject: [PATCH 313/437] document fesco exception to allow python2 use --- qt5-qtwebengine.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e3ff163..3c0af25 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -173,6 +173,8 @@ BuildRequires: pkgconfig(lcms2) ## https://bugreports.qt.io/browse/QTBUG-59094 #BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) BuildRequires: perl-interpreter +# fesco exception to allow python2 use: https://pagure.io/fesco/issue/2208 +# per https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions BuildRequires: python2-devel %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 From 2f1aa8a27c0d77b0ce5b3ce95417088eeba3c171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 26 Aug 2019 14:11:17 +0200 Subject: [PATCH 314/437] Adjust Python 2 BuildRequires to make it work both before and after python2 retirement --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3c0af25..2b90052 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -175,7 +175,8 @@ BuildRequires: pkgconfig(lcms2) BuildRequires: perl-interpreter # fesco exception to allow python2 use: https://pagure.io/fesco/issue/2208 # per https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions -BuildRequires: python2-devel +# Only the interpreter is needed +BuildRequires: %{__python2} %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif From 167ab2f1d8bd7faee2446217a3808d10d7ed6305 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 24 Sep 2019 21:07:15 +0200 Subject: [PATCH 315/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2b90052..36a1666 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.4 -Release: 9%{?dist} +Release: 10%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -594,6 +594,9 @@ done %changelog +* Tue Sep 24 2019 Jan Grulich - 5.12.4-10 +- rebuild (qt5) + * Wed Aug 14 2019 Rex Dieter - 5.12.4-9 - rebuild (re2) From 910879a0882e4f13e121d91128bc34ee36c46e85 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 25 Sep 2019 06:51:27 +0200 Subject: [PATCH 316/437] Fix build --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 36a1666..3760476 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -469,7 +469,7 @@ popd ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt5_libdir} -for prl_file in libQt5*.prl ; do +for prl_file in *Qt5*.prl ; do sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} if [ -f "$(basename ${prl_file} .prl).so" ]; then rm -fv "$(basename ${prl_file} .prl).la" From daf33315266f698ac82f0bd5b79659d9c720b9dc Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 25 Sep 2019 11:16:54 +0200 Subject: [PATCH 317/437] Fix build++ --- qt5-qtwebengine.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3760476..363f7d3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -469,7 +469,7 @@ popd ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt5_libdir} -for prl_file in *Qt5*.prl ; do +for prl_file in libQt5*.prl ; do sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} if [ -f "$(basename ${prl_file} .prl).so" ]; then rm -fv "$(basename ${prl_file} .prl).la" @@ -577,6 +577,7 @@ done %{_qt5_headerdir}/Qt*/ %{_qt5_libdir}/libQt5*.so %{_qt5_libdir}/libQt5*.prl +%{_qt5_libdir}/Qt5WebEngineCore.la %{_qt5_libdir}/cmake/Qt5*/ %{_qt5_libdir}/pkgconfig/Qt5*.pc %{_qt5_archdatadir}/mkspecs/modules/*.pri From 7a09077c55ed43a39369c217d8b5f9814a128296 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 26 Sep 2019 15:07:11 -0500 Subject: [PATCH 318/437] 5.12.5 --- .gitignore | 1 + ...uld_override_user_agent_in_new_tabs_.patch | 34 ------------------ 0002-Bump-V8-patch-level.patch | 30 ---------------- ...-segfaults-with-arm-32bit-on-metrics.patch | 31 ---------------- ...compilation-of-simplebrowser-example.patch | 35 ------------------- get_free_ffmpeg_source_files.py | 2 +- qt5-qtwebengine.spec | 17 ++++----- sources | 2 +- 8 files changed, 10 insertions(+), 142 deletions(-) delete mode 100644 0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch delete mode 100644 0002-Bump-V8-patch-level.patch delete mode 100644 0003-Fix-segfaults-with-arm-32bit-on-metrics.patch delete mode 100644 0027-Fix-compilation-of-simplebrowser-example.patch diff --git a/.gitignore b/.gitignore index 1ceb264..cdfb6c3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /qtwebengine-everywhere-src-5.12.3-clean.tar.xz /qtwebengine-everywhere-src-5.12.4-clean.tar.xz /pulseaudio-12.2-headers.tar.gz +/qtwebengine-everywhere-src-5.12.5-clean.tar.xz diff --git a/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch b/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch deleted file mode 100644 index 92b8a73..0000000 --- a/0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e8eec84aac0dc626770a483d503f7b16ab0dbe70 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Fri, 7 Jun 2019 14:18:23 +0200 -Subject: [PATCH 1/3] Fix changing should_override_user_agent_in_new_tabs_ - -It wouldn't be updated if the custom user-agent didn't change. - -Change-Id: Ic31ef485e2cb84903f9b48cb9ad5f9f1a723eb92 -Reviewed-by: Michal Klocek ---- - chromium/content/browser/web_contents/web_contents_impl.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc -index a2659263737..4c127f835d6 100644 ---- a/chromium/content/browser/web_contents/web_contents_impl.cc -+++ b/chromium/content/browser/web_contents/web_contents_impl.cc -@@ -1230,11 +1230,11 @@ WebUI* WebContentsImpl::GetCommittedWebUI() const { - - void WebContentsImpl::SetUserAgentOverride(const std::string& override, - bool override_in_new_tabs) { -+ should_override_user_agent_in_new_tabs_ = override_in_new_tabs; -+ - if (GetUserAgentOverride() == override) - return; - -- should_override_user_agent_in_new_tabs_ = override_in_new_tabs; -- - renderer_preferences_.user_agent_override = override; - - // Send the new override string to the renderer. --- -2.21.0 - diff --git a/0002-Bump-V8-patch-level.patch b/0002-Bump-V8-patch-level.patch deleted file mode 100644 index 768c923..0000000 --- a/0002-Bump-V8-patch-level.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6f3c15d2319ca11c2e31076292f5733baf64d991 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Tue, 18 Jun 2019 10:29:48 +0200 -Subject: [PATCH 2/3] Bump V8 patch level - -Otherwise it might use outdated script caches. - -Change-Id: I839c6a11c3e1991f232972ad2d87fe6318256307 -Fixes: QTBUG-72532 -Reviewed-by: Michal Klocek ---- - chromium/v8/include/v8-version.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h -index 3e703039517..8dacc30c340 100644 ---- a/chromium/v8/include/v8-version.h -+++ b/chromium/v8/include/v8-version.h -@@ -11,7 +11,7 @@ - #define V8_MAJOR_VERSION 6 - #define V8_MINOR_VERSION 9 - #define V8_BUILD_NUMBER 427 --#define V8_PATCH_LEVEL 31 -+#define V8_PATCH_LEVEL 32 - - // Use 1 for candidates and 0 otherwise. - // (Boolean macro values are not supported by all preprocessors.) --- -2.21.0 - diff --git a/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch b/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch deleted file mode 100644 index 793efb2..0000000 --- a/0003-Fix-segfaults-with-arm-32bit-on-metrics.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2323dc924a3b107647f9e5f0bdbcfc44b9713195 Mon Sep 17 00:00:00 2001 -From: Michal Klocek -Date: Thu, 20 Jun 2019 09:09:53 +0200 -Subject: [PATCH 3/3] Fix segfaults with arm 32bit on metrics - -Gcc 6 seems to misscompile pair's template constructor -in std::map emplace, use converting move constructor instead. - -Fixes: QTBUG-75097 -Change-Id: Ia50dc9eadb58f713432c0228a4a5aed73b275f32 -Reviewed-by: Allan Sandfeld Jensen ---- - chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc b/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc -index 6685a5816db..5c5380e007e 100644 ---- a/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc -+++ b/chromium/services/metrics/public/cpp/ukm_entry_builder_base.cc -@@ -23,7 +23,7 @@ UkmEntryBuilderBase::~UkmEntryBuilderBase() = default; - - void UkmEntryBuilderBase::SetMetricInternal(uint64_t metric_hash, - int64_t value) { -- entry_->metrics.emplace(metric_hash, value); -+ entry_->metrics.emplace(std::make_pair(metric_hash, value)); - } - - void UkmEntryBuilderBase::Record(UkmRecorder* recorder) { --- -2.21.0 - diff --git a/0027-Fix-compilation-of-simplebrowser-example.patch b/0027-Fix-compilation-of-simplebrowser-example.patch deleted file mode 100644 index e6c895f..0000000 --- a/0027-Fix-compilation-of-simplebrowser-example.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c041711febbee334ce5369f25cfae3f560819855 Mon Sep 17 00:00:00 2001 -From: Kai Koehne -Date: Tue, 16 Jan 2018 14:09:50 +0100 -Subject: [PATCH 027/230] Fix compilation of simplebrowser example -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Previously qstyle.h was included indirectly through the uic -generated code, but this got changed in qtbase -commit 058474884c2505a8a0. - -Task-number: QTBUG-65793 -Change-Id: I56a1cd045d53b268999d728f6907ee8d952ba6e9 -Reviewed-by: Jüri Valdmann -Reviewed-by: Michal Klocek ---- - examples/webenginewidgets/simplebrowser/webpage.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/examples/webenginewidgets/simplebrowser/webpage.cpp b/examples/webenginewidgets/simplebrowser/webpage.cpp -index 3b78b861..90395641 100644 ---- a/examples/webenginewidgets/simplebrowser/webpage.cpp -+++ b/examples/webenginewidgets/simplebrowser/webpage.cpp -@@ -56,6 +56,7 @@ - #include "webview.h" - #include - #include -+#include - - WebPage::WebPage(QWebEngineProfile *profile, QObject *parent) - : QWebEnginePage(profile, parent) --- -2.17.0 - diff --git a/get_free_ffmpeg_source_files.py b/get_free_ffmpeg_source_files.py index 76c73ae..899e774 100755 --- a/get_free_ffmpeg_source_files.py +++ b/get_free_ffmpeg_source_files.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2015 Tomas Popela # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 363f7d3..1d4e7dd 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,8 +46,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.4 -Release: 10%{?dist} +Version: 5.12.5 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -55,8 +55,8 @@ Release: 10%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.12/5.12.3/submodules/qtwebengine-everywhere-src-5.12.3.tar.xz -# ./clean_qtwebengine.sh 5.12.2 +# wget http://download.qt.io/official_releases/qt/5.12/5.12.5/submodules/qtwebengine-everywhere-src-5.12.5.tar.xz +# ./clean_qtwebengine.sh 5.12.5 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -92,9 +92,6 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch ## Upstream patches: # qtwebengine-chromium -Patch101: 0001-Fix-changing-should_override_user_agent_in_new_tabs_.patch -Patch102: 0002-Bump-V8-patch-level.patch -Patch103: 0003-Fix-segfaults-with-arm-32bit-on-metrics.patch # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} @@ -355,9 +352,6 @@ BuildArch: noarch mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium -%patch101 -p2 -b .0001 -%patch102 -p2 -b .0002 -%patch103 -p2 -b .0003 popd %patch0 -p1 -b .linux-pri @@ -595,6 +589,9 @@ done %changelog +* Thu Sep 26 2019 Rex Dieter - 5.12.5-1 +- 5.12.5 + * Tue Sep 24 2019 Jan Grulich - 5.12.4-10 - rebuild (qt5) diff --git a/sources b/sources index 39eb9c0..0c2c194 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qtwebengine-everywhere-src-5.12.4-clean.tar.xz) = 6ac76ef0fde00763a407363e1ce79d883d827020580c0ec712ae1b2f1262d9daf2a1039c44f271ac4b498acaa9af1c1dcdb7367bcf3a6b97acdc9d8973b3cd18 SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be +SHA512 (qtwebengine-everywhere-src-5.12.5-clean.tar.xz) = 62b88f5710a16e8e5770d6a38f24f3f4355a1d7559f8a80906bc5d3b3214a8cb0600943a78770bc625f8a8b2e35a338c45325035f6bced259b39edba5f96f7b6 From 05a52d121d49972989aea8127e22e25f0292333c Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 2 Oct 2019 17:54:44 +0200 Subject: [PATCH 319/437] Fix build on F29. %{__python2} is not defined out of the box on F29. --- qt5-qtwebengine.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1d4e7dd..560bd54 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -173,7 +173,12 @@ BuildRequires: perl-interpreter # fesco exception to allow python2 use: https://pagure.io/fesco/issue/2208 # per https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions # Only the interpreter is needed +%if 0%{?fedora} > 29 || 0%{?rhel} > 8 BuildRequires: %{__python2} +%else +BuildRequires: python2 +BuildRequires: python2-rpm-macros +%endif %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.7.0 %endif From 7ac0c5530a8b559e98884da2e075e4421a1fe0ee Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 2 Oct 2019 13:52:43 -0500 Subject: [PATCH 320/437] explicitly omit QtWebEngineCore.la from packaging --- qt5-qtwebengine.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 560bd54..fe3fb85 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.12.5 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -475,6 +475,8 @@ for prl_file in libQt5*.prl ; do sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} fi done +# explicitly omit, at least until there's a real library installed associated with it -- rex +rm -fv Qt5WebEngineCore.la popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} @@ -576,7 +578,7 @@ done %{_qt5_headerdir}/Qt*/ %{_qt5_libdir}/libQt5*.so %{_qt5_libdir}/libQt5*.prl -%{_qt5_libdir}/Qt5WebEngineCore.la +#{_qt5_libdir}/Qt5WebEngineCore.la %{_qt5_libdir}/cmake/Qt5*/ %{_qt5_libdir}/pkgconfig/Qt5*.pc %{_qt5_archdatadir}/mkspecs/modules/*.pri @@ -594,6 +596,9 @@ done %changelog +* Wed Oct 02 2019 Rex Dieter - 5.12.5-2 +- explicitly omit QtWebEngineCore.la from packaging + * Thu Sep 26 2019 Rex Dieter - 5.12.5-1 - 5.12.5 From b8567790e7cfb3acb7b91969bc5977c92e8cbb88 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 2 Dec 2019 15:04:33 -0600 Subject: [PATCH 321/437] explicitly omit QtWebEngineCore.la from packaging --- .gitignore | 1 + qt5-qtwebengine.spec | 8 ++++---- sources | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index cdfb6c3..4a38d62 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /qtwebengine-everywhere-src-5.12.4-clean.tar.xz /pulseaudio-12.2-headers.tar.gz /qtwebengine-everywhere-src-5.12.5-clean.tar.xz +/qtwebengine-everywhere-src-5.12.6-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fe3fb85..268e310 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,8 +46,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.5 -Release: 2%{?dist} +Version: 5.12.6 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -55,8 +55,8 @@ Release: 2%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.12/5.12.5/submodules/qtwebengine-everywhere-src-5.12.5.tar.xz -# ./clean_qtwebengine.sh 5.12.5 +# wget http://download.qt.io/official_releases/qt/5.12/5.12.6/submodules/qtwebengine-everywhere-src-5.12.6.tar.xz +# ./clean_qtwebengine.sh 5.12.6 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh diff --git a/sources b/sources index 0c2c194..252c82d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.12.5-clean.tar.xz) = 62b88f5710a16e8e5770d6a38f24f3f4355a1d7559f8a80906bc5d3b3214a8cb0600943a78770bc625f8a8b2e35a338c45325035f6bced259b39edba5f96f7b6 +SHA512 (qtwebengine-everywhere-src-5.12.6-clean.tar.xz) = 1f4cc91870b669b373064070f0e8802235213e15f3e474f21bf291d3103212518486183d68ef64cf1736cfe40688f8b667da2e26781f8b75239cb8ee172ae928 From b992294189c7666a37d913bfcea319fed9706813 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 2 Dec 2019 15:05:02 -0600 Subject: [PATCH 322/437] +changelog --- qt5-qtwebengine.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 268e310..be2cf94 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -596,6 +596,9 @@ done %changelog +* Mon Dec 02 2019 Rex Dieter - 5.12.6-1 +- 5.12.6 + * Wed Oct 02 2019 Rex Dieter - 5.12.5-2 - explicitly omit QtWebEngineCore.la from packaging From be1aee452412c07d14da83e27774cce7508af6ac Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 9 Dec 2019 21:30:35 +0100 Subject: [PATCH 323/437] 5.13.2 --- .gitignore | 1 + qt5-qtwebengine.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4a38d62..0b1a746 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pulseaudio-12.2-headers.tar.gz /qtwebengine-everywhere-src-5.12.5-clean.tar.xz /qtwebengine-everywhere-src-5.12.6-clean.tar.xz +/qtwebengine-everywhere-src-5.13.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index be2cf94..96818f8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -46,7 +46,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.12.6 +Version: 5.13.2 Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details @@ -596,6 +596,9 @@ done %changelog +* Mon Dec 09 2019 Jan Grulich - 5.13.2-1 +- 5.13.2 + * Mon Dec 02 2019 Rex Dieter - 5.12.6-1 - 5.12.6 diff --git a/sources b/sources index 252c82d..2edbcea 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +SHA512 (qtwebengine-everywhere-src-5.13.2-clean.tar.xz) = 1797f1e67ac02e3f8277698cc308bdf6ebffcf646c89121d12353a42a9b6392f2180bfe3e5d051d1a5e205ece182c183a3914376c547e6239a71f2c64f2fe775 SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.12.6-clean.tar.xz) = 1f4cc91870b669b373064070f0e8802235213e15f3e474f21bf291d3103212518486183d68ef64cf1736cfe40688f8b667da2e26781f8b75239cb8ee172ae928 From 66fb45507473ab9fd692265410087e1738a32ec4 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 9 Dec 2019 21:51:23 +0100 Subject: [PATCH 324/437] Rebase patches --- qtwebengine-SIOCGSTAMP.patch | 14 +++++----- ...-everywhere-src-5.11.0-no-icudtl-dat.patch | 26 ++++++++++--------- ...here-src-5.12.0-gn-bootstrap-verbose.patch | 17 ++++++------ ...bengine-opensource-src-5.9.0-no-neon.patch | 9 ++++--- ...opensource-src-5.9.0-openmax-dl-neon.patch | 25 +++++++++++------- 5 files changed, 50 insertions(+), 41 deletions(-) diff --git a/qtwebengine-SIOCGSTAMP.patch b/qtwebengine-SIOCGSTAMP.patch index 0b9df9b..7609f85 100644 --- a/qtwebengine-SIOCGSTAMP.patch +++ b/qtwebengine-SIOCGSTAMP.patch @@ -1,11 +1,11 @@ -diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc -index ca7849917..31c5f7697 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc -+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physicalsocketserver.cc -@@ -69,6 +69,11 @@ typedef void* SockOptArg; - +diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +index c38d7fdfa..0a8b0fd8b 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc ++++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +@@ -72,6 +72,11 @@ typedef void* SockOptArg; + #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) - + +// Seems that kernel 5.2.0 renames this define to SIOCGSTAMP_OLD +#ifndef SIOCGSTAMP +#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ diff --git a/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch index 59da86e..e035dff 100644 --- a/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch +++ b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch @@ -1,9 +1,10 @@ -diff -up qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp ---- qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat 2018-06-14 09:23:48.931195271 -0500 -+++ qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp 2018-06-14 09:27:26.248014325 -0500 -@@ -258,28 +258,12 @@ QString dictionariesPath() +diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp +index 1c8316430..a1c27d28f 100644 +--- a/src/core/web_engine_library_info.cpp ++++ b/src/core/web_engine_library_info.cpp +@@ -259,29 +259,12 @@ QString dictionariesPath() - QString icuDataPath() + QString resourcesDataPath() { - static bool initialized = false; static QString potentialResourcesPath = @@ -14,19 +15,20 @@ diff -up qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp. #endif - if (!initialized) { - initialized = true; -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { -- qWarning("Qt WebEngine ICU data not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); - potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath); - } -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { -- qWarning("Qt WebEngine ICU data not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); - potentialResourcesPath = QCoreApplication::applicationDirPath(); - } -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) { -- qWarning("Qt WebEngine ICU data not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath)); +- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { +- qWarning("Qt WebEngine resources not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath)); - potentialResourcesPath = fallbackDir(); - } - } - +- return potentialResourcesPath; } + } // namespace diff --git a/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch index 9d4cadb..ef1012f 100644 --- a/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch +++ b/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch @@ -1,12 +1,13 @@ -diff -up qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro.gn-bootstrap-verbose qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro ---- qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro.gn-bootstrap-verbose 2018-12-07 09:53:18.262171677 -0600 -+++ qtwebengine-everywhere-src-5.12.0/src/buildtools/gn.pro 2018-12-07 09:57:53.246646133 -0600 +diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro +index b6bf9cfc4..30f92e6ac 100644 +--- a/src/buildtools/gn.pro ++++ b/src/buildtools/gn.pro @@ -18,7 +18,7 @@ build_pass|!debug_and_release { src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") gn_bootstrap = $$system_path($$absolute_path(gn/build/gen.py, $$src_3rd_party_dir)) -- gn_configure = $$system_quote($$gn_bootstrap) --no-last-commit-position --out-path $$out_path -+ gn_configure = $$system_quote($$gn_bootstrap) --verbose --no-last-commit-position --out-path $$out_path - !system("$$pythonPathForSystem() $$gn_configure") { - error("GN generation error!") - } +- gn_gen_args = --no-last-commit-position --out-path $$out_path \ ++ gn_gen_args = --no-last-commit-position --verbose --out-path $$out_path \ + --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" \ + --ld \"$$which($$QMAKE_LINK)\" + diff --git a/qtwebengine-opensource-src-5.9.0-no-neon.patch b/qtwebengine-opensource-src-5.9.0-no-neon.patch index 0fc7395..dd24ee2 100644 --- a/qtwebengine-opensource-src-5.9.0-no-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-no-neon.patch @@ -1,7 +1,8 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-no-neon/src/core/config/linux.pri ---- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-no-neon/src/core/config/linux.pri 2017-06-08 00:55:22.257781563 +0200 -@@ -70,7 +70,9 @@ +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +index f45c418fe..f6c7b714e 100644 +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -87,7 +87,9 @@ contains(QT_ARCH, "arm") { gn_args += arm_use_neon=false # If the toolchain does not explicitly specify to use NEON instructions # we use arm_neon_optional for ARMv7 diff --git a/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch index fd11fae..09803b2 100644 --- a/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch @@ -1,19 +1,24 @@ -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-06-10 02:41:10.317340598 +0200 -@@ -196,9 +196,6 @@ +diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn b/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn +index 96a59c7c7..d5470f284 100644 +--- a/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn +@@ -208,12 +208,6 @@ if (current_cpu == "arm") { ] if (arm_optionally_use_neon) { # Run-time NEON detection. -- deps = [ "//third_party/android_tools:cpu_features" ] +- deps = [ +- "//third_party/android_tools:cpu_features", +- ] +- - # To get the __android_log_print routine - libs = [ "log" ] + # Detection routine sources += [ "sp/src/arm/detect.c" ] - } -diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c ---- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-05-18 16:51:44.000000000 +0200 -+++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-06-10 02:38:30.593809570 +0200 +diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +index 57bfe4089..94a3f7ddc 100644 +--- a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c ++++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c @@ -9,13 +9,57 @@ * */ @@ -76,7 +81,7 @@ diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/open } static void SetFFTRoutines() { -@@ -24,13 +68,9 @@ +@@ -24,13 +68,9 @@ static void SetFFTRoutines() { * forward and inverse FFTs */ if (omxSP_HasArmNeon()) { From 8662bd6fa6356f3aefbf1f80e19a48e0cfa951e2 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 10 Dec 2019 07:32:14 +0100 Subject: [PATCH 325/437] Fix build --- qt5-qtwebengine.spec | 3 +++ ...erywhere-5.13.2-missing-semicolon-in-blink.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 96818f8..72314e3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -89,6 +89,8 @@ Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch +# Fix missing semicolon in Blink +Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch ## Upstream patches: # qtwebengine-chromium @@ -373,6 +375,7 @@ popd ## NEEDSWORK #patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat +%patch25 -p1 -b .missing-semicolon-in-blink # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases diff --git a/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch b/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch new file mode 100644 index 0000000..55251d7 --- /dev/null +++ b/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc +index 18100c7b7..542f9bd11 100644 +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc +@@ -5710,7 +5710,7 @@ static ParseQualifiedNameResult ParseQualifiedNameInternal( + + for (unsigned i = 0; i < length;) { + UChar32 c; +- U16_NEXT(characters, i, length, c) ++ U16_NEXT(characters, i, length, c); + if (c == ':') { + if (saw_colon) + return ParseQualifiedNameResult(kQNMultipleColons); From c3c921f3286f80d7e287fd930f0f46b4963ea373 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 10 Dec 2019 12:50:53 +0100 Subject: [PATCH 326/437] Use python2 --- qt5-qtwebengine.spec | 3 +++ qtwebengine-everywhere-5.13.2-use-python2.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 qtwebengine-everywhere-5.13.2-use-python2.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 72314e3..981b505 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -91,6 +91,8 @@ Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Fix missing semicolon in Blink Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch +# Use Python2 +Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch ## Upstream patches: # qtwebengine-chromium @@ -376,6 +378,7 @@ popd #patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat %patch25 -p1 -b .missing-semicolon-in-blink +%patch26 -p1 -b .use-python2 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases diff --git a/qtwebengine-everywhere-5.13.2-use-python2.patch b/qtwebengine-everywhere-5.13.2-use-python2.patch new file mode 100644 index 0000000..91a17ae --- /dev/null +++ b/qtwebengine-everywhere-5.13.2-use-python2.patch @@ -0,0 +1,13 @@ +diff --git a/src/webengine/module.pro b/src/webengine/module.pro +index 49a1086b2..afc89d49e 100644 +--- a/src/webengine/module.pro ++++ b/src/webengine/module.pro +@@ -76,7 +76,7 @@ qtConfig(webengine-testsupport) { + python = $$pythonPathForShell() + chromium_attributions.commands = \ + cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \ +- $$python chromium/tools/licenses.py \ ++ python2 chromium/tools/licenses.py \ + --file-template ../../tools/about_credits.tmpl \ + --entry-template ../../tools/about_credits_entry.tmpl credits \ + $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc)) From 32de271bb597c05cda4d34cb0132a9f9dece36b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 8 Jan 2020 11:29:56 +0100 Subject: [PATCH 327/437] keep ppc files in ffmpeg --- clean_ffmpeg.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index ab775a4..f7b5446 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -46,6 +46,12 @@ header_files=" libavutil/x86/asm.h \ libavutil/arm/intmath.h \ libavutil/arm/intreadwrite.h \ libavutil/arm/timer.h \ + libavutil/ppc/cpu.h \ + libavutil/ppc/float_dsp_altivec.h \ + libavutil/ppc/float_dsp_vsx.h \ + libavutil/ppc/intreadwrite.h \ + libavutil/ppc/timer.h \ + libavutil/ppc/util_altivec.h \ libavutil/aes_internal.h \ libavutil/atomic.h \ libavutil/atomic_gcc.h \ @@ -99,6 +105,9 @@ header_files=" libavutil/x86/asm.h \ libavcodec/arm/vp56_arith.h \ libavcodec/arm/vp8.h \ libavcodec/arm/vp8dsp.h \ + libavcodec/ppc/fft_vsx.h \ + libavcodec/ppc/hpeldsp_altivec.h \ + libavcodec/ppc/mathops.h \ libavcodec/aac_ac3_parser.h \ libavcodec/ac3_parser_internal.h \ libavcodec/ac3.h \ @@ -270,6 +279,19 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/arm/vorbisdsp_neon.S \ libavcodec/arm/mdct_neon.S \ libavcodec/arm/fft_neon.S \ + libavutil/ppc/cpu.c \ + libavutil/ppc/float_dsp_altivec.c \ + libavutil/ppc/float_dsp_init.c \ + libavutil/ppc/float_dsp_vsx.c \ + libavcodec/ppc/fft_altivec.S \ + libavcodec/ppc/fft_init.c \ + libavcodec/ppc/fft_vsx.c \ + libavcodec/ppc/hpeldsp_altivec.c \ + libavcodec/ppc/mpegaudiodsp_altivec.c \ + libavcodec/ppc/videodsp.c \ + libavcodec/ppc/vorbisdsp_altivec.c \ + libavcodec/ppc/vp3dsp_altivec.c \ + libavcodec/ppc/vp8dsp_altivec.c \ chromium/ffmpeg_stub_headers.fragment \ chromium/ffmpegsumo.sigs" From 3f2a0d25e7885a3156b28b60e4adab960caed643 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 8 Jan 2020 13:02:38 +0100 Subject: [PATCH 328/437] merged Pull-Request, keep ppc files in ffmpeg --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 981b505..c204e45 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -47,7 +47,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.13.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -602,6 +602,9 @@ done %changelog +* Wed Jan 08 2020 Than Ngo - 5.13.2-2 +- merged Pull-Request, keep ppc files in ffmpeg + * Mon Dec 09 2019 Jan Grulich - 5.13.2-1 - 5.13.2 From 7af3e8d732acbdffc5ced75e605d7223c73fdd13 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 14 Jan 2020 19:35:11 +0100 Subject: [PATCH 329/437] Remove obsolete libv8.so Provides/Requires excludes. We no longer ship a libv8.so, ever since the no-sse2 patch was dropped. --- qt5-qtwebengine.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c204e45..ba2f2f8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -36,11 +36,8 @@ %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) -# exclude plugins (all architectures) and libv8.so (i686, it's static everywhere -# else) -%global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ -# exclude libv8.so (i686, it's static everywhere else) -%global __requires_exclude ^libv8\\.so$ +# exclude plugins +%global __provides_exclude ^lib.*plugin\\.so.*$ # and designer plugins %global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$ From e061628edd970cc6a1b1b0b379f45b16b3b134d3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 17:00:10 +0000 Subject: [PATCH 330/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ba2f2f8..98b88e5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -44,7 +44,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.13.2 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -599,6 +599,9 @@ done %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 5.13.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Jan 08 2020 Than Ngo - 5.13.2-2 - merged Pull-Request, keep ppc files in ffmpeg From a71afe3eb00888a7f81c964451fd5866737ec3f2 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 21 Feb 2020 08:34:58 -0800 Subject: [PATCH 331/437] Patch 3rd party chromium, fix FTBFS (#1799084) --- qt5-qtwebengine.spec | 9 +- ...erywhere-5.13.2-fix-chromium-headers.patch | 578 ++++++++++++++++++ 2 files changed, 584 insertions(+), 3 deletions(-) create mode 100644 qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 98b88e5..bf631ff 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -9,9 +9,9 @@ %if 0%{?fedora} > 29 # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 -%endif # need libwebp >= 0.6.0 %global use_system_libwebp 1 +%endif # NEON support on ARM (detected at runtime) - disable this if you are hitting # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 @@ -90,6 +90,8 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch # Use Python2 Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch +# Fix missing include in chromium +Patch27: qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch ## Upstream patches: # qtwebengine-chromium @@ -376,6 +378,7 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch25 -p1 -b .missing-semicolon-in-blink %patch26 -p1 -b .use-python2 +%patch27 -p1 -b .fix-chromium # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -599,8 +602,8 @@ done %changelog -* Thu Jan 30 2020 Fedora Release Engineering - 5.13.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild +* Fri Feb 21 2020 Troy Dawson - 5.13.2-3 +- Patch 3rd party chromium, fix FTBFS (#1799084) * Wed Jan 08 2020 Than Ngo - 5.13.2-2 - merged Pull-Request, keep ppc files in ffmpeg diff --git a/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch b/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch new file mode 100644 index 0000000..d14f1e0 --- /dev/null +++ b/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch @@ -0,0 +1,578 @@ +From 033c7aa2da1bc78347765d60c15843ece02ef4d8 Mon Sep 17 00:00:00 2001 +From: Troy Dawson +Date: Tue, 11 Feb 2020 15:43:30 -0800 +Subject: [PATCH] fix chromium headers + +--- + .../chromium/cc/base/list_container_helper.cc | 250 ----------------- + .../chromium/cc/base/list_container_helper.h | 254 ++++++++++++++++++ + .../aec3/clockdrift_detector.h | 1 + + .../modules/video_coding/decoding_state.h | 1 + + 4 files changed, 256 insertions(+), 250 deletions(-) + +diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.cc b/src/3rdparty/chromium/cc/base/list_container_helper.cc +index 380ad3dd1..c4a9245d9 100644 +--- a/src/3rdparty/chromium/cc/base/list_container_helper.cc ++++ b/src/3rdparty/chromium/cc/base/list_container_helper.cc +@@ -13,258 +13,8 @@ + #include "base/macros.h" + #include "base/memory/aligned_memory.h" + +-namespace { +-const size_t kDefaultNumElementTypesToReserve = 32; +-} // namespace +- + namespace cc { + +-// CharAllocator +-//////////////////////////////////////////////////// +-// This class deals only with char* and void*. It does allocation and passing +-// out raw pointers, as well as memory deallocation when being destroyed. +-class ListContainerHelper::CharAllocator { +- public: +- // CharAllocator::InnerList +- ///////////////////////////////////////////// +- // This class holds the raw memory chunk, as well as information about its +- // size and availability. +- struct InnerList { +- std::unique_ptr data; +- // The number of elements in total the memory can hold. The difference +- // between capacity and size is the how many more elements this list can +- // hold. +- size_t capacity; +- // The number of elements have been put into this list. +- size_t size; +- // The size of each element is in bytes. This is used to move from between +- // elements' memory locations. +- size_t step; +- +- InnerList() : capacity(0), size(0), step(0) {} +- +- void Erase(char* position) { +- // Confident that destructor is called by caller of this function. Since +- // CharAllocator does not handle construction after +- // allocation, it doesn't handle desctrution before deallocation. +- DCHECK_LE(position, LastElement()); +- DCHECK_GE(position, Begin()); +- char* start = position + step; +- std::copy(start, End(), position); +- +- --size; +- // Decrease capacity to avoid creating not full not last InnerList. +- --capacity; +- } +- +- void InsertBefore(size_t alignment, char** position, size_t count) { +- DCHECK_LE(*position, LastElement() + step); +- DCHECK_GE(*position, Begin()); +- +- // Adjust the size and capacity +- size_t old_size = size; +- size += count; +- capacity = size; +- +- // Allocate the new data and update the iterator's pointer. +- std::unique_ptr new_data( +- static_cast(base::AlignedAlloc(size * step, alignment))); +- size_t position_offset = *position - Begin(); +- *position = new_data.get() + position_offset; +- +- // Copy the data before the inserted segment +- memcpy(new_data.get(), data.get(), position_offset); +- // Copy the data after the inserted segment. +- memcpy(new_data.get() + position_offset + count * step, +- data.get() + position_offset, old_size * step - position_offset); +- data = std::move(new_data); +- } +- +- bool IsEmpty() const { return !size; } +- bool IsFull() { return capacity == size; } +- size_t NumElementsAvailable() const { return capacity - size; } +- +- void* AddElement() { +- DCHECK_LT(size, capacity); +- ++size; +- return LastElement(); +- } +- +- void RemoveLast() { +- DCHECK(!IsEmpty()); +- --size; +- } +- +- char* Begin() const { return data.get(); } +- char* End() const { return data.get() + size * step; } +- char* LastElement() const { return data.get() + (size - 1) * step; } +- char* ElementAt(size_t index) const { return data.get() + index * step; } +- +- private: +- DISALLOW_COPY_AND_ASSIGN(InnerList); +- }; +- +- CharAllocator(size_t alignment, size_t element_size, size_t element_count) +- // base::AlignedAlloc does not accept alignment less than sizeof(void*). +- : alignment_(std::max(sizeof(void*), alignment)), +- element_size_(element_size), +- size_(0), +- last_list_index_(0), +- last_list_(nullptr) { +- // If this fails, then alignment of elements after the first could be wrong, +- // and we need to pad sizes to fix that. +- DCHECK_EQ(element_size % alignment, 0u); +- AllocateNewList(element_count > 0 ? element_count +- : kDefaultNumElementTypesToReserve); +- last_list_ = storage_[last_list_index_].get(); +- } +- +- ~CharAllocator() = default; +- +- void* Allocate() { +- if (last_list_->IsFull()) { +- // Only allocate a new list if there isn't a spare one still there from +- // previous usage. +- if (last_list_index_ + 1 >= storage_.size()) +- AllocateNewList(last_list_->capacity * 2); +- +- ++last_list_index_; +- last_list_ = storage_[last_list_index_].get(); +- } +- +- ++size_; +- return last_list_->AddElement(); +- } +- +- size_t alignment() const { return alignment_; } +- size_t element_size() const { return element_size_; } +- size_t list_count() const { return storage_.size(); } +- size_t size() const { return size_; } +- bool IsEmpty() const { return size() == 0; } +- +- size_t Capacity() const { +- size_t capacity_sum = 0; +- for (const auto& inner_list : storage_) +- capacity_sum += inner_list->capacity; +- return capacity_sum; +- } +- +- void Clear() { +- // Remove all except for the first InnerList. +- DCHECK(!storage_.empty()); +- storage_.erase(storage_.begin() + 1, storage_.end()); +- last_list_index_ = 0; +- last_list_ = storage_[0].get(); +- last_list_->size = 0; +- size_ = 0; +- } +- +- void RemoveLast() { +- DCHECK(!IsEmpty()); +- last_list_->RemoveLast(); +- if (last_list_->IsEmpty() && last_list_index_ > 0) { +- --last_list_index_; +- last_list_ = storage_[last_list_index_].get(); +- +- // If there are now two empty inner lists, free one of them. +- if (last_list_index_ + 2 < storage_.size()) +- storage_.pop_back(); +- } +- --size_; +- } +- +- void Erase(PositionInCharAllocator* position) { +- DCHECK_EQ(this, position->ptr_to_container); +- +- // Update |position| to point to the element after the erased element. +- InnerList* list = storage_[position->vector_index].get(); +- char* item_iterator = position->item_iterator; +- if (item_iterator == list->LastElement()) +- position->Increment(); +- +- list->Erase(item_iterator); +- // TODO(weiliangc): Free the InnerList if it is empty. +- --size_; +- } +- +- void InsertBefore(ListContainerHelper::Iterator* position, size_t count) { +- if (!count) +- return; +- +- // If |position| is End(), then append |count| elements at the end. This +- // will happen to not invalidate any iterators or memory. +- if (!position->item_iterator) { +- // Set |position| to be the first inserted element. +- Allocate(); +- position->vector_index = storage_.size() - 1; +- position->item_iterator = storage_[position->vector_index]->LastElement(); +- // Allocate the rest. +- for (size_t i = 1; i < count; ++i) +- Allocate(); +- } else { +- storage_[position->vector_index]->InsertBefore( +- alignment_, &position->item_iterator, count); +- size_ += count; +- } +- } +- +- InnerList* InnerListById(size_t id) const { +- DCHECK_LT(id, storage_.size()); +- return storage_[id].get(); +- } +- +- size_t FirstInnerListId() const { +- // |size_| > 0 means that at least one vector in |storage_| will be +- // non-empty. +- DCHECK_GT(size_, 0u); +- size_t id = 0; +- while (storage_[id]->size == 0) +- ++id; +- return id; +- } +- +- size_t LastInnerListId() const { +- // |size_| > 0 means that at least one vector in |storage_| will be +- // non-empty. +- DCHECK_GT(size_, 0u); +- size_t id = storage_.size() - 1; +- while (storage_[id]->size == 0) +- --id; +- return id; +- } +- +- size_t NumAvailableElementsInLastList() const { +- return last_list_->NumElementsAvailable(); +- } +- +- private: +- void AllocateNewList(size_t list_size) { +- std::unique_ptr new_list(new InnerList); +- new_list->capacity = list_size; +- new_list->size = 0; +- new_list->step = element_size_; +- new_list->data.reset(static_cast( +- base::AlignedAlloc(list_size * element_size_, alignment_))); +- storage_.push_back(std::move(new_list)); +- } +- +- std::vector> storage_; +- const size_t alignment_; +- const size_t element_size_; +- +- // The number of elements in the list. +- size_t size_; +- +- // The index of the last list to have had elements added to it, or the only +- // list if the container has not had elements added since being cleared. +- size_t last_list_index_; +- +- // This is equivalent to |storage_[last_list_index_]|. +- InnerList* last_list_; +- +- DISALLOW_COPY_AND_ASSIGN(CharAllocator); +-}; +- + // PositionInCharAllocator + ////////////////////////////////////////////////////// + ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator( +diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.h b/src/3rdparty/chromium/cc/base/list_container_helper.h +index c79cf1f18..a44ecb4de 100644 +--- a/src/3rdparty/chromium/cc/base/list_container_helper.h ++++ b/src/3rdparty/chromium/cc/base/list_container_helper.h +@@ -8,10 +8,18 @@ + #include + + #include ++#include ++#include + ++#include "base/logging.h" + #include "base/macros.h" ++#include "base/memory/aligned_memory.h" + #include "cc/base/base_export.h" + ++namespace { ++const size_t kDefaultNumElementTypesToReserve = 32; ++} // namespace ++ + namespace cc { + + // Helper class for ListContainer non-templated logic. All methods are private, +@@ -174,6 +182,252 @@ class CC_BASE_EXPORT ListContainerHelper final { + DISALLOW_COPY_AND_ASSIGN(ListContainerHelper); + }; + ++// CharAllocator ++//////////////////////////////////////////////////// ++// This class deals only with char* and void*. It does allocation and passing ++// out raw pointers, as well as memory deallocation when being destroyed. ++class ListContainerHelper::CharAllocator { ++ public: ++ // CharAllocator::InnerList ++ ///////////////////////////////////////////// ++ // This class holds the raw memory chunk, as well as information about its ++ // size and availability. ++ struct InnerList { ++ std::unique_ptr data; ++ // The number of elements in total the memory can hold. The difference ++ // between capacity and size is the how many more elements this list can ++ // hold. ++ size_t capacity; ++ // The number of elements have been put into this list. ++ size_t size; ++ // The size of each element is in bytes. This is used to move from between ++ // elements' memory locations. ++ size_t step; ++ ++ InnerList() : capacity(0), size(0), step(0) {} ++ ++ void Erase(char* position) { ++ // Confident that destructor is called by caller of this function. Since ++ // CharAllocator does not handle construction after ++ // allocation, it doesn't handle desctrution before deallocation. ++ DCHECK_LE(position, LastElement()); ++ DCHECK_GE(position, Begin()); ++ char* start = position + step; ++ std::copy(start, End(), position); ++ ++ --size; ++ // Decrease capacity to avoid creating not full not last InnerList. ++ --capacity; ++ } ++ ++ void InsertBefore(size_t alignment, char** position, size_t count) { ++ DCHECK_LE(*position, LastElement() + step); ++ DCHECK_GE(*position, Begin()); ++ ++ // Adjust the size and capacity ++ size_t old_size = size; ++ size += count; ++ capacity = size; ++ ++ // Allocate the new data and update the iterator's pointer. ++ std::unique_ptr new_data( ++ static_cast(base::AlignedAlloc(size * step, alignment))); ++ size_t position_offset = *position - Begin(); ++ *position = new_data.get() + position_offset; ++ ++ // Copy the data before the inserted segment ++ memcpy(new_data.get(), data.get(), position_offset); ++ // Copy the data after the inserted segment. ++ memcpy(new_data.get() + position_offset + count * step, ++ data.get() + position_offset, old_size * step - position_offset); ++ data = std::move(new_data); ++ } ++ ++ bool IsEmpty() const { return !size; } ++ bool IsFull() { return capacity == size; } ++ size_t NumElementsAvailable() const { return capacity - size; } ++ ++ void* AddElement() { ++ DCHECK_LT(size, capacity); ++ ++size; ++ return LastElement(); ++ } ++ ++ void RemoveLast() { ++ DCHECK(!IsEmpty()); ++ --size; ++ } ++ ++ char* Begin() const { return data.get(); } ++ char* End() const { return data.get() + size * step; } ++ char* LastElement() const { return data.get() + (size - 1) * step; } ++ char* ElementAt(size_t index) const { return data.get() + index * step; } ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(InnerList); ++ }; ++ ++ CharAllocator(size_t alignment, size_t element_size, size_t element_count) ++ // base::AlignedAlloc does not accept alignment less than sizeof(void*). ++ : alignment_(std::max(sizeof(void*), alignment)), ++ element_size_(element_size), ++ size_(0), ++ last_list_index_(0), ++ last_list_(nullptr) { ++ // If this fails, then alignment of elements after the first could be wrong, ++ // and we need to pad sizes to fix that. ++ DCHECK_EQ(element_size % alignment, 0u); ++ AllocateNewList(element_count > 0 ? element_count ++ : kDefaultNumElementTypesToReserve); ++ last_list_ = storage_[last_list_index_].get(); ++ } ++ ++ ~CharAllocator() = default; ++ ++ void* Allocate() { ++ if (last_list_->IsFull()) { ++ // Only allocate a new list if there isn't a spare one still there from ++ // previous usage. ++ if (last_list_index_ + 1 >= storage_.size()) ++ AllocateNewList(last_list_->capacity * 2); ++ ++ ++last_list_index_; ++ last_list_ = storage_[last_list_index_].get(); ++ } ++ ++ ++size_; ++ return last_list_->AddElement(); ++ } ++ ++ size_t alignment() const { return alignment_; } ++ size_t element_size() const { return element_size_; } ++ size_t list_count() const { return storage_.size(); } ++ size_t size() const { return size_; } ++ bool IsEmpty() const { return size() == 0; } ++ ++ size_t Capacity() const { ++ size_t capacity_sum = 0; ++ for (const auto& inner_list : storage_) ++ capacity_sum += inner_list->capacity; ++ return capacity_sum; ++ } ++ ++ void Clear() { ++ // Remove all except for the first InnerList. ++ DCHECK(!storage_.empty()); ++ storage_.erase(storage_.begin() + 1, storage_.end()); ++ last_list_index_ = 0; ++ last_list_ = storage_[0].get(); ++ last_list_->size = 0; ++ size_ = 0; ++ } ++ ++ void RemoveLast() { ++ DCHECK(!IsEmpty()); ++ last_list_->RemoveLast(); ++ if (last_list_->IsEmpty() && last_list_index_ > 0) { ++ --last_list_index_; ++ last_list_ = storage_[last_list_index_].get(); ++ ++ // If there are now two empty inner lists, free one of them. ++ if (last_list_index_ + 2 < storage_.size()) ++ storage_.pop_back(); ++ } ++ --size_; ++ } ++ ++ void Erase(PositionInCharAllocator* position) { ++ DCHECK_EQ(this, position->ptr_to_container); ++ ++ // Update |position| to point to the element after the erased element. ++ InnerList* list = storage_[position->vector_index].get(); ++ char* item_iterator = position->item_iterator; ++ if (item_iterator == list->LastElement()) ++ position->Increment(); ++ ++ list->Erase(item_iterator); ++ // TODO(weiliangc): Free the InnerList if it is empty. ++ --size_; ++ } ++ ++ void InsertBefore(ListContainerHelper::Iterator* position, size_t count) { ++ if (!count) ++ return; ++ ++ // If |position| is End(), then append |count| elements at the end. This ++ // will happen to not invalidate any iterators or memory. ++ if (!position->item_iterator) { ++ // Set |position| to be the first inserted element. ++ Allocate(); ++ position->vector_index = storage_.size() - 1; ++ position->item_iterator = storage_[position->vector_index]->LastElement(); ++ // Allocate the rest. ++ for (size_t i = 1; i < count; ++i) ++ Allocate(); ++ } else { ++ storage_[position->vector_index]->InsertBefore( ++ alignment_, &position->item_iterator, count); ++ size_ += count; ++ } ++ } ++ ++ InnerList* InnerListById(size_t id) const { ++ DCHECK_LT(id, storage_.size()); ++ return storage_[id].get(); ++ } ++ ++ size_t FirstInnerListId() const { ++ // |size_| > 0 means that at least one vector in |storage_| will be ++ // non-empty. ++ DCHECK_GT(size_, 0u); ++ size_t id = 0; ++ while (storage_[id]->size == 0) ++ ++id; ++ return id; ++ } ++ ++ size_t LastInnerListId() const { ++ // |size_| > 0 means that at least one vector in |storage_| will be ++ // non-empty. ++ DCHECK_GT(size_, 0u); ++ size_t id = storage_.size() - 1; ++ while (storage_[id]->size == 0) ++ --id; ++ return id; ++ } ++ ++ size_t NumAvailableElementsInLastList() const { ++ return last_list_->NumElementsAvailable(); ++ } ++ ++ private: ++ void AllocateNewList(size_t list_size) { ++ std::unique_ptr new_list(new InnerList); ++ new_list->capacity = list_size; ++ new_list->size = 0; ++ new_list->step = element_size_; ++ new_list->data.reset(static_cast( ++ base::AlignedAlloc(list_size * element_size_, alignment_))); ++ storage_.push_back(std::move(new_list)); ++ } ++ ++ std::vector> storage_; ++ const size_t alignment_; ++ const size_t element_size_; ++ ++ // The number of elements in the list. ++ size_t size_; ++ ++ // The index of the last list to have had elements added to it, or the only ++ // list if the container has not had elements added since being cleared. ++ size_t last_list_index_; ++ ++ // This is equivalent to |storage_[last_list_index_]|. ++ InnerList* last_list_; ++ ++ DISALLOW_COPY_AND_ASSIGN(CharAllocator); ++}; ++ + } // namespace cc + + #endif // CC_BASE_LIST_CONTAINER_HELPER_H_ +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h +index 22528c948..69e624e8b 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h +@@ -12,6 +12,7 @@ + #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_ + + #include ++#include + + namespace webrtc { + +diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h +index b87fb2d03..ec972949d 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h +@@ -11,6 +11,7 @@ + #ifndef MODULES_VIDEO_CODING_DECODING_STATE_H_ + #define MODULES_VIDEO_CODING_DECODING_STATE_H_ + ++#include + #include + #include + #include +-- +2.24.1 + From 56139b589249056277583020a3841a3037e66c88 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 21 Feb 2020 11:32:32 -0800 Subject: [PATCH 332/437] Move use_system_libwebp back out of %if --- qt5-qtwebengine.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bf631ff..f650daa 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -6,12 +6,12 @@ # where qt5-qttools (qt5-doctools) builds are not yet available %global docs 1 -%if 0%{?fedora} > 29 +%if 0%{?fedora} # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 +%endif # need libwebp >= 0.6.0 %global use_system_libwebp 1 -%endif # NEON support on ARM (detected at runtime) - disable this if you are hitting # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 From 86c8573d0db07e17e18c6292b256db7704aadefc Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 26 Feb 2020 11:34:42 +0100 Subject: [PATCH 333/437] Delete another unused remnant of the defunct no-sse2 patch. The (misleadingly-named) condition %if 0%{?sse2} (which really meant: do we want to build both an SSE2 and a non-SSE2 version?) has been always false for a while now. Hence, delete it from the file list. --- qt5-qtwebengine.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f650daa..ed48c8d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -513,11 +513,6 @@ done %{_qt5_bindir}/qwebengine_convert_dict %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess -#ifarch %{ix86} -%if 0%{?sse2} -# shared V8 library and its SSE2 version -%{_qt5_libdir}/qtwebengine/ -%endif %{_qt5_plugindir}/designer/libqwebengineview.so %dir %{_qt5_datadir}/resources/ %{_qt5_datadir}/resources/qtwebengine_resources_100p.pak From 52761a3da1702ffb9f82f71936c7c8ea251c4dae Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 25 Mar 2020 14:25:03 +0000 Subject: [PATCH 334/437] Add patch: Allow restricted clock_nanosleep in Linux sandbox References: - https://bugreports.qt.io/browse/QTBUG-81313 - https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/292352 - https://bugzilla.redhat.com/show_bug.cgi?id=1812482 - https://bugzilla.redhat.com/show_bug.cgi?id=1773289 --- qt5-qtwebengine.spec | 14 +- ...ck_nanosleep-in-Linux-sandbox-manual.patch | 129 ++++++++++++++++++ 2 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ed48c8d..aed43b1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -44,7 +44,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.13.2 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -92,6 +92,13 @@ Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch # Fix missing include in chromium Patch27: qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch +# Fix for clock_nanosleep +# https://bugreports.qt.io/browse/QTBUG-81313 +# https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/292352 +# Qt: https://codereview.qt-project.org/gitweb?p=qt/qtwebengine-chromium.git;a=patch;h=2c37da9ad4fe7d5b1911ba991798e508c81ba5ef +# Chromium: https://chromium.googlesource.com/chromium/src/+/54407b422a9cbf775a68c1d57603c0ecac8ce0d7%5E%21/#F0 +# Didn't apply cleanly, manually ported +Patch28: qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch ## Upstream patches: # qtwebengine-chromium @@ -380,6 +387,8 @@ popd %patch26 -p1 -b .use-python2 %patch27 -p1 -b .fix-chromium +%patch28 -p0 -b .allow-clock_nanosleep + # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases %if "%{_qt5_version}" < "5.12.0" @@ -597,6 +606,9 @@ done %changelog +* Wed Mar 25 2020 Ankur Sinha - 5.13.2-4 +- Add patch to allow clock_nanosleep in Linux sandbox (Chromium) + * Fri Feb 21 2020 Troy Dawson - 5.13.2-3 - Patch 3rd party chromium, fix FTBFS (#1799084) diff --git a/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch b/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch new file mode 100644 index 0000000..2cc4e0a --- /dev/null +++ b/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch @@ -0,0 +1,129 @@ +diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:57:05.214021490 +0000 ++++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:58:35.813396054 +0000 +@@ -137,7 +137,7 @@ + return Allow(); + #endif + +- if (sysno == __NR_clock_gettime) { ++ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { + return RestrictClockID(); + } + +diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc +--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 12:57:05.214021490 +0000 ++++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 13:01:05.971702078 +0000 +@@ -393,6 +393,18 @@ + syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts); + } + ++BPF_DEATH_TEST_C(BaselinePolicy, ++ ClockNanosleepWithDisallowedClockCrashes, ++ DEATH_SEGV_MESSAGE(GetErrorMessageContentForTests()), ++ BaselinePolicy) { ++ struct timespec ts; ++ struct timespec out_ts; ++ ts.tv_sec = 0; ++ ts.tv_nsec = 0; ++ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts); ++} ++ ++ + #if !defined(GRND_RANDOM) + #define GRND_RANDOM 2 + #endif +diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h +--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 12:57:05.213021508 +0000 ++++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 13:03:32.058081155 +0000 +@@ -86,12 +86,13 @@ + // process). + SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictGetrusage(); + +-// Restrict |clk_id| for clock_getres(), clock_gettime() and clock_settime(). +-// We allow accessing only CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, +-// CLOCK_REALTIME, and CLOCK_THREAD_CPUTIME_ID. In particular, this disallows +-// access to arbitrary per-{process,thread} CPU-time clock IDs (such as those +-// returned by {clock,pthread}_getcpuclockid), which can leak information +-// about the state of the host OS. ++// Restrict |clk_id| for clock_getres(), clock_gettime(), clock_settime(), and ++// clock_nanosleep(). We allow accessing only CLOCK_BOOTTIME, ++// CLOCK_MONOTONIC{,_RAW,_COARSE}, CLOCK_PROCESS_CPUTIME_ID, ++// CLOCK_REALTIME{,_COARSE}, and CLOCK_THREAD_CPUTIME_ID. In particular, on ++// non-Android platforms this disallows access to arbitrary per-{process,thread} ++// CPU-time clock IDs (such as those returned by {clock,pthread}_getcpuclockid), ++// which can leak information about the state of the host OS. + SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictClockID(); + + // Restrict the flags argument to getrandom() to allow only no flags, or +diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 12:57:05.213021508 +0000 ++++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 13:06:05.643325692 +0000 +@@ -59,6 +59,7 @@ + switch (sysno) { + case __NR_clock_gettime: + case __NR_clock_getres: ++ case __NR_clock_nanosleep: + return RestrictClockID(); + default: + return Allow(); +@@ -99,6 +100,25 @@ + #endif + } + ++void CheckClockNanosleep(clockid_t clockid) { ++ struct timespec ts; ++ struct timespec out_ts; ++ ts.tv_sec = 0; ++ ts.tv_nsec = 0; ++ clock_nanosleep(clockid, 0, &ts, &out_ts); ++} ++ ++BPF_TEST_C(ParameterRestrictions, ++ clock_nanosleep_allowed, ++ RestrictClockIdPolicy) { ++ CheckClockNanosleep(CLOCK_MONOTONIC); ++ CheckClockNanosleep(CLOCK_MONOTONIC_COARSE); ++ CheckClockNanosleep(CLOCK_MONOTONIC_RAW); ++ CheckClockNanosleep(CLOCK_BOOTTIME); ++ CheckClockNanosleep(CLOCK_REALTIME); ++ CheckClockNanosleep(CLOCK_REALTIME_COARSE); ++} ++ + BPF_DEATH_TEST_C(ParameterRestrictions, + clock_gettime_crash_monotonic_raw, + DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), +@@ -107,6 +127,17 @@ + syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts); + } + ++BPF_DEATH_TEST_C(ParameterRestrictions, ++ clock_nanosleep_crash_clock_fd, ++ DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), ++ RestrictClockIdPolicy) { ++ struct timespec ts; ++ struct timespec out_ts; ++ ts.tv_sec = 0; ++ ts.tv_nsec = 0; ++ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts); ++} ++ + #if !defined(OS_ANDROID) + BPF_DEATH_TEST_C(ParameterRestrictions, + clock_gettime_crash_cpu_clock, +diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 12:57:05.213021508 +0000 ++++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 13:06:50.881514077 +0000 +@@ -35,9 +35,10 @@ + return true; + case __NR_adjtimex: // Privileged. + case __NR_clock_adjtime: // Privileged. +- case __NR_clock_getres: // Could be allowed. +- case __NR_clock_gettime: +- case __NR_clock_nanosleep: // Could be allowed. ++ case __NR_clock_getres: // Allowed only on Android with parameters ++ // filtered by RestrictClokID(). ++ case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). ++ case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). + case __NR_clock_settime: // Privileged. + #if defined(__i386__) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) From f9cf1a6ce6b4c3e5e9316dd59ab9da2860f8a7b6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 25 Mar 2020 11:17:16 -0500 Subject: [PATCH 335/437] 5.14.1 use_system_icu on f32+ drop upstreamed patches --- .gitignore | 1 + clean_ffmpeg.sh | 3 + qt5-qtwebengine.spec | 53 +- ...bengine-5.14-1-QT_DEPRECATED_VERSION.patch | 17 + ...ck_nanosleep-in-Linux-sandbox-manual.patch | 129 ----- ...erywhere-5.13.2-fix-chromium-headers.patch | 539 ------------------ ...re-5.13.2-missing-semicolon-in-blink.patch | 13 - qtwebengine-everywhere-5.14.1-gcc10.patch | 35 ++ ...gine-everywhere-src-5.10.0-linux-pri.patch | 6 +- ...ensource-src-5.12.4-fix-extractcflag.patch | 6 +- ...bengine-opensource-src-5.9.0-no-neon.patch | 6 +- sources | 2 +- 12 files changed, 98 insertions(+), 712 deletions(-) create mode 100644 qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch delete mode 100644 qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch delete mode 100644 qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch create mode 100644 qtwebengine-everywhere-5.14.1-gcc10.patch diff --git a/.gitignore b/.gitignore index 0b1a746..d756eff 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /qtwebengine-everywhere-src-5.12.5-clean.tar.xz /qtwebengine-everywhere-src-5.12.6-clean.tar.xz /qtwebengine-everywhere-src-5.13.2-clean.tar.xz +/qtwebengine-everywhere-src-5.14.1-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index f7b5446..6239278 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -155,12 +155,14 @@ header_files=" libavutil/x86/asm.h \ libavcodec/old_codec_ids.h \ libavcodec/options_table.h \ libavcodec/opus_celt.h \ + libavcodec/opusdsp.h \ libavcodec/opus_pvq.h \ libavcodec/opus_rc.h \ libavcodec/pcm_tablegen.h \ libavcodec/pel_template.c \ libavcodec/pixblockdsp.h \ libavcodec/pixels.h \ + libavcodec/png.h \ libavcodec/pthread_internal.h \ libavcodec/put_bits.h \ libavcodec/qpeldsp.h \ @@ -178,6 +180,7 @@ header_files=" libavutil/x86/asm.h \ libavcodec/vorbisdsp.h \ libavcodec/vp3data.h \ libavcodec/vp3dsp.h \ + libavcodec/vp4data.h \ libavcodec/vp56.h \ libavcodec/vp56dsp.h \ libavcodec/vp8data.h \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index aed43b1..217dc34 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -13,6 +13,11 @@ # need libwebp >= 0.6.0 %global use_system_libwebp 1 +%if 0%{?fedora} > 31 +# need libicu >= 64, only currently available on f32+ +%global use_system_libicu 1 +%endif + # NEON support on ARM (detected at runtime) - disable this if you are hitting # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 #global arm_neon 1 @@ -43,17 +48,17 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.13.2 -Release: 4%{?dist} +Version: 5.14.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html # The other licenses are from Chromium and the code it bundles License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io -# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.12/5.12.6/submodules/qtwebengine-everywhere-src-5.12.6.tar.xz -# ./clean_qtwebengine.sh 5.12.6 +# leaned tarball with patent-encumbered codecs removed from the bundled FFmpeg +# wget http://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtwebengine-everywhere-src-5.14.1.tar.xz +# ./clean_qtwebengine.sh 5.14.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -80,25 +85,20 @@ Patch2: qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch # workaround FTBFS against kernel-headers-5.2.0+ Patch4: qtwebengine-SIOCGSTAMP.patch +# fix build when using qt < 5.14 +Patch5: qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # Force verbose output from the GN bootstrap process Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch -# Fix missing semicolon in Blink -Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch # Use Python2 Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch # Fix missing include in chromium Patch27: qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch -# Fix for clock_nanosleep -# https://bugreports.qt.io/browse/QTBUG-81313 -# https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/292352 -# Qt: https://codereview.qt-project.org/gitweb?p=qt/qtwebengine-chromium.git;a=patch;h=2c37da9ad4fe7d5b1911ba991798e508c81ba5ef -# Chromium: https://chromium.googlesource.com/chromium/src/+/54407b422a9cbf775a68c1d57603c0ecac8ce0d7%5E%21/#F0 -# Didn't apply cleanly, manually ported -Patch28: qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch +# Fix gcc10 FTBFS +Patch29: qtwebengine-everywhere-5.14.1-gcc10.patch ## Upstream patches: # qtwebengine-chromium @@ -128,7 +128,9 @@ BuildRequires: libstdc++-static BuildRequires: git-core BuildRequires: gperf BuildRequires: krb5-devel -BuildRequires: libicu-devel +%if 0%{?use_system_libicu} +BuildRequires: libicu-devel >= 64 +%endif BuildRequires: libjpeg-devel BuildRequires: re2-devel BuildRequires: snappy-devel @@ -370,24 +372,25 @@ pushd src/3rdparty/chromium popd %patch0 -p1 -b .linux-pri +%if 0%{?use_system_libicu} %patch1 -p1 -b .no-icudtl-dat +%endif %patch2 -p1 -b .fix-extractcflag %if !0%{?arm_neon} %patch3 -p1 -b .no-neon %endif %patch4 -p1 -b .SIOCGSTAMP +%patch5 -p1 -b .QT_DEPRECATED_VERSION ## upstream patches -%patch10 -p1 -b .openmax-dl-neon +#patch10 -p1 -b .openmax-dl-neon ## NEEDSWORK #patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat -%patch25 -p1 -b .missing-semicolon-in-blink %patch26 -p1 -b .use-python2 %patch27 -p1 -b .fix-chromium - -%patch28 -p0 -b .allow-clock_nanosleep +%patch29 -p1 -b .gcc10 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -444,12 +447,12 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} \ %{?debug_config:CONFIG+="%{debug_config}}" \ CONFIG+="link_pulseaudio" \ - QMAKE_EXTRA_ARGS+="-system-webengine-icu" \ + %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja -make %{?_smp_mflags} +make %{?_smp_mflags} -k %if 0%{?docs} %make_build docs @@ -524,6 +527,9 @@ done %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess %{_qt5_plugindir}/designer/libqwebengineview.so %dir %{_qt5_datadir}/resources/ +%if ! 0%{?use_system_libicu} +%{_qt5_datadir}/resources/icudtl.dat +%endif %{_qt5_datadir}/resources/qtwebengine_resources_100p.pak %{_qt5_datadir}/resources/qtwebengine_resources_200p.pak %{_qt5_datadir}/resources/qtwebengine_resources.pak @@ -606,6 +612,11 @@ done %changelog +* Wed Mar 25 2020 Rex Dieter - 5.14.1-1 +- 5.14.1 +- use_system_icu on f32+ +- drop upstreamed patches + * Wed Mar 25 2020 Ankur Sinha - 5.13.2-4 - Add patch to allow clock_nanosleep in Linux sandbox (Chromium) diff --git a/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch b/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch new file mode 100644 index 0000000..69b1bbf --- /dev/null +++ b/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch @@ -0,0 +1,17 @@ +diff -up qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h +--- qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED 2020-01-20 05:17:16.000000000 -0600 ++++ qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h 2020-03-24 15:42:03.558394148 -0500 +@@ -119,9 +119,13 @@ public: + QUrl url() const; + QString mimeType() const; + #if QT_DEPRECATED_SINCE(5, 14) ++#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) + QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead") ++#endif + QString path() const; ++#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) + QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead") ++#endif + void setPath(QString path); + #endif + bool isFinished() const; diff --git a/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch b/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch deleted file mode 100644 index 2cc4e0a..0000000 --- a/qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ---- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:57:05.214021490 +0000 -+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:58:35.813396054 +0000 -@@ -137,7 +137,7 @@ - return Allow(); - #endif - -- if (sysno == __NR_clock_gettime) { -+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { - return RestrictClockID(); - } - -diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc ---- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 12:57:05.214021490 +0000 -+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 13:01:05.971702078 +0000 -@@ -393,6 +393,18 @@ - syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts); - } - -+BPF_DEATH_TEST_C(BaselinePolicy, -+ ClockNanosleepWithDisallowedClockCrashes, -+ DEATH_SEGV_MESSAGE(GetErrorMessageContentForTests()), -+ BaselinePolicy) { -+ struct timespec ts; -+ struct timespec out_ts; -+ ts.tv_sec = 0; -+ ts.tv_nsec = 0; -+ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts); -+} -+ -+ - #if !defined(GRND_RANDOM) - #define GRND_RANDOM 2 - #endif -diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h ---- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 12:57:05.213021508 +0000 -+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 13:03:32.058081155 +0000 -@@ -86,12 +86,13 @@ - // process). - SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictGetrusage(); - --// Restrict |clk_id| for clock_getres(), clock_gettime() and clock_settime(). --// We allow accessing only CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, --// CLOCK_REALTIME, and CLOCK_THREAD_CPUTIME_ID. In particular, this disallows --// access to arbitrary per-{process,thread} CPU-time clock IDs (such as those --// returned by {clock,pthread}_getcpuclockid), which can leak information --// about the state of the host OS. -+// Restrict |clk_id| for clock_getres(), clock_gettime(), clock_settime(), and -+// clock_nanosleep(). We allow accessing only CLOCK_BOOTTIME, -+// CLOCK_MONOTONIC{,_RAW,_COARSE}, CLOCK_PROCESS_CPUTIME_ID, -+// CLOCK_REALTIME{,_COARSE}, and CLOCK_THREAD_CPUTIME_ID. In particular, on -+// non-Android platforms this disallows access to arbitrary per-{process,thread} -+// CPU-time clock IDs (such as those returned by {clock,pthread}_getcpuclockid), -+// which can leak information about the state of the host OS. - SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictClockID(); - - // Restrict the flags argument to getrandom() to allow only no flags, or -diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ---- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 12:57:05.213021508 +0000 -+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 13:06:05.643325692 +0000 -@@ -59,6 +59,7 @@ - switch (sysno) { - case __NR_clock_gettime: - case __NR_clock_getres: -+ case __NR_clock_nanosleep: - return RestrictClockID(); - default: - return Allow(); -@@ -99,6 +100,25 @@ - #endif - } - -+void CheckClockNanosleep(clockid_t clockid) { -+ struct timespec ts; -+ struct timespec out_ts; -+ ts.tv_sec = 0; -+ ts.tv_nsec = 0; -+ clock_nanosleep(clockid, 0, &ts, &out_ts); -+} -+ -+BPF_TEST_C(ParameterRestrictions, -+ clock_nanosleep_allowed, -+ RestrictClockIdPolicy) { -+ CheckClockNanosleep(CLOCK_MONOTONIC); -+ CheckClockNanosleep(CLOCK_MONOTONIC_COARSE); -+ CheckClockNanosleep(CLOCK_MONOTONIC_RAW); -+ CheckClockNanosleep(CLOCK_BOOTTIME); -+ CheckClockNanosleep(CLOCK_REALTIME); -+ CheckClockNanosleep(CLOCK_REALTIME_COARSE); -+} -+ - BPF_DEATH_TEST_C(ParameterRestrictions, - clock_gettime_crash_monotonic_raw, - DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), -@@ -107,6 +127,17 @@ - syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts); - } - -+BPF_DEATH_TEST_C(ParameterRestrictions, -+ clock_nanosleep_crash_clock_fd, -+ DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), -+ RestrictClockIdPolicy) { -+ struct timespec ts; -+ struct timespec out_ts; -+ ts.tv_sec = 0; -+ ts.tv_nsec = 0; -+ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts); -+} -+ - #if !defined(OS_ANDROID) - BPF_DEATH_TEST_C(ParameterRestrictions, - clock_gettime_crash_cpu_clock, -diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ---- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 12:57:05.213021508 +0000 -+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 13:06:50.881514077 +0000 -@@ -35,9 +35,10 @@ - return true; - case __NR_adjtimex: // Privileged. - case __NR_clock_adjtime: // Privileged. -- case __NR_clock_getres: // Could be allowed. -- case __NR_clock_gettime: -- case __NR_clock_nanosleep: // Could be allowed. -+ case __NR_clock_getres: // Allowed only on Android with parameters -+ // filtered by RestrictClokID(). -+ case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). -+ case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) diff --git a/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch b/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch index d14f1e0..e887fa3 100644 --- a/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch +++ b/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch @@ -10,545 +10,6 @@ Subject: [PATCH] fix chromium headers .../modules/video_coding/decoding_state.h | 1 + 4 files changed, 256 insertions(+), 250 deletions(-) -diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.cc b/src/3rdparty/chromium/cc/base/list_container_helper.cc -index 380ad3dd1..c4a9245d9 100644 ---- a/src/3rdparty/chromium/cc/base/list_container_helper.cc -+++ b/src/3rdparty/chromium/cc/base/list_container_helper.cc -@@ -13,258 +13,8 @@ - #include "base/macros.h" - #include "base/memory/aligned_memory.h" - --namespace { --const size_t kDefaultNumElementTypesToReserve = 32; --} // namespace -- - namespace cc { - --// CharAllocator --//////////////////////////////////////////////////// --// This class deals only with char* and void*. It does allocation and passing --// out raw pointers, as well as memory deallocation when being destroyed. --class ListContainerHelper::CharAllocator { -- public: -- // CharAllocator::InnerList -- ///////////////////////////////////////////// -- // This class holds the raw memory chunk, as well as information about its -- // size and availability. -- struct InnerList { -- std::unique_ptr data; -- // The number of elements in total the memory can hold. The difference -- // between capacity and size is the how many more elements this list can -- // hold. -- size_t capacity; -- // The number of elements have been put into this list. -- size_t size; -- // The size of each element is in bytes. This is used to move from between -- // elements' memory locations. -- size_t step; -- -- InnerList() : capacity(0), size(0), step(0) {} -- -- void Erase(char* position) { -- // Confident that destructor is called by caller of this function. Since -- // CharAllocator does not handle construction after -- // allocation, it doesn't handle desctrution before deallocation. -- DCHECK_LE(position, LastElement()); -- DCHECK_GE(position, Begin()); -- char* start = position + step; -- std::copy(start, End(), position); -- -- --size; -- // Decrease capacity to avoid creating not full not last InnerList. -- --capacity; -- } -- -- void InsertBefore(size_t alignment, char** position, size_t count) { -- DCHECK_LE(*position, LastElement() + step); -- DCHECK_GE(*position, Begin()); -- -- // Adjust the size and capacity -- size_t old_size = size; -- size += count; -- capacity = size; -- -- // Allocate the new data and update the iterator's pointer. -- std::unique_ptr new_data( -- static_cast(base::AlignedAlloc(size * step, alignment))); -- size_t position_offset = *position - Begin(); -- *position = new_data.get() + position_offset; -- -- // Copy the data before the inserted segment -- memcpy(new_data.get(), data.get(), position_offset); -- // Copy the data after the inserted segment. -- memcpy(new_data.get() + position_offset + count * step, -- data.get() + position_offset, old_size * step - position_offset); -- data = std::move(new_data); -- } -- -- bool IsEmpty() const { return !size; } -- bool IsFull() { return capacity == size; } -- size_t NumElementsAvailable() const { return capacity - size; } -- -- void* AddElement() { -- DCHECK_LT(size, capacity); -- ++size; -- return LastElement(); -- } -- -- void RemoveLast() { -- DCHECK(!IsEmpty()); -- --size; -- } -- -- char* Begin() const { return data.get(); } -- char* End() const { return data.get() + size * step; } -- char* LastElement() const { return data.get() + (size - 1) * step; } -- char* ElementAt(size_t index) const { return data.get() + index * step; } -- -- private: -- DISALLOW_COPY_AND_ASSIGN(InnerList); -- }; -- -- CharAllocator(size_t alignment, size_t element_size, size_t element_count) -- // base::AlignedAlloc does not accept alignment less than sizeof(void*). -- : alignment_(std::max(sizeof(void*), alignment)), -- element_size_(element_size), -- size_(0), -- last_list_index_(0), -- last_list_(nullptr) { -- // If this fails, then alignment of elements after the first could be wrong, -- // and we need to pad sizes to fix that. -- DCHECK_EQ(element_size % alignment, 0u); -- AllocateNewList(element_count > 0 ? element_count -- : kDefaultNumElementTypesToReserve); -- last_list_ = storage_[last_list_index_].get(); -- } -- -- ~CharAllocator() = default; -- -- void* Allocate() { -- if (last_list_->IsFull()) { -- // Only allocate a new list if there isn't a spare one still there from -- // previous usage. -- if (last_list_index_ + 1 >= storage_.size()) -- AllocateNewList(last_list_->capacity * 2); -- -- ++last_list_index_; -- last_list_ = storage_[last_list_index_].get(); -- } -- -- ++size_; -- return last_list_->AddElement(); -- } -- -- size_t alignment() const { return alignment_; } -- size_t element_size() const { return element_size_; } -- size_t list_count() const { return storage_.size(); } -- size_t size() const { return size_; } -- bool IsEmpty() const { return size() == 0; } -- -- size_t Capacity() const { -- size_t capacity_sum = 0; -- for (const auto& inner_list : storage_) -- capacity_sum += inner_list->capacity; -- return capacity_sum; -- } -- -- void Clear() { -- // Remove all except for the first InnerList. -- DCHECK(!storage_.empty()); -- storage_.erase(storage_.begin() + 1, storage_.end()); -- last_list_index_ = 0; -- last_list_ = storage_[0].get(); -- last_list_->size = 0; -- size_ = 0; -- } -- -- void RemoveLast() { -- DCHECK(!IsEmpty()); -- last_list_->RemoveLast(); -- if (last_list_->IsEmpty() && last_list_index_ > 0) { -- --last_list_index_; -- last_list_ = storage_[last_list_index_].get(); -- -- // If there are now two empty inner lists, free one of them. -- if (last_list_index_ + 2 < storage_.size()) -- storage_.pop_back(); -- } -- --size_; -- } -- -- void Erase(PositionInCharAllocator* position) { -- DCHECK_EQ(this, position->ptr_to_container); -- -- // Update |position| to point to the element after the erased element. -- InnerList* list = storage_[position->vector_index].get(); -- char* item_iterator = position->item_iterator; -- if (item_iterator == list->LastElement()) -- position->Increment(); -- -- list->Erase(item_iterator); -- // TODO(weiliangc): Free the InnerList if it is empty. -- --size_; -- } -- -- void InsertBefore(ListContainerHelper::Iterator* position, size_t count) { -- if (!count) -- return; -- -- // If |position| is End(), then append |count| elements at the end. This -- // will happen to not invalidate any iterators or memory. -- if (!position->item_iterator) { -- // Set |position| to be the first inserted element. -- Allocate(); -- position->vector_index = storage_.size() - 1; -- position->item_iterator = storage_[position->vector_index]->LastElement(); -- // Allocate the rest. -- for (size_t i = 1; i < count; ++i) -- Allocate(); -- } else { -- storage_[position->vector_index]->InsertBefore( -- alignment_, &position->item_iterator, count); -- size_ += count; -- } -- } -- -- InnerList* InnerListById(size_t id) const { -- DCHECK_LT(id, storage_.size()); -- return storage_[id].get(); -- } -- -- size_t FirstInnerListId() const { -- // |size_| > 0 means that at least one vector in |storage_| will be -- // non-empty. -- DCHECK_GT(size_, 0u); -- size_t id = 0; -- while (storage_[id]->size == 0) -- ++id; -- return id; -- } -- -- size_t LastInnerListId() const { -- // |size_| > 0 means that at least one vector in |storage_| will be -- // non-empty. -- DCHECK_GT(size_, 0u); -- size_t id = storage_.size() - 1; -- while (storage_[id]->size == 0) -- --id; -- return id; -- } -- -- size_t NumAvailableElementsInLastList() const { -- return last_list_->NumElementsAvailable(); -- } -- -- private: -- void AllocateNewList(size_t list_size) { -- std::unique_ptr new_list(new InnerList); -- new_list->capacity = list_size; -- new_list->size = 0; -- new_list->step = element_size_; -- new_list->data.reset(static_cast( -- base::AlignedAlloc(list_size * element_size_, alignment_))); -- storage_.push_back(std::move(new_list)); -- } -- -- std::vector> storage_; -- const size_t alignment_; -- const size_t element_size_; -- -- // The number of elements in the list. -- size_t size_; -- -- // The index of the last list to have had elements added to it, or the only -- // list if the container has not had elements added since being cleared. -- size_t last_list_index_; -- -- // This is equivalent to |storage_[last_list_index_]|. -- InnerList* last_list_; -- -- DISALLOW_COPY_AND_ASSIGN(CharAllocator); --}; -- - // PositionInCharAllocator - ////////////////////////////////////////////////////// - ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator( -diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.h b/src/3rdparty/chromium/cc/base/list_container_helper.h -index c79cf1f18..a44ecb4de 100644 ---- a/src/3rdparty/chromium/cc/base/list_container_helper.h -+++ b/src/3rdparty/chromium/cc/base/list_container_helper.h -@@ -8,10 +8,18 @@ - #include - - #include -+#include -+#include - -+#include "base/logging.h" - #include "base/macros.h" -+#include "base/memory/aligned_memory.h" - #include "cc/base/base_export.h" - -+namespace { -+const size_t kDefaultNumElementTypesToReserve = 32; -+} // namespace -+ - namespace cc { - - // Helper class for ListContainer non-templated logic. All methods are private, -@@ -174,6 +182,252 @@ class CC_BASE_EXPORT ListContainerHelper final { - DISALLOW_COPY_AND_ASSIGN(ListContainerHelper); - }; - -+// CharAllocator -+//////////////////////////////////////////////////// -+// This class deals only with char* and void*. It does allocation and passing -+// out raw pointers, as well as memory deallocation when being destroyed. -+class ListContainerHelper::CharAllocator { -+ public: -+ // CharAllocator::InnerList -+ ///////////////////////////////////////////// -+ // This class holds the raw memory chunk, as well as information about its -+ // size and availability. -+ struct InnerList { -+ std::unique_ptr data; -+ // The number of elements in total the memory can hold. The difference -+ // between capacity and size is the how many more elements this list can -+ // hold. -+ size_t capacity; -+ // The number of elements have been put into this list. -+ size_t size; -+ // The size of each element is in bytes. This is used to move from between -+ // elements' memory locations. -+ size_t step; -+ -+ InnerList() : capacity(0), size(0), step(0) {} -+ -+ void Erase(char* position) { -+ // Confident that destructor is called by caller of this function. Since -+ // CharAllocator does not handle construction after -+ // allocation, it doesn't handle desctrution before deallocation. -+ DCHECK_LE(position, LastElement()); -+ DCHECK_GE(position, Begin()); -+ char* start = position + step; -+ std::copy(start, End(), position); -+ -+ --size; -+ // Decrease capacity to avoid creating not full not last InnerList. -+ --capacity; -+ } -+ -+ void InsertBefore(size_t alignment, char** position, size_t count) { -+ DCHECK_LE(*position, LastElement() + step); -+ DCHECK_GE(*position, Begin()); -+ -+ // Adjust the size and capacity -+ size_t old_size = size; -+ size += count; -+ capacity = size; -+ -+ // Allocate the new data and update the iterator's pointer. -+ std::unique_ptr new_data( -+ static_cast(base::AlignedAlloc(size * step, alignment))); -+ size_t position_offset = *position - Begin(); -+ *position = new_data.get() + position_offset; -+ -+ // Copy the data before the inserted segment -+ memcpy(new_data.get(), data.get(), position_offset); -+ // Copy the data after the inserted segment. -+ memcpy(new_data.get() + position_offset + count * step, -+ data.get() + position_offset, old_size * step - position_offset); -+ data = std::move(new_data); -+ } -+ -+ bool IsEmpty() const { return !size; } -+ bool IsFull() { return capacity == size; } -+ size_t NumElementsAvailable() const { return capacity - size; } -+ -+ void* AddElement() { -+ DCHECK_LT(size, capacity); -+ ++size; -+ return LastElement(); -+ } -+ -+ void RemoveLast() { -+ DCHECK(!IsEmpty()); -+ --size; -+ } -+ -+ char* Begin() const { return data.get(); } -+ char* End() const { return data.get() + size * step; } -+ char* LastElement() const { return data.get() + (size - 1) * step; } -+ char* ElementAt(size_t index) const { return data.get() + index * step; } -+ -+ private: -+ DISALLOW_COPY_AND_ASSIGN(InnerList); -+ }; -+ -+ CharAllocator(size_t alignment, size_t element_size, size_t element_count) -+ // base::AlignedAlloc does not accept alignment less than sizeof(void*). -+ : alignment_(std::max(sizeof(void*), alignment)), -+ element_size_(element_size), -+ size_(0), -+ last_list_index_(0), -+ last_list_(nullptr) { -+ // If this fails, then alignment of elements after the first could be wrong, -+ // and we need to pad sizes to fix that. -+ DCHECK_EQ(element_size % alignment, 0u); -+ AllocateNewList(element_count > 0 ? element_count -+ : kDefaultNumElementTypesToReserve); -+ last_list_ = storage_[last_list_index_].get(); -+ } -+ -+ ~CharAllocator() = default; -+ -+ void* Allocate() { -+ if (last_list_->IsFull()) { -+ // Only allocate a new list if there isn't a spare one still there from -+ // previous usage. -+ if (last_list_index_ + 1 >= storage_.size()) -+ AllocateNewList(last_list_->capacity * 2); -+ -+ ++last_list_index_; -+ last_list_ = storage_[last_list_index_].get(); -+ } -+ -+ ++size_; -+ return last_list_->AddElement(); -+ } -+ -+ size_t alignment() const { return alignment_; } -+ size_t element_size() const { return element_size_; } -+ size_t list_count() const { return storage_.size(); } -+ size_t size() const { return size_; } -+ bool IsEmpty() const { return size() == 0; } -+ -+ size_t Capacity() const { -+ size_t capacity_sum = 0; -+ for (const auto& inner_list : storage_) -+ capacity_sum += inner_list->capacity; -+ return capacity_sum; -+ } -+ -+ void Clear() { -+ // Remove all except for the first InnerList. -+ DCHECK(!storage_.empty()); -+ storage_.erase(storage_.begin() + 1, storage_.end()); -+ last_list_index_ = 0; -+ last_list_ = storage_[0].get(); -+ last_list_->size = 0; -+ size_ = 0; -+ } -+ -+ void RemoveLast() { -+ DCHECK(!IsEmpty()); -+ last_list_->RemoveLast(); -+ if (last_list_->IsEmpty() && last_list_index_ > 0) { -+ --last_list_index_; -+ last_list_ = storage_[last_list_index_].get(); -+ -+ // If there are now two empty inner lists, free one of them. -+ if (last_list_index_ + 2 < storage_.size()) -+ storage_.pop_back(); -+ } -+ --size_; -+ } -+ -+ void Erase(PositionInCharAllocator* position) { -+ DCHECK_EQ(this, position->ptr_to_container); -+ -+ // Update |position| to point to the element after the erased element. -+ InnerList* list = storage_[position->vector_index].get(); -+ char* item_iterator = position->item_iterator; -+ if (item_iterator == list->LastElement()) -+ position->Increment(); -+ -+ list->Erase(item_iterator); -+ // TODO(weiliangc): Free the InnerList if it is empty. -+ --size_; -+ } -+ -+ void InsertBefore(ListContainerHelper::Iterator* position, size_t count) { -+ if (!count) -+ return; -+ -+ // If |position| is End(), then append |count| elements at the end. This -+ // will happen to not invalidate any iterators or memory. -+ if (!position->item_iterator) { -+ // Set |position| to be the first inserted element. -+ Allocate(); -+ position->vector_index = storage_.size() - 1; -+ position->item_iterator = storage_[position->vector_index]->LastElement(); -+ // Allocate the rest. -+ for (size_t i = 1; i < count; ++i) -+ Allocate(); -+ } else { -+ storage_[position->vector_index]->InsertBefore( -+ alignment_, &position->item_iterator, count); -+ size_ += count; -+ } -+ } -+ -+ InnerList* InnerListById(size_t id) const { -+ DCHECK_LT(id, storage_.size()); -+ return storage_[id].get(); -+ } -+ -+ size_t FirstInnerListId() const { -+ // |size_| > 0 means that at least one vector in |storage_| will be -+ // non-empty. -+ DCHECK_GT(size_, 0u); -+ size_t id = 0; -+ while (storage_[id]->size == 0) -+ ++id; -+ return id; -+ } -+ -+ size_t LastInnerListId() const { -+ // |size_| > 0 means that at least one vector in |storage_| will be -+ // non-empty. -+ DCHECK_GT(size_, 0u); -+ size_t id = storage_.size() - 1; -+ while (storage_[id]->size == 0) -+ --id; -+ return id; -+ } -+ -+ size_t NumAvailableElementsInLastList() const { -+ return last_list_->NumElementsAvailable(); -+ } -+ -+ private: -+ void AllocateNewList(size_t list_size) { -+ std::unique_ptr new_list(new InnerList); -+ new_list->capacity = list_size; -+ new_list->size = 0; -+ new_list->step = element_size_; -+ new_list->data.reset(static_cast( -+ base::AlignedAlloc(list_size * element_size_, alignment_))); -+ storage_.push_back(std::move(new_list)); -+ } -+ -+ std::vector> storage_; -+ const size_t alignment_; -+ const size_t element_size_; -+ -+ // The number of elements in the list. -+ size_t size_; -+ -+ // The index of the last list to have had elements added to it, or the only -+ // list if the container has not had elements added since being cleared. -+ size_t last_list_index_; -+ -+ // This is equivalent to |storage_[last_list_index_]|. -+ InnerList* last_list_; -+ -+ DISALLOW_COPY_AND_ASSIGN(CharAllocator); -+}; -+ - } // namespace cc - - #endif // CC_BASE_LIST_CONTAINER_HELPER_H_ diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h index 22528c948..69e624e8b 100644 --- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h diff --git a/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch b/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch deleted file mode 100644 index 55251d7..0000000 --- a/qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc -index 18100c7b7..542f9bd11 100644 ---- a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc -+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc -@@ -5710,7 +5710,7 @@ static ParseQualifiedNameResult ParseQualifiedNameInternal( - - for (unsigned i = 0; i < length;) { - UChar32 c; -- U16_NEXT(characters, i, length, c) -+ U16_NEXT(characters, i, length, c); - if (c == ':') { - if (saw_colon) - return ParseQualifiedNameResult(kQNMultipleColons); diff --git a/qtwebengine-everywhere-5.14.1-gcc10.patch b/qtwebengine-everywhere-5.14.1-gcc10.patch new file mode 100644 index 0000000..be17f15 --- /dev/null +++ b/qtwebengine-everywhere-5.14.1-gcc10.patch @@ -0,0 +1,35 @@ +diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc +diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h +--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 2020-01-20 04:37:42.000000000 -0600 ++++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h 2020-03-25 08:19:35.628534572 -0500 +@@ -6,6 +6,7 @@ + #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ + + #include ++#include + + #include "media/base/media_export.h" + #include "media/cdm/api/content_decryption_module.h" +diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h +--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 2020-01-20 04:37:42.000000000 -0600 ++++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h 2020-03-17 16:59:11.432193734 -0500 +@@ -18,6 +18,7 @@ + #define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_ + + #include ++#include + + #include "perfetto/base/export.h" + +diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h +--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 2020-01-20 04:37:42.000000000 -0600 ++++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h 2020-03-25 09:37:13.373280961 -0500 +@@ -11,6 +11,8 @@ + #ifndef CALL_RTX_RECEIVE_STREAM_H_ + #define CALL_RTX_RECEIVE_STREAM_H_ + ++#include ++#include + #include + + #include "call/rtp_packet_sink_interface.h" diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch index 4bcd376..995db84 100644 --- a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -1,6 +1,6 @@ -diff -ur qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri ---- qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri 2017-12-25 12:07:40.262411459 +0100 +diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri +--- qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri 2017-12-25 12:07:40.262411459 +0100 @@ -157,3 +157,19 @@ #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true diff --git a/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch b/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch index fbbf6fc..fcbc6b5 100644 --- a/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch +++ b/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch @@ -1,7 +1,7 @@ -diff --git a/src/core/config/functions.pri b/src/core/config/functions.pri +diff --git a/src/buildtools/config/functions.pri b/src/buildtools/config/functions.pri index 8c11faa16..191d3d623 100644 ---- a/src/core/config/functions.pri -+++ b/src/core/config/functions.pri +--- a/src/buildtools/config/functions.pri ++++ b/src/buildrools/config/functions.pri @@ -1,5 +1,5 @@ defineReplace(qtwebengine_extractCFlag) { - CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS diff --git a/qtwebengine-opensource-src-5.9.0-no-neon.patch b/qtwebengine-opensource-src-5.9.0-no-neon.patch index dd24ee2..308c5bc 100644 --- a/qtwebengine-opensource-src-5.9.0-no-neon.patch +++ b/qtwebengine-opensource-src-5.9.0-no-neon.patch @@ -1,7 +1,7 @@ -diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri index f45c418fe..f6c7b714e 100644 ---- a/src/core/config/linux.pri -+++ b/src/core/config/linux.pri +--- a/src/buildtools/config/linux.pri ++++ b/src/buildtools/config/linux.pri @@ -87,7 +87,9 @@ contains(QT_ARCH, "arm") { gn_args += arm_use_neon=false # If the toolchain does not explicitly specify to use NEON instructions diff --git a/sources b/sources index 2edbcea..2c2da80 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qtwebengine-everywhere-src-5.13.2-clean.tar.xz) = 1797f1e67ac02e3f8277698cc308bdf6ebffcf646c89121d12353a42a9b6392f2180bfe3e5d051d1a5e205ece182c183a3914376c547e6239a71f2c64f2fe775 SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be +SHA512 (qtwebengine-everywhere-src-5.14.1-clean.tar.xz) = a5c8334e87bc7bf42249b0c1afbf658438de8d05b519d681f3fe3639d65ffd7c3113792cc2f89bed73d9704ac520e15eff94dd5e4a5d36359ac77b4cedc6643f From 80db03774578cd780d50f1c9b555f23d1631a9d6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 26 Mar 2020 07:22:11 -0500 Subject: [PATCH 336/437] update for 5.14.1, use threads for xz --- clean_qtwebengine.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index e134704..bc462b8 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.11.1" + echo "e.g.: ./clean_qtwebengine.sh 5.14.1" exit 1 fi @@ -32,7 +32,7 @@ rm -rf "$DIRNAME" || exit $? if [ -f "$DIRNAME.tar.xz" ] ; then echo "unpacking $DIRNAME.tar.xz" - tar xJf "$DIRNAME.tar.xz" || exit $? + XZ_OPT="-T 4" tar xJf "$DIRNAME.tar.xz" || exit $? elif [ -f "$DIRNAME.tar.bz2" ] ; then echo "unpacking $DIRNAME.tar.bz2" tar xjf "$DIRNAME.tar.bz2" || exit $? @@ -61,7 +61,7 @@ echo "ripping out openh264 sources" rm -rf "$DIRNAME/src/3rdparty/chromium/third_party/openh264/src" || exit $? echo "repacking as $DIRNAME-clean.tar.xz" -XZ_OPT="-9 -f" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? +XZ_OPT="-9 -T 4" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? echo "removing $DIRNAME" rm -rf "$DIRNAME" || exit $? From 99752bf654337a7e0157da713f5613b1f7335c65 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 26 Mar 2020 07:22:39 -0500 Subject: [PATCH 337/437] aarch64 fixes --- clean_ffmpeg.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 6239278..7e1dd97 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -91,6 +91,8 @@ header_files=" libavutil/x86/asm.h \ libavutil/time_internal.h \ libavutil/version.h \ libavutil/x86_cpu.h + libavcodec/aarch64/neon.S \ + libavcodec/aarch64/vp8dsp.h \ libavcodec/x86/constants.h \ libavcodec/x86/dsputil_x86.h \ libavcodec/x86/fft.h \ @@ -279,9 +281,11 @@ manual_files=" libavutil/x86/x86inc.asm \ libavcodec/aarch64/h264pred_neon.S \ libavcodec/aarch64/mdct_neon.S \ libavcodec/aarch64/vorbisdsp_neon.S \ + libavcodec/aarch64/vp8dsp_neon.S \ libavcodec/arm/vorbisdsp_neon.S \ libavcodec/arm/mdct_neon.S \ libavcodec/arm/fft_neon.S \ + libavcodec/arm/vp8dsp_neon.S \ libavutil/ppc/cpu.c \ libavutil/ppc/float_dsp_altivec.c \ libavutil/ppc/float_dsp_init.c \ From b9477d7e182ff23dde3ee196ab28e70768fd0413 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 26 Mar 2020 07:22:53 -0500 Subject: [PATCH 338/437] %build: drop -k used for prior debugging --- qt5-qtwebengine.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 217dc34..da79e51 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -452,7 +452,7 @@ export NINJA_PATH=%{__ninja} . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja -make %{?_smp_mflags} -k +make %{?_smp_mflags} %if 0%{?docs} %make_build docs diff --git a/sources b/sources index 2c2da80..c01519a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.14.1-clean.tar.xz) = a5c8334e87bc7bf42249b0c1afbf658438de8d05b519d681f3fe3639d65ffd7c3113792cc2f89bed73d9704ac520e15eff94dd5e4a5d36359ac77b4cedc6643f +SHA512 (qtwebengine-everywhere-src-5.14.1-clean.tar.xz) = 2823d0e71ac31c605a558e14ed491630d0bcf1d811c5c775c9cef9389352da04953d93a0a209fe40f2cdc8904298700c01e21b0fc46fe6ad8bb659c55fad7cbe From b1bd8b7ca10e077dd10cf16bbb3b9c739b4d9288 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 1 Apr 2020 10:00:37 -0500 Subject: [PATCH 339/437] 5.14.2 --- .gitignore | 1 + qt5-qtwebengine.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d756eff..eb88acf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /qtwebengine-everywhere-src-5.12.6-clean.tar.xz /qtwebengine-everywhere-src-5.13.2-clean.tar.xz /qtwebengine-everywhere-src-5.14.1-clean.tar.xz +/qtwebengine-everywhere-src-5.14.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index da79e51..3cebf11 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -48,7 +48,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.14.1 +Version: 5.14.2 Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details @@ -57,8 +57,8 @@ Release: 1%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # leaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtwebengine-everywhere-src-5.14.1.tar.xz -# ./clean_qtwebengine.sh 5.14.1 +# wget http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/qtwebengine-everywhere-src-5.14.2.tar.xz +# ./clean_qtwebengine.sh 5.14.2 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -612,6 +612,9 @@ done %changelog +* Wed Apr 01 2020 Rex Dieter - 5.14.2-1 +- 5.14.2 + * Wed Mar 25 2020 Rex Dieter - 5.14.1-1 - 5.14.1 - use_system_icu on f32+ diff --git a/sources b/sources index c01519a..2c0d922 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.14.1-clean.tar.xz) = 2823d0e71ac31c605a558e14ed491630d0bcf1d811c5c775c9cef9389352da04953d93a0a209fe40f2cdc8904298700c01e21b0fc46fe6ad8bb659c55fad7cbe +SHA512 (qtwebengine-everywhere-src-5.14.2-clean.tar.xz) = 1b946115ac7fba2db6f2807bca5b8911147c164ed19aa13e46bd030a3317f484b2241150cad59ab071da5fd000fc003a81ccc93a68ef3f34a997ff8c4a7d113a From f28b232cf11404d17304d4fba203e6f745c06ce3 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 4 Apr 2020 18:46:59 -0500 Subject: [PATCH 340/437] rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 3cebf11..94ffa85 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -49,7 +49,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.14.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -612,6 +612,9 @@ done %changelog +* Sat Apr 04 2020 Rex Dieter - 5.14.2-2 +- rebuild (qt5) + * Wed Apr 01 2020 Rex Dieter - 5.14.2-1 - 5.14.2 From c778c7c102b629c805bf7f0bd3f632588975e15c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 11 Jun 2020 15:26:18 -0500 Subject: [PATCH 341/437] 5.15.0 f33's icu-67.x currently not compatible, use bundled icu --- .gitignore | 1 + clean_ffmpeg.sh | 3 ++ qt5-qtwebengine.spec | 28 ++++++------- ...erywhere-5.13.2-fix-chromium-headers.patch | 39 ------------------- sources | 3 +- 5 files changed, 20 insertions(+), 54 deletions(-) delete mode 100644 qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch diff --git a/.gitignore b/.gitignore index eb88acf..f9e5389 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /qtwebengine-everywhere-src-5.13.2-clean.tar.xz /qtwebengine-everywhere-src-5.14.1-clean.tar.xz /qtwebengine-everywhere-src-5.14.2-clean.tar.xz +/qtwebengine-everywhere-src-5.15.0-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index 7e1dd97..bb28dd4 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -80,6 +80,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/lzo.h \ libavutil/macros.h \ libavutil/mem_internal.h \ + libavcodec/mlp_parse.h \ libavutil/old_pix_fmts.h \ libavutil/pixfmt.h \ libavutil/qsort.h \ @@ -89,6 +90,8 @@ header_files=" libavutil/x86/asm.h \ libavutil/timer.h \ libavutil/timestamp.h \ libavutil/time_internal.h \ + libavutil/tx_priv.h \ + libavutil/tx_template.c \ libavutil/version.h \ libavutil/x86_cpu.h libavcodec/aarch64/neon.S \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 94ffa85..378db7d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -13,7 +13,7 @@ # need libwebp >= 0.6.0 %global use_system_libwebp 1 -%if 0%{?fedora} > 31 +%if 0%{?fedora} > 31 && 0%{?fedora} < 33 # need libicu >= 64, only currently available on f32+ %global use_system_libicu 1 %endif @@ -48,8 +48,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.14.2 -Release: 2%{?dist} +Version: 5.15.0 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -95,10 +95,6 @@ Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch -# Fix missing include in chromium -Patch27: qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch -# Fix gcc10 FTBFS -Patch29: qtwebengine-everywhere-5.14.1-gcc10.patch ## Upstream patches: # qtwebengine-chromium @@ -114,6 +110,7 @@ BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qtxmlpatterns-devel BuildRequires: qt5-qtlocation-devel BuildRequires: qt5-qtsensors-devel +BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-qtwebchannel-devel BuildRequires: qt5-qttools-static # for examples? @@ -380,7 +377,7 @@ popd %patch3 -p1 -b .no-neon %endif %patch4 -p1 -b .SIOCGSTAMP -%patch5 -p1 -b .QT_DEPRECATED_VERSION +#patch5 -p1 -b .QT_DEPRECATED_VERSION ## upstream patches @@ -389,8 +386,6 @@ popd #patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 -%patch27 -p1 -b .fix-chromium -%patch29 -p1 -b .gcc10 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -405,10 +400,12 @@ sed -i -e 's|QT_CONFIG(xkbcommon)|QT_CONFIG(xkbcommon_evdev)|g' src/core/web_eve sed -i -e 's!audio_processing//!audio_processing/!g' \ src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \ src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc + # remove ./ from #line commands in ANGLE to avoid debugedit failure (?) -sed -i -e 's!\./!!g' \ - src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ - src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +#sed -i -e 's!\./!!g' \ +# src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ +# src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp + # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ @@ -526,6 +523,7 @@ done %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess %{_qt5_plugindir}/designer/libqwebengineview.so +%{_qt5_plugindir}/imageformats/libqpdf.so %dir %{_qt5_datadir}/resources/ %if ! 0%{?use_system_libicu} %{_qt5_datadir}/resources/icudtl.dat @@ -612,6 +610,10 @@ done %changelog +* Wed Jun 10 2020 Rex Dieter - 5.15.0-1 +- 5.15.0 +- f33's icu-67.x currently not compatible, use bundled icu + * Sat Apr 04 2020 Rex Dieter - 5.14.2-2 - rebuild (qt5) diff --git a/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch b/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch deleted file mode 100644 index e887fa3..0000000 --- a/qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 033c7aa2da1bc78347765d60c15843ece02ef4d8 Mon Sep 17 00:00:00 2001 -From: Troy Dawson -Date: Tue, 11 Feb 2020 15:43:30 -0800 -Subject: [PATCH] fix chromium headers - ---- - .../chromium/cc/base/list_container_helper.cc | 250 ----------------- - .../chromium/cc/base/list_container_helper.h | 254 ++++++++++++++++++ - .../aec3/clockdrift_detector.h | 1 + - .../modules/video_coding/decoding_state.h | 1 + - 4 files changed, 256 insertions(+), 250 deletions(-) - -diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -index 22528c948..69e624e8b 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -@@ -12,6 +12,7 @@ - #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_ - - #include -+#include - - namespace webrtc { - -diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h -index b87fb2d03..ec972949d 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h -+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h -@@ -11,6 +11,7 @@ - #ifndef MODULES_VIDEO_CODING_DECODING_STATE_H_ - #define MODULES_VIDEO_CODING_DECODING_STATE_H_ - -+#include - #include - #include - #include --- -2.24.1 - diff --git a/sources b/sources index 2c0d922..a96de3d 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.14.2-clean.tar.xz) = 1b946115ac7fba2db6f2807bca5b8911147c164ed19aa13e46bd030a3317f484b2241150cad59ab071da5fd000fc003a81ccc93a68ef3f34a997ff8c4a7d113a +SHA512 (qtwebengine-everywhere-src-5.15.0-clean.tar.xz) = 888c29bb1d461e2fee369c84938de7738ff56f95a63bb91df0f6ecbc46b1cbe5a6787486c15972dea1e210afe4f7adc65ef0926cf1de6545a532d3a85dec54af From e83ad4cc52e3a413fa89335baa826d5d7660f12b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 11 Jun 2020 15:27:30 -0500 Subject: [PATCH 342/437] pulseaudio header sources too --- sources | 1 + sources.keep | 1 + 2 files changed, 2 insertions(+) create mode 100644 sources.keep diff --git a/sources b/sources index a96de3d..c6a12e9 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (qtwebengine-everywhere-src-5.15.0-clean.tar.xz) = 888c29bb1d461e2fee369c84938de7738ff56f95a63bb91df0f6ecbc46b1cbe5a6787486c15972dea1e210afe4f7adc65ef0926cf1de6545a532d3a85dec54af +SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be diff --git a/sources.keep b/sources.keep new file mode 100644 index 0000000..adf9556 --- /dev/null +++ b/sources.keep @@ -0,0 +1 @@ +SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be From 000c49fd9415b2ba85440ef3df9c26e1d36f85c3 Mon Sep 17 00:00:00 2001 From: Marie Loise Nolden Date: Wed, 17 Jun 2020 13:18:40 +0000 Subject: [PATCH 343/437] introduce %if 0%{?use_system_re2} %if 0%{?use_system_jsoncpp} to select where to use system vs. shipped libs better make things a bit more optional for shipped vs. built-in libs re2 and jsoncpp with variables collected at one place. F30 fails to build because re2 is too small, centos-stream and rhel don't ship them at all while they are included in epel 8 already. --- qt5-qtwebengine.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 378db7d..6717995 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -10,8 +10,12 @@ # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 %endif +%if 0%{?fedora} > 30 || 0%{?epel} > 7 # need libwebp >= 0.6.0 %global use_system_libwebp 1 +%global use_system_jsoncpp 1 +%global use_system_re2 1 +%endif %if 0%{?fedora} > 31 && 0%{?fedora} < 33 # need libicu >= 64, only currently available on f32+ @@ -99,8 +103,10 @@ Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch ## Upstream patches: # qtwebengine-chromium +%if 0%{?fedora} || 0%{?epel} > 7 # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches ExclusiveArch: %{qt5_qtwebengine_arches} +%endif BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-private-devel @@ -129,7 +135,9 @@ BuildRequires: krb5-devel BuildRequires: libicu-devel >= 64 %endif BuildRequires: libjpeg-devel +%if 0%{?use_system_re2} BuildRequires: re2-devel +%endif BuildRequires: snappy-devel %ifarch %{ix86} x86_64 BuildRequires: yasm @@ -141,7 +149,9 @@ BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(egl) +%if 0%{?use_system_jsoncpp} BuildRequires: pkgconfig(jsoncpp) +%endif BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libudev) %if 0%{?use_system_libwebp} @@ -411,9 +421,11 @@ sed -i -e 's!audio_processing//!audio_processing/!g' \ sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +%if 0%{?use_system_re2} # http://bugzilla.redhat.com/1337585 # can't just delete, but we'll overwrite with system headers to be on the safe side cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ +%endif %if 0 #ifarch x86_64 From 692d13d648d98d96562ab48995ad4fc86db1f202 Mon Sep 17 00:00:00 2001 From: Marie Loise Nolden Date: Wed, 17 Jun 2020 13:21:29 +0000 Subject: [PATCH 344/437] compile on rhel 7 --- qt5-qtwebengine.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6717995..1538803 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -326,6 +326,9 @@ Provides: bundled(fdlibm) = 5.3 %{?_qt5_version:Requires: qt5-qtbase%{?_isa} = %{_qt5_version}} +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-toolchain +%endif %description %{summary}. @@ -449,6 +452,10 @@ cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium %build +%if 0%{?rhel} == 7 +. /opt/rh/devtoolset-7/enable +%endif + export STRIP=strip export NINJAFLAGS="%{__ninja_common_opts}" export NINJA_PATH=%{__ninja} From 1d3b8d400ffb02bd32e9ebf93253fd3406fb23de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 05:14:57 +0000 Subject: [PATCH 345/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1538803..b9141c7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.0 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -629,6 +629,9 @@ done %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 5.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jun 10 2020 Rex Dieter - 5.15.0-1 - 5.15.0 - f33's icu-67.x currently not compatible, use bundled icu From 9f9009e6e2bafa724d24a4e452aa46c147b4535c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 07:36:45 +0000 Subject: [PATCH 346/437] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b9141c7..70d6526 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -629,6 +629,10 @@ done %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 5.15.0-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 5.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 0f2066a515f0cf27d7131fcf3276eb9b54cfe2ca Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Sun, 6 Sep 2020 10:44:40 +0200 Subject: [PATCH 347/437] Fix FTBFS --- qt5-qtwebengine.spec | 10 ++++- qtwebengine-opensource-bison-37.patch | 53 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 qtwebengine-opensource-bison-37.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 70d6526..0964586 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.0 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -102,6 +102,7 @@ Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch ## Upstream patches: # qtwebengine-chromium +Patch100: qtwebengine-opensource-bison-37.patch %if 0%{?fedora} || 0%{?epel} > 7 # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches @@ -400,6 +401,8 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 +%patch100 -p1 -b .bison37 + # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases %if "%{_qt5_version}" < "5.12.0" @@ -462,7 +465,7 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} \ %{?debug_config:CONFIG+="%{debug_config}}" \ - CONFIG+="link_pulseaudio" \ + CONFIG+="link_pulseaudio use_gold_linker" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ . @@ -629,6 +632,9 @@ done %changelog +* Fri Sep 04 2020 Than Ngo - 5.15.0-4 +- Fix FTBFS + * Sat Aug 01 2020 Fedora Release Engineering - 5.15.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/qtwebengine-opensource-bison-37.patch b/qtwebengine-opensource-bison-37.patch new file mode 100644 index 0000000..081aad1 --- /dev/null +++ b/qtwebengine-opensource-bison-37.patch @@ -0,0 +1,53 @@ +From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Fri, 14 Aug 2020 16:38:48 +0200 +Subject: [PATCH 1/1] Fix bison 3.7 +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +Do a replace run inspired by newer versions of the script. + +Fixes: QTBUG-86018 +Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1 +Reviewed-by: Michael Brüning +--- + .../blink/renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py +index f75e25fd23f..7e0767e951a 100755 +--- qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py ++++ qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py +@@ -45,6 +45,19 @@ from utilities import abs + + from blinkbuild.name_style_converter import NameStyleConverter + ++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): ++ prefix_lines = map(lambda s: s + '\n', prefix_lines) ++ suffix_lines = map(lambda s: s + '\n', suffix_lines) ++ with open(path, 'r') as f: ++ old_lines = f.readlines() ++ for i in range(len(old_lines)): ++ for src, dest in replace_list: ++ old_lines[i] = old_lines[i].replace(src, dest) ++ new_lines = prefix_lines + old_lines + suffix_lines ++ with open(path, 'w') as f: ++ f.writelines(new_lines) ++ ++ + assert len(sys.argv) == 4 or len(sys.argv) == 5 + + inputFile = abs(sys.argv[1]) +@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard + print >>outputHFile, outputHContents + print >>outputHFile, '#endif // %s' % headerGuard + outputHFile.close() ++ ++common_replace_list = [(inputRoot + '.hh', ++ inputRoot + '.h')] ++modify_file( ++ outputCpp, [], [], ++ replace_list=common_replace_list) +-- +2.16.3 From c3347b713e180ca6206d9e5a71875297478cb096 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 11 Sep 2020 10:41:17 +0200 Subject: [PATCH 348/437] 5.15.1 --- .gitignore | 1 + qt5-qtwebengine.spec | 15 ++++---- qtwebengine-opensource-bison-37.patch | 53 --------------------------- sources | 2 +- 4 files changed, 9 insertions(+), 62 deletions(-) delete mode 100644 qtwebengine-opensource-bison-37.patch diff --git a/.gitignore b/.gitignore index f9e5389..fcccc05 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /qtwebengine-everywhere-src-5.14.1-clean.tar.xz /qtwebengine-everywhere-src-5.14.2-clean.tar.xz /qtwebengine-everywhere-src-5.15.0-clean.tar.xz +/qtwebengine-everywhere-src-5.15.1-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0964586..08a36be 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,8 +52,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.0 -Release: 4%{?dist} +Version: 5.15.1 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -61,8 +61,8 @@ Release: 4%{?dist} License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io # leaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/qtwebengine-everywhere-src-5.14.2.tar.xz -# ./clean_qtwebengine.sh 5.14.2 +# wget http://download.qt.io/official_releases/qt/5.15/5.15.1/submodules/qtwebengine-everywhere-src-5.15.1.tar.xz +# ./clean_qtwebengine.sh 5.15.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz # cleanup scripts used above Source1: clean_qtwebengine.sh @@ -101,8 +101,6 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch ## Upstream patches: -# qtwebengine-chromium -Patch100: qtwebengine-opensource-bison-37.patch %if 0%{?fedora} || 0%{?epel} > 7 # handled by qt5-srpm-macros, which defines %%qt5_qtwebengine_arches @@ -401,8 +399,6 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 -%patch100 -p1 -b .bison37 - # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases %if "%{_qt5_version}" < "5.12.0" @@ -632,6 +628,9 @@ done %changelog +* Fri Sep 11 2020 Jan Grulich - 5.15.1-1 +- 5.15.1 + * Fri Sep 04 2020 Than Ngo - 5.15.0-4 - Fix FTBFS diff --git a/qtwebengine-opensource-bison-37.patch b/qtwebengine-opensource-bison-37.patch deleted file mode 100644 index 081aad1..0000000 --- a/qtwebengine-opensource-bison-37.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Fri, 14 Aug 2020 16:38:48 +0200 -Subject: [PATCH 1/1] Fix bison 3.7 -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -Do a replace run inspired by newer versions of the script. - -Fixes: QTBUG-86018 -Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1 -Reviewed-by: Michael Brüning ---- - .../blink/renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -index f75e25fd23f..7e0767e951a 100755 ---- qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -+++ qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -@@ -45,6 +45,19 @@ from utilities import abs - - from blinkbuild.name_style_converter import NameStyleConverter - -+def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): -+ prefix_lines = map(lambda s: s + '\n', prefix_lines) -+ suffix_lines = map(lambda s: s + '\n', suffix_lines) -+ with open(path, 'r') as f: -+ old_lines = f.readlines() -+ for i in range(len(old_lines)): -+ for src, dest in replace_list: -+ old_lines[i] = old_lines[i].replace(src, dest) -+ new_lines = prefix_lines + old_lines + suffix_lines -+ with open(path, 'w') as f: -+ f.writelines(new_lines) -+ -+ - assert len(sys.argv) == 4 or len(sys.argv) == 5 - - inputFile = abs(sys.argv[1]) -@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard - print >>outputHFile, outputHContents - print >>outputHFile, '#endif // %s' % headerGuard - outputHFile.close() -+ -+common_replace_list = [(inputRoot + '.hh', -+ inputRoot + '.h')] -+modify_file( -+ outputCpp, [], [], -+ replace_list=common_replace_list) --- -2.16.3 diff --git a/sources b/sources index c6a12e9..3a616ba 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qtwebengine-everywhere-src-5.15.0-clean.tar.xz) = 888c29bb1d461e2fee369c84938de7738ff56f95a63bb91df0f6ecbc46b1cbe5a6787486c15972dea1e210afe4f7adc65ef0926cf1de6545a532d3a85dec54af +SHA512 (qtwebengine-everywhere-src-5.15.1-clean.tar.xz) = 13c71bce833ba46f16e3171b7b79d999db1688eae9000850c30274f5e68677b5338cb298b8f68b58f606135da538e3a2068e45545574e8bf462d0c314f36719a SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be From 87255949e2c8a36c979928561a2a387e55328b32 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 11 Sep 2020 10:56:41 +0200 Subject: [PATCH 349/437] Rebase patches --- qtwebengine-everywhere-src-5.10.0-linux-pri.patch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch index 995db84..a4dc334 100644 --- a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -1,9 +1,10 @@ -diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri ---- qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri 2017-11-29 09:42:29.000000000 +0100 -+++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri 2017-12-25 12:07:40.262411459 +0100 -@@ -157,3 +157,19 @@ - #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true - #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true +diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri +index 56c18bd..cb17c7a 100644 +--- a/src/buildtools/config/linux.pri ++++ b/src/buildtools/config/linux.pri +@@ -176,3 +176,19 @@ host_build { + } + gn_args += use_glib=false } + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on From c0b909f308a58551ffc97df31ecb8848f1f934cb Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 11 Sep 2020 12:06:33 +0200 Subject: [PATCH 350/437] BR: xkbcommon --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 08a36be..bbc2a5d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -185,6 +185,7 @@ BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(xkbcommon) ## https://bugreports.qt.io/browse/QTBUG-59094 #BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) BuildRequires: perl-interpreter From 6cf36e6da80f56dc5bfc14fb009f4f57d78d4089 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 23 Sep 2020 12:53:07 +0200 Subject: [PATCH 351/437] Rebuild (libevent) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bbc2a5d..fa49766 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.1 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -629,6 +629,9 @@ done %changelog +* Wed Sep 23 12:52:56 CEST 2020 Jan Grulich - 5.15.1-2 +- Rebuild (libevent) + * Fri Sep 11 2020 Jan Grulich - 5.15.1-1 - 5.15.1 From bf0addefcad5eabf0910a6b14097b2e535f34361 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 4 Nov 2020 13:39:21 -0700 Subject: [PATCH 352/437] Fix missing #includes for gcc-11 --- qt5-qtwebengine.spec | 8 +++++++- qtwebengine-gcc11.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-gcc11.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fa49766..48291bc 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.1 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -99,6 +99,8 @@ Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch +# Missing #includes for gcc-11 +Patch27: qtwebengine-gcc11.patch ## Upstream patches: @@ -399,6 +401,7 @@ popd #patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 +%patch27 -p1 -b .gcc11 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -629,6 +632,9 @@ done %changelog +* Wed Nov 04 2020 Jeff Law - 5.15.1-3 +- Fix missing #includes for gcc-11 + * Wed Sep 23 12:52:56 CEST 2020 Jan Grulich - 5.15.1-2 - Rebuild (libevent) diff --git a/qtwebengine-gcc11.patch b/qtwebengine-gcc11.patch new file mode 100644 index 0000000..e6ab5d0 --- /dev/null +++ b/qtwebengine-gcc11.patch @@ -0,0 +1,40 @@ +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc +index b957d3ddd..2f9df34b0 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + ++#include + #include "src/trace_processor/db/column.h" + + #include "src/trace_processor/db/table.h" +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc +index 020d3b4a9..fd405d179 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc +@@ -14,6 +14,8 @@ + * limitations under the License. + */ + ++#include ++ + #include "src/trace_processor/importers/proto/heap_graph_walker.h" + #include "perfetto/base/logging.h" + +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc +index f02990069..df1c0eeb2 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc +@@ -14,9 +14,9 @@ + * limitations under the License. + */ + ++#include + #include "src/trace_processor/string_pool.h" + +-#include + + #include "perfetto/base/logging.h" + #include "perfetto/ext/base/utils.h" From 62bdc27178acb18f7c6f93f5b1a1e0af55d5d0cd Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 20 Nov 2020 09:12:46 +0100 Subject: [PATCH 353/437] 5.15.2 --- .gitignore | 1 + qt5-qtwebengine.spec | 7 +++++-- sources | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fcccc05..b75d6b0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /qtwebengine-everywhere-src-5.14.2-clean.tar.xz /qtwebengine-everywhere-src-5.15.0-clean.tar.xz /qtwebengine-everywhere-src-5.15.1-clean.tar.xz +/qtwebengine-everywhere-src-5.15.2-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 48291bc..a110cd5 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,8 +52,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.1 -Release: 3%{?dist} +Version: 5.15.2 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -632,6 +632,9 @@ done %changelog +* Fri Nov 20 09:12:35 CET 2020 Jan Grulich - 5.15.2-1 +- 5.15.2 + * Wed Nov 04 2020 Jeff Law - 5.15.1-3 - Fix missing #includes for gcc-11 diff --git a/sources b/sources index 3a616ba..46ecf0c 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (qtwebengine-everywhere-src-5.15.1-clean.tar.xz) = 13c71bce833ba46f16e3171b7b79d999db1688eae9000850c30274f5e68677b5338cb298b8f68b58f606135da538e3a2068e45545574e8bf462d0c314f36719a -SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be +SHA512 (qtwebengine-everywhere-src-5.15.2-clean.tar.xz) = 03c167ce94fd639ace630308a3b3fffa96d122049640dc9e3c2687f239af754359126f739569c1771f684d1be665404be093e96697813fd689eccf10aea2b1f2 From 5f4140fe4546d3e15729cee5bc72a55d7b9ee643 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 20 Nov 2020 09:20:34 +0100 Subject: [PATCH 354/437] Add back missing sources --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index 46ecf0c..813cc9f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ +SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be SHA512 (qtwebengine-everywhere-src-5.15.2-clean.tar.xz) = 03c167ce94fd639ace630308a3b3fffa96d122049640dc9e3c2687f239af754359126f739569c1771f684d1be665404be093e96697813fd689eccf10aea2b1f2 From 7d0e99c8fea1868af414eb0367eddef1c37dcfe1 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 20 Nov 2020 11:21:53 +0100 Subject: [PATCH 355/437] Rebase GCC11 patch --- qtwebengine-gcc11.patch | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/qtwebengine-gcc11.patch b/qtwebengine-gcc11.patch index e6ab5d0..7910b39 100644 --- a/qtwebengine-gcc11.patch +++ b/qtwebengine-gcc11.patch @@ -1,5 +1,20 @@ +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc +index fd651958f..1e8d0606c 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc +@@ -14,9 +14,9 @@ + * limitations under the License. + */ + ++#include + #include "src/trace_processor/containers/string_pool.h" + +-#include + + #include "perfetto/base/logging.h" + #include "perfetto/ext/base/utils.h" diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc -index b957d3ddd..2f9df34b0 100644 +index 80dcf5b24..b0037ec34 100644 --- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc +++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc @@ -14,6 +14,7 @@ @@ -9,9 +24,9 @@ index b957d3ddd..2f9df34b0 100644 +#include #include "src/trace_processor/db/column.h" - #include "src/trace_processor/db/table.h" + #include "src/trace_processor/db/compare.h" diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc -index 020d3b4a9..fd405d179 100644 +index fc9e41558..0e5bd92f4 100644 --- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc +++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc @@ -14,6 +14,8 @@ @@ -23,18 +38,3 @@ index 020d3b4a9..fd405d179 100644 #include "src/trace_processor/importers/proto/heap_graph_walker.h" #include "perfetto/base/logging.h" -diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc -index f02990069..df1c0eeb2 100644 ---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc -+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc -@@ -14,9 +14,9 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/string_pool.h" - --#include - - #include "perfetto/base/logging.h" - #include "perfetto/ext/base/utils.h" From a3ce39e504d702c64ee79da452325e47b99a44c4 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 24 Nov 2020 07:55:17 +0100 Subject: [PATCH 356/437] Rebuild for qtbase with -no-reduce-relocations option --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a110cd5..36ba684 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -632,6 +632,9 @@ done %changelog +* Tue Nov 24 07:55:13 CET 2020 Jan Grulich - 5.15.2-2 +- Rebuild for qtbase with -no-reduce-relocations option + * Fri Nov 20 09:12:35 CET 2020 Jan Grulich - 5.15.2-1 - 5.15.2 From 6aa5c41e88baa69150b774d39d05c41dfb3e7392 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 4 Dec 2020 12:22:42 -0700 Subject: [PATCH 357/437] Fix another missing #include for gcc-11 --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-gcc11.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 36ba684..0f12d65 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -632,6 +632,9 @@ done %changelog +* Fri Dec 04 2020 Jeff Law - 5.15.2-3 +- Fix another missing #include for gcc-11 + * Tue Nov 24 07:55:13 CET 2020 Jan Grulich - 5.15.2-2 - Rebuild for qtbase with -no-reduce-relocations option diff --git a/qtwebengine-gcc11.patch b/qtwebengine-gcc11.patch index 7910b39..f8b2c16 100644 --- a/qtwebengine-gcc11.patch +++ b/qtwebengine-gcc11.patch @@ -38,3 +38,15 @@ index fc9e41558..0e5bd92f4 100644 #include "src/trace_processor/importers/proto/heap_graph_walker.h" #include "perfetto/base/logging.h" +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc +index 837bfeba9..cdd56817d 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + ++#include + #include "src/trace_processor/types/variadic.h" + + namespace perfetto { From bf83cfa46f0938b931fd7870c1cbb0513985f88b Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Wed, 30 Dec 2020 14:00:14 +0100 Subject: [PATCH 358/437] Rebuild for gcc bugfix upgrade --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0f12d65..abe68b0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -632,6 +632,9 @@ done %changelog +* Wed Dec 30 2020 Mattia Verga - 5.15.2-4 +- Rebuild for gcc bugfix upgrade + * Fri Dec 04 2020 Jeff Law - 5.15.2-3 - Fix another missing #include for gcc-11 From 101979aadb9f53fc7f141f5d7942de62edeeeed6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 06:37:01 +0000 Subject: [PATCH 359/437] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index abe68b0..ac878b7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -109,6 +109,7 @@ Patch27: qtwebengine-gcc11.patch ExclusiveArch: %{qt5_qtwebengine_arches} %endif +BuildRequires: make BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-private-devel # TODO: check of = is really needed or if >= would be good enough -- rex From 98d7dd5b849c63454c00f3e7298f76e92304e9d3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 20 Jan 2021 02:50:55 +0100 Subject: [PATCH 360/437] Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) * Wed Jan 20 2021 Kevin Kofler - 5.15.2-5 - Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) --- qt5-qtwebengine.spec | 8 +- ...ngine-everywhere-src-5.15.2-#1904652.patch | 137 ++++++++++++++++++ 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-src-5.15.2-#1904652.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ac878b7..4ccd818 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -101,6 +101,8 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch # Missing #includes for gcc-11 Patch27: qtwebengine-gcc11.patch +# Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) +Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch ## Upstream patches: @@ -403,6 +405,7 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 %patch27 -p1 -b .gcc11 +%patch28 -p1 -b .rh#1904652 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -633,6 +636,9 @@ done %changelog +* Wed Jan 20 2021 Kevin Kofler - 5.15.2-5 +- Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) + * Wed Dec 30 2020 Mattia Verga - 5.15.2-4 - Rebuild for gcc bugfix upgrade diff --git a/qtwebengine-everywhere-src-5.15.2-#1904652.patch b/qtwebengine-everywhere-src-5.15.2-#1904652.patch new file mode 100644 index 0000000..49281f1 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.2-#1904652.patch @@ -0,0 +1,137 @@ +diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-11-07 02:22:36.000000000 +0100 ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-20 02:14:53.066223906 +0100 +@@ -248,6 +248,18 @@ + return RestrictKillTarget(current_pid, sysno); + } + ++#if defined(__NR_newfstatat) ++ if (sysno == __NR_newfstatat) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ ++#if defined(__NR_fstatat64) ++ if (sysno == __NR_fstatat64) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ + if (SyscallSets::IsFileSystem(sysno) || + SyscallSets::IsCurrentDirectory(sysno)) { + return Error(fs_denied_errno); +diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2020-11-07 02:22:36.000000000 +0100 ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-20 02:44:06.132477575 +0100 +@@ -6,6 +6,7 @@ + + #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" + ++#include + #include + #include + #include +@@ -353,6 +354,32 @@ + return -ENOSYS; + } + ++intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ void* aux) { ++ switch (args.nr) { ++#if defined(__NR_newfstatat) ++ case __NR_newfstatat: ++#endif ++#if defined(__NR_fstatat64) ++ case __NR_fstatat64: ++#endif ++#if defined(__NR_newfstatat) || defined(__NR_fstatat64) ++ if (*reinterpret_cast(args.args[1]) == '\0' ++ && args.args[3] == static_cast(AT_EMPTY_PATH)) { ++ return sandbox::sys_fstat64(static_cast(args.args[0]), ++ reinterpret_cast(args.args[2])); ++ } ++ break; ++#endif ++ } ++ ++ CrashSIGSYS_Handler(args, aux); ++ ++ // Should never be reached. ++ RAW_CHECK(false); ++ return -ENOSYS; ++} ++ + bpf_dsl::ResultExpr CrashSIGSYS() { + return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); + } +@@ -385,6 +412,10 @@ + return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); + } + ++bpf_dsl::ResultExpr RewriteFstatatSIGSYS() { ++ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL); ++} ++ + void AllocateCrashKeys() { + #if !defined(OS_NACL_NONSFI) + if (seccomp_crash_key) +diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2020-11-07 02:22:36.000000000 +0100 ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-20 02:11:04.583714199 +0100 +@@ -62,6 +62,10 @@ + // sched_setparam(), sched_setscheduler() + SANDBOX_EXPORT intptr_t + SIGSYSSchedHandler(const struct arch_seccomp_data& args, void* aux); ++// If the fstatat syscall is actually a disguised fstat, calls the regular fstat ++// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler. ++SANDBOX_EXPORT intptr_t ++ SIGSYSFstatatHandler(const struct arch_seccomp_data& args, void* aux); + + // Variants of the above functions for use with bpf_dsl. + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS(); +@@ -72,6 +76,7 @@ + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex(); + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace(); + SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS(); ++SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS(); + + // Allocates a crash key so that Seccomp information can be recorded. + void AllocateCrashKeys(); +diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2020-11-07 02:22:36.000000000 +0100 ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2021-01-20 02:41:12.033133269 +0100 +@@ -261,4 +261,13 @@ + + #endif // defined(MEMORY_SANITIZER) + ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf) ++{ ++#if defined(__NR_fstat64) ++ return syscall(__NR_fstat64, fd, buf); ++#else ++ return syscall(__NR_fstat, fd, buf); ++#endif ++} ++ + } // namespace sandbox +diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2020-11-07 02:22:36.000000000 +0100 ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2021-01-20 02:40:26.499827829 +0100 +@@ -17,6 +17,7 @@ + struct rlimit64; + struct cap_hdr; + struct cap_data; ++struct stat64; + + namespace sandbox { + +@@ -84,6 +85,9 @@ + const struct sigaction* act, + struct sigaction* oldact); + ++// Recent glibc rewrites fstat to fstatat. ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf); ++ + } // namespace sandbox + + #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ From 09e1adb883639325aa8115dc1fc3e8f5088a2438 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 22 Jan 2021 19:13:51 +0100 Subject: [PATCH 361/437] -#1904652 patch: Fail more gracefully on bad fstatat. Do not crash if an fstatat is not allowed, but fail in the way documented by the fstatat manpage (set errno to EACCES and return -1). Otherwise, QtWebEngine always crashes. --- qtwebengine-everywhere-src-5.15.2-#1904652.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qtwebengine-everywhere-src-5.15.2-#1904652.patch b/qtwebengine-everywhere-src-5.15.2-#1904652.patch index 49281f1..28a60ad 100644 --- a/qtwebengine-everywhere-src-5.15.2-#1904652.patch +++ b/qtwebengine-everywhere-src-5.15.2-#1904652.patch @@ -22,16 +22,17 @@ diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/s return Error(fs_denied_errno); diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc --- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-20 02:44:06.132477575 +0100 -@@ -6,6 +6,7 @@ ++++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-22 19:02:55.651668257 +0100 +@@ -6,6 +6,8 @@ #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" ++#include +#include #include #include #include -@@ -353,6 +354,32 @@ +@@ -353,6 +355,35 @@ return -ENOSYS; } @@ -49,6 +50,9 @@ diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/s + && args.args[3] == static_cast(AT_EMPTY_PATH)) { + return sandbox::sys_fstat64(static_cast(args.args[0]), + reinterpret_cast(args.args[2])); ++ } else { ++ errno = EACCES; ++ return -1; + } + break; +#endif @@ -64,7 +68,7 @@ diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/s bpf_dsl::ResultExpr CrashSIGSYS() { return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); } -@@ -385,6 +412,10 @@ +@@ -385,6 +416,10 @@ return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); } From 393d059f13f02ab1b61b83d232efe6402216af41 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 23 Jan 2021 10:49:35 +0100 Subject: [PATCH 362/437] Reenable system ICU on F33+, ICU 67 supported since 5.15.1 according to Debian * Sat Jan 23 2021 Kevin Kofler - 5.15.2-6 - Reenable system ICU on F33+, ICU 67 supported since 5.15.1 according to Debian --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 4ccd818..df8a719 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -17,7 +17,7 @@ %global use_system_re2 1 %endif -%if 0%{?fedora} > 31 && 0%{?fedora} < 33 +%if 0%{?fedora} > 31 # need libicu >= 64, only currently available on f32+ %global use_system_libicu 1 %endif @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -636,6 +636,9 @@ done %changelog +* Sat Jan 23 2021 Kevin Kofler - 5.15.2-6 +- Reenable system ICU on F33+, ICU 67 supported since 5.15.1 according to Debian + * Wed Jan 20 2021 Kevin Kofler - 5.15.2-5 - Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) From 8f7f959da3ea185ef74ef9d89499aae8039c0c4a Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 23 Jan 2021 23:31:04 +0100 Subject: [PATCH 363/437] Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) * Sat Jan 23 2021 Kevin Kofler - 5.15.2-7 - Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) Unlike the other sandbox fix, this one also affects stable Fedora releases, but it affects only 32-bit architectures such as armv7hl or the i386 multilib, not 64-bit architectures such as x86_64 or aarch64. --- qt5-qtwebengine.spec | 10 ++- ...e-src-5.15.2-sandbox-time64-syscalls.patch | 89 +++++++++++++++++++ 2 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index df8a719..400e25c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -101,8 +101,10 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch # Missing #includes for gcc-11 Patch27: qtwebengine-gcc11.patch -# Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652) +# Fix sandbox issue breaking text rendering with glibc >= 2.33 (#1904652) Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch +# Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) +Patch29: qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch ## Upstream patches: @@ -406,6 +408,7 @@ popd %patch26 -p1 -b .use-python2 %patch27 -p1 -b .gcc11 %patch28 -p1 -b .rh#1904652 +%patch29 -p1 -b .sandbox-time64-syscalls # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -636,6 +639,9 @@ done %changelog +* Sat Jan 23 2021 Kevin Kofler - 5.15.2-7 +- Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) + * Sat Jan 23 2021 Kevin Kofler - 5.15.2-6 - Reenable system ICU on F33+, ICU 67 supported since 5.15.1 according to Debian diff --git a/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch b/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch new file mode 100644 index 0000000..6a98dd4 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch @@ -0,0 +1,89 @@ +Description: fix seccomp-bpf failures in syscalls 0403, 0407 + glibc ≥ 2.31 uses these syscalls on 32-bit platforms: + . + - https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d98 + - https://sourceware.org/git/?p=glibc.git;a=commit;h=ec138c67cbda8b58 +Author: Andreas Müller +Forwarded: no +Last-Update: 2020-09-02 + +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return Allow(); + #endif + +- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { ++ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep ++#if defined(__NR_clock_gettime64) ++ || sysno == __NR_clock_gettime64 ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ || sysno == __NR_clock_nanosleep_time64 ++#endif ++ ) { + return RestrictClockID(); + } + +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf + case __NR_clock_gettime: + case __NR_clock_getres: + case __NR_clock_nanosleep: ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: ++#endif ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: ++#endif + return RestrictClockID(); + default: + return Allow(); +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s + // filtered by RestrictClokID(). + case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). + case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). ++#endif + case __NR_clock_settime: // Privileged. + #if defined(__i386__) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) +--- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h ++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +@@ -1385,6 +1385,14 @@ + #define __NR_memfd_create (__NR_SYSCALL_BASE+385) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) ++#endif ++ + // ARM private syscalls. + #if !defined(__ARM_NR_BASE) + #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) +--- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h ++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h +@@ -1433,4 +1433,12 @@ + #define __NR_memfd_create (__NR_Linux + 354) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ From a86893d2861fc62811df1b94b2e12226b8029dd3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Tue, 26 Jan 2021 13:52:53 +0100 Subject: [PATCH 364/437] Add versioned Conflicts with -freeworld built against bundled ICU (#1920379) * Tue Jan 26 2021 Kevin Kofler - 5.15.2-8 - Add versioned Conflicts with -freeworld built against bundled ICU (#1920379) The offending -freeworld builds want the ICU data file previously shipped here. -freeworld must be upgraded together with this package. --- qt5-qtwebengine.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 400e25c..47d06ce 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 7%{?dist} +Release: 8%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -333,6 +333,11 @@ Provides: bundled(fdlibm) = 5.3 %{?_qt5_version:Requires: qt5-qtbase%{?_isa} = %{_qt5_version}} +%if 0%{?use_system_icu} +# Those versions were built with bundled ICU and want the data file. +Conflicts: qt5-qtwebengine-freeworld < 5.15.2-2 +%endif + %if 0%{?rhel} == 7 BuildRequires: devtoolset-7-toolchain %endif @@ -639,6 +644,9 @@ done %changelog +* Tue Jan 26 2021 Kevin Kofler - 5.15.2-8 +- Add versioned Conflicts with -freeworld built against bundled ICU (#1920379) + * Sat Jan 23 2021 Kevin Kofler - 5.15.2-7 - Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) From 75dddc5aef27eda236c7e4b085cf4831ff6c439d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 30 Mar 2021 19:39:37 +0100 Subject: [PATCH 365/437] Rebuilt for removed libstdc++ symbol (#1937698) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 47d06ce..b38a2d9 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 8%{?dist} +Release: 9%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -644,6 +644,9 @@ done %changelog +* Tue Mar 30 2021 Jonathan Wakely - 5.15.2-9 +- Rebuilt for removed libstdc++ symbol (#1937698) + * Tue Jan 26 2021 Kevin Kofler - 5.15.2-8 - Add versioned Conflicts with -freeworld built against bundled ICU (#1920379) From 0236974f1f4c4600f85e6833413f0652e62e1999 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 10 May 2021 16:08:31 +0100 Subject: [PATCH 366/437] Rebuilt for removed libstdc++ symbols (#1937698) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b38a2d9..8d51236 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 9%{?dist} +Release: 10%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -644,6 +644,9 @@ done %changelog +* Mon May 10 2021 Jonathan Wakely - 5.15.2-10 +- Rebuilt for removed libstdc++ symbols (#1937698) + * Tue Mar 30 2021 Jonathan Wakely - 5.15.2-9 - Rebuilt for removed libstdc++ symbol (#1937698) From 32062243e895612823b47c2ae9eeb873a98a3542 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Thu, 20 May 2021 01:16:47 +0100 Subject: [PATCH 367/437] Rebuild for ICU 69 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8d51236..264e84a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 10%{?dist} +Release: 11%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -644,6 +644,9 @@ done %changelog +* Thu May 20 2021 Pete Walter - 5.15.2-11 +- Rebuild for ICU 69 + * Mon May 10 2021 Jonathan Wakely - 5.15.2-10 - Rebuilt for removed libstdc++ symbols (#1937698) From 4cef673b2dd01ce85ce7a841cf352104bbe79668 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 16 Jun 2021 09:23:37 -0500 Subject: [PATCH 368/437] workaround SIGSTKSZ FTBFS (#19455950 --- qt5-qtwebengine.spec | 8 +++++++- qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 264e84a..9c00ab2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.2 -Release: 11%{?dist} +Release: 12%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -105,6 +105,8 @@ Patch27: qtwebengine-gcc11.patch Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch # Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) Patch29: qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch +# Fix FTBFS with latest glibc, https://bugzilla.redhat.com/show_bug.cgi?id=1945595 +Patch30: qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch ## Upstream patches: @@ -414,6 +416,7 @@ popd %patch27 -p1 -b .gcc11 %patch28 -p1 -b .rh#1904652 %patch29 -p1 -b .sandbox-time64-syscalls +%patch30 -p1 -b .SIGSTKSZ # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -644,6 +647,9 @@ done %changelog +* Wed Jun 16 2021 Rex Dieter - 5.15.2-12 +- workaround SIGSTKSZ FTBFS (#19455950 + * Thu May 20 2021 Pete Walter - 5.15.2-11 - Rebuild for ICU 69 diff --git a/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch b/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch new file mode 100644 index 0000000..44b6c87 --- /dev/null +++ b/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-06-16 09:20:00.175193987 -0500 +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. From 3e16f741fab72d4a7de0906dbb0a98579294f39f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 24 Jun 2021 12:04:43 -0500 Subject: [PATCH 369/437] workaround 'TRUE'/'FALSE' was not declared in this scope --- qt5-qtwebengine.spec | 4 +++ qtwebengine-everywhere-src-5.15.2-bool.patch | 26 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 qtwebengine-everywhere-src-5.15.2-bool.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9c00ab2..c05bf6f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -107,6 +107,8 @@ Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch Patch29: qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch # Fix FTBFS with latest glibc, https://bugzilla.redhat.com/show_bug.cgi?id=1945595 Patch30: qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch +# FIX FTBFS with latest glibc: 'TRUE'/'FALSE' was not declared in this scope +Patch31: qtwebengine-everywhere-src-5.15.2-bool.patch ## Upstream patches: @@ -417,6 +419,7 @@ popd %patch28 -p1 -b .rh#1904652 %patch29 -p1 -b .sandbox-time64-syscalls %patch30 -p1 -b .SIGSTKSZ +%patch31 -p1 -b .bool # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references # when building on older Qt releases @@ -649,6 +652,7 @@ done %changelog * Wed Jun 16 2021 Rex Dieter - 5.15.2-12 - workaround SIGSTKSZ FTBFS (#19455950 +- workaround 'TRUE'/'FALSE' was not declared in this scope * Thu May 20 2021 Pete Walter - 5.15.2-11 - Rebuild for ICU 69 diff --git a/qtwebengine-everywhere-src-5.15.2-bool.patch b/qtwebengine-everywhere-src-5.15.2-bool.patch new file mode 100644 index 0000000..cda9140 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.2-bool.patch @@ -0,0 +1,26 @@ +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.BOOL qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.BOOL 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 12:00:52.393740774 -0500 +@@ -18,8 +18,8 @@ UCollationResult CompareString16WithColl + StringPiece16 rhs) { + UErrorCode error = U_ZERO_ERROR; + UCollationResult result = collator.compare( +- icu::UnicodeString(FALSE, lhs.data(), static_cast(lhs.length())), +- icu::UnicodeString(FALSE, rhs.data(), static_cast(rhs.length())), ++ icu::UnicodeString(false, lhs.data(), static_cast(lhs.length())), ++ icu::UnicodeString(false, rhs.data(), static_cast(rhs.length())), + error); + DCHECK(U_SUCCESS(error)); + return result; +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.BOOL qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.BOOL 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 12:01:13.735648901 -0500 +@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const + icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE); + measure_format.formatMeasures(measures, 3, formatted, ignore, status); + *out = i18n::UnicodeStringToString16(formatted); +- return U_SUCCESS(status) == TRUE; ++ return U_SUCCESS(status) == true; + } + + string16 DateIntervalFormat(const Time& begin_time, From c2956dae379a6a32935a2454c0b7d18c58233bfa Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 24 Jun 2021 12:46:53 -0500 Subject: [PATCH 370/437] respin bool.patch --- qtwebengine-everywhere-src-5.15.2-bool.patch | 24 +++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/qtwebengine-everywhere-src-5.15.2-bool.patch b/qtwebengine-everywhere-src-5.15.2-bool.patch index cda9140..468032e 100644 --- a/qtwebengine-everywhere-src-5.15.2-bool.patch +++ b/qtwebengine-everywhere-src-5.15.2-bool.patch @@ -1,6 +1,6 @@ -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.BOOL qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.BOOL 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 12:00:52.393740774 -0500 +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 12:46:07.233326342 -0500 @@ -18,8 +18,8 @@ UCollationResult CompareString16WithColl StringPiece16 rhs) { UErrorCode error = U_ZERO_ERROR; @@ -12,9 +12,9 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/strin error); DCHECK(U_SUCCESS(error)); return result; -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.BOOL qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.BOOL 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 12:01:13.735648901 -0500 +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 12:46:07.233326342 -0500 @@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE); measure_format.formatMeasures(measures, 3, formatted, ignore, status); @@ -24,3 +24,15 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_ } string16 DateIntervalFormat(const Time& begin_time, +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc 2021-06-24 12:46:07.233326342 -0500 +@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() + Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) { + Skeletons skeletons; + size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0); +- icu::UnicodeString host(FALSE, hostname.data(), hostname_length); ++ icu::UnicodeString host(false, hostname.data(), hostname_length); + // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-], + // there is no point in getting rid of diacritics because combining marks + // attached to non-LGC characters are already blocked. From 04f58d9aa76e46b422ef5a8450dc9cfca849d170 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 24 Jun 2021 14:15:24 -0500 Subject: [PATCH 371/437] respin bool.patch --- qtwebengine-everywhere-src-5.15.2-bool.patch | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/qtwebengine-everywhere-src-5.15.2-bool.patch b/qtwebengine-everywhere-src-5.15.2-bool.patch index 468032e..dc9f83e 100644 --- a/qtwebengine-everywhere-src-5.15.2-bool.patch +++ b/qtwebengine-everywhere-src-5.15.2-bool.patch @@ -1,6 +1,6 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc --- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 12:46:07.233326342 -0500 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 14:14:23.409239460 -0500 @@ -18,8 +18,8 @@ UCollationResult CompareString16WithColl StringPiece16 rhs) { UErrorCode error = U_ZERO_ERROR; @@ -14,7 +14,7 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/strin return result; diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc --- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 12:46:07.233326342 -0500 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 14:14:23.409239460 -0500 @@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE); measure_format.formatMeasures(measures, 3, formatted, ignore, status); @@ -26,7 +26,7 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_ string16 DateIntervalFormat(const Time& begin_time, diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc --- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc 2021-06-24 12:46:07.233326342 -0500 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc 2021-06-24 14:14:23.410239461 -0500 @@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) { Skeletons skeletons; @@ -36,3 +36,15 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_ // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-], // there is no point in getting rid of diacritics because combining marks // attached to non-LGC characters are already blocked. +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc.bool 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc 2021-06-24 14:15:06.057259662 -0500 +@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() + DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING) + << "ICU ambiguous alias warning for encoding: " << encoding_.GetName(); + if (converter_icu_) +- ucnv_setFallback(converter_icu_, TRUE); ++ ucnv_setFallback(converter_icu_, true); + } + + int TextCodecICU::DecodeToBuffer(UChar* target, From 5c93e67981a847db05675ec79c4ab91965015b66 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 24 Jun 2021 14:44:19 -0500 Subject: [PATCH 372/437] respin bool.patch --- qtwebengine-everywhere-src-5.15.2-bool.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qtwebengine-everywhere-src-5.15.2-bool.patch b/qtwebengine-everywhere-src-5.15.2-bool.patch index dc9f83e..511da94 100644 --- a/qtwebengine-everywhere-src-5.15.2-bool.patch +++ b/qtwebengine-everywhere-src-5.15.2-bool.patch @@ -48,3 +48,15 @@ diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/bli } int TextCodecICU::DecodeToBuffer(UChar* target, +diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c +--- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c.bool 2020-11-06 19:22:36.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-06-24 14:44:09.987163175 -0500 +@@ -1958,7 +1958,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler + #ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_out != NULL) { + ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, +- TRUE); ++ 1); + } + #endif /* LIBXML_ICU_ENABLED */ + else { From d122c011631137b79455850c363676c655cf9e09 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 Jun 2021 14:07:15 -0500 Subject: [PATCH 373/437] 5.15.5 --- .gitignore | 1 + clean_ffmpeg.sh | 12 ++ qt5-qtwebengine.spec | 97 ++++++------ ...bengine-5.14-1-QT_DEPRECATED_VERSION.patch | 17 --- ...bengine-5.15.0-QT_DEPRECATED_VERSION.patch | 17 +++ ...engine-everywhere-5.13.2-use-python2.patch | 13 -- qtwebengine-everywhere-5.14.1-gcc10.patch | 35 ----- qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch | 12 -- ...engine-everywhere-5.15.5-use-python2.patch | 24 +++ ...gine-everywhere-src-5.10.0-linux-pri.patch | 6 +- ...here-src-5.12.0-gn-bootstrap-verbose.patch | 13 -- ...-everywhere-src-5.15.0-no-icudtl-dat.patch | 15 +- ...ngine-everywhere-src-5.15.2-#1904652.patch | 141 ------------------ qtwebengine-everywhere-src-5.15.2-bool.patch | 62 -------- ...e-src-5.15.2-sandbox-time64-syscalls.patch | 89 ----------- ...ngine-everywhere-src-5.15.5-#1904652.patch | 141 ++++++++++++++++++ ...ngine-everywhere-src-5.15.5-SIGSTKSZ.patch | 24 +++ qtwebengine-everywhere-src-5.15.5-TRUE.patch | 12 ++ ...e-src-5.15.5-sandbox-time64-syscalls.patch | 85 +++++++++++ qtwebengine-gcc11.patch | 52 ------- sources | 2 +- 21 files changed, 369 insertions(+), 501 deletions(-) delete mode 100644 qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch create mode 100644 qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch delete mode 100644 qtwebengine-everywhere-5.13.2-use-python2.patch delete mode 100644 qtwebengine-everywhere-5.14.1-gcc10.patch delete mode 100644 qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch create mode 100644 qtwebengine-everywhere-5.15.5-use-python2.patch delete mode 100644 qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch rename qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch => qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch (71%) delete mode 100644 qtwebengine-everywhere-src-5.15.2-#1904652.patch delete mode 100644 qtwebengine-everywhere-src-5.15.2-bool.patch delete mode 100644 qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch create mode 100644 qtwebengine-everywhere-src-5.15.5-#1904652.patch create mode 100644 qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch create mode 100644 qtwebengine-everywhere-src-5.15.5-TRUE.patch create mode 100644 qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch delete mode 100644 qtwebengine-gcc11.patch diff --git a/.gitignore b/.gitignore index b75d6b0..6226724 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /qtwebengine-everywhere-src-5.15.0-clean.tar.xz /qtwebengine-everywhere-src-5.15.1-clean.tar.xz /qtwebengine-everywhere-src-5.15.2-clean.tar.xz +/qtwebengine-everywhere-src-5.15.5-clean.tar.xz diff --git a/clean_ffmpeg.sh b/clean_ffmpeg.sh index bb28dd4..360f330 100755 --- a/clean_ffmpeg.sh +++ b/clean_ffmpeg.sh @@ -38,6 +38,7 @@ header_files=" libavutil/x86/asm.h \ libavutil/x86/timer.h \ libavutil/aarch64/asm.S \ libavutil/aarch64/bswap.h \ + libavutil/aarch64/cpu.h \ libavutil/aarch64/timer.h \ libavutil/arm/asm.S \ libavutil/arm/bswap.h \ @@ -61,6 +62,16 @@ header_files=" libavutil/x86/asm.h \ libavutil/avutil.h \ libavutil/bswap.h \ libavutil/buffer_internal.h \ + libavcodec/bsf_internal.h \ + libavcodec/codec.h \ + libavcodec/codec_desc.h \ + libavcodec/codec_id.h \ + libavcodec/codec_par.h \ + libavcodec/decode.h \ + libavcodec/hwconfig.h \ + libavcodec/internal.h \ + libavcodec/packet.h \ + libavcodec/packet_internal.h \ libavutil/common.h \ libavutil/colorspace.h \ libavutil/cpu_internal.h \ @@ -272,6 +283,7 @@ manual_files=" libavutil/x86/x86inc.asm \ libavutil/fixed_dsp.c \ libavutil/float_dsp.c \ libavutil/imgutils.c \ + libavutil/aarch64/cpu.c \ libavutil/aarch64/float_dsp_neon.S \ libavutil/arm/cpu.c \ libavutil/arm/float_dsp_neon.S \ diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c05bf6f..f5dcb91 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -2,7 +2,7 @@ %global _hardened_build 1 -# define to build docs, need to undef this for bootstrapping +# define to build docs, may need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available %global docs 1 @@ -17,8 +17,8 @@ %global use_system_re2 1 %endif -%if 0%{?fedora} > 31 -# need libicu >= 64, only currently available on f32+ +%if 0%{?fedora} > 32 +# need libicu >= 65, only currently available on f33+ %global use_system_libicu 1 %endif @@ -52,8 +52,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.2 -Release: 12%{?dist} +Version: 5.15.5 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -75,12 +75,13 @@ Source10: macros.qt5-qtwebengine Source20: pulseaudio-12.2-headers.tar.gz # some tweaks to linux.pri (system yasm, link libpci, run unbundling script) +# FIXME/TODO: review, I *think* this is no longer needed -- rdieter Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because # we use the system ICU, which embeds the data statically) completely -Patch1: qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch +Patch1: qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch2: qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch @@ -90,25 +91,23 @@ Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch # workaround FTBFS against kernel-headers-5.2.0+ Patch4: qtwebengine-SIOCGSTAMP.patch # fix build when using qt < 5.14 -Patch5: qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch +Patch5: qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch # remove Android dependencies from openmax_dl ARM NEON detection (detect.c) Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch -# Force verbose output from the GN bootstrap process -Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 -Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch -# Missing #includes for gcc-11 -Patch27: qtwebengine-gcc11.patch +Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch # Fix sandbox issue breaking text rendering with glibc >= 2.33 (#1904652) -Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch +# https://bugs.chromium.org/p/chromium/issues/detail?id=1164975 +Patch28: qtwebengine-everywhere-src-5.15.5-#1904652.patch # Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) -Patch29: qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch -# Fix FTBFS with latest glibc, https://bugzilla.redhat.com/show_bug.cgi?id=1945595 -Patch30: qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch -# FIX FTBFS with latest glibc: 'TRUE'/'FALSE' was not declared in this scope -Patch31: qtwebengine-everywhere-src-5.15.2-bool.patch +Patch29: qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch +# don't assume type-ness of SIGSTKSZ, +# https://bugzilla.redhat.com/show_bug.cgi?id=1945595 +Patch30: qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch +# FTBFS TRUE/FALSE undeclared +Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch ## Upstream patches: @@ -142,9 +141,10 @@ BuildRequires: git-core BuildRequires: gperf BuildRequires: krb5-devel %if 0%{?use_system_libicu} -BuildRequires: libicu-devel >= 64 +BuildRequires: libicu-devel >= 65 %endif BuildRequires: libjpeg-devel +BuildRequires: nodejs %if 0%{?use_system_re2} BuildRequires: re2-devel %endif @@ -172,10 +172,12 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(poppler-cpp) BuildRequires: pkgconfig(zlib) %if 0%{?fedora} && 0%{?fedora} < 30 BuildRequires: pkgconfig(minizip) %else +BuildConflicts: minizip-devel Provides: bundled(minizip) = 1.2 %endif BuildRequires: pkgconfig(x11) @@ -197,7 +199,9 @@ BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xkbfile) ## https://bugreports.qt.io/browse/QTBUG-59094 +## requires libxml2 built with icu support #BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0) BuildRequires: perl-interpreter # fesco exception to allow python2 use: https://pagure.io/fesco/issue/2208 @@ -209,8 +213,10 @@ BuildRequires: %{__python2} BuildRequires: python2 BuildRequires: python2-rpm-macros %endif +## HACK, seems patch26 is not 100% complete +BuildRequires: %{_bindir}/python %if 0%{?use_system_libvpx} -BuildRequires: pkgconfig(vpx) >= 1.7.0 +BuildRequires: pkgconfig(vpx) >= 1.8.0 %endif # extra (non-upstream) functions needed, see @@ -397,7 +403,7 @@ mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium popd -%patch0 -p1 -b .linux-pri +#patch0 -p1 -b .linux-pri %if 0%{?use_system_libicu} %patch1 -p1 -b .no-icudtl-dat %endif @@ -406,39 +412,17 @@ popd %patch3 -p1 -b .no-neon %endif %patch4 -p1 -b .SIOCGSTAMP -#patch5 -p1 -b .QT_DEPRECATED_VERSION +%patch5 -p1 -b .QT_DEPRECATED_VERSION ## upstream patches #patch10 -p1 -b .openmax-dl-neon -## NEEDSWORK -#patch21 -p1 -b .gn-bootstrap-verbose %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 -%patch27 -p1 -b .gcc11 %patch28 -p1 -b .rh#1904652 %patch29 -p1 -b .sandbox-time64-syscalls %patch30 -p1 -b .SIGSTKSZ -%patch31 -p1 -b .bool - -# the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references -# when building on older Qt releases -%if "%{_qt5_version}" < "5.12.0" -sed -i -e 's|QT_CONFIG(xkbcommon)|QT_CONFIG(xkbcommon_evdev)|g' src/core/web_event_factory.cpp -%endif - -# fix // in #include in content/renderer/gpu to avoid debugedit failure -#sed -i -e 's!gpu//!gpu/!g' \ -# src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc -# and another one in 2 files in WebRTC -sed -i -e 's!audio_processing//!audio_processing/!g' \ - src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \ - src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc - -# remove ./ from #line commands in ANGLE to avoid debugedit failure (?) -#sed -i -e 's!\./!!g' \ -# src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ -# src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +%patch31 -p1 -b .TRUE # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS @@ -471,6 +455,16 @@ popd # copy the Chromium license so it is installed with the appropriate name cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium +# consider doing this as part of the tarball creation step instead? rdieter +# fix/workaround +# fatal error: QtWebEngineCore/qtwebenginecoreglobal.h: No such file or directory +if [ ! -f "./include/QtWebEngineCore/qtwebenginecoreglobal.h" ]; then +%_qt5_bindir/syncqt.pl -version %{version} +fi + +# abort if this doesn't get created by syncqt.pl +test -f "./include/QtWebEngineCore/qtwebenginecoreglobal.h" + %build %if 0%{?rhel} == 7 @@ -512,14 +506,6 @@ sed -i \ -e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" \ %{buildroot}%{rpm_macros_dir}/macros.qt5-qtwebengine -# hardlink files to {_bindir} -mkdir -p %{buildroot}%{_bindir} -pushd %{buildroot}%{_qt5_bindir} -for i in * ; do - ln -v ${i} %{buildroot}%{_bindir}/${i} -done -popd - ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt5_libdir} @@ -558,7 +544,6 @@ done %files %license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc %{_qt5_libdir}/libQt5*.so.* -%{_bindir}/qwebengine_convert_dict %{_qt5_bindir}/qwebengine_convert_dict %{_qt5_libdir}/qt5/qml/* %{_qt5_libdir}/qt5/libexec/QtWebEngineProcess @@ -632,7 +617,6 @@ done %{_qt5_headerdir}/Qt*/ %{_qt5_libdir}/libQt5*.so %{_qt5_libdir}/libQt5*.prl -#{_qt5_libdir}/Qt5WebEngineCore.la %{_qt5_libdir}/cmake/Qt5*/ %{_qt5_libdir}/pkgconfig/Qt5*.pc %{_qt5_archdatadir}/mkspecs/modules/*.pri @@ -650,6 +634,9 @@ done %changelog +* Wed Jun 23 2021 Rex Dieter - 5.15.5-1 +- 5.15.5 + * Wed Jun 16 2021 Rex Dieter - 5.15.2-12 - workaround SIGSTKSZ FTBFS (#19455950 - workaround 'TRUE'/'FALSE' was not declared in this scope diff --git a/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch b/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch deleted file mode 100644 index 69b1bbf..0000000 --- a/qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h ---- qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED 2020-01-20 05:17:16.000000000 -0600 -+++ qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h 2020-03-24 15:42:03.558394148 -0500 -@@ -119,9 +119,13 @@ public: - QUrl url() const; - QString mimeType() const; - #if QT_DEPRECATED_SINCE(5, 14) -+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) - QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead") -+#endif - QString path() const; -+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) - QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead") -+#endif - void setPath(QString path); - #endif - bool isFinished() const; diff --git a/qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch b/qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch new file mode 100644 index 0000000..3771308 --- /dev/null +++ b/qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch @@ -0,0 +1,17 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED_VERSION qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h +--- qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED_VERSION 2021-06-24 07:34:27.991417071 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h 2021-06-24 07:36:28.996937357 -0500 +@@ -120,9 +120,13 @@ public: + QString mimeType() const; + #if QT_DEPRECATED_SINCE(5, 14) + #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) ++#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) + QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead") ++#endif + QString path() const; ++#if QT_VERSION >= QT_VERSION_CHECK(5,14,0) + QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead") ++#endif + void setPath(QString path); + #else + QT_DEPRECATED_X("Use downloadDirectory() and downloadFileName() instead") diff --git a/qtwebengine-everywhere-5.13.2-use-python2.patch b/qtwebengine-everywhere-5.13.2-use-python2.patch deleted file mode 100644 index 91a17ae..0000000 --- a/qtwebengine-everywhere-5.13.2-use-python2.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/webengine/module.pro b/src/webengine/module.pro -index 49a1086b2..afc89d49e 100644 ---- a/src/webengine/module.pro -+++ b/src/webengine/module.pro -@@ -76,7 +76,7 @@ qtConfig(webengine-testsupport) { - python = $$pythonPathForShell() - chromium_attributions.commands = \ - cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \ -- $$python chromium/tools/licenses.py \ -+ python2 chromium/tools/licenses.py \ - --file-template ../../tools/about_credits.tmpl \ - --entry-template ../../tools/about_credits_entry.tmpl credits \ - $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc)) diff --git a/qtwebengine-everywhere-5.14.1-gcc10.patch b/qtwebengine-everywhere-5.14.1-gcc10.patch deleted file mode 100644 index be17f15..0000000 --- a/qtwebengine-everywhere-5.14.1-gcc10.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc -diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h ---- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 2020-01-20 04:37:42.000000000 -0600 -+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h 2020-03-25 08:19:35.628534572 -0500 -@@ -6,6 +6,7 @@ - #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ - - #include -+#include - - #include "media/base/media_export.h" - #include "media/cdm/api/content_decryption_module.h" -diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h ---- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 2020-01-20 04:37:42.000000000 -0600 -+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h 2020-03-17 16:59:11.432193734 -0500 -@@ -18,6 +18,7 @@ - #define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_ - - #include -+#include - - #include "perfetto/base/export.h" - -diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h ---- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 2020-01-20 04:37:42.000000000 -0600 -+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h 2020-03-25 09:37:13.373280961 -0500 -@@ -11,6 +11,8 @@ - #ifndef CALL_RTX_RECEIVE_STREAM_H_ - #define CALL_RTX_RECEIVE_STREAM_H_ - -+#include -+#include - #include - - #include "call/rtp_packet_sink_interface.h" diff --git a/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch b/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch deleted file mode 100644 index 44b6c87..0000000 --- a/qtwebengine-everywhere-5.15.2-SIGSTKSZ.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-06-16 09:20:00.175193987 -0500 -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/qtwebengine-everywhere-5.15.5-use-python2.patch b/qtwebengine-everywhere-5.15.5-use-python2.patch new file mode 100644 index 0000000..12c53ea --- /dev/null +++ b/qtwebengine-everywhere-5.15.5-use-python2.patch @@ -0,0 +1,24 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.use-python2 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.use-python2 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2021-06-23 15:27:45.771765298 -0500 +@@ -83,7 +83,7 @@ def _MinifyJS(input_js): + + with tempfile.NamedTemporaryFile() as _: + args = [ +- 'python', ++ 'python2', + rjsmin_path + ] + p = subprocess.Popen(args, +diff -up qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro.use-python2 qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro +--- qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro.use-python2 2021-06-11 00:31:04.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro 2021-06-23 15:26:48.897435095 -0500 +@@ -76,7 +76,7 @@ qtConfig(webengine-testsupport) { + python = $$pythonPathForShell() + chromium_attributions.commands = \ + cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \ +- $$python chromium/tools/licenses.py \ ++ python2 chromium/tools/licenses.py \ + --file-template ../../tools/about_credits.tmpl \ + --entry-template ../../tools/about_credits_entry.tmpl credits \ + $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc)) diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch index a4dc334..8d88773 100644 --- a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -9,9 +9,9 @@ index 56c18bd..cb17c7a 100644 + +# yasm is only used on x86, and passing use_system_yasm makes the build fail on +# other architectures (e.g., ARM), so make it conditional on the architecture -+contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+ gn_args += use_system_yasm=true -+} ++#contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++# gn_args += use_system_yasm=true ++#} + +# link libpci instead of dlopening it, our Qt packaging depends on it anyway +gn_args += linux_link_libpci=true diff --git a/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch deleted file mode 100644 index ef1012f..0000000 --- a/qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index b6bf9cfc4..30f92e6ac 100644 ---- a/src/buildtools/gn.pro -+++ b/src/buildtools/gn.pro -@@ -18,7 +18,7 @@ build_pass|!debug_and_release { - src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - gn_bootstrap = $$system_path($$absolute_path(gn/build/gen.py, $$src_3rd_party_dir)) - -- gn_gen_args = --no-last-commit-position --out-path $$out_path \ -+ gn_gen_args = --no-last-commit-position --verbose --out-path $$out_path \ - --cc \"$$which($$QMAKE_CC)\" --cxx \"$$which($$QMAKE_CXX)\" \ - --ld \"$$which($$QMAKE_LINK)\" - diff --git a/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch b/qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch similarity index 71% rename from qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch rename to qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch index e035dff..a83367e 100644 --- a/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch +++ b/qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch @@ -1,15 +1,15 @@ -diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp -index 1c8316430..a1c27d28f 100644 ---- a/src/core/web_engine_library_info.cpp -+++ b/src/core/web_engine_library_info.cpp -@@ -259,29 +259,12 @@ QString dictionariesPath() +diff -up qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp +--- qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat 2021-06-24 07:26:58.976486102 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp 2021-06-24 07:32:19.272863523 -0500 +@@ -273,7 +273,6 @@ QString dictionariesPath() QString resourcesDataPath() { - static bool initialized = false; static QString potentialResourcesPath = - #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) + #if defined(OS_MAC) && defined(QT_MAC_FRAMEWORK_BUILD) getResourcesPath(frameworkBundle()); +@@ -282,21 +281,6 @@ QString resourcesDataPath() #else QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); #endif @@ -28,7 +28,6 @@ index 1c8316430..a1c27d28f 100644 - potentialResourcesPath = fallbackDir(); - } - } -- + return potentialResourcesPath; } - } // namespace diff --git a/qtwebengine-everywhere-src-5.15.2-#1904652.patch b/qtwebengine-everywhere-src-5.15.2-#1904652.patch deleted file mode 100644 index 28a60ad..0000000 --- a/qtwebengine-everywhere-src-5.15.2-#1904652.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-20 02:14:53.066223906 +0100 -@@ -248,6 +248,18 @@ - return RestrictKillTarget(current_pid, sysno); - } - -+#if defined(__NR_newfstatat) -+ if (sysno == __NR_newfstatat) { -+ return RewriteFstatatSIGSYS(); -+ } -+#endif -+ -+#if defined(__NR_fstatat64) -+ if (sysno == __NR_fstatat64) { -+ return RewriteFstatatSIGSYS(); -+ } -+#endif -+ - if (SyscallSets::IsFileSystem(sysno) || - SyscallSets::IsCurrentDirectory(sysno)) { - return Error(fs_denied_errno); -diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-22 19:02:55.651668257 +0100 -@@ -6,6 +6,8 @@ - - #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" - -+#include -+#include - #include - #include - #include -@@ -353,6 +355,35 @@ - return -ENOSYS; - } - -+intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, -+ void* aux) { -+ switch (args.nr) { -+#if defined(__NR_newfstatat) -+ case __NR_newfstatat: -+#endif -+#if defined(__NR_fstatat64) -+ case __NR_fstatat64: -+#endif -+#if defined(__NR_newfstatat) || defined(__NR_fstatat64) -+ if (*reinterpret_cast(args.args[1]) == '\0' -+ && args.args[3] == static_cast(AT_EMPTY_PATH)) { -+ return sandbox::sys_fstat64(static_cast(args.args[0]), -+ reinterpret_cast(args.args[2])); -+ } else { -+ errno = EACCES; -+ return -1; -+ } -+ break; -+#endif -+ } -+ -+ CrashSIGSYS_Handler(args, aux); -+ -+ // Should never be reached. -+ RAW_CHECK(false); -+ return -ENOSYS; -+} -+ - bpf_dsl::ResultExpr CrashSIGSYS() { - return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); - } -@@ -385,6 +416,10 @@ - return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); - } - -+bpf_dsl::ResultExpr RewriteFstatatSIGSYS() { -+ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL); -+} -+ - void AllocateCrashKeys() { - #if !defined(OS_NACL_NONSFI) - if (seccomp_crash_key) -diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-20 02:11:04.583714199 +0100 -@@ -62,6 +62,10 @@ - // sched_setparam(), sched_setscheduler() - SANDBOX_EXPORT intptr_t - SIGSYSSchedHandler(const struct arch_seccomp_data& args, void* aux); -+// If the fstatat syscall is actually a disguised fstat, calls the regular fstat -+// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler. -+SANDBOX_EXPORT intptr_t -+ SIGSYSFstatatHandler(const struct arch_seccomp_data& args, void* aux); - - // Variants of the above functions for use with bpf_dsl. - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS(); -@@ -72,6 +76,7 @@ - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex(); - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace(); - SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS(); -+SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS(); - - // Allocates a crash key so that Seccomp information can be recorded. - void AllocateCrashKeys(); -diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2021-01-20 02:41:12.033133269 +0100 -@@ -261,4 +261,13 @@ - - #endif // defined(MEMORY_SANITIZER) - -+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf) -+{ -+#if defined(__NR_fstat64) -+ return syscall(__NR_fstat64, fd, buf); -+#else -+ return syscall(__NR_fstat, fd, buf); -+#endif -+} -+ - } // namespace sandbox -diff -ur qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2020-11-07 02:22:36.000000000 +0100 -+++ qtwebengine-everywhere-src-5.15.2-#1904652/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2021-01-20 02:40:26.499827829 +0100 -@@ -17,6 +17,7 @@ - struct rlimit64; - struct cap_hdr; - struct cap_data; -+struct stat64; - - namespace sandbox { - -@@ -84,6 +85,9 @@ - const struct sigaction* act, - struct sigaction* oldact); - -+// Recent glibc rewrites fstat to fstatat. -+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf); -+ - } // namespace sandbox - - #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ diff --git a/qtwebengine-everywhere-src-5.15.2-bool.patch b/qtwebengine-everywhere-src-5.15.2-bool.patch deleted file mode 100644 index 511da94..0000000 --- a/qtwebengine-everywhere-src-5.15.2-bool.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/string_compare.cc 2021-06-24 14:14:23.409239460 -0500 -@@ -18,8 +18,8 @@ UCollationResult CompareString16WithColl - StringPiece16 rhs) { - UErrorCode error = U_ZERO_ERROR; - UCollationResult result = collator.compare( -- icu::UnicodeString(FALSE, lhs.data(), static_cast(lhs.length())), -- icu::UnicodeString(FALSE, rhs.data(), static_cast(rhs.length())), -+ icu::UnicodeString(false, lhs.data(), static_cast(lhs.length())), -+ icu::UnicodeString(false, rhs.data(), static_cast(rhs.length())), - error); - DCHECK(U_SUCCESS(error)); - return result; -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/base/i18n/time_formatting.cc 2021-06-24 14:14:23.409239460 -0500 -@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const - icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE); - measure_format.formatMeasures(measures, 3, formatted, ignore, status); - *out = i18n::UnicodeStringToString16(formatted); -- return U_SUCCESS(status) == TRUE; -+ return U_SUCCESS(status) == true; - } - - string16 DateIntervalFormat(const Time& begin_time, -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc 2021-06-24 14:14:23.410239461 -0500 -@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() - Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) { - Skeletons skeletons; - size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0); -- icu::UnicodeString host(FALSE, hostname.data(), hostname_length); -+ icu::UnicodeString host(false, hostname.data(), hostname_length); - // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-], - // there is no point in getting rid of diacritics because combining marks - // attached to non-LGC characters are already blocked. -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc 2021-06-24 14:15:06.057259662 -0500 -@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() - DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING) - << "ICU ambiguous alias warning for encoding: " << encoding_.GetName(); - if (converter_icu_) -- ucnv_setFallback(converter_icu_, TRUE); -+ ucnv_setFallback(converter_icu_, true); - } - - int TextCodecICU::DecodeToBuffer(UChar* target, -diff -up qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c.bool qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c ---- qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c.bool 2020-11-06 19:22:36.000000000 -0600 -+++ qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-06-24 14:44:09.987163175 -0500 -@@ -1958,7 +1958,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler - #ifdef LIBXML_ICU_ENABLED - else if (handler->uconv_out != NULL) { - ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, -- TRUE); -+ 1); - } - #endif /* LIBXML_ICU_ENABLED */ - else { diff --git a/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch b/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch deleted file mode 100644 index 6a98dd4..0000000 --- a/qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch +++ /dev/null @@ -1,89 +0,0 @@ -Description: fix seccomp-bpf failures in syscalls 0403, 0407 - glibc ≥ 2.31 uses these syscalls on 32-bit platforms: - . - - https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d98 - - https://sourceware.org/git/?p=glibc.git;a=commit;h=ec138c67cbda8b58 -Author: Andreas Müller -Forwarded: no -Last-Update: 2020-09-02 - ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de - return Allow(); - #endif - -- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { -+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep -+#if defined(__NR_clock_gettime64) -+ || sysno == __NR_clock_gettime64 -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ || sysno == __NR_clock_nanosleep_time64 -+#endif -+ ) { - return RestrictClockID(); - } - ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf - case __NR_clock_gettime: - case __NR_clock_getres: - case __NR_clock_nanosleep: -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: -+#endif -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: -+#endif - return RestrictClockID(); - default: - return Allow(); ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s - // filtered by RestrictClokID(). - case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). - case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). -+#endif - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -@@ -1385,6 +1385,14 @@ - #define __NR_memfd_create (__NR_SYSCALL_BASE+385) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -@@ -1433,4 +1433,12 @@ - #define __NR_memfd_create (__NR_Linux + 354) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_Linux + 403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ diff --git a/qtwebengine-everywhere-src-5.15.5-#1904652.patch b/qtwebengine-everywhere-src-5.15.5-#1904652.patch new file mode 100644 index 0000000..7951e6b --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.5-#1904652.patch @@ -0,0 +1,141 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-06-24 08:34:07.566783935 -0500 +@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictKillTarget(current_pid, sysno); + } + ++#if defined(__NR_newfstatat) ++ if (sysno == __NR_newfstatat) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ ++#if defined(__NR_fstatat64) ++ if (sysno == __NR_fstatat64) { ++ return RewriteFstatatSIGSYS(); ++ } ++#endif ++ + if (SyscallSets::IsFileSystem(sysno) || + SyscallSets::IsCurrentDirectory(sysno)) { + return Error(fs_denied_errno); +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-06-24 08:40:08.552334787 -0500 +@@ -6,6 +6,8 @@ + + #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" + ++#include ++#include + #include + #include + #include +@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct + return -ENOSYS; + } + ++intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ void* aux) { ++ switch (args.nr) { ++#if defined(__NR_newfstatat) ++ case __NR_newfstatat: ++#endif ++#if defined(__NR_fstatat64) ++ case __NR_fstatat64: ++#endif ++#if defined(__NR_newfstatat) || defined(__NR_fstatat64) ++ if (*reinterpret_cast(args.args[1]) == '\0' ++ && args.args[3] == static_cast(AT_EMPTY_PATH)) { ++ return sandbox::sys_fstat64(static_cast(args.args[0]), ++ reinterpret_cast(args.args[2])); ++ } else { ++ errno = EACCES; ++ return -1; ++ } ++ break; ++#endif ++ } ++ ++ CrashSIGSYS_Handler(args, aux); ++ ++ // Should never be reached. ++ RAW_CHECK(false); ++ return -ENOSYS; ++} ++ + bpf_dsl::ResultExpr CrashSIGSYS() { + return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); + } +@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS() + return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); + } + ++bpf_dsl::ResultExpr RewriteFstatatSIGSYS() { ++ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL); ++} ++ + void AllocateCrashKeys() { + #if !defined(OS_NACL_NONSFI) + if (seccomp_crash_key) +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.rh#1904652 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-06-24 08:39:31.205174337 -0500 +@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail + // sched_setparam(), sched_setscheduler() + SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args, + void* aux); ++// If the fstatat syscall is actually a disguised fstat, calls the regular fstat ++// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler. ++SANDBOX_EXPORT intptr_t ++ SIGSYSFstatatHandler(const struct arch_seccomp_data& args, void* aux); + + // Variants of the above functions for use with bpf_dsl. + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS(); +@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex(); + SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace(); + SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS(); ++SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS(); + + // Allocates a crash key so that Seccomp information can be recorded. + void AllocateCrashKeys(); +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2021-06-24 08:34:07.567783940 -0500 +@@ -261,4 +261,13 @@ int sys_sigaction(int signum, + + #endif // defined(MEMORY_SANITIZER) + ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf) ++{ ++#if defined(__NR_fstat64) ++ return syscall(__NR_fstat64, fd, buf); ++#else ++ return syscall(__NR_fstat, fd, buf); ++#endif ++} ++ + } // namespace sandbox +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h.rh#1904652 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2021-06-24 08:34:07.568783944 -0500 +@@ -17,6 +17,7 @@ struct sock_fprog; + struct rlimit64; + struct cap_hdr; + struct cap_data; ++struct stat64; + + namespace sandbox { + +@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig + const struct sigaction* act, + struct sigaction* oldact); + ++// Recent glibc rewrites fstat to fstatat. ++SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf); ++ + } // namespace sandbox + + #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ diff --git a/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch b/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch new file mode 100644 index 0000000..2f32049 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch @@ -0,0 +1,24 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.SIGSTKSZ 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2021-06-24 09:14:27.365186590 -0500 +@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { + #else + const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; + #endif +- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; ++ size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; + #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ + defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) + // Account for sanitizer instrumentation requiring additional stack space. +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-06-24 09:15:54.012558815 -0500 +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. diff --git a/qtwebengine-everywhere-src-5.15.5-TRUE.patch b/qtwebengine-everywhere-src-5.15.5-TRUE.patch new file mode 100644 index 0000000..b61c923 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.5-TRUE.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-06-24 09:44:41.592468805 -0500 +@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler + #ifdef LIBXML_ICU_ENABLED + else if (handler->uconv_out != NULL) { + ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen, +- TRUE); ++ 1); + } + #endif /* LIBXML_ICU_ENABLED */ + else { diff --git a/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch b/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch new file mode 100644 index 0000000..1a14bc9 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch @@ -0,0 +1,85 @@ +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.sandbox-time64-syscalls 2021-06-24 10:36:45.687826522 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-06-24 10:36:45.692826524 -0500 +@@ -157,7 +157,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return Allow(); + #endif + +- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { ++ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep ++#if defined(__NR_clock_gettime64) ++ || sysno == __NR_clock_gettime64 ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ || sysno == __NR_clock_nanosleep_time64 ++#endif ++ ) { + return RestrictClockID(); + } + +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2021-06-24 10:36:45.692826524 -0500 +@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf + case __NR_clock_gettime: + case __NR_clock_getres: + case __NR_clock_nanosleep: ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: ++#endif ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: ++#endif + return RestrictClockID(); + default: + return Allow(); +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2021-06-24 10:36:45.693826524 -0500 +@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s + // filtered by RestrictClokID(). + case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). + case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). ++#endif + case __NR_clock_settime: // Privileged. + #if defined(__i386__) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls 2021-06-24 10:36:45.694826524 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h 2021-06-24 10:37:50.383852263 -0500 +@@ -1441,6 +1441,14 @@ + #define __NR_io_pgetevents (__NR_SYSCALL_BASE+399) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) ++#endif ++ + // ARM private syscalls. + #if !defined(__ARM_NR_BASE) + #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) +diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h +--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 ++++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h 2021-06-24 10:36:45.695826525 -0500 +@@ -1433,4 +1433,12 @@ + #define __NR_memfd_create (__NR_Linux + 354) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ diff --git a/qtwebengine-gcc11.patch b/qtwebengine-gcc11.patch deleted file mode 100644 index f8b2c16..0000000 --- a/qtwebengine-gcc11.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc -index fd651958f..1e8d0606c 100644 ---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc -+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc -@@ -14,9 +14,9 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/containers/string_pool.h" - --#include - - #include "perfetto/base/logging.h" - #include "perfetto/ext/base/utils.h" -diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc -index 80dcf5b24..b0037ec34 100644 ---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc -+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/db/column.h" - - #include "src/trace_processor/db/compare.h" -diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc -index fc9e41558..0e5bd92f4 100644 ---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc -+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc -@@ -14,6 +14,8 @@ - * limitations under the License. - */ - -+#include -+ - #include "src/trace_processor/importers/proto/heap_graph_walker.h" - #include "perfetto/base/logging.h" - -diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc -index 837bfeba9..cdd56817d 100644 ---- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc -+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc -@@ -14,6 +14,7 @@ - * limitations under the License. - */ - -+#include - #include "src/trace_processor/types/variadic.h" - - namespace perfetto { diff --git a/sources b/sources index 813cc9f..03ee456 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.15.2-clean.tar.xz) = 03c167ce94fd639ace630308a3b3fffa96d122049640dc9e3c2687f239af754359126f739569c1771f684d1be665404be093e96697813fd689eccf10aea2b1f2 +SHA512 (qtwebengine-everywhere-src-5.15.5-clean.tar.xz) = f23c28a430edea9d83eadc741fde26cbc8fe2965cc3372b38755d4850c80a404e9009187296b368ccc5093b92227d7830d263ec0fb6c152e5e4522d11c6aa46d From a767051e9cfe7077a449cc1ae75147d83c2d4a47 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 Jun 2021 14:37:43 -0500 Subject: [PATCH 374/437] import qtwebengine-release.sh Used to generate source tarball --- qtwebengine-release.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 qtwebengine-release.sh diff --git a/qtwebengine-release.sh b/qtwebengine-release.sh new file mode 100644 index 0000000..e5402d3 --- /dev/null +++ b/qtwebengine-release.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -x +VERSION=5.15.5 +CHROMIUMHASH=`wget https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/3rdparty?h=$VERSION -q --content-on-error -O - | grep "Bad object name: " | sed 's/^.*Bad object name: \([0-9a-f]\{40\}\).*$/\1/g'` +rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION +wget https://github.com/qt/qtwebengine/archive/$VERSION.tar.gz -O qtwebengine-$VERSION.tar.gz || exit $? +tar xzf qtwebengine-$VERSION.tar.gz || exit $? +wget https://github.com/qt/qtwebengine-chromium/archive/$CHROMIUMHASH.tar.gz -O qtwebengine-chromium-$CHROMIUMHASH.tar.gz || exit $? +tar xzf qtwebengine-chromium-$CHROMIUMHASH.tar.gz || exit $? +mv qtwebengine-$VERSION qtwebengine-everywhere-src-$VERSION || exit $? +cd qtwebengine-everywhere-src-$VERSION ; syncqt.pl -version $VERSION || exit $? +rmdir qtwebengine-everywhere-src-$VERSION/src/3rdparty || exit $? +mv qtwebengine-chromium-$CHROMIUMHASH qtwebengine-everywhere-src-$VERSION/src/3rdparty || exit $? +XZ_OPT=-9 tar cJf qtwebengine-everywhere-src-$VERSION.tar.xz qtwebengine-everywhere-src-$VERSION || exit $? +rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION From bb966b45bdc6b3d4632a42f286563bfd8b809135 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 10:52:38 +0000 Subject: [PATCH 375/437] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f5dcb91..cf98cd0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.5 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -634,6 +634,9 @@ done %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 5.15.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jun 23 2021 Rex Dieter - 5.15.5-1 - 5.15.5 From 85acb836bc12e5fc2d8b1826efae61bbab5dca53 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 12 Aug 2021 09:43:31 -0700 Subject: [PATCH 376/437] Fix use-python2.patch --- qt5-qtwebengine.spec | 7 +++--- ...engine-everywhere-5.15.5-use-python2.patch | 23 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index cf98cd0..337cec3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.5 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -213,8 +213,6 @@ BuildRequires: %{__python2} BuildRequires: python2 BuildRequires: python2-rpm-macros %endif -## HACK, seems patch26 is not 100% complete -BuildRequires: %{_bindir}/python %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.8.0 %endif @@ -634,6 +632,9 @@ done %changelog +* Thu Aug 12 2021 Troy Dawson - 5.15.5-3 +- Fix use-python2.patch + * Fri Jul 23 2021 Fedora Release Engineering - 5.15.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/qtwebengine-everywhere-5.15.5-use-python2.patch b/qtwebengine-everywhere-5.15.5-use-python2.patch index 12c53ea..9626d27 100644 --- a/qtwebengine-everywhere-5.15.5-use-python2.patch +++ b/qtwebengine-everywhere-5.15.5-use-python2.patch @@ -1,6 +1,7 @@ -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.use-python2 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.use-python2 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2021-06-23 15:27:45.771765298 -0500 +diff --git a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py +index 8af373102..b551c0fe2 100644 +--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py ++++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py @@ -83,7 +83,7 @@ def _MinifyJS(input_js): with tempfile.NamedTemporaryFile() as _: @@ -10,9 +11,19 @@ diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/cat rjsmin_path ] p = subprocess.Popen(args, -diff -up qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro.use-python2 qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro ---- qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro.use-python2 2021-06-11 00:31:04.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/webengine/module.pro 2021-06-23 15:26:48.897435095 -0500 +@@ -203,7 +203,7 @@ def _MinifyCSS(css_text): + os.path.join(py_vulcanize_path, 'third_party', 'rcssmin', 'rcssmin.py')) + + with tempfile.NamedTemporaryFile() as _: +- rcssmin_args = ['python', rcssmin_path] ++ rcssmin_args = ['python2', rcssmin_path] + p = subprocess.Popen(rcssmin_args, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, +diff --git a/src/webengine/module.pro b/src/webengine/module.pro +index 49a1086b2..afc89d49e 100644 +--- a/src/webengine/module.pro ++++ b/src/webengine/module.pro @@ -76,7 +76,7 @@ qtConfig(webengine-testsupport) { python = $$pythonPathForShell() chromium_attributions.commands = \ From b08ccbcbe916b79ba6515d6dcbbbb897ecffcc54 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 23 Aug 2021 12:24:57 -0500 Subject: [PATCH 377/437] bump bundled(chromium) Provides --- qt5-qtwebengine.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 337cec3..78efcc3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -234,12 +234,7 @@ BuildRequires: pkgconfig(vpx) >= 1.8.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# Some security fixes (up to version 64.0.3282.140) are backported, see: -# http://code.qt.io/cgit/qt/qtwebengine-chromium.git/log/?h=61-based -# see dist/changes-5.10.1 for the version numbers (base, security fixes) and for -# a list of CVEs fixed by the added security backports -# See Patch101 for additional fixes applied (up to version 65.0.3325.146) -Provides: bundled(chromium) = 61.0.3163.140 +Provides: bundled(chromium) = 90.0.44.30.228 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, From 40e9dfd0b07c55c82626436e74981c7c144b7785 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 3 Sep 2021 14:07:40 -0500 Subject: [PATCH 378/437] 5.15.6 --- .gitignore | 1 + qt5-qtwebengine.spec | 11 +++++++++-- qtwebengine-everywhere-src-5.15.6-clone3.patch | 16 ++++++++++++++++ qtwebengine-release.sh | 6 +++--- sources | 2 +- 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 qtwebengine-everywhere-src-5.15.6-clone3.patch diff --git a/.gitignore b/.gitignore index 6226724..d9f03a1 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /qtwebengine-everywhere-src-5.15.1-clean.tar.xz /qtwebengine-everywhere-src-5.15.2-clean.tar.xz /qtwebengine-everywhere-src-5.15.5-clean.tar.xz +/qtwebengine-everywhere-src-5.15.6-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 78efcc3..6f764b1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,8 +52,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.5 -Release: 3%{?dist} +Version: 5.15.6 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -108,6 +108,9 @@ Patch29: qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch Patch30: qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch # FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch +# Issue 1213452: Sandbox doesn't work with clone3 +# https://bugs.chromium.org/p/chromium/issues/detail?id=1213452 +Patch32: qtwebengine-everywhere-src-5.15.6-clone3.patch ## Upstream patches: @@ -416,6 +419,7 @@ popd %patch29 -p1 -b .sandbox-time64-syscalls %patch30 -p1 -b .SIGSTKSZ %patch31 -p1 -b .TRUE +%patch32 -p1 -b .clone3 # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS @@ -627,6 +631,9 @@ done %changelog +* Fri Sep 03 2021 Rex Dieter - 5.15.6-1 +- 5.15.6 + * Thu Aug 12 2021 Troy Dawson - 5.15.5-3 - Fix use-python2.patch diff --git a/qtwebengine-everywhere-src-5.15.6-clone3.patch b/qtwebengine-everywhere-src-5.15.6-clone3.patch new file mode 100644 index 0000000..a89a363 --- /dev/null +++ b/qtwebengine-everywhere-src-5.15.6-clone3.patch @@ -0,0 +1,16 @@ +diff -up qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.1213452 qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.1213452 2021-09-03 10:35:33.069779845 -0500 ++++ qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-09-03 10:36:43.891325411 -0500 +@@ -172,6 +172,12 @@ ResultExpr EvaluateSyscallImpl(int fs_de + return RestrictCloneToThreadsAndEPERMFork(); + } + ++ // clone3 takes a pointer argument which we cannot examine, so return ENOSYS ++ // to force the libc to use clone. See https://crbug.com/1213452. ++ if (sysno == __NR_clone3) { ++ return Error(ENOSYS); ++ } ++ + if (sysno == __NR_fcntl) + return RestrictFcntlCommands(); + diff --git a/qtwebengine-release.sh b/qtwebengine-release.sh index e5402d3..027cfc8 100644 --- a/qtwebengine-release.sh +++ b/qtwebengine-release.sh @@ -1,6 +1,6 @@ #!/bin/sh set -x -VERSION=5.15.5 +VERSION=5.15.6 CHROMIUMHASH=`wget https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/3rdparty?h=$VERSION -q --content-on-error -O - | grep "Bad object name: " | sed 's/^.*Bad object name: \([0-9a-f]\{40\}\).*$/\1/g'` rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION wget https://github.com/qt/qtwebengine/archive/$VERSION.tar.gz -O qtwebengine-$VERSION.tar.gz || exit $? @@ -8,8 +8,8 @@ tar xzf qtwebengine-$VERSION.tar.gz || exit $? wget https://github.com/qt/qtwebengine-chromium/archive/$CHROMIUMHASH.tar.gz -O qtwebengine-chromium-$CHROMIUMHASH.tar.gz || exit $? tar xzf qtwebengine-chromium-$CHROMIUMHASH.tar.gz || exit $? mv qtwebengine-$VERSION qtwebengine-everywhere-src-$VERSION || exit $? -cd qtwebengine-everywhere-src-$VERSION ; syncqt.pl -version $VERSION || exit $? +(cd qtwebengine-everywhere-src-$VERSION ; syncqt.pl -version $VERSION ) || exit $? rmdir qtwebengine-everywhere-src-$VERSION/src/3rdparty || exit $? mv qtwebengine-chromium-$CHROMIUMHASH qtwebengine-everywhere-src-$VERSION/src/3rdparty || exit $? -XZ_OPT=-9 tar cJf qtwebengine-everywhere-src-$VERSION.tar.xz qtwebengine-everywhere-src-$VERSION || exit $? +XZ_OPT="-9 -T2" tar cJf qtwebengine-everywhere-src-$VERSION.tar.xz qtwebengine-everywhere-src-$VERSION || exit $? rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION diff --git a/sources b/sources index 03ee456..9431908 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.15.5-clean.tar.xz) = f23c28a430edea9d83eadc741fde26cbc8fe2965cc3372b38755d4850c80a404e9009187296b368ccc5093b92227d7830d263ec0fb6c152e5e4522d11c6aa46d +SHA512 (qtwebengine-everywhere-src-5.15.6-clean.tar.xz) = 7c05934769bbfef181c591b65916c456449a3dd6e653d80b6e601a5b4e22904a2256538edd771453e31dceae56b2075c88c19b00cfab234e561ed6ca72bb143e From 09d1fc370fd9943063b594bc77fc073f4de9f62b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 20 Sep 2021 15:51:37 -0500 Subject: [PATCH 379/437] rebuild (harfbuzz) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6f764b1..1f22fa7 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.6 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -631,6 +631,9 @@ done %changelog +* Mon Sep 20 2021 Rex Dieter - 5.15.6-2 +- rebuild (harfbuzz) + * Fri Sep 03 2021 Rex Dieter - 5.15.6-1 - 5.15.6 From db3b70b97f7ae84aa82a1ed241a969f72fefa911 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 21 Sep 2021 08:58:51 -0500 Subject: [PATCH 380/437] patch use of deprecated harfbuzz apis --- qt5-qtwebengine.spec | 5 ++++- qtwebengine-harfbuzz.patch | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-harfbuzz.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 1f22fa7..a7d8154 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -111,6 +111,8 @@ Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch # Issue 1213452: Sandbox doesn't work with clone3 # https://bugs.chromium.org/p/chromium/issues/detail?id=1213452 Patch32: qtwebengine-everywhere-src-5.15.6-clone3.patch +# Fix use of deprecated harfbuzz api's +Patch33: qtwebengine-harfbuzz.patch ## Upstream patches: @@ -420,6 +422,7 @@ popd %patch30 -p1 -b .SIGSTKSZ %patch31 -p1 -b .TRUE %patch32 -p1 -b .clone3 +%patch33 -p1 -b .harfbuzz # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS @@ -632,7 +635,7 @@ done %changelog * Mon Sep 20 2021 Rex Dieter - 5.15.6-2 -- rebuild (harfbuzz) +- patch use of deprecated harfbuzz apis * Fri Sep 03 2021 Rex Dieter - 5.15.6-1 - 5.15.6 diff --git a/qtwebengine-harfbuzz.patch b/qtwebengine-harfbuzz.patch new file mode 100644 index 0000000..327874f --- /dev/null +++ b/qtwebengine-harfbuzz.patch @@ -0,0 +1,34 @@ +diff --git a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc +index ba5391708..8565b67e3 100644 +--- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc ++++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc +@@ -71,9 +71,9 @@ sk_sp SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) { + hb_set_t* glyphs = + hb_subset_input_glyph_set(input.get()); // Owned by |input|. + usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs))); +- hb_subset_input_set_retain_gids(input.get(), true); ++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); + +- HbScoped subset_face(hb_subset(face.get(), input.get())); ++ HbFace subset_face(hb_subset_or_fail(face.get(), input.get())); + HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); + if (!subset_blob) + return nullptr; +diff --git a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp +index 81c37eef3..1581fb8a9 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp +@@ -71,11 +71,10 @@ static sk_sp subset_harfbuzz(sk_sp fontData, + hb_set_t* glyphs = hb_subset_input_glyph_set(input.get()); + glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);}); + +- hb_subset_input_set_retain_gids(input.get(), true); + // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. + // If it isn't known if a font is 'tricky', retain the hints. +- hb_subset_input_set_drop_hints(input.get(), false); +- HBFace subset(hb_subset(face.get(), input.get())); ++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS | HB_SUBSET_FLAGS_NO_HINTING); ++ HBFace subset(hb_subset_or_fail(face.get(), input.get())); + HBBlob result(hb_face_reference_blob(subset.get())); + return to_data(std::move(result)); + } From 1442be6d398979c09a98a49935c4a4961b0c9053 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 21 Sep 2021 09:45:06 -0500 Subject: [PATCH 381/437] respin harfbuzz.patch --- qtwebengine-harfbuzz.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qtwebengine-harfbuzz.patch b/qtwebengine-harfbuzz.patch index 327874f..cedfd16 100644 --- a/qtwebengine-harfbuzz.patch +++ b/qtwebengine-harfbuzz.patch @@ -1,5 +1,5 @@ diff --git a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc -index ba5391708..8565b67e3 100644 +index ba5391708..f5fad4148 100644 --- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc +++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc @@ -71,9 +71,9 @@ sk_sp SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) { @@ -10,7 +10,7 @@ index ba5391708..8565b67e3 100644 + hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); - HbScoped subset_face(hb_subset(face.get(), input.get())); -+ HbFace subset_face(hb_subset_or_fail(face.get(), input.get())); ++ HbScoped subset_face(hb_subset_or_fail(face.get(), input.get())); HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); if (!subset_blob) return nullptr; From a8dd1a7a5855837bc20c964fd75d92ad198747f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 8 Jan 2022 11:41:46 +0100 Subject: [PATCH 382/437] Rebuilt for libre2.so.9 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a7d8154..91f41ea 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -53,7 +53,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.6 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -634,6 +634,9 @@ done %changelog +* Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 +- Rebuilt for libre2.so.9 + * Mon Sep 20 2021 Rex Dieter - 5.15.6-2 - patch use of deprecated harfbuzz apis From b20c6739c1f612f0336ebef019b74d3f46014dc2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 18 Jan 2022 14:31:59 -0600 Subject: [PATCH 383/437] 5.15.8 --- .gitignore | 18 +----------------- clean_qtwebengine.sh | 4 ++-- qt5-qtwebengine.spec | 18 +++++++++++------- qtwebengine-release.sh | 2 +- sources | 2 +- 5 files changed, 16 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index d9f03a1..f3ee4f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,2 @@ -/qtwebengine-everywhere-src-5.11.1-clean.tar.xz -/qtwebengine-everywhere-src-5.11.2-clean.tar.xz -/qtwebengine-everywhere-src-5.11.3-clean.tar.xz -/qtwebengine-everywhere-src-5.12.1-clean.tar.xz -/qtwebengine-everywhere-src-5.12.2-clean.tar.xz -/qtwebengine-everywhere-src-5.12.3-clean.tar.xz -/qtwebengine-everywhere-src-5.12.4-clean.tar.xz /pulseaudio-12.2-headers.tar.gz -/qtwebengine-everywhere-src-5.12.5-clean.tar.xz -/qtwebengine-everywhere-src-5.12.6-clean.tar.xz -/qtwebengine-everywhere-src-5.13.2-clean.tar.xz -/qtwebengine-everywhere-src-5.14.1-clean.tar.xz -/qtwebengine-everywhere-src-5.14.2-clean.tar.xz -/qtwebengine-everywhere-src-5.15.0-clean.tar.xz -/qtwebengine-everywhere-src-5.15.1-clean.tar.xz -/qtwebengine-everywhere-src-5.15.2-clean.tar.xz -/qtwebengine-everywhere-src-5.15.5-clean.tar.xz -/qtwebengine-everywhere-src-5.15.6-clean.tar.xz +/qtwebengine-everywhere-src-5.15.8-clean.tar.xz diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index bc462b8..17f77fa 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.14.1" + echo "e.g.: ./clean_qtwebengine.sh 5.15.8" exit 1 fi @@ -61,7 +61,7 @@ echo "ripping out openh264 sources" rm -rf "$DIRNAME/src/3rdparty/chromium/third_party/openh264/src" || exit $? echo "repacking as $DIRNAME-clean.tar.xz" -XZ_OPT="-9 -T 4" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? +XZ_OPT="-8 -T 2" tar cJf "$DIRNAME-clean.tar.xz" "$DIRNAME" || exit $? echo "removing $DIRNAME" rm -rf "$DIRNAME" || exit $? diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 91f41ea..c31a399 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -52,8 +52,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.6 -Release: 3%{?dist} +Version: 5.15.8 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -417,12 +417,13 @@ popd #patch10 -p1 -b .openmax-dl-neon %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 -%patch28 -p1 -b .rh#1904652 -%patch29 -p1 -b .sandbox-time64-syscalls -%patch30 -p1 -b .SIGSTKSZ +#patch28 -p1 -b .rh#1904652 +#patch29 -p1 -b .sandbox-time64-syscalls +#patch30 -p1 -b .SIGSTKSZ %patch31 -p1 -b .TRUE -%patch32 -p1 -b .clone3 -%patch33 -p1 -b .harfbuzz +#patch32 -p1 -b .clone3 +## may need porting +#patch33 -p1 -b .harfbuzz # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS @@ -634,6 +635,9 @@ done %changelog +* Tue Jan 11 2022 Rex Dieter - 5.15.8-1 +- 5.15.8 + * Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 - Rebuilt for libre2.so.9 diff --git a/qtwebengine-release.sh b/qtwebengine-release.sh index 027cfc8..a05c100 100644 --- a/qtwebengine-release.sh +++ b/qtwebengine-release.sh @@ -1,6 +1,6 @@ #!/bin/sh set -x -VERSION=5.15.6 +VERSION=5.15.8 CHROMIUMHASH=`wget https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/3rdparty?h=$VERSION -q --content-on-error -O - | grep "Bad object name: " | sed 's/^.*Bad object name: \([0-9a-f]\{40\}\).*$/\1/g'` rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION wget https://github.com/qt/qtwebengine/archive/$VERSION.tar.gz -O qtwebengine-$VERSION.tar.gz || exit $? diff --git a/sources b/sources index 9431908..71b9125 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.15.6-clean.tar.xz) = 7c05934769bbfef181c591b65916c456449a3dd6e653d80b6e601a5b4e22904a2256538edd771453e31dceae56b2075c88c19b00cfab234e561ed6ca72bb143e +SHA512 (qtwebengine-everywhere-src-5.15.8-clean.tar.xz) = 0ded6ec6106a79e66796fa65b9574debf59e602aecbfdd0cdf0aeb6d17530177c0a8650078402c426abfebcd40c97d1501f4277541c86f2c576543052f627c04 From 2ea927dfdbc273e71d339ff2024455dd99dd522a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 19 Jan 2022 08:55:49 -0600 Subject: [PATCH 384/437] drop old/unused patches --- qt5-qtwebengine.spec | 23 --- ...ngine-everywhere-src-5.15.5-#1904652.patch | 141 ------------------ ...ngine-everywhere-src-5.15.5-SIGSTKSZ.patch | 24 --- ...e-src-5.15.5-sandbox-time64-syscalls.patch | 85 ----------- ...bengine-everywhere-src-5.15.6-clone3.patch | 16 -- qtwebengine-harfbuzz.patch | 34 ----- ...opensource-src-5.9.0-openmax-dl-neon.patch | 97 ------------ 7 files changed, 420 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.15.5-#1904652.patch delete mode 100644 qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch delete mode 100644 qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch delete mode 100644 qtwebengine-everywhere-src-5.15.6-clone3.patch delete mode 100644 qtwebengine-harfbuzz.patch delete mode 100644 qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c31a399..918083d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -92,27 +92,11 @@ Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch Patch4: qtwebengine-SIOCGSTAMP.patch # fix build when using qt < 5.14 Patch5: qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch -# remove Android dependencies from openmax_dl ARM NEON detection (detect.c) -Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch -# Fix sandbox issue breaking text rendering with glibc >= 2.33 (#1904652) -# https://bugs.chromium.org/p/chromium/issues/detail?id=1164975 -Patch28: qtwebengine-everywhere-src-5.15.5-#1904652.patch -# Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian) -Patch29: qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch -# don't assume type-ness of SIGSTKSZ, -# https://bugzilla.redhat.com/show_bug.cgi?id=1945595 -Patch30: qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch -# FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch -# Issue 1213452: Sandbox doesn't work with clone3 -# https://bugs.chromium.org/p/chromium/issues/detail?id=1213452 -Patch32: qtwebengine-everywhere-src-5.15.6-clone3.patch -# Fix use of deprecated harfbuzz api's -Patch33: qtwebengine-harfbuzz.patch ## Upstream patches: @@ -414,16 +398,9 @@ popd ## upstream patches -#patch10 -p1 -b .openmax-dl-neon %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 -#patch28 -p1 -b .rh#1904652 -#patch29 -p1 -b .sandbox-time64-syscalls -#patch30 -p1 -b .SIGSTKSZ %patch31 -p1 -b .TRUE -#patch32 -p1 -b .clone3 -## may need porting -#patch33 -p1 -b .harfbuzz # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS diff --git a/qtwebengine-everywhere-src-5.15.5-#1904652.patch b/qtwebengine-everywhere-src-5.15.5-#1904652.patch deleted file mode 100644 index 7951e6b..0000000 --- a/qtwebengine-everywhere-src-5.15.5-#1904652.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-06-24 08:34:07.566783935 -0500 -@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de - return RestrictKillTarget(current_pid, sysno); - } - -+#if defined(__NR_newfstatat) -+ if (sysno == __NR_newfstatat) { -+ return RewriteFstatatSIGSYS(); -+ } -+#endif -+ -+#if defined(__NR_fstatat64) -+ if (sysno == __NR_fstatat64) { -+ return RewriteFstatatSIGSYS(); -+ } -+#endif -+ - if (SyscallSets::IsFileSystem(sysno) || - SyscallSets::IsCurrentDirectory(sysno)) { - return Error(fs_denied_errno); -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-06-24 08:40:08.552334787 -0500 -@@ -6,6 +6,8 @@ - - #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" - -+#include -+#include - #include - #include - #include -@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct - return -ENOSYS; - } - -+intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, -+ void* aux) { -+ switch (args.nr) { -+#if defined(__NR_newfstatat) -+ case __NR_newfstatat: -+#endif -+#if defined(__NR_fstatat64) -+ case __NR_fstatat64: -+#endif -+#if defined(__NR_newfstatat) || defined(__NR_fstatat64) -+ if (*reinterpret_cast(args.args[1]) == '\0' -+ && args.args[3] == static_cast(AT_EMPTY_PATH)) { -+ return sandbox::sys_fstat64(static_cast(args.args[0]), -+ reinterpret_cast(args.args[2])); -+ } else { -+ errno = EACCES; -+ return -1; -+ } -+ break; -+#endif -+ } -+ -+ CrashSIGSYS_Handler(args, aux); -+ -+ // Should never be reached. -+ RAW_CHECK(false); -+ return -ENOSYS; -+} -+ - bpf_dsl::ResultExpr CrashSIGSYS() { - return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL); - } -@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS() - return bpf_dsl::Trap(SIGSYSSchedHandler, NULL); - } - -+bpf_dsl::ResultExpr RewriteFstatatSIGSYS() { -+ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL); -+} -+ - void AllocateCrashKeys() { - #if !defined(OS_NACL_NONSFI) - if (seccomp_crash_key) -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.rh#1904652 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-06-24 08:39:31.205174337 -0500 -@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail - // sched_setparam(), sched_setscheduler() - SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args, - void* aux); -+// If the fstatat syscall is actually a disguised fstat, calls the regular fstat -+// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler. -+SANDBOX_EXPORT intptr_t -+ SIGSYSFstatatHandler(const struct arch_seccomp_data& args, void* aux); - - // Variants of the above functions for use with bpf_dsl. - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS(); -@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex(); - SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace(); - SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS(); -+SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS(); - - // Allocates a crash key so that Seccomp information can be recorded. - void AllocateCrashKeys(); -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc.rh#1904652 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc 2021-06-24 08:34:07.567783940 -0500 -@@ -261,4 +261,13 @@ int sys_sigaction(int signum, - - #endif // defined(MEMORY_SANITIZER) - -+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf) -+{ -+#if defined(__NR_fstat64) -+ return syscall(__NR_fstat64, fd, buf); -+#else -+ return syscall(__NR_fstat, fd, buf); -+#endif -+} -+ - } // namespace sandbox -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h.rh#1904652 qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h.rh#1904652 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.h 2021-06-24 08:34:07.568783944 -0500 -@@ -17,6 +17,7 @@ struct sock_fprog; - struct rlimit64; - struct cap_hdr; - struct cap_data; -+struct stat64; - - namespace sandbox { - -@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig - const struct sigaction* act, - struct sigaction* oldact); - -+// Recent glibc rewrites fstat to fstatat. -+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf); -+ - } // namespace sandbox - - #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ diff --git a/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch b/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch deleted file mode 100644 index 2f32049..0000000 --- a/qtwebengine-everywhere-src-5.15.5-SIGSTKSZ.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.SIGSTKSZ 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2021-06-24 09:14:27.365186590 -0500 -@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { - #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; - #endif -- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; - #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ - defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) - // Account for sanitizer instrumentation requiring additional stack space. -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.SIGSTKSZ 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-06-24 09:15:54.012558815 -0500 -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch b/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch deleted file mode 100644 index 1a14bc9..0000000 --- a/qtwebengine-everywhere-src-5.15.5-sandbox-time64-syscalls.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.sandbox-time64-syscalls 2021-06-24 10:36:45.687826522 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-06-24 10:36:45.692826524 -0500 -@@ -157,7 +157,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de - return Allow(); - #endif - -- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { -+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep -+#if defined(__NR_clock_gettime64) -+ || sysno == __NR_clock_gettime64 -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ || sysno == __NR_clock_nanosleep_time64 -+#endif -+ ) { - return RestrictClockID(); - } - -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2021-06-24 10:36:45.692826524 -0500 -@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf - case __NR_clock_gettime: - case __NR_clock_getres: - case __NR_clock_nanosleep: -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: -+#endif -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: -+#endif - return RestrictClockID(); - default: - return Allow(); -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2021-06-24 10:36:45.693826524 -0500 -@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s - // filtered by RestrictClokID(). - case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). - case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). -+#endif - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls 2021-06-24 10:36:45.694826524 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h 2021-06-24 10:37:50.383852263 -0500 -@@ -1441,6 +1441,14 @@ - #define __NR_io_pgetevents (__NR_SYSCALL_BASE+399) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) -diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h ---- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h 2021-06-24 10:36:45.695826525 -0500 -@@ -1433,4 +1433,12 @@ - #define __NR_memfd_create (__NR_Linux + 354) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_Linux + 403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ diff --git a/qtwebengine-everywhere-src-5.15.6-clone3.patch b/qtwebengine-everywhere-src-5.15.6-clone3.patch deleted file mode 100644 index a89a363..0000000 --- a/qtwebengine-everywhere-src-5.15.6-clone3.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.1213452 qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ---- qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.1213452 2021-09-03 10:35:33.069779845 -0500 -+++ qtwebengine-everywhere-src-5.15.6/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-09-03 10:36:43.891325411 -0500 -@@ -172,6 +172,12 @@ ResultExpr EvaluateSyscallImpl(int fs_de - return RestrictCloneToThreadsAndEPERMFork(); - } - -+ // clone3 takes a pointer argument which we cannot examine, so return ENOSYS -+ // to force the libc to use clone. See https://crbug.com/1213452. -+ if (sysno == __NR_clone3) { -+ return Error(ENOSYS); -+ } -+ - if (sysno == __NR_fcntl) - return RestrictFcntlCommands(); - diff --git a/qtwebengine-harfbuzz.patch b/qtwebengine-harfbuzz.patch deleted file mode 100644 index cedfd16..0000000 --- a/qtwebengine-harfbuzz.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc -index ba5391708..f5fad4148 100644 ---- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc -+++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc -@@ -71,9 +71,9 @@ sk_sp SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) { - hb_set_t* glyphs = - hb_subset_input_glyph_set(input.get()); // Owned by |input|. - usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs))); -- hb_subset_input_set_retain_gids(input.get(), true); -+ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); - -- HbScoped subset_face(hb_subset(face.get(), input.get())); -+ HbScoped subset_face(hb_subset_or_fail(face.get(), input.get())); - HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); - if (!subset_blob) - return nullptr; -diff --git a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp -index 81c37eef3..1581fb8a9 100644 ---- a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp -@@ -71,11 +71,10 @@ static sk_sp subset_harfbuzz(sk_sp fontData, - hb_set_t* glyphs = hb_subset_input_glyph_set(input.get()); - glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);}); - -- hb_subset_input_set_retain_gids(input.get(), true); - // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. - // If it isn't known if a font is 'tricky', retain the hints. -- hb_subset_input_set_drop_hints(input.get(), false); -- HBFace subset(hb_subset(face.get(), input.get())); -+ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS | HB_SUBSET_FLAGS_NO_HINTING); -+ HBFace subset(hb_subset_or_fail(face.get(), input.get())); - HBBlob result(hb_face_reference_blob(subset.get())); - return to_data(std::move(result)); - } diff --git a/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch deleted file mode 100644 index 09803b2..0000000 --- a/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn b/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn -index 96a59c7c7..d5470f284 100644 ---- a/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn -@@ -208,12 +208,6 @@ if (current_cpu == "arm") { - ] - if (arm_optionally_use_neon) { - # Run-time NEON detection. -- deps = [ -- "//third_party/android_tools:cpu_features", -- ] -- -- # To get the __android_log_print routine -- libs = [ "log" ] - - # Detection routine - sources += [ "sp/src/arm/detect.c" ] -diff --git a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c -index 57bfe4089..94a3f7ddc 100644 ---- a/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c -+++ b/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c -@@ -9,13 +9,57 @@ - * - */ - --#include -- --#include "android/log.h" - #include "dl/sp/api/omxSP.h" - -+// For ArmCpuCaps() -+#include -+#include -+ -+// based on libvpx arm_cpudetect.c -+static int ArmCpuCaps(const char* cpuinfo_name) { -+ char cpuinfo_line[512]; -+ FILE* f = fopen(cpuinfo_name, "r"); -+ if (!f) { -+ // Assume Neon if /proc/cpuinfo is unavailable. -+ // This will occur for Chrome sandbox for Pepper or Render process. -+ return 1; -+ } -+ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { -+ if (memcmp(cpuinfo_line, "Features", 8) == 0) { -+ char* p = strstr(cpuinfo_line, " neon"); -+ if (p && (p[5] == ' ' || p[5] == '\n')) { -+ fclose(f); -+ return 1; -+ } -+ // aarch64 uses asimd for Neon. -+ p = strstr(cpuinfo_line, " asimd"); -+ if (p && (p[6] == ' ' || p[6] == '\n')) { -+ fclose(f); -+ return 1; -+ } -+ } -+ } -+ fclose(f); -+ return 0; -+} -+ - int omxSP_HasArmNeon() { -- return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; -+#if defined(__arm__) || defined(__aarch64__) -+// gcc -mfpu=neon defines __ARM_NEON__ -+// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. -+// For Linux, /proc/cpuinfo can be tested but without that assume Neon. -+#if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) -+ return 1; -+// For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon -+// flag in it. -+// So for aarch64, neon enabling is hard coded here. -+#elif defined(__aarch64__) -+ return 1; -+#else -+ // Linux arm parse text file for neon detect. -+ return ArmCpuCaps("/proc/cpuinfo"); -+#endif -+#endif // __arm__ - } - - static void SetFFTRoutines() { -@@ -24,13 +68,9 @@ static void SetFFTRoutines() { - * forward and inverse FFTs - */ - if (omxSP_HasArmNeon()) { -- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", -- "Using NEON FFT"); - omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs; - omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs; - } else { -- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", -- "Using non-NEON FFT"); - omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp; - omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp; - } From 2126c351306f374b7b3cfe811174e1f47306aecc Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 19 Jan 2022 09:35:51 -0600 Subject: [PATCH 385/437] update bundle versions, nullptr gcc12 ftbfs fix --- qt5-qtwebengine.spec | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 918083d..bbbf040 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -92,6 +92,8 @@ Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch Patch4: qtwebengine-SIOCGSTAMP.patch # fix build when using qt < 5.14 Patch5: qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch +# gcc-12 FTBFS "use of deleted function" +Patch6: chromium-angle-nullptr.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 @@ -223,6 +225,11 @@ BuildRequires: pkgconfig(vpx) >= 1.8.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. +# rdieter: unsure, chrome/VERSION says: +#MAJOR=87 +#MINOR=0 +#BUILD=4280 +#PATCH=144 Provides: bundled(chromium) = 90.0.44.30.228 # Bundled in src/3rdparty/chromium/third_party: @@ -243,7 +250,7 @@ Provides: bundled(brotli) # out. See clean_qtwebengine.sh, clean_ffmpeg.sh, and # get_free_ffmpeg_source_files.py. # see src/3rdparty/chromium/third_party/ffmpeg/Changelog for the version number -Provides: bundled(ffmpeg) = 3.3 +Provides: bundled(ffmpeg) = 4.3 Provides: bundled(hunspell) = 1.6.0 Provides: bundled(iccjpeg) # bundled as "khronos", headers only @@ -255,20 +262,19 @@ Provides: bundled(libjingle) # see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number Provides: bundled(libsrtp) = 2.1.0 %if !0%{?use_system_libvpx} -# claims "Version: 1.6.0", but according to the fine print, this is actually a -# snapshot from master from after the 1.6.1 release -Provides: bundled(libvpx) = 1.6.1 +Provides: bundled(libvpx) = 1.8.2 %endif %if !0%{?use_system_libwebp} -Provides: bundled(libwebp) = 0.6.0 +Provides: bundled(libwebp) = 1.1.0-28-g55a080e5 %endif # bundled as "libxml" # see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h -Provides: bundled(libxml2) = 2.9.4 +# post 2.9.9 snapshot?, 2.9.9-0b3c64d9f2f3e9ce1a98d8f19ee7a763c87e27d5 +Provides: bundled(libxml2) = 2.9.10 # see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version -Provides: bundled(libxslt) = 1.1.29 +Provides: bundled(libxslt) = 1.1.34 Provides: bundled(libXNVCtrl) = 302.17 -Provides: bundled(libyuv) = 1658 +Provides: bundled(libyuv) = 1768 Provides: bundled(modp_b64) Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) @@ -278,8 +284,8 @@ Provides: bundled(qcms) = 4 Provides: bundled(sfntly) Provides: bundled(skia) # bundled as "smhasher" -Provides: bundled(SMHasher) = 0-0.1.svn147 -Provides: bundled(sqlite) = 3.20 +Provides: bundled(SMHasher) = 0-147 +Provides: bundled(sqlite) = 3.35.5 Provides: bundled(usrsctp) Provides: bundled(webrtc) = 90 @@ -395,9 +401,9 @@ popd %endif %patch4 -p1 -b .SIOCGSTAMP %patch5 -p1 -b .QT_DEPRECATED_VERSION +%patch6 -p1 -b .nullptr ## upstream patches - %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 %patch31 -p1 -b .TRUE From 02956c858dbe7b2d21d3143ed51805c65066947d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 19 Jan 2022 09:36:28 -0600 Subject: [PATCH 386/437] commit awol nullptr.patch --- chromium-angle-nullptr.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 chromium-angle-nullptr.patch diff --git a/chromium-angle-nullptr.patch b/chromium-angle-nullptr.patch new file mode 100644 index 0000000..78ae389 --- /dev/null +++ b/chromium-angle-nullptr.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp.nullptr qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp +--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp.nullptr 2021-12-15 10:09:27.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp 2022-01-19 08:52:02.659577615 -0600 +@@ -254,7 +254,7 @@ std::string GetGLSLTypeString(GLenum typ + return "mat4"; + default: + UNREACHABLE(); +- return nullptr; ++ return ""; + } + } + From c36afa25bff3a32acf943218aeb274afc37b9ba2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 19 Jan 2022 17:10:14 -0600 Subject: [PATCH 387/437] one more nullptr.patch (hunspell) --- chromium-hunspell-nullptr.patch | 12 ++++++++++++ qt5-qtwebengine.spec | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 chromium-hunspell-nullptr.patch diff --git a/chromium-hunspell-nullptr.patch b/chromium-hunspell-nullptr.patch new file mode 100644 index 0000000..b215049 --- /dev/null +++ b/chromium-hunspell-nullptr.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx.nullptr qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx +--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx.nullptr 2021-12-15 10:09:27.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx 2022-01-19 10:30:40.845051982 -0600 +@@ -1725,7 +1725,7 @@ std::string HunspellImpl::get_xml_par(co + if (end == '>') + end = '<'; + else if (end != '\'' && end != '"') +- return 0; // bad XML ++ return dest; // bad XML + for (par++; *par != '\0' && *par != end; ++par) { + dest.push_back(*par); + } diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bbbf040..16a7895 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -94,6 +94,7 @@ Patch4: qtwebengine-SIOCGSTAMP.patch Patch5: qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch # gcc-12 FTBFS "use of deleted function" Patch6: chromium-angle-nullptr.patch +Patch7: chromium-hunspell-nullptr.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 @@ -401,7 +402,8 @@ popd %endif %patch4 -p1 -b .SIOCGSTAMP %patch5 -p1 -b .QT_DEPRECATED_VERSION -%patch6 -p1 -b .nullptr +%patch6 -p1 -b .angle_nullptr +%patch7 -p1 -b .hunspell_nullptr ## upstream patches %patch24 -p1 -b .aarch64-new-stat From 0c04e957df90a03a3abefa9178719fd057d1ecb2 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 22 Jan 2022 13:45:54 +0100 Subject: [PATCH 388/437] Fix Provides: bundled(chromium). --- qt5-qtwebengine.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 16a7895..bed58ec 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -226,12 +226,7 @@ BuildRequires: pkgconfig(vpx) >= 1.8.0 # Of course, Chromium itself is bundled. It cannot be unbundled because it is # not a library, but forked (modified) application code. -# rdieter: unsure, chrome/VERSION says: -#MAJOR=87 -#MINOR=0 -#BUILD=4280 -#PATCH=144 -Provides: bundled(chromium) = 90.0.44.30.228 +Provides: bundled(chromium) = 87.0.4280.144 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, From b36104f4bb5c9ac82056c46249d5a404a6b4b228 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 22 Jan 2022 13:47:09 +0100 Subject: [PATCH 389/437] Drop "use_gold_linker" (see #2043178). --- qt5-qtwebengine.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bed58ec..d2f4a89 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -458,7 +458,7 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} \ %{?debug_config:CONFIG+="%{debug_config}}" \ - CONFIG+="link_pulseaudio use_gold_linker" \ + CONFIG+="link_pulseaudio" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ . @@ -617,6 +617,7 @@ done %changelog * Tue Jan 11 2022 Rex Dieter - 5.15.8-1 - 5.15.8 +- drop "use_gold_linker" (see #2043178) * Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 - Rebuilt for libre2.so.9 @@ -637,7 +638,7 @@ done - 5.15.5 * Wed Jun 16 2021 Rex Dieter - 5.15.2-12 -- workaround SIGSTKSZ FTBFS (#19455950 +- workaround SIGSTKSZ FTBFS (#1945595) - workaround 'TRUE'/'FALSE' was not declared in this scope * Thu May 20 2021 Pete Walter - 5.15.2-11 From f6a6f07c22c61f1bc8fc1f9fb598043c85fb1835 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 22 Jan 2022 16:06:22 +0100 Subject: [PATCH 390/437] Revert "Drop "use_gold_linker" (see #2043178)." This reverts commit b36104f4bb5c9ac82056c46249d5a404a6b4b228. This fails to build on i686 due to ffmpeg text relocations (which produce a warning from ld.bfd, and -Wl,--fatal-warnings gets passed): https://bugzilla.redhat.com/show_bug.cgi?id=2043178#c14 --- qt5-qtwebengine.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index d2f4a89..bed58ec 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -458,7 +458,7 @@ export NINJA_PATH=%{__ninja} %{qmake_qt5} \ %{?debug_config:CONFIG+="%{debug_config}}" \ - CONFIG+="link_pulseaudio" \ + CONFIG+="link_pulseaudio use_gold_linker" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ . @@ -617,7 +617,6 @@ done %changelog * Tue Jan 11 2022 Rex Dieter - 5.15.8-1 - 5.15.8 -- drop "use_gold_linker" (see #2043178) * Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 - Rebuilt for libre2.so.9 @@ -638,7 +637,7 @@ done - 5.15.5 * Wed Jun 16 2021 Rex Dieter - 5.15.2-12 -- workaround SIGSTKSZ FTBFS (#1945595) +- workaround SIGSTKSZ FTBFS (#19455950 - workaround 'TRUE'/'FALSE' was not declared in this scope * Thu May 20 2021 Pete Walter - 5.15.2-11 From 6d39634c0ea5d1d08e51a9816bc8be3af944603f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 22 Jan 2022 16:09:01 +0100 Subject: [PATCH 391/437] Set "%%global _package_notes_linker gold" (#2043178). --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index bed58ec..e02237d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -2,6 +2,9 @@ %global _hardened_build 1 +# This package uses the gold linker. +%global _package_notes_linker gold + # define to build docs, may need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available %global docs 1 @@ -617,6 +620,7 @@ done %changelog * Tue Jan 11 2022 Rex Dieter - 5.15.8-1 - 5.15.8 +- Set "%%global _package_notes_linker gold" (#2043178) * Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 - Rebuilt for libre2.so.9 @@ -637,7 +641,7 @@ done - 5.15.5 * Wed Jun 16 2021 Rex Dieter - 5.15.2-12 -- workaround SIGSTKSZ FTBFS (#19455950 +- workaround SIGSTKSZ FTBFS (#1945595) - workaround 'TRUE'/'FALSE' was not declared in this scope * Thu May 20 2021 Pete Walter - 5.15.2-11 From 9ae22d8d063baaa00144ec6c2538c96454e8bdc3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sat, 22 Jan 2022 23:49:21 +0100 Subject: [PATCH 392/437] %undefine _package_note_file (#2043178). --- qt5-qtwebengine.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e02237d..2d8765b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -2,8 +2,8 @@ %global _hardened_build 1 -# This package uses the gold linker. -%global _package_notes_linker gold +# package-notes causes FTBFS (#2043178) +%undefine _package_note_file # define to build docs, may need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available @@ -620,7 +620,7 @@ done %changelog * Tue Jan 11 2022 Rex Dieter - 5.15.8-1 - 5.15.8 -- Set "%%global _package_notes_linker gold" (#2043178) +- %%undefine _package_note_file (#2043178) * Sat Jan 08 2022 Miro Hrončok - 5.15.6-3 - Rebuilt for libre2.so.9 From e3cb59b44a87a6c9dfabc3432bfc460fb479891f Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 23 Jan 2022 16:01:12 +0100 Subject: [PATCH 393/437] Mark qtwebengine-release.sh executable. --- qtwebengine-release.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 qtwebengine-release.sh diff --git a/qtwebengine-release.sh b/qtwebengine-release.sh old mode 100644 new mode 100755 From c7db84b88585ea6c0a7e5c3e52682c7b2af3c7d7 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 23 Jan 2022 16:22:27 +0100 Subject: [PATCH 394/437] Include qtwebengine-release.sh as Source1. (and increment the Source numbers of the cleanup scripts by 1) --- qt5-qtwebengine.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 2d8765b..e76dc3d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -63,14 +63,16 @@ Release: 1%{?dist} # The other licenses are from Chromium and the code it bundles License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) URL: http://www.qt.io -# leaned tarball with patent-encumbered codecs removed from the bundled FFmpeg -# wget http://download.qt.io/official_releases/qt/5.15/5.15.1/submodules/qtwebengine-everywhere-src-5.15.1.tar.xz +# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg +# ./qtwebengine-release.sh # ./clean_qtwebengine.sh 5.15.1 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz +# release script used above +Source1: qtwebengine-release.sh # cleanup scripts used above -Source1: clean_qtwebengine.sh -Source2: clean_ffmpeg.sh -Source3: get_free_ffmpeg_source_files.py +Source2: clean_qtwebengine.sh +Source3: clean_ffmpeg.sh +Source4: get_free_ffmpeg_source_files.py # macros Source10: macros.qt5-qtwebengine From 9aa6750784e697d9f976823baf754b63169ace43 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 23 Jan 2022 16:36:40 +0100 Subject: [PATCH 395/437] Delete qtwebengine-everywhere-src-5.10.0-linux-pri.patch. The yasm part is obsolete because QtWebEngine uses nasm now (but currently a bundled copy, that needs to be fixed). The libpci part seems obsolete as well, -lpci is getting linked already. Also restore an AWOL patch comment. --- qt5-qtwebengine.spec | 5 +--- ...gine-everywhere-src-5.10.0-linux-pri.patch | 24 ------------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.10.0-linux-pri.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index e76dc3d..16ec784 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -79,9 +79,6 @@ Source10: macros.qt5-qtwebengine # pulseaudio headers Source20: pulseaudio-12.2-headers.tar.gz -# some tweaks to linux.pri (system yasm, link libpci, run unbundling script) -# FIXME/TODO: review, I *think* this is no longer needed -- rdieter -Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -104,6 +101,7 @@ Patch7: chromium-hunspell-nullptr.patch Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch +# FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch ## Upstream patches: @@ -392,7 +390,6 @@ mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium popd -#patch0 -p1 -b .linux-pri %if 0%{?use_system_libicu} %patch1 -p1 -b .no-icudtl-dat %endif diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch deleted file mode 100644 index 8d88773..0000000 --- a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri -index 56c18bd..cb17c7a 100644 ---- a/src/buildtools/config/linux.pri -+++ b/src/buildtools/config/linux.pri -@@ -176,3 +176,19 @@ host_build { - } - gn_args += use_glib=false - } -+ -+# yasm is only used on x86, and passing use_system_yasm makes the build fail on -+# other architectures (e.g., ARM), so make it conditional on the architecture -+#contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { -+# gn_args += use_system_yasm=true -+#} -+ -+# link libpci instead of dlopening it, our Qt packaging depends on it anyway -+gn_args += linux_link_libpci=true -+ -+# run the unbundling script Chromium provides -+CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()" -+R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py" -+R_G_F_PY_ARGS = "--system-libraries yasm" -+log("Running python2 $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}") -+!system("python2 $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed") From 09d69c316abdda8cc0dcc436d4f64bf909292d57 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 23 Jan 2022 17:01:02 +0100 Subject: [PATCH 396/437] Remove no longer used BuildRequires: yasm. --- qt5-qtwebengine.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 16ec784..b4d7110 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -144,9 +144,6 @@ BuildRequires: nodejs BuildRequires: re2-devel %endif BuildRequires: snappy-devel -%ifarch %{ix86} x86_64 -BuildRequires: yasm -%endif BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(glib-2.0) From f523d61a98f04bdecf0f6c3c2835524ae00fe0c8 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 23 Jan 2022 17:33:16 +0100 Subject: [PATCH 397/437] Fix Provides: bundled(*), remove no longer used BR pkgconfig(protobuf). * Sun Jan 23 2022 Kevin Kofler - 5.15.8-2 - Update Provides: bundled(*) version numbers, remove ones dropped upstream - Restore Provides: bundled(protobuf), unbundling support dropped years ago - Remove no longer used BuildRequires: yasm and pkgconfig(protobuf) --- qt5-qtwebengine.spec | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b4d7110..b7caa59 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -162,7 +162,6 @@ BuildRequires: pkgconfig(libwebp) >= 0.6.0 BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(opus) -BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(libevent) BuildRequires: pkgconfig(poppler-cpp) BuildRequires: pkgconfig(zlib) @@ -231,6 +230,13 @@ Provides: bundled(chromium) = 87.0.4280.144 # Bundled in src/3rdparty/chromium/third_party: # Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers, # except where specified otherwise. +# Note that many of those libraries are git snapshots, so version numbers are +# necessarily approximate. +# Also note that the list is probably not complete anymore due to Chromium +# adding more and more bundled stuff at every release, some of which (but not +# all) is actually built in QtWebEngine. +# src/3rdparty/chromium/third_party/angle/doc/ChoosingANGLEBranch.md points to +# http://omahaproxy.appspot.com/deps.json?version=87.0.4280.144 chromium_branch Provides: bundled(angle) = 2422 # Google's fork of OpenSSL # We cannot build against NSS instead because it no longer works with NSS 3.21: @@ -252,11 +258,11 @@ Provides: bundled(iccjpeg) # bundled as "khronos", headers only Provides: bundled(khronos_headers) # bundled as "leveldatabase" -Provides: bundled(leveldb) = 1.20 +Provides: bundled(leveldb) = 1.22 # bundled as "libjingle_xmpp" Provides: bundled(libjingle) # see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number -Provides: bundled(libsrtp) = 2.1.0 +Provides: bundled(libsrtp) = 2.2.0 %if !0%{?use_system_libvpx} Provides: bundled(libvpx) = 1.8.2 %endif @@ -272,12 +278,10 @@ Provides: bundled(libxslt) = 1.1.34 Provides: bundled(libXNVCtrl) = 302.17 Provides: bundled(libyuv) = 1768 Provides: bundled(modp_b64) -Provides: bundled(openmax_dl) = 1.0.2 Provides: bundled(ots) # see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version -#Provides: bundled(protobuf) = 3.0.0-0.1.beta3 +Provides: bundled(protobuf) = 3.9.0 Provides: bundled(qcms) = 4 -Provides: bundled(sfntly) Provides: bundled(skia) # bundled as "smhasher" Provides: bundled(SMHasher) = 0-147 @@ -294,7 +298,6 @@ Provides: bundled(x86inc) # Bundled in src/3rdparty/chromium/base/third_party: # Check src/3rdparty/chromium/third_party/base/*/README.chromium for version # numbers, except where specified otherwise. -Provides: bundled(dmg_fp) Provides: bundled(dynamic_annotations) = 4384 Provides: bundled(superfasthash) = 0 Provides: bundled(symbolize) @@ -319,7 +322,7 @@ Provides: bundled(nsURLParsers) # Bundled outside of third_party, apparently not considered as such by Chromium: Provides: bundled(mojo) # see src/3rdparty/chromium/v8/include/v8_version.h for the version number -Provides: bundled(v8) = 6.1.534.44 +Provides: bundled(v8) = 8.7.220.35 # bundled by v8 (src/3rdparty/chromium/v8/src/base/ieee754.cc) # The version number is 5.3, the last version that upstream released, years ago: # http://www.netlib.org/fdlibm/readme @@ -614,6 +617,11 @@ done %changelog +* Sun Jan 23 2022 Kevin Kofler - 5.15.8-2 +- Update Provides: bundled(*) version numbers, remove ones dropped upstream +- Restore Provides: bundled(protobuf), unbundling support dropped years ago +- Remove no longer used BuildRequires: yasm and pkgconfig(protobuf) + * Tue Jan 11 2022 Rex Dieter - 5.15.8-1 - 5.15.8 - %%undefine _package_note_file (#2043178) From 15ba324421e2fccdf6edf77e7f430a4bc2615ca3 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 26 Jan 2022 09:39:53 -0800 Subject: [PATCH 398/437] get_free_ffmpeg_source_files.py use python3 --- get_free_ffmpeg_source_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_free_ffmpeg_source_files.py b/get_free_ffmpeg_source_files.py index 899e774..390ee3f 100755 --- a/get_free_ffmpeg_source_files.py +++ b/get_free_ffmpeg_source_files.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python3 # Copyright 2015 Tomas Popela # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -73,7 +73,7 @@ def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): sys.stderr.write("Something went wrong, no sources parsed!\n") sys.exit(1) - print ' '.join(output_sources) + print(' '.join(output_sources)) if __name__ == "__main__": From 9294599c2450d4006ad696aa52415e7bfbf53e3b Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 27 Jan 2022 16:38:58 -0500 Subject: [PATCH 399/437] rebuild for libvpx --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b7caa59..f4c01ac 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -56,7 +56,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -617,6 +617,9 @@ done %changelog +* Thu Jan 27 2022 Tom Callaway - 5.15.8-3 +- rebuild for libvpx + * Sun Jan 23 2022 Kevin Kofler - 5.15.8-2 - Update Provides: bundled(*) version numbers, remove ones dropped upstream - Restore Provides: bundled(protobuf), unbundling support dropped years ago From dfae144a41bb5ea3d3a89f05ef6f3b4caab6b041 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 1 Feb 2022 15:45:56 -0800 Subject: [PATCH 400/437] Specifically for epel9 only, until things switch to python3 Bundle python2 for building only Bundled re2 No docs --- .gitignore | 3 +++ qt5-qtwebengine.spec | 54 ++++++++++++++++++++++++++++++++++++++++---- sources | 3 +++ 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f3ee4f9..1ef4d88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /pulseaudio-12.2-headers.tar.gz /qtwebengine-everywhere-src-5.15.8-clean.tar.xz +/python2.7-2.7.18-19.el9.1.src.rpm +/python2.7-2.7.18-19.el9.1.aarch64.rpm +/python2.7-2.7.18-19.el9.1.x86_64.rpm diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f4c01ac..c367d29 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -7,7 +7,7 @@ # define to build docs, may need to undef this for bootstrapping # where qt5-qttools (qt5-doctools) builds are not yet available -%global docs 1 +%global docs 0 %if 0%{?fedora} # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) @@ -17,8 +17,12 @@ # need libwebp >= 0.6.0 %global use_system_libwebp 1 %global use_system_jsoncpp 1 +%if 0%{?rhel} && 0%{?rhel} == 9 +%global use_system_re2 0 +%else %global use_system_re2 1 %endif +%endif %if 0%{?fedora} > 32 # need libicu >= 65, only currently available on f33+ @@ -56,7 +60,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 3%{?dist} +Release: 3%{?dist}.1 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -79,6 +83,13 @@ Source10: macros.qt5-qtwebengine # pulseaudio headers Source20: pulseaudio-12.2-headers.tar.gz +## Python2 Sources +## src.rpm is Fedora spec with tests and tkinter turned off +## binary rpms have been built on epel9 +Source100: python2.7-2.7.18-19.el9.1.src.rpm +Source101: python2.7-2.7.18-19.el9.1.aarch64.rpm +Source102: python2.7-2.7.18-19.el9.1.x86_64.rpm + # quick hack to avoid checking for the nonexistent icudtl.dat and silence the # resulting warnings - not upstreamable as is because it removes the fallback # mechanism for the ICU data directory (which is not used in our builds because @@ -199,7 +210,11 @@ BuildRequires: perl-interpreter # per https://fedoraproject.org/wiki/Changes/RetirePython2#FESCo_exceptions # Only the interpreter is needed %if 0%{?fedora} > 29 || 0%{?rhel} > 8 +%if 0%{?rhel} && 0%{?rhel} == 9 +BuildRequires: %{__python3} +%else BuildRequires: %{__python2} +%endif %else BuildRequires: python2 BuildRequires: python2-rpm-macros @@ -207,6 +222,10 @@ BuildRequires: python2-rpm-macros %if 0%{?use_system_libvpx} BuildRequires: pkgconfig(vpx) >= 1.8.0 %endif +# For python on EPEL9, These get pulled in via python2 +BuildRequires: libtirpc +BuildRequires: libnsl2 +BuildRequires: python-rpm-macros # extra (non-upstream) functions needed, see # src/3rdparty/chromium/third_party/sqlite/README.chromium for details @@ -279,6 +298,7 @@ Provides: bundled(libXNVCtrl) = 302.17 Provides: bundled(libyuv) = 1768 Provides: bundled(modp_b64) Provides: bundled(ots) +Provides: bundled(re2) # see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version Provides: bundled(protobuf) = 3.9.0 Provides: bundled(qcms) = 4 @@ -390,6 +410,17 @@ mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium popd +# Install python2 from rpms +mkdir python2 +pushd python2 +%ifarch aarch64 +rpm2cpio %{SOURCE101} | cpio -idm +%endif +%ifarch x86_64 +rpm2cpio %{SOURCE102} | cpio -idm +%endif +popd + %if 0%{?use_system_libicu} %patch1 -p1 -b .no-icudtl-dat %endif @@ -427,13 +458,15 @@ cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ sed -i -e 's/symbol_level=1/symbol_level=2/g' src/core/config/common.pri %endif +%if 0%{?docs} # generate qtwebengine-3rdparty.qdoc, it is missing from the tarball pushd src/3rdparty -%{__python2} chromium/tools/licenses.py \ +%{__python3} chromium/tools/licenses.py \ --file-template ../../tools/about_credits.tmpl \ --entry-template ../../tools/about_credits_entry.tmpl \ credits >../webengine/doc/src/qtwebengine-3rdparty.qdoc popd +%endif # copy the Chromium license so it is installed with the appropriate name cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium @@ -454,6 +487,10 @@ test -f "./include/QtWebEngineCore/qtwebenginecoreglobal.h" . /opt/rh/devtoolset-7/enable %endif +# python2 path +export PATH=$(pwd)/python2/usr/bin:$PATH +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/python2/usr/lib64 + export STRIP=strip export NINJAFLAGS="%{__ninja_common_opts}" export NINJA_PATH=%{__ninja} @@ -525,7 +562,10 @@ while read filename ; do done %files -%license LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc +%license LICENSE.* +%if 0%{?docs} +%license src/webengine/doc/src/qtwebengine-3rdparty.qdoc +%endif %{_qt5_libdir}/libQt5*.so.* %{_qt5_bindir}/qwebengine_convert_dict %{_qt5_libdir}/qt5/qml/* @@ -617,6 +657,12 @@ done %changelog +* Tue Feb 01 2022 Troy Dawson - 5.15.8-3.1 +- Specifically for epel9 only, until things switch to python3 +- Bundle python2 for building only +- Bundled re2 +- No docs + * Thu Jan 27 2022 Tom Callaway - 5.15.8-3 - rebuild for libvpx diff --git a/sources b/sources index 71b9125..b4bf324 100644 --- a/sources +++ b/sources @@ -1,2 +1,5 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be SHA512 (qtwebengine-everywhere-src-5.15.8-clean.tar.xz) = 0ded6ec6106a79e66796fa65b9574debf59e602aecbfdd0cdf0aeb6d17530177c0a8650078402c426abfebcd40c97d1501f4277541c86f2c576543052f627c04 +SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 +SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 +SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 From af46fc18c6d350d1d79eddde56adf7351b5c73e9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 17 Feb 2022 14:03:23 -0600 Subject: [PATCH 401/437] use python2 hack only on epel and not unconditionally --- qt5-qtwebengine.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index c367d29..07c31da 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -410,6 +410,7 @@ mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium popd +%if 0%{?epel:1} # Install python2 from rpms mkdir python2 pushd python2 @@ -420,6 +421,7 @@ rpm2cpio %{SOURCE101} | cpio -idm rpm2cpio %{SOURCE102} | cpio -idm %endif popd +%endif %if 0%{?use_system_libicu} %patch1 -p1 -b .no-icudtl-dat From 6736cadbe258149a1d5f82bc97d0941b850f29de Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 17 Feb 2022 14:04:37 -0600 Subject: [PATCH 402/437] Screen sharing support under Wayland (#2054690) --- qt5-qtwebengine.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 07c31da..78b2a94 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -60,7 +60,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 3%{?dist}.1 +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -502,6 +502,7 @@ export NINJA_PATH=%{__ninja} CONFIG+="link_pulseaudio use_gold_linker" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ + QMAKE_EXTRA_ARGS+="--webengine-webrtc-pipewire" \ . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja @@ -659,6 +660,9 @@ done %changelog +* Thu Feb 17 2022 Rex Dieter - 5.15.8-4 +- Screen sharing support under Wayland (#2054690) + * Tue Feb 01 2022 Troy Dawson - 5.15.8-3.1 - Specifically for epel9 only, until things switch to python3 - Bundle python2 for building only From 4c3f7f038d269d510841bb3da1f0449f9b3f5c36 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 17 Feb 2022 14:12:57 -0600 Subject: [PATCH 403/437] fix typo *appears* to work this way too, but want to keep option enablement consistent --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 78b2a94..9c622b6 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -502,7 +502,7 @@ export NINJA_PATH=%{__ninja} CONFIG+="link_pulseaudio use_gold_linker" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ - QMAKE_EXTRA_ARGS+="--webengine-webrtc-pipewire" \ + QMAKE_EXTRA_ARGS+="-webengine-webrtc-pipewire" \ . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja From 54a875c23a81fa680acd80bf903ffb4a1e97a30e Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 18 Feb 2022 09:58:17 -0600 Subject: [PATCH 404/437] fix pipewire support patch inspired by chromium-80.0.3987.87-libpipewire-0.3.patch --- qt5-qtwebengine.spec | 10 +++++++++- qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 9c622b6..74b4312 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -12,6 +12,8 @@ %if 0%{?fedora} # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 +# For screen sharing on Wayland, currently Fedora only thing - no epel +%global pipewire 1 %endif %if 0%{?fedora} > 30 || 0%{?epel} > 7 # need libwebp >= 0.6.0 @@ -154,6 +156,9 @@ BuildRequires: nodejs %if 0%{?use_system_re2} BuildRequires: re2-devel %endif +%if 0%{?pipewire} +BuildRequires: pkgconfig(libpipewire-0.3) +%endif BuildRequires: snappy-devel BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(gobject-2.0) @@ -434,6 +439,9 @@ popd %patch5 -p1 -b .QT_DEPRECATED_VERSION %patch6 -p1 -b .angle_nullptr %patch7 -p1 -b .hunspell_nullptr +#if 0%{?pipewire} +%patch8 -p1 -b .libpipewire-0.3 +#endif ## upstream patches %patch24 -p1 -b .aarch64-new-stat @@ -502,7 +510,7 @@ export NINJA_PATH=%{__ninja} CONFIG+="link_pulseaudio use_gold_linker" \ %{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \ QMAKE_EXTRA_ARGS+="-webengine-kerberos" \ - QMAKE_EXTRA_ARGS+="-webengine-webrtc-pipewire" \ + %{?pipewire:QMAKE_EXTRA_ARGS+="-webengine-webrtc-pipewire"} \ . # avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja diff --git a/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch b/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch new file mode 100644 index 0000000..ece385b --- /dev/null +++ b/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch @@ -0,0 +1,12 @@ +diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn.libpipewire-0.3 qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn +--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn.libpipewire-0.3 2021-12-15 10:09:27.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn 2022-02-18 09:43:31.402923179 -0600 +@@ -202,7 +202,7 @@ if (is_linux || is_chromeos) { + + if (rtc_link_pipewire) { + pkg_config("pipewire") { +- packages = [ "libpipewire-0.2" ] ++ packages = [ "libpipewire-0.3" ] + } + } else { + # When libpipewire is not directly linked, use stubs to allow for dlopening of From 5e1880c665e1ac57b9d946fd3e04d8c09d7f4768 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 18 Feb 2022 10:18:47 -0600 Subject: [PATCH 405/437] patch8 awol, added --- qt5-qtwebengine.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 74b4312..fa315c1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -110,6 +110,7 @@ Patch5: qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch # gcc-12 FTBFS "use of deleted function" Patch6: chromium-angle-nullptr.patch Patch7: chromium-hunspell-nullptr.patch +Patch8: qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch # Fix/workaround FTBFS on aarch64 with newer glibc Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch # Use Python2 From 864d6241146620294dfea4829d79049614c7ee5c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 18 Feb 2022 12:36:26 -0600 Subject: [PATCH 406/437] respin pipewire patch enable rtc_link_pipewire --- qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch b/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch index ece385b..c9e4686 100644 --- a/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch +++ b/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch @@ -10,3 +10,15 @@ diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/web } } else { # When libpipewire is not directly linked, use stubs to allow for dlopening of +diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni.libpipewire-0.3 qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni +--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni.libpipewire-0.3 2021-12-15 10:09:27.000000000 -0600 ++++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni 2022-02-18 12:35:13.895009491 -0600 +@@ -115,7 +115,7 @@ declare_args() { + rtc_use_pipewire = is_desktop_linux && use_sysroot + + # Set this to link PipeWire directly instead of using the dlopen. +- rtc_link_pipewire = false ++ rtc_link_pipewire = true + + # Enable to use the Mozilla internal settings. + build_with_mozilla = false From 046e95e43aed57299d4fba77958ca3d701109215 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 9 Mar 2022 08:15:12 +0100 Subject: [PATCH 407/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fa315c1..7aded31 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -669,6 +669,9 @@ done %changelog +* Wed Mar 09 2022 Jan Grulich - 5.15.8-5 +- Rebuild (qt5) + * Thu Feb 17 2022 Rex Dieter - 5.15.8-4 - Screen sharing support under Wayland (#2054690) From b20253f3ffa06466ebe9e1687036486653ff7be5 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 9 Mar 2022 09:28:23 +0100 Subject: [PATCH 408/437] Disable PipeWire for now, WebRTC in qtwebengine is still PW 0.2 based --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 7aded31..a62d2b0 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -13,7 +13,7 @@ # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 # For screen sharing on Wayland, currently Fedora only thing - no epel -%global pipewire 1 +#global pipewire 1 %endif %if 0%{?fedora} > 30 || 0%{?epel} > 7 # need libwebp >= 0.6.0 From f79a8388e168adce9e2efacf0c98a88a1e2440dc Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Tue, 29 Mar 2022 18:58:12 +0530 Subject: [PATCH 409/437] Update hunspell dictionary path by adding conditional support F36 Change https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change Signed-off-by: Parag Nemade --- qt5-qtwebengine.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a62d2b0..22c0d4d 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -563,7 +563,11 @@ sed -i -e "s|%{version} \${_Qt5WebEngine|%{lesser_version} \${_Qt5WebEngine|" \ %ldconfig_scriptlets +%if 0%{?fedora} > 35 || 0%{?epel} > 9 +%filetriggerin -- %{_datadir}/hunspell +%else %filetriggerin -- %{_datadir}/myspell +%endif while read filename ; do case "$filename" in *.dic) @@ -669,6 +673,10 @@ done %changelog +* Tue Mar 29 2022 Parag Nemade - 5.15.8-6 +- Update hunspell dictionary path by adding conditional support + F36 Change https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change + * Wed Mar 09 2022 Jan Grulich - 5.15.8-5 - Rebuild (qt5) From 6f87bfde8d0ea47eb557786aab2a42fd75ad484f Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 6 May 2022 09:59:03 -0700 Subject: [PATCH 410/437] python2 rpms for rhel9 only --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 22c0d4d..b7d29ea 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -416,7 +416,7 @@ mv pulse src/3rdparty/chromium/ pushd src/3rdparty/chromium popd -%if 0%{?epel:1} +%if 0%{?rhel} && 0%{?rhel} == 9 # Install python2 from rpms mkdir python2 pushd python2 From 28e42828996fcede09f2d0045da15d5988925e5b Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 17 May 2022 12:27:19 +0200 Subject: [PATCH 411/437] Rebuild (Qt 5.15.4) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index b7d29ea..6a7b9f4 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.8 -Release: 6%{?dist} +Release: 7%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -673,6 +673,9 @@ done %changelog +* Tue May 17 2022 Jan Grulich - 5.15.8-7 +- Rebuild (Qt 5.15.4) + * Tue Mar 29 2022 Parag Nemade - 5.15.8-6 - Update hunspell dictionary path by adding conditional support F36 Change https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change From 2583ebbf3f38a3ebabe3843d40542ea9fcfc4fde Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 18 May 2022 12:17:53 +0200 Subject: [PATCH 412/437] Add missing includes --- qt5-qtwebengine.spec | 3 ++- qtwebengine-skia-missing-includes.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-skia-missing-includes.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 6a7b9f4..a1a58c2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -117,7 +117,7 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch # FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch - +Patch32: qtwebengine-skia-missing-includes.patch ## Upstream patches: %if 0%{?fedora} || 0%{?epel} > 7 @@ -448,6 +448,7 @@ popd %patch24 -p1 -b .aarch64-new-stat %patch26 -p1 -b .use-python2 %patch31 -p1 -b .TRUE +%patch32 -p1 -b .skia-missing-includes # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS diff --git a/qtwebengine-skia-missing-includes.patch b/qtwebengine-skia-missing-includes.patch new file mode 100644 index 0000000..8402a73 --- /dev/null +++ b/qtwebengine-skia-missing-includes.patch @@ -0,0 +1,15 @@ +diff --git a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp +index 7260365..503ed08 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp +@@ -8,6 +8,10 @@ + + #include "include/utils/SkParse.h" + ++#include ++#include ++#include ++ + static constexpr const char* gColorNames[] = { + "aliceblue", + "antiquewhite", From 734c76e76c8864657dea1c29e182f9762c89eca4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 2 Jun 2022 08:08:23 -0500 Subject: [PATCH 413/437] 5.15.9 --- .gitignore | 1 + qt5-qtwebengine.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1ef4d88..6f05a86 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /python2.7-2.7.18-19.el9.1.src.rpm /python2.7-2.7.18-19.el9.1.aarch64.rpm /python2.7-2.7.18-19.el9.1.x86_64.rpm +/qtwebengine-everywhere-src-5.15.9-clean.tar.xz diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a1a58c2..48da22c 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -61,8 +61,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.8 -Release: 7%{?dist} +Version: 5.15.9 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -118,6 +118,7 @@ Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch # FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch Patch32: qtwebengine-skia-missing-includes.patch + ## Upstream patches: %if 0%{?fedora} || 0%{?epel} > 7 @@ -674,6 +675,9 @@ done %changelog +* Wed Jun 01 2022 Rex Dieter - 5.15.9-1 +- 5.15.9 + * Tue May 17 2022 Jan Grulich - 5.15.8-7 - Rebuild (Qt 5.15.4) diff --git a/sources b/sources index b4bf324..cb2ac95 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (qtwebengine-everywhere-src-5.15.8-clean.tar.xz) = 0ded6ec6106a79e66796fa65b9574debf59e602aecbfdd0cdf0aeb6d17530177c0a8650078402c426abfebcd40c97d1501f4277541c86f2c576543052f627c04 SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 +SHA512 (qtwebengine-everywhere-src-5.15.9-clean.tar.xz) = d2c16022e8881994689c09ce3a3ee635730fd1ab1b4dd8b23243cd0a09fc231c8034a77e878634dd49206ca01fa48caccda600c869283855a20c3e6714cd93be From a9c79ab034228108277c956f9322c0b37e2d7788 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Thu, 14 Jul 2022 12:12:40 +0200 Subject: [PATCH 414/437] Rebuild (Qt 5.15.5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 48da22c..8cd6ba1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.9 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -675,6 +675,9 @@ done %changelog +* Thu Jul 14 2022 Jan Grulich - 5.15.9-2 +- Rebuild (Qt 5.15.5) + * Wed Jun 01 2022 Rex Dieter - 5.15.9-1 - 5.15.9 From 9816079afb681f0611bc7b9194d83f8b9e0608ca Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Wed, 20 Jul 2022 02:52:28 +0200 Subject: [PATCH 415/437] Drop obsolete no-icudtl-dat patch, code has been fixed upstream since 5.11.0 * Wed Jul 20 2022 Kevin Kofler - 5.15.9-3 - Drop obsolete no-icudtl-dat patch, code has been fixed upstream since 5.11.0 If you look closely at the patch, you will see that the code that is removed does not actually mention the offending icudtl.dat anywhere. This upstream code snippet was fixed back in 5.11.0 to check for qtwebengine_resources.pak instead, which is always installed. (Compare my original patch with the version rebased by Rex Dieter for 5.11.0.) Searching for alternate resource paths is still pointless in packaged QtWebEngine, mind you. (The file installed by the package should always be found.) So the patch did not hurt. But still, it is no longer necessary to patch this out. --- qt5-qtwebengine.spec | 13 +++----- ...-everywhere-src-5.15.0-no-icudtl-dat.patch | 33 ------------------- 2 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8cd6ba1..21b1b95 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.9 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -92,11 +92,6 @@ Source100: python2.7-2.7.18-19.el9.1.src.rpm Source101: python2.7-2.7.18-19.el9.1.aarch64.rpm Source102: python2.7-2.7.18-19.el9.1.x86_64.rpm -# quick hack to avoid checking for the nonexistent icudtl.dat and silence the -# resulting warnings - not upstreamable as is because it removes the fallback -# mechanism for the ICU data directory (which is not used in our builds because -# we use the system ICU, which embeds the data statically) completely -Patch1: qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the # ARM flags with our %%qmake_qt5 macro, including for the next patch Patch2: qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch @@ -430,9 +425,6 @@ rpm2cpio %{SOURCE102} | cpio -idm popd %endif -%if 0%{?use_system_libicu} -%patch1 -p1 -b .no-icudtl-dat -%endif %patch2 -p1 -b .fix-extractcflag %if !0%{?arm_neon} %patch3 -p1 -b .no-neon @@ -675,6 +667,9 @@ done %changelog +* Wed Jul 20 2022 Kevin Kofler - 5.15.9-3 +- Drop obsolete no-icudtl-dat patch, code has been fixed upstream since 5.11.0 + * Thu Jul 14 2022 Jan Grulich - 5.15.9-2 - Rebuild (Qt 5.15.5) diff --git a/qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch b/qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch deleted file mode 100644 index a83367e..0000000 --- a/qtwebengine-everywhere-src-5.15.0-no-icudtl-dat.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp ---- qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp.no-icudtl-dat 2021-06-24 07:26:58.976486102 -0500 -+++ qtwebengine-everywhere-src-5.15.5/src/core/web_engine_library_info.cpp 2021-06-24 07:32:19.272863523 -0500 -@@ -273,7 +273,6 @@ QString dictionariesPath() - - QString resourcesDataPath() - { -- static bool initialized = false; - static QString potentialResourcesPath = - #if defined(OS_MAC) && defined(QT_MAC_FRAMEWORK_BUILD) - getResourcesPath(frameworkBundle()); -@@ -282,21 +281,6 @@ QString resourcesDataPath() - #else - QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); - #endif -- if (!initialized) { -- initialized = true; -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { -- qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath)); -- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath); -- } -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { -- qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath)); -- potentialResourcesPath = QCoreApplication::applicationDirPath(); -- } -- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) { -- qWarning("Qt WebEngine resources not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath)); -- potentialResourcesPath = fallbackDir(); -- } -- } - - return potentialResourcesPath; - } From b22f6246a6afa4b7e212be3eedabc366938df78b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 00:09:49 +0000 Subject: [PATCH 416/437] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 21b1b95..ae23260 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.9 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -667,6 +667,9 @@ done %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 5.15.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jul 20 2022 Kevin Kofler - 5.15.9-3 - Drop obsolete no-icudtl-dat patch, code has been fixed upstream since 5.11.0 From c3db46dbfbf92af69c65a44ffb38b91fd347323c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 2 Aug 2022 13:23:52 +0200 Subject: [PATCH 417/437] Rebuilt for ICU 71.1 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ae23260..a31d6c3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.9 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -667,6 +667,9 @@ done %changelog +* Tue Aug 02 2022 Frantisek Zatloukal - 5.15.9-5 +- Rebuilt for ICU 71.1 + * Sat Jul 23 2022 Fedora Release Engineering - 5.15.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 6deffa33bdea5a54541f940b8db56e41483d629c Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 29 Aug 2022 21:39:56 +0100 Subject: [PATCH 418/437] feat: upload 5.15.10 sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6f05a86..dbf8d97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /python2.7-2.7.18-19.el9.1.aarch64.rpm /python2.7-2.7.18-19.el9.1.x86_64.rpm /qtwebengine-everywhere-src-5.15.9-clean.tar.xz +/qtwebengine-everywhere-src-5.15.10-clean.tar.xz diff --git a/sources b/sources index cb2ac95..3f8c795 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 -SHA512 (qtwebengine-everywhere-src-5.15.9-clean.tar.xz) = d2c16022e8881994689c09ce3a3ee635730fd1ab1b4dd8b23243cd0a09fc231c8034a77e878634dd49206ca01fa48caccda600c869283855a20c3e6714cd93be +SHA512 (qtwebengine-everywhere-src-5.15.10-clean.tar.xz) = b268d9fe163ebb3a076d7a37d3189532cf9c5bd76d4dd9e20cc37dcc5c4a5c19070dca27b9b404bbe9837e2a1b339ca6cceb29826b8b1650815f9ea64733859a From 56925bd64c8b29a33f06480e8e79e72840c7a584 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 29 Aug 2022 21:41:14 +0100 Subject: [PATCH 419/437] feat: bump spec to 5.15.10 --- qt5-qtwebengine.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index a31d6c3..555dc66 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -61,8 +61,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.9 -Release: 5%{?dist} +Version: 5.15.10 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -667,6 +667,9 @@ done %changelog +* Mon Aug 29 2022 Ankur Sinha - 5.15.10-1 +- Update to 5.15.10 + * Tue Aug 02 2022 Frantisek Zatloukal - 5.15.9-5 - Rebuilt for ICU 71.1 From 5d7fb448f0aa492d706680c48cba94343193c9a0 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 21 Sep 2022 08:23:11 +0200 Subject: [PATCH 420/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 555dc66..fbac2c3 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.10 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -667,6 +667,9 @@ done %changelog +* Wed Sep 21 2022 Jan Grulich - 5.15.10-2 +- Rebuild (qt5) + * Mon Aug 29 2022 Ankur Sinha - 5.15.10-1 - Update to 5.15.10 From 7e4c2d0c4547a46568cd0ade8f9da3ffabb8e5a8 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 31 Oct 2022 14:28:12 +0100 Subject: [PATCH 421/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index fbac2c3..5a40f0b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.10 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -667,6 +667,9 @@ done %changelog +* Mon Oct 31 2022 Jan Grulich - 5.15.10-3 +- Rebuild (qt5) + * Wed Sep 21 2022 Jan Grulich - 5.15.10-2 - Rebuild (qt5) From 63fa67df29b6c5aadc1e18564813a32e55a5e7e7 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 20 Nov 2022 08:16:32 -0500 Subject: [PATCH 422/437] Add patch to backport support for 16k pages on AArch64 This is a backport of the change in Chromium that enables support for running on Linux AArch64 systems that use 16K pages, notably Apple Silicon hardware. This fix exists in Qt6 for QtWebEngine by virtue of being based on a newer Chromium (Chromium >= 102). The patch is originally sourced from the Arch Linux ARM project, tweaked to apply properly on the QtWebEngine sources. Resolves: rhbz#2144200 --- qt5-qtwebengine.spec | 11 +- ...kport-of-16k-page-support-on-aarch64.patch | 345 ++++++++++++++++++ 2 files changed, 355 insertions(+), 1 deletion(-) create mode 100644 qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 5a40f0b..ef5d7d8 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.10 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -113,6 +113,11 @@ Patch26: qtwebengine-everywhere-5.15.5-use-python2.patch # FTBFS TRUE/FALSE undeclared Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch Patch32: qtwebengine-skia-missing-includes.patch +# Fix QtWebEngine on Apple M1 hardware (patch from Arch Linux ARM) +## Cf. https://bugreports.qt.io/browse/QTBUG-108674 +## Cf. https://bugzilla.redhat.com/show_bug.cgi?id=2144200 +## From: https://chromium-review.googlesource.com/c/chromium/src/+/3545665 +Patch33: qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch ## Upstream patches: @@ -442,6 +447,7 @@ popd %patch26 -p1 -b .use-python2 %patch31 -p1 -b .TRUE %patch32 -p1 -b .skia-missing-includes +%patch33 -p1 -b .aarch64-16kb-support # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS @@ -667,6 +673,9 @@ done %changelog +* Sun Nov 20 2022 Neal Gompa - 5.15.10-4 +- Add patch to backport support for 16k pages on AArch64 (#2144200) + * Mon Oct 31 2022 Jan Grulich - 5.15.10-3 - Rebuild (qt5) diff --git a/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch b/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch new file mode 100644 index 0000000..9a16671 --- /dev/null +++ b/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch @@ -0,0 +1,345 @@ +From 0908105c5a7fb5d3f0b644b37811f82934cccf60 Mon Sep 17 00:00:00 2001 +From: Yichao Yu +Date: Tue, 19 Jul 2022 23:58:46 -0400 +Subject: [PATCH] Backport of 16k page support on aarch64 + +--- + .../address_space_randomization.h | 15 ++++++ + .../page_allocator_constants.h | 51 +++++++++++++++++- + .../partition_address_space.cc | 6 +++ + .../partition_allocator/partition_alloc.cc | 2 +- + .../partition_alloc_constants.h | 5 +- + .../address_space_randomization.h | 15 ++++++ + .../partition_allocator/page_allocator.cc | 8 +++ + .../page_allocator_constants.h | 52 ++++++++++++++++++- + .../partition_allocator/partition_alloc.cc | 2 +- + .../partition_alloc_constants.h | 5 +- + 10 files changed, 153 insertions(+), 8 deletions(-) + +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h b/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h +index e77003eab25..31ac05b86f5 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h +@@ -119,6 +119,21 @@ AslrMask(uintptr_t bits) { + return AslrAddress(0x20000000ULL); + } + ++ #elif defined(OS_LINUX) ++ ++ // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on ++ // page size and number of levels of translation pages used. We use ++ // 39-bit as base as all setups should support this, lowered to 38-bit ++ // as ASLROffset() could cause a carry. ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t ++ ASLRMask() { ++ return AslrMask(38); ++ } ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t ++ ASLROffset() { ++ return AslrAddress(0x1000000000ULL); ++ } ++ + #else + + // ARM64 on Linux has 39-bit user space. Use 38 bits since ASLROffset() +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +index c42fe2835ff..dc7486608b9 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +@@ -24,6 +24,31 @@ + // elimination. + #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) + ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++// This should work for all POSIX (if needed), but currently all other ++// supported OS/architecture combinations use either hard-coded values ++// (such as x86) or have means to determine these values without needing ++// atomics (such as macOS on arm64). ++ ++// Page allocator constants are run-time constant ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#include ++#include ++ ++namespace base::internal { ++ ++// Holds the current page size and shift, where size = 1 << shift ++// Use PageAllocationGranularity(), PageAllocationGranularityShift() ++// to initialize and retrieve these values safely. ++struct PageCharacteristics { ++ std::atomic size; ++ std::atomic shift; ++}; ++extern PageCharacteristics page_characteristics; ++ ++} // namespace base::internal ++ + #else + + // When defined, page size constants are fixed at compile time. When not +@@ -36,11 +61,17 @@ + + #endif + ++namespace base { ++// Forward declaration, implementation below ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity(); ++} ++ + namespace { + + #if !defined(OS_APPLE) + +-constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { + #if defined(OS_WIN) || defined(ARCH_CPU_PPC64) + // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page + // sizes. Since 64kB is the de facto standard on the platform and binaries +@@ -49,6 +80,15 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { + return 16; // 64kB + #elif defined(_MIPS_ARCH_LOONGSON) + return 14; // 16kB ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) ++ // page sizes. Retrieve from or initialize cache. ++ int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); ++ if (UNLIKELY(shift == 0)) { ++ shift = __builtin_ctz((int)base::PageAllocationGranularity()); ++ base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); ++ } ++ return shift; + #else + return 12; // 4kB + #endif +@@ -64,6 +104,15 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t + PageAllocationGranularity() { + #if defined(OS_APPLE) + return vm_page_size; ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or ++ // initialize cache. ++ int size = internal::page_characteristics.size.load(std::memory_order_relaxed); ++ if (UNLIKELY(size == 0)) { ++ size = getpagesize(); ++ internal::page_characteristics.size.store(size, std::memory_order_relaxed); ++ } ++ return size; + #else + return 1ULL << PageAllocationGranularityShift(); + #endif +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc +index 03883bcb113..90efc51c838 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc +@@ -75,6 +75,12 @@ void PartitionAddressSpace::UninitForTesting() { + internal::AddressPoolManager::GetInstance()->ResetForTesting(); + } + ++#if defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ ++PageCharacteristics page_characteristics; ++ ++#endif // defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ + #endif // defined(PA_HAS_64_BITS_POINTERS) + + } // namespace internal +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc +index daeb6d5cb17..7c434b5e697 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc +@@ -522,7 +522,7 @@ static size_t PartitionPurgePage(internal::PartitionPage* page, + #if defined(PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR) + constexpr size_t kMaxSlotCount = + (PartitionPageSize() * kMaxPartitionPagesPerSlotSpan) / SystemPageSize(); +-#elif defined(OS_APPLE) ++#elif defined(OS_APPLE) || (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) + // It's better for slot_usage to be stack-allocated and fixed-size, which + // demands that its size be constexpr. On OS_APPLE, PartitionPageSize() is + // always SystemPageSize() << 2, so regardless of what the run time page size +diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +index c8268ec30a0..f03ba1e4ab4 100644 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -57,10 +57,11 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int + PartitionPageShift() { + return 18; // 256 KiB + } +-#elif defined(OS_APPLE) ++#elif defined(OS_APPLE) || \ ++ (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int + PartitionPageShift() { +- return vm_page_shift + 2; ++ return PageAllocationGranularityShift() + 2; + } + #else + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int +diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h +index 28c8271fd68..3957e0cdf76 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h ++++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h +@@ -120,6 +120,21 @@ AslrMask(uintptr_t bits) { + return AslrAddress(0x20000000ULL); + } + ++ #elif defined(OS_LINUX) ++ ++ // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on ++ // page size and number of levels of translation pages used. We use ++ // 39-bit as base as all setups should support this, lowered to 38-bit ++ // as ASLROffset() could cause a carry. ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t ++ ASLRMask() { ++ return AslrMask(38); ++ } ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t ++ ASLROffset() { ++ return AslrAddress(0x1000000000ULL); ++ } ++ + #else + + // ARM64 on Linux has 39-bit user space. Use 38 bits since kASLROffset +diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc +index 91d00d2fbca..597d5f84cb1 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc ++++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc +@@ -255,5 +255,13 @@ uint32_t GetAllocPageErrorCode() { + return s_allocPageErrorCode; + } + ++#if defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ ++namespace internal { ++PageCharacteristics page_characteristics; ++} ++ ++#endif // defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ + } // namespace base + } // namespace pdfium +diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h +index fdc65ac47b7..f826308839d 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h ++++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h +@@ -24,6 +24,31 @@ + // elimination. + #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) + ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++// This should work for all POSIX (if needed), but currently all other ++// supported OS/architecture combinations use either hard-coded values ++// (such as x86) or have means to determine these values without needing ++// atomics (such as macOS on arm64). ++ ++// Page allocator constants are run-time constant ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#include ++#include ++ ++namespace pdfium::base::internal { ++ ++// Holds the current page size and shift, where size = 1 << shift ++// Use PageAllocationGranularity(), PageAllocationGranularityShift() ++// to initialize and retrieve these values safely. ++struct PageCharacteristics { ++ std::atomic size; ++ std::atomic shift; ++}; ++extern PageCharacteristics page_characteristics; ++ ++} // namespace base::internal ++ + #else + + // When defined, page size constants are fixed at compile time. When not +@@ -37,11 +62,18 @@ + #endif + + namespace pdfium { ++ ++namespace base { ++// Forward declaration, implementation below ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity(); ++} ++ + namespace { + + #if !defined(OS_APPLE) + +-constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { + #if defined(OS_WIN) || defined(ARCH_CPU_PPC64) + // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page + // sizes. Since 64kB is the de facto standard on the platform and binaries +@@ -50,6 +82,15 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { + return 16; // 64kB + #elif defined(_MIPS_ARCH_LOONGSON) + return 14; // 16kB ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) ++ // page sizes. Retrieve from or initialize cache. ++ int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); ++ if (UNLIKELY(shift == 0)) { ++ shift = __builtin_ctz((int)base::PageAllocationGranularity()); ++ base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); ++ } ++ return shift; + #else + return 12; // 4kB + #endif +@@ -65,6 +106,15 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t + PageAllocationGranularity() { + #if defined(OS_APPLE) + return vm_page_size; ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or ++ // initialize cache. ++ int size = internal::page_characteristics.size.load(std::memory_order_relaxed); ++ if (UNLIKELY(size == 0)) { ++ size = getpagesize(); ++ internal::page_characteristics.size.store(size, std::memory_order_relaxed); ++ } ++ return size; + #else + return 1ULL << PageAllocationGranularityShift(); + #endif +diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc +index 2e5e87fa7e6..89b9f6217a6 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc ++++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc +@@ -486,7 +486,7 @@ static size_t PartitionPurgePage(internal::PartitionPage* page, bool discard) { + #if defined(PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR) + constexpr size_t kMaxSlotCount = + (PartitionPageSize() * kMaxPartitionPagesPerSlotSpan) / SystemPageSize(); +-#elif defined(OS_APPLE) ++#elif defined(OS_APPLE) || (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) + // It's better for slot_usage to be stack-allocated and fixed-size, which + // demands that its size be constexpr. On OS_APPLE, PartitionPageSize() is + // always SystemPageSize() << 2, so regardless of what the run time page size +diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h +index 71d63ba4146..a6d83626741 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -50,10 +50,11 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int + PartitionPageShift() { + return 18; // 256 KiB + } +-#elif defined(OS_APPLE) ++#elif defined(OS_APPLE) || \ ++ (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int + PartitionPageShift() { +- return vm_page_shift + 2; ++ return PageAllocationGranularityShift() + 2; + } + #else + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int +-- +2.37.0 + From e54439c5b20f63b07fbdc7160d35418667917dd0 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 20 Nov 2022 14:02:29 -0500 Subject: [PATCH 423/437] Refresh QtWebEngine patch for 16k page support from official Chromium commit This refreshes the commit with the upstream Chromium commit data and the upstream Qt references required for upstreaming the change. --- ...kport-of-16k-page-support-on-aarch64.patch | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch b/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch index 9a16671..01ae8f6 100644 --- a/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch +++ b/qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch @@ -1,8 +1,35 @@ -From 0908105c5a7fb5d3f0b644b37811f82934cccf60 Mon Sep 17 00:00:00 2001 -From: Yichao Yu -Date: Tue, 19 Jul 2022 23:58:46 -0400 -Subject: [PATCH] Backport of 16k page support on aarch64 +From 0e827b4f741e57538c24d90b63659dbdb0992cb0 Mon Sep 17 00:00:00 2001 +From: Jorrit Jongma +Date: Tue, 12 Apr 2022 17:09:34 +0000 +Subject: [PATCH] [Backport] [PA] Support 16kb pagesize on Linux+ARM64 +This makes the system pagesize a run-time property. + +ARM64 supports 4kb, 16kb, and 64kb page sizes. Previously, only 4kb +was supported by Chromium. This patch adds 16kb support, as is used +for example by Asahi Linux on M1 Macs. The rare 64kb case is still +not supported due to further changes needed to SlotSpanMetadata. + +The implementation follows the changes made to support run-time page +size on macOS. On macOS, the required constants are conveniently +injected before any code runs, while on Linux a function call is +needed, complicating initialization. + +The new PageCharacteristics structure holds the page size and shift +as std::atomic which are initialized on first use. + +Bug: 1301788 +Change-Id: I8ceead40de53ba7a2ec248bd6ef46f2a521dd29c +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3545665 +Reviewed-by: Benoit Lize +Reviewed-by: Mark Mentovai +Commit-Queue: Mark Mentovai +Cr-Commit-Position: refs/heads/main@{#991588} + +(adapted from commit a704c3a94179e6f3abb28f090d096ced72657d7c) + +Bug-Fedora: 2144200 +Task-number: QTBUG-108674 --- .../address_space_randomization.h | 15 ++++++ .../page_allocator_constants.h | 51 +++++++++++++++++- @@ -341,5 +368,5 @@ index 71d63ba4146..a6d83626741 100644 #else PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int -- -2.37.0 +2.38.1 From ff38c83c179fb409d90186b824362c79f7664ed2 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sat, 31 Dec 2022 04:04:24 +0000 Subject: [PATCH 424/437] Rebuild for ICU 72 --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ef5d7d8..74b489e 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.10 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -673,6 +673,9 @@ done %changelog +* Sat Dec 31 2022 Pete Walter - 5.15.10-5 +- Rebuild for ICU 72 + * Sun Nov 20 2022 Neal Gompa - 5.15.10-4 - Add patch to backport support for 16k pages on AArch64 (#2144200) From e40dff5d8a48efe33f07831d2ace6bf24b8f3f9c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 6 Jan 2023 12:57:49 +0100 Subject: [PATCH 425/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 74b489e..71c8fe2 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.10 -Release: 5%{?dist} +Release: 6%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -673,6 +673,9 @@ done %changelog +* Fri Jan 06 2023 Jan Grulich - 5.15.10-6 +- Rebuild (qt5) + * Sat Dec 31 2022 Pete Walter - 5.15.10-5 - Rebuild for ICU 72 From fcb65f83e3879e04f9274d7c9b8f4526dfeb410c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 16 Jan 2023 10:26:28 +0100 Subject: [PATCH 426/437] 5.15.12 --- .gitignore | 1 + clean_qtwebengine.sh | 2 +- qt5-qtwebengine.spec | 7 +++++-- qtwebengine-release.sh | 2 +- sources | 2 +- sources.keep | 3 +++ 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index dbf8d97..1c7910a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /python2.7-2.7.18-19.el9.1.x86_64.rpm /qtwebengine-everywhere-src-5.15.9-clean.tar.xz /qtwebengine-everywhere-src-5.15.10-clean.tar.xz +/qtwebengine-everywhere-src-5.15.12-clean.tar.xz diff --git a/clean_qtwebengine.sh b/clean_qtwebengine.sh index 17f77fa..7bc05c0 100755 --- a/clean_qtwebengine.sh +++ b/clean_qtwebengine.sh @@ -21,7 +21,7 @@ if [ -z "$1" ] ; then echo "usage: ./clean_qtwebengine.sh VERSION" - echo "e.g.: ./clean_qtwebengine.sh 5.15.8" + echo "e.g.: ./clean_qtwebengine.sh 5.15.12" exit 1 fi diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 71c8fe2..79b2e7f 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -61,8 +61,8 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine -Version: 5.15.10 -Release: 6%{?dist} +Version: 5.15.12 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -673,6 +673,9 @@ done %changelog +* Mon Jan 16 2023 Jan Grulich - 5.15.12-1 +- 5.15.12 + * Fri Jan 06 2023 Jan Grulich - 5.15.10-6 - Rebuild (qt5) diff --git a/qtwebengine-release.sh b/qtwebengine-release.sh index a05c100..a5ce247 100755 --- a/qtwebengine-release.sh +++ b/qtwebengine-release.sh @@ -1,6 +1,6 @@ #!/bin/sh set -x -VERSION=5.15.8 +VERSION=5.15.12 CHROMIUMHASH=`wget https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/3rdparty?h=$VERSION -q --content-on-error -O - | grep "Bad object name: " | sed 's/^.*Bad object name: \([0-9a-f]\{40\}\).*$/\1/g'` rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION wget https://github.com/qt/qtwebengine/archive/$VERSION.tar.gz -O qtwebengine-$VERSION.tar.gz || exit $? diff --git a/sources b/sources index 3f8c795..9d4d0cb 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 -SHA512 (qtwebengine-everywhere-src-5.15.10-clean.tar.xz) = b268d9fe163ebb3a076d7a37d3189532cf9c5bd76d4dd9e20cc37dcc5c4a5c19070dca27b9b404bbe9837e2a1b339ca6cceb29826b8b1650815f9ea64733859a +SHA512 (qtwebengine-everywhere-src-5.15.12-clean.tar.xz) = b6c5e31de17e3a443e1cd620f77b9fba7dc638232de8703b481f2b1166623a36c82fec4e13ef29064602e1db607d562056f64a83b1e5c036a1dc59b7890219ee diff --git a/sources.keep b/sources.keep index adf9556..a90d5b7 100644 --- a/sources.keep +++ b/sources.keep @@ -1 +1,4 @@ SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be +SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 +SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 +SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 From 42a405105cf98b1319b297c3461191a1d6e64ae3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 19:08:23 +0000 Subject: [PATCH 427/437] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 79b2e7f..f405978 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.12 -Release: 1%{?dist} +Release: 2%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -673,6 +673,9 @@ done %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 5.15.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Jan 16 2023 Jan Grulich - 5.15.12-1 - 5.15.12 From 14bbdcc0567223a4c96421ab2dfe2a668831ec98 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 27 Jan 2023 16:33:29 +0100 Subject: [PATCH 428/437] Fix build against GCC13 --- qt5-qtwebengine.spec | 2 + qtwebengine-fix-build.patch | 460 ++++++++++++++++++++++++++++++++++++ 2 files changed, 462 insertions(+) create mode 100644 qtwebengine-fix-build.patch diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index f405978..ff8e84b 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -118,6 +118,7 @@ Patch32: qtwebengine-skia-missing-includes.patch ## Cf. https://bugzilla.redhat.com/show_bug.cgi?id=2144200 ## From: https://chromium-review.googlesource.com/c/chromium/src/+/3545665 Patch33: qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch +Patch34: qtwebengine-fix-build.patch ## Upstream patches: @@ -448,6 +449,7 @@ popd %patch31 -p1 -b .TRUE %patch32 -p1 -b .skia-missing-includes %patch33 -p1 -b .aarch64-16kb-support +%patch34 -p1 -b .fix-build # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS diff --git a/qtwebengine-fix-build.patch b/qtwebengine-fix-build.patch new file mode 100644 index 0000000..1f199e8 --- /dev/null +++ b/qtwebengine-fix-build.patch @@ -0,0 +1,460 @@ +diff --git a/src/3rdparty/chromium/base/debug/profiler.h b/src/3rdparty/chromium/base/debug/profiler.h +index 1229e0623..c7ed55e70 100644 +--- a/src/3rdparty/chromium/base/debug/profiler.h ++++ b/src/3rdparty/chromium/base/debug/profiler.h +@@ -5,6 +5,7 @@ + #ifndef BASE_DEBUG_PROFILER_H_ + #define BASE_DEBUG_PROFILER_H_ + ++#include + #include + + #include +diff --git a/src/3rdparty/chromium/cc/trees/target_property.cc b/src/3rdparty/chromium/cc/trees/target_property.cc +index ed2062557..036c870b2 100644 +--- a/src/3rdparty/chromium/cc/trees/target_property.cc ++++ b/src/3rdparty/chromium/cc/trees/target_property.cc +@@ -4,6 +4,10 @@ + + #include "cc/trees/target_property.h" + ++#include ++ ++#include ++ + namespace cc { + + static_assert(TargetProperty::LAST_TARGET_PROPERTY < kMaxTargetPropertyIndex, +diff --git a/src/3rdparty/chromium/content/public/browser/browsing_data_remover_delegate.h b/src/3rdparty/chromium/content/public/browser/browsing_data_remover_delegate.h +index 3896bc6e7..b93843dc1 100644 +--- a/src/3rdparty/chromium/content/public/browser/browsing_data_remover_delegate.h ++++ b/src/3rdparty/chromium/content/public/browser/browsing_data_remover_delegate.h +@@ -5,6 +5,7 @@ + #ifndef CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ + #define CONTENT_PUBLIC_BROWSER_BROWSING_DATA_REMOVER_DELEGATE_H_ + ++#include + #include + #include + #include "base/callback_forward.h" +diff --git a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc +index 213b6301c..d77be3f14 100644 +--- a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc ++++ b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc +@@ -4,6 +4,8 @@ + + #include "device/base/synchronization/one_writer_seqlock.h" + ++#include ++ + namespace device { + + OneWriterSeqLock::OneWriterSeqLock() : sequence_(0) {} +diff --git a/src/3rdparty/chromium/device/bluetooth/public/cpp/bluetooth_uuid.h b/src/3rdparty/chromium/device/bluetooth/public/cpp/bluetooth_uuid.h +index 0c27ae710..b64f82f75 100644 +--- a/src/3rdparty/chromium/device/bluetooth/public/cpp/bluetooth_uuid.h ++++ b/src/3rdparty/chromium/device/bluetooth/public/cpp/bluetooth_uuid.h +@@ -5,6 +5,7 @@ + #ifndef DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_ + #define DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/extensions/common/constants.h b/src/3rdparty/chromium/extensions/common/constants.h +index 747906a06..fec888a11 100644 +--- a/src/3rdparty/chromium/extensions/common/constants.h ++++ b/src/3rdparty/chromium/extensions/common/constants.h +@@ -11,6 +11,8 @@ + #include "components/version_info/channel.h" + #include "ui/base/layout.h" + ++#include ++ + namespace extensions { + + // Scheme we serve extension content from. +diff --git a/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_enums.h b/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_enums.h +index 83615b30c..8fa9fb1f6 100644 +--- a/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_enums.h ++++ b/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_enums.h +@@ -5,6 +5,8 @@ + #ifndef GPU_COMMAND_BUFFER_COMMON_WEBGPU_CMD_ENUMS_H_ + #define GPU_COMMAND_BUFFER_COMMON_WEBGPU_CMD_ENUMS_H_ + ++#include ++ + namespace gpu { + namespace webgpu { + +diff --git a/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_format.h b/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_format.h +index 286a41c43..25d2413df 100644 +--- a/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_format.h ++++ b/src/3rdparty/chromium/gpu/command_buffer/common/webgpu_cmd_format.h +@@ -5,6 +5,7 @@ + #ifndef GPU_COMMAND_BUFFER_COMMON_WEBGPU_CMD_FORMAT_H_ + #define GPU_COMMAND_BUFFER_COMMON_WEBGPU_CMD_FORMAT_H_ + ++#include + #include + + #include "gpu/command_buffer/common/gl2_types.h" +diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/shared_context_state.h b/src/3rdparty/chromium/gpu/command_buffer/service/shared_context_state.h +index bcba574d5..f4916bed7 100644 +--- a/src/3rdparty/chromium/gpu/command_buffer/service/shared_context_state.h ++++ b/src/3rdparty/chromium/gpu/command_buffer/service/shared_context_state.h +@@ -5,6 +5,7 @@ + #ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_CONTEXT_STATE_H_ + #define GPU_COMMAND_BUFFER_SERVICE_SHARED_CONTEXT_STATE_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/gpu/config/device_perf_info.h b/src/3rdparty/chromium/gpu/config/device_perf_info.h +index e33874ba3..824a207a2 100644 +--- a/src/3rdparty/chromium/gpu/config/device_perf_info.h ++++ b/src/3rdparty/chromium/gpu/config/device_perf_info.h +@@ -5,6 +5,7 @@ + #ifndef GPU_CONFIG_DEVICE_PERF_INFO_H_ + #define GPU_CONFIG_DEVICE_PERF_INFO_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/gpu/config/gpu_feature_info.h b/src/3rdparty/chromium/gpu/config/gpu_feature_info.h +index 027f1a5af..70759b2ae 100644 +--- a/src/3rdparty/chromium/gpu/config/gpu_feature_info.h ++++ b/src/3rdparty/chromium/gpu/config/gpu_feature_info.h +@@ -5,6 +5,7 @@ + #ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_ + #define GPU_CONFIG_GPU_FEATURE_INFO_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/gpu/config/gpu_preferences.h b/src/3rdparty/chromium/gpu/config/gpu_preferences.h +index 6b8587151..e2bc6b90f 100644 +--- a/src/3rdparty/chromium/gpu/config/gpu_preferences.h ++++ b/src/3rdparty/chromium/gpu/config/gpu_preferences.h +@@ -5,6 +5,7 @@ + #ifndef GPU_CONFIG_GPU_PREFERENCES_H_ + #define GPU_CONFIG_GPU_PREFERENCES_H_ + ++#include + #include + #include + #include +diff --git a/src/3rdparty/chromium/gpu/config/gpu_util.h b/src/3rdparty/chromium/gpu/config/gpu_util.h +index b4d6dfb30..0dc300a9f 100644 +--- a/src/3rdparty/chromium/gpu/config/gpu_util.h ++++ b/src/3rdparty/chromium/gpu/config/gpu_util.h +@@ -5,6 +5,8 @@ + #ifndef GPU_CONFIG_GPU_UTIL_H_ + #define GPU_CONFIG_GPU_UTIL_H_ + ++#include ++ + #include "build/build_config.h" + #include "gpu/config/gpu_feature_info.h" + #include "gpu/gpu_export.h" +diff --git a/src/3rdparty/chromium/net/base/parse_number.h b/src/3rdparty/chromium/net/base/parse_number.h +index 0b4cfc1f8..55e9bfa8e 100644 +--- a/src/3rdparty/chromium/net/base/parse_number.h ++++ b/src/3rdparty/chromium/net/base/parse_number.h +@@ -9,6 +9,8 @@ + #include "base/strings/string_piece.h" + #include "net/base/net_export.h" + ++#include ++ + // This file contains utility functions for parsing numbers, in the context of + // network protocols. + // +diff --git a/src/3rdparty/chromium/net/cookies/cookie_inclusion_status.h b/src/3rdparty/chromium/net/cookies/cookie_inclusion_status.h +index 9e506b555..cfb03bfe2 100644 +--- a/src/3rdparty/chromium/net/cookies/cookie_inclusion_status.h ++++ b/src/3rdparty/chromium/net/cookies/cookie_inclusion_status.h +@@ -5,6 +5,7 @@ + #ifndef NET_COOKIES_COOKIE_INCLUSION_STATUS_H_ + #define NET_COOKIES_COOKIE_INCLUSION_STATUS_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/pdf/document_attachment_info.h b/src/3rdparty/chromium/pdf/document_attachment_info.h +index 254398e62..22038e755 100644 +--- a/src/3rdparty/chromium/pdf/document_attachment_info.h ++++ b/src/3rdparty/chromium/pdf/document_attachment_info.h +@@ -7,6 +7,8 @@ + + #include "base/strings/string16.h" + ++#include ++ + namespace chrome_pdf { + + struct DocumentAttachmentInfo { +diff --git a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h +index ac0b31a75..5d1c421d0 100644 +--- a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h ++++ b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h +@@ -38,6 +38,10 @@ namespace pp { + /// As a further optimization, we can add support for this later. + class ThreadSafeThreadTraits { + public: ++ ++ typedef pp::Lock Lock; ++ typedef pp::AutoLock AutoLock; ++ + class RefCount { + public: + /// Default constructor. In debug mode, this checks that the object is being +@@ -67,8 +71,6 @@ class ThreadSafeThreadTraits { + int32_t ref_; + }; + +- typedef pp::Lock Lock; +- typedef pp::AutoLock AutoLock; + }; + + /// The non-thread-safe version of thread traits. Using this class as the +diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +index a9b9e137d..6f1122c42 100644 +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +@@ -19,6 +19,7 @@ + #include + + #include ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h b/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h +index 9911546b9..48b660db3 100644 +--- a/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h ++++ b/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h +@@ -12,6 +12,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h b/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h +index f669d7df3..8f391fdd7 100644 +--- a/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h ++++ b/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h +@@ -15,6 +15,7 @@ + # include "absl/container/flat_hash_map.h" + #endif // defined(ANGLE_USE_ABSEIL) + ++#include + #include + #include + #include +diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/minidump_descriptor.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/minidump_descriptor.h +index c7e4f2b37..e491a1f68 100644 +--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/minidump_descriptor.h ++++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/minidump_descriptor.h +@@ -33,6 +33,7 @@ + #include + #include + ++#include + #include + + #include "client/linux/handler/microdump_extra_info.h" +diff --git a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc +index 8c8f4fe08..931782214 100644 +--- a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc ++++ b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h b/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h +index d2731dac7..46bc87ef9 100644 +--- a/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h ++++ b/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h +@@ -5,6 +5,8 @@ + #ifndef CONSTANTS_ANNOTATION_FLAGS_H_ + #define CONSTANTS_ANNOTATION_FLAGS_H_ + ++#include ++ + namespace pdfium { + namespace annotation_flags { + +diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/uuid.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/uuid.h +index 1b4c53815..472042fab 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/uuid.h ++++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/uuid.h +@@ -18,6 +18,7 @@ + #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ + + #include ++#include + #include + + #include "perfetto/ext/base/optional.h" +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h +index 74cc9583c..2a00b3b94 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h +@@ -21,6 +21,8 @@ + #include "perfetto/trace_processor/status.h" + #include "src/trace_processor/trace_blob_view.h" + ++#include ++ + namespace perfetto { + + namespace protos { +diff --git a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp +index 503ed08ff..59c755b84 100644 +--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp ++++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp +@@ -12,6 +12,10 @@ + #include + #include + ++#include ++#include ++#include ++ + static constexpr const char* gColorNames[] = { + "aliceblue", + "antiquewhite", +diff --git a/src/3rdparty/chromium/third_party/webrtc/call/rtp_demuxer.h b/src/3rdparty/chromium/third_party/webrtc/call/rtp_demuxer.h +index 3aa7e9df2..3cfc8d6a3 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/call/rtp_demuxer.h ++++ b/src/3rdparty/chromium/third_party/webrtc/call/rtp_demuxer.h +@@ -11,6 +11,7 @@ + #ifndef CALL_RTP_DEMUXER_H_ + #define CALL_RTP_DEMUXER_H_ + ++#include + #include + #include + #include +diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/base64/base64.h b/src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/base64/base64.h +index 7a936f23e..21951a1d2 100644 +--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/base64/base64.h ++++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/third_party/base64/base64.h +@@ -12,6 +12,7 @@ + #ifndef RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ + #define RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/ui/events/gesture_event_details.h b/src/3rdparty/chromium/ui/events/gesture_event_details.h +index d20416738..8dadab3d0 100644 +--- a/src/3rdparty/chromium/ui/events/gesture_event_details.h ++++ b/src/3rdparty/chromium/ui/events/gesture_event_details.h +@@ -5,6 +5,7 @@ + #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ + #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ + ++#include + #include + + #include "base/check_op.h" +diff --git a/src/3rdparty/chromium/ui/events/types/scroll_types.h b/src/3rdparty/chromium/ui/events/types/scroll_types.h +index 7ff15f0fc..136cebc09 100644 +--- a/src/3rdparty/chromium/ui/events/types/scroll_types.h ++++ b/src/3rdparty/chromium/ui/events/types/scroll_types.h +@@ -5,6 +5,8 @@ + #ifndef UI_EVENTS_TYPES_SCROLL_TYPES_H_ + #define UI_EVENTS_TYPES_SCROLL_TYPES_H_ + ++#include ++ + namespace ui { + + enum class ScrollGranularity : uint8_t { +diff --git a/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc b/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc +index 1d5527691..ef9d5ce13 100644 +--- a/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc ++++ b/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc +@@ -4,6 +4,7 @@ + + #include "ui/gl/gl_surface_glx.h" + ++#include + #include + + #include "base/bind.h" +diff --git a/src/3rdparty/chromium/ui/gl/gl_surface_glx.h b/src/3rdparty/chromium/ui/gl/gl_surface_glx.h +index ab612cd87..2178d8514 100644 +--- a/src/3rdparty/chromium/ui/gl/gl_surface_glx.h ++++ b/src/3rdparty/chromium/ui/gl/gl_surface_glx.h +@@ -5,6 +5,7 @@ + #ifndef UI_GL_GL_SURFACE_GLX_H_ + #define UI_GL_GL_SURFACE_GLX_H_ + ++#include + #include + + #include +diff --git a/src/3rdparty/chromium/v8/src/base/logging.h b/src/3rdparty/chromium/v8/src/base/logging.h +index fe39f9882..dbe130581 100644 +--- a/src/3rdparty/chromium/v8/src/base/logging.h ++++ b/src/3rdparty/chromium/v8/src/base/logging.h +@@ -5,6 +5,7 @@ + #ifndef V8_BASE_LOGGING_H_ + #define V8_BASE_LOGGING_H_ + ++#include + #include + #include + #include +diff --git a/src/3rdparty/chromium/v8/src/base/macros.h b/src/3rdparty/chromium/v8/src/base/macros.h +index 37cab78f0..4220eacbb 100644 +--- a/src/3rdparty/chromium/v8/src/base/macros.h ++++ b/src/3rdparty/chromium/v8/src/base/macros.h +@@ -5,6 +5,7 @@ + #ifndef V8_BASE_MACROS_H_ + #define V8_BASE_MACROS_H_ + ++#include + #include + #include + +diff --git a/src/3rdparty/chromium/v8/src/inspector/v8-string-conversions.h b/src/3rdparty/chromium/v8/src/inspector/v8-string-conversions.h +index c1d69c18f..eb33c6816 100644 +--- a/src/3rdparty/chromium/v8/src/inspector/v8-string-conversions.h ++++ b/src/3rdparty/chromium/v8/src/inspector/v8-string-conversions.h +@@ -5,6 +5,7 @@ + #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + ++#include + #include + + // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may +diff --git a/src/core/browsing_data_remover_delegate_qt.h b/src/core/browsing_data_remover_delegate_qt.h +index a10409f39..b9f5e59d8 100644 +--- a/src/core/browsing_data_remover_delegate_qt.h ++++ b/src/core/browsing_data_remover_delegate_qt.h +@@ -42,6 +42,8 @@ + + #include "content/public/browser/browsing_data_remover_delegate.h" + ++#include ++ + namespace QtWebEngineCore { + + class BrowsingDataRemoverDelegateQt : public content::BrowsingDataRemoverDelegate { From 9a37c86a90d1d3c0684aa1428657fc7ed22390ac Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 31 Jan 2023 09:09:58 +0100 Subject: [PATCH 429/437] Fix wrongly generated files that don't build with GCC13 --- qtwebengine-fix-build.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qtwebengine-fix-build.patch b/qtwebengine-fix-build.patch index 1f199e8..c433cd6 100644 --- a/qtwebengine-fix-build.patch +++ b/qtwebengine-fix-build.patch @@ -458,3 +458,16 @@ index a10409f39..b9f5e59d8 100644 namespace QtWebEngineCore { class BrowsingDataRemoverDelegateQt : public content::BrowsingDataRemoverDelegate { +diff --git a/src/3rdparty/chromium/third_party/xcbproto/src/src/present.xml b/src/3rdparty/chromium/third_party/xcbproto/src/src/present.xml +index fb06e73..f20c11e 100644 +--- a/src/3rdparty/chromium/third_party/xcbproto/src/src/present.xml ++++ b/src/3rdparty/chromium/third_party/xcbproto/src/src/present.xml +@@ -89,7 +89,7 @@ OF THIS SOFTWARE. + + + +- ++ + + + From 5dc49e01024ab2adae3705d14a9be76d706b7e52 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 31 Jan 2023 09:49:08 +0100 Subject: [PATCH 430/437] Last missing fix for GCC 13 --- qtwebengine-fix-build.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qtwebengine-fix-build.patch b/qtwebengine-fix-build.patch index c433cd6..7cec0af 100644 --- a/qtwebengine-fix-build.patch +++ b/qtwebengine-fix-build.patch @@ -471,3 +471,15 @@ index fb06e73..f20c11e 100644 +diff --git a/src/3rdparty/chromium/extensions/browser/api/audio/audio_device_id_calculator.h b/src/3rdparty/chromium/extensions/browser/api/audio/audio_device_id_calculator.h +index 9d2858177..d263f6703 100644 +--- a/src/3rdparty/chromium/extensions/browser/api/audio/audio_device_id_calculator.h ++++ b/src/3rdparty/chromium/extensions/browser/api/audio/audio_device_id_calculator.h +@@ -5,6 +5,7 @@ + #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_DEVICE_ID_CALCULATOR_H_ + #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_DEVICE_ID_CALCULATOR_H_ + ++#include + #include + #include + From 2483bdc6b07d48cde98699547efc808046174160 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 15 Feb 2023 17:20:10 -0500 Subject: [PATCH 431/437] rebuild for libvpx --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index ff8e84b..876d346 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.12 -Release: 2%{?dist} +Release: 3%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -675,6 +675,9 @@ done %changelog +* Wed Feb 15 2023 Tom Callaway - 5.15.12-3 +- rebuild for libvpx + * Fri Jan 20 2023 Fedora Release Engineering - 5.15.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 628adfbb0613c892b91689d0db85de631d04fdae Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 23 Feb 2023 16:25:02 +0100 Subject: [PATCH 432/437] Port bundled libsync to C99 (#2155642) Related to: --- qt5-qtwebengine-c99.patch | 45 +++++++++++++++++++++++++++++++++++++++ qt5-qtwebengine.spec | 8 ++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 qt5-qtwebengine-c99.patch diff --git a/qt5-qtwebengine-c99.patch b/qt5-qtwebengine-c99.patch new file mode 100644 index 0000000..bf34288 --- /dev/null +++ b/qt5-qtwebengine-c99.patch @@ -0,0 +1,45 @@ +Avoid calls to the undeclared strlcpy function in libsync. This +prevents a build failure with future compilers. + +Submitted upstream: + +diff -up qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn.c99 qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn +--- qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn.c99 2023-02-23 10:54:15.909380015 +0100 ++++ qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn 2023-02-23 11:00:32.019601795 +0100 +@@ -21,24 +21,15 @@ if (!use_system_libsync) { + ] + } + +- config("libsync_private_config") { +- # To suppress the warning caused by strlcpy. +- cflags = [ "-Wno-implicit-function-declaration" ] +- } +- + source_set("libsync") { + sources = [ + "src/include/sync/sync.h", + "src/sw_sync.h", + "src/sync.c", +- "strlcpy.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] +- configs += [ +- "//build/config/compiler:no_chromium_code", +- ":libsync_private_config", +- ] ++ configs += [ "//build/config/compiler:no_chromium_code" ] + + public_configs = [ ":libsync_config" ] + } +diff -up qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c.c99 qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c +--- qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c.c99 2023-02-23 10:54:30.650231820 +0100 ++++ qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c 2023-02-23 10:54:50.116036131 +0100 +@@ -29,6 +29,7 @@ + + #include + ++#include "../strlcpy.c" + + struct sw_sync_create_fence_data { + __u32 value; diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 876d346..0d24632 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.12 -Release: 3%{?dist} +Release: 4%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -119,6 +119,7 @@ Patch32: qtwebengine-skia-missing-includes.patch ## From: https://chromium-review.googlesource.com/c/chromium/src/+/3545665 Patch33: qtwebengine-5.15-Backport-of-16k-page-support-on-aarch64.patch Patch34: qtwebengine-fix-build.patch +Patch35: qt5-qtwebengine-c99.patch ## Upstream patches: @@ -451,6 +452,8 @@ popd %patch33 -p1 -b .aarch64-16kb-support %patch34 -p1 -b .fix-build +%patch35 -p1 -b .c99 + # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \ @@ -675,6 +678,9 @@ done %changelog +* Thu Feb 23 2023 Florian Weimer - 5.15.12-4 +- Port bundled libsync to C99 (#2155642) + * Wed Feb 15 2023 Tom Callaway - 5.15.12-3 - rebuild for libvpx From 0103b75b86dec0cbe4b3143b9dba72e42ef7c32b Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 11 Apr 2023 18:11:40 +0200 Subject: [PATCH 433/437] Rebuild (qt5) --- qt5-qtwebengine.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 0d24632..40105a1 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -62,7 +62,7 @@ Summary: Qt5 - QtWebEngine components Name: qt5-qtwebengine Version: 5.15.12 -Release: 4%{?dist} +Release: 5%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -678,6 +678,9 @@ done %changelog +* Tue Apr 11 2023 Jan Grulich - 5.15.12-5 +- Rebuild (qt5) + * Thu Feb 23 2023 Florian Weimer - 5.15.12-4 - Port bundled libsync to C99 (#2155642) From 1bfdeddb39db59928249a422579926db3bfc804a Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 5 May 2023 14:32:19 -0700 Subject: [PATCH 434/437] Use system libraries on rhel9+ --- qt5-qtwebengine.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 40105a1..8024073 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -9,7 +9,7 @@ # where qt5-qttools (qt5-doctools) builds are not yet available %global docs 0 -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?epel} >= 9 # need libvpx >= 1.8.0 (need commit 297dfd869609d7c3c5cd5faa3ebc7b43a394434e) %global use_system_libvpx 1 # For screen sharing on Wayland, currently Fedora only thing - no epel @@ -19,14 +19,10 @@ # need libwebp >= 0.6.0 %global use_system_libwebp 1 %global use_system_jsoncpp 1 -%if 0%{?rhel} && 0%{?rhel} == 9 -%global use_system_re2 0 -%else %global use_system_re2 1 %endif -%endif -%if 0%{?fedora} > 32 +%if 0%{?fedora} > 32 || 0%{?epel} >= 9 # need libicu >= 65, only currently available on f33+ %global use_system_libicu 1 %endif From cf9e5e80d95c0e3249339845260ee741f118df7d Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 5 May 2023 14:34:22 -0700 Subject: [PATCH 435/437] Fix typo --- qt5-qtwebengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 8024073..273fe9a 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -291,7 +291,7 @@ Provides: bundled(libsrtp) = 2.2.0 Provides: bundled(libvpx) = 1.8.2 %endif %if !0%{?use_system_libwebp} -Provides: bundled(libwebp) = 1.1.0-28-g55a080e5 +Provides: bundled(libwebp) = 1.1.0-28.g55a080e5 %endif # bundled as "libxml" # see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h From 19481f21c145df6418795ff3943b626378d6de03 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 8 May 2023 11:27:32 -0700 Subject: [PATCH 436/437] fix gcc-toolset-12-binutils-gold --- qt5-qtwebengine.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 273fe9a..8968d58 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -124,6 +124,9 @@ Patch35: qt5-qtwebengine-c99.patch ExclusiveArch: %{qt5_qtwebengine_arches} %endif +# Build on CentOS Stream 9 pulls in old gcc-toolset-12-binutils-gold +# Remove this when version 2.38-14 is no longer pulled in. +BuildRequires: gcc-toolset-12-binutils-gold >= 2.38-16 BuildRequires: make BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-private-devel From 03b4262649463978590f75633f3f11102f88b235 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 31 Oct 2023 00:11:59 +0300 Subject: [PATCH 437/437] Remove unnecessary files --- sources | 5 ----- sources.keep | 4 ---- 2 files changed, 9 deletions(-) delete mode 100644 sources delete mode 100644 sources.keep diff --git a/sources b/sources deleted file mode 100644 index 9d4d0cb..0000000 --- a/sources +++ /dev/null @@ -1,5 +0,0 @@ -SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 -SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 -SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9 -SHA512 (qtwebengine-everywhere-src-5.15.12-clean.tar.xz) = b6c5e31de17e3a443e1cd620f77b9fba7dc638232de8703b481f2b1166623a36c82fec4e13ef29064602e1db607d562056f64a83b1e5c036a1dc59b7890219ee diff --git a/sources.keep b/sources.keep deleted file mode 100644 index a90d5b7..0000000 --- a/sources.keep +++ /dev/null @@ -1,4 +0,0 @@ -SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be -SHA512 (python2.7-2.7.18-19.el9.1.src.rpm) = e6d738b2880b833ea80aec709f7bcf20dac2e8c59d45f1627f61245b3aa9be845888152232e9f08145723514eb29aeada3d5d99641aabe9ec9af2a5c15f32777 -SHA512 (python2.7-2.7.18-19.el9.1.aarch64.rpm) = 66c8487a3323bb854ff79242287ae5d290315609b4f79fb985626e52d96286d6dfd2da9a8257e23be036b72adabbbec08d53db339935d5d6e8b6018417bbc769 -SHA512 (python2.7-2.7.18-19.el9.1.x86_64.rpm) = 55f03b17f649a2da9edae67c1ca7c84738a023fc3ab2e7d6060db8a2b8ddf20099147533f3d50ce3dfafec5ca988f75ff229e67d331bcb669c879802ab6555a9